Chris Lattner
0e352963fd
Emit series of conditionals with &&, emitting stuff like this:
...
if (N1.getOpcode() == ISD::LOAD &&
N1.hasOneUse() &&
!CodeGenMap.count(N1.getValue(0)) &&
!CodeGenMap.count(N1.getValue(1))) {
instead of this:
if (N1.getOpcode() == ISD::LOAD) {
if (N1.hasOneUse()) {
if (!CodeGenMap.count(N1.getValue(0))) {
if (!CodeGenMap.count(N1.getValue(1))) {
llvm-svn: 25763
2006-01-29 04:41:05 +00:00
Chris Lattner
7c0149d1d6
Factor matching code that is common between patterns. This works around
...
GCC not jump-threading across this common code, and produces far nicer
output.
llvm-svn: 25762
2006-01-29 04:25:26 +00:00
Chris Lattner
1b09c6ba87
cmovle != cmovlt
...
llvm-svn: 25761
2006-01-29 03:47:30 +00:00
Jeff Cohen
4ab39e43e8
Fix typo.
...
llvm-svn: 25760
2006-01-29 03:45:35 +00:00
Chris Lattner
d3a63de91e
Split out code generation from analysis from emission
...
llvm-svn: 25759
2006-01-29 02:57:39 +00:00
Chris Lattner
afe9baeb69
move some code around, no change in the generated code
...
llvm-svn: 25758
2006-01-29 02:43:35 +00:00
Chris Lattner
5255c6c627
now that we have control over emission of the code, emit the code using nested
...
"if" statements (indenting it appropriately, of course) instead of using goto's.
This inverts the logic for all of the if statements, which makes things simpler
to understand in addition to making the generated code easier to read.
llvm-svn: 25757
2006-01-28 20:43:52 +00:00
Chris Lattner
4c4da201bf
Change PatternCodeEmitter to emit code into a buffer instead of emitting it
...
directly to the output file. This makes things simple because the code doesn't
have to worry about indentation or the case when there is no goto. It also
allows us to indent the code better without touching everything :)
llvm-svn: 25756
2006-01-28 20:31:24 +00:00
Jeff Cohen
8643ea67b1
Flesh out AMD family/models.
...
llvm-svn: 25755
2006-01-28 20:30:18 +00:00
Jeff Cohen
58ca0be9af
Correctly determine CPU vendor.
...
llvm-svn: 25754
2006-01-28 19:48:34 +00:00
Reid Spencer
4bfd3b40b0
Make long warnings wrap and have less indent so other portions of the page
...
are not skewed out of view.
llvm-svn: 25753
2006-01-28 19:44:48 +00:00
Chris Lattner
a7d6bbff00
Fit to 80 columns, no functionality change
...
llvm-svn: 25752
2006-01-28 19:06:51 +00:00
Jeff Cohen
71287085a1
Use union instead of reinterpret_cast.
...
llvm-svn: 25751
2006-01-28 18:47:32 +00:00
Jeff Cohen
b5de47cd9a
Fix recognition of Intel CPUs.
...
llvm-svn: 25750
2006-01-28 18:38:20 +00:00
Chris Lattner
b3ab2d3a42
Is64Bit reflects the capability of the chip, not an aspect of the target os
...
llvm-svn: 25749
2006-01-28 18:23:48 +00:00
Chris Lattner
be08957dc5
Fix a bunch of JIT failures with the new isel
...
llvm-svn: 25748
2006-01-28 18:19:37 +00:00
Jeff Cohen
e128d5f724
Improve X86 subtarget support for Windows and AMD.
...
llvm-svn: 25747
2006-01-28 18:09:06 +00:00
Chris Lattner
d02b05473c
Use the new "UpdateNodeOperands" method to simplify LegalizeDAG and make it
...
faster. This cuts about 120 lines of code out of the legalizer (mostly code
checking to see if operands have changed).
It also fixes an ugly performance issue, where the legalizer cloned the entire
graph after any change. Now the "UpdateNodeOperands" method gives it a chance
to reuse nodes if the operands of a node change but not its opcode or valuetypes.
This speeds up instruction selection time on kimwitu++ by about 8.2% with a
release build.
llvm-svn: 25746
2006-01-28 10:58:55 +00:00
Chris Lattner
ccd2a20c4b
silence a warning
...
llvm-svn: 25745
2006-01-28 10:34:47 +00:00
Chris Lattner
580b12ad34
add another method variant
...
llvm-svn: 25744
2006-01-28 10:09:25 +00:00
Chris Lattner
64f934f07f
add another variant
...
llvm-svn: 25743
2006-01-28 10:08:58 +00:00
Chris Lattner
f34156e8cb
add some methods for updating nodes
...
llvm-svn: 25742
2006-01-28 09:32:45 +00:00
Chris Lattner
009c53f688
Add some methods
...
llvm-svn: 25741
2006-01-28 09:32:01 +00:00
Chris Lattner
eb63751499
minor tweaks
...
llvm-svn: 25740
2006-01-28 08:31:04 +00:00
Chris Lattner
689bdcc9cf
move a bunch of code, no other change.
...
llvm-svn: 25739
2006-01-28 08:25:58 +00:00
Chris Lattner
fcfda5a174
remove a couple more now-extraneous legalizeop's
...
llvm-svn: 25738
2006-01-28 08:22:56 +00:00
Chris Lattner
364b89a784
fix a bug
...
llvm-svn: 25737
2006-01-28 07:42:08 +00:00
Chris Lattner
9dcce6da8e
Several major changes:
...
1. Pull out the expand cases for BSWAP and CT* into a separate function,
reducing the size of LegalizeOp.
2. Fix a bug where expand(bswap i64) was wrong when i64 is legal.
3. Changed LegalizeOp/PromoteOp so that the legalizer never needs to be
iterative. It now operates in a single pass over the nodes.
4. Simplify a LOT of code, with a net reduction of ~280 lines.
llvm-svn: 25736
2006-01-28 07:39:30 +00:00
Chris Lattner
30432e07f0
Fix a bug in my elimination of ISD::CALL this morning. PPC now has to
...
provide the expansion for i64 calls itself
llvm-svn: 25735
2006-01-28 07:33:03 +00:00
Chris Lattner
dc8bbb6527
make this work on non-native hosts
...
llvm-svn: 25734
2006-01-28 06:05:41 +00:00
Chris Lattner
0c7b4666a3
add a note about how we should implement this FIXME from the legalizer:
...
// FIXME: revisit this when we have some kind of mechanism by which targets
// can decided legality of vector constants, of which there may be very
// many.
llvm-svn: 25733
2006-01-28 05:40:47 +00:00
Chris Lattner
fd4a7f76a9
Eliminate the need for ExpandOp to set 'needsanotheriteration', as it already
...
relegalizes the stuff it returns.
Add the ability to custom expand ADD/SUB, so that targets don't need to deal
with ADD_PARTS/SUB_PARTS if they don't want.
Fix some obscure potential bugs and simplify code.
llvm-svn: 25732
2006-01-28 05:07:51 +00:00
Chris Lattner
10f677508f
Instead of making callers of ExpandLibCall legalize the result, make
...
ExpandLibCall do it itself.
llvm-svn: 25731
2006-01-28 04:28:26 +00:00
Chris Lattner
a593acfe66
Eliminate the need to do another iteration of the legalizer after inserting
...
a libcall.
llvm-svn: 25730
2006-01-28 04:23:12 +00:00
Chris Lattner
b256104073
remove this method I just added, now is not the time.
...
llvm-svn: 25729
2006-01-28 03:43:33 +00:00
Chris Lattner
98ed05c81d
remove method I just added
...
llvm-svn: 25728
2006-01-28 03:43:09 +00:00
Chris Lattner
43b867dd3b
add a new callback
...
llvm-svn: 25727
2006-01-28 03:37:03 +00:00
Nate Begeman
595ec734fc
Implement Promote for VAARG, and allow it to be custom promoted for people
...
who don't want the default behavior (Alpha).
llvm-svn: 25726
2006-01-28 03:14:31 +00:00
Nate Begeman
6c82262289
Add a couple more things to the readme.
...
llvm-svn: 25724
2006-01-28 01:22:10 +00:00
Nate Begeman
af397cec0b
Add a missing case to the dag combiner.
...
llvm-svn: 25723
2006-01-28 01:06:30 +00:00
Chris Lattner
fb16a62fba
Remove the ISD::CALL and ISD::TAILCALL nodes
...
llvm-svn: 25721
2006-01-28 00:18:58 +00:00
Chris Lattner
b95594b2f0
The 'target-independent' ISD::CALL isn't. Nuke it, making way for Nate's
...
future work.
llvm-svn: 25720
2006-01-28 00:18:27 +00:00
Chris Lattner
b292de6703
Remove some dead code
...
llvm-svn: 25719
2006-01-28 00:02:51 +00:00
Chris Lattner
2c00db82bd
Switch to AlphaISD::CALL instead of ISD::CALL
...
llvm-svn: 25718
2006-01-27 23:39:00 +00:00
Chris Lattner
f424a66524
Use PPCISD::CALL instead of ISD::CALL
...
llvm-svn: 25717
2006-01-27 23:34:02 +00:00
Chris Lattner
a9382ca59e
Use V8ISD::CALL instead of ISD::CALL
...
llvm-svn: 25716
2006-01-27 23:30:03 +00:00
Evan Cheng
18243826fd
A bit of wisdom from Chris on the last entry.
...
llvm-svn: 25715
2006-01-27 22:54:32 +00:00
Evan Cheng
63045d221b
AT&T assembly convention: registers are in lower case.
...
llvm-svn: 25714
2006-01-27 22:53:29 +00:00
Evan Cheng
6a92822173
Use Intel assembly syntax to look for ST
...
llvm-svn: 25713
2006-01-27 22:51:51 +00:00
Chris Lattner
a502b93fae
initialize member vars
...
llvm-svn: 25712
2006-01-27 22:38:36 +00:00
Chris Lattner
dbfc299915
initialize all instance vars
...
llvm-svn: 25711
2006-01-27 22:37:09 +00:00
Chris Lattner
4d967a4cbb
Make llvm.frame/returnaddr not crash on ppc
...
llvm-svn: 25710
2006-01-27 22:25:06 +00:00
Jeff Cohen
e251e92c23
Teach tablegen to generate code that is VC++ warning-free.
...
llvm-svn: 25709
2006-01-27 22:22:28 +00:00
Evan Cheng
e555a92c8d
(store (op (load ...)), ...)
...
If store's chain operand is load, then use load's chain operand instead. If
it isn't (likely a TokenFactor), then do not allow the folding.
llvm-svn: 25708
2006-01-27 22:13:45 +00:00
Chris Lattner
b3eb31f7f9
* Eliminate FAKE_SOURCES
...
* Make runtimes and projects build with the new front-end by not relying on
'llvm-gcc -c' to build a .bc file. Instead, use llvm-gcc -S -emit-llvm,
then an explicit invocation of gccas. Also, don't use llvm-gcc to link
.bc files together, use gccld directly.
llvm-svn: 25707
2006-01-27 22:13:12 +00:00
Evan Cheng
9857d075b5
Added notes about a x86 isel deficiency.
...
llvm-svn: 25706
2006-01-27 22:11:01 +00:00
Chris Lattner
4c251f89b4
Remove out of date comment
...
llvm-svn: 25705
2006-01-27 22:06:50 +00:00
Chris Lattner
a4575c7349
Remove the only use of FAKE_SOURCES
...
llvm-svn: 25704
2006-01-27 22:06:23 +00:00
Chris Lattner
35b707cfcc
Remove FAKE_SOURCES
...
llvm-svn: 25703
2006-01-27 22:06:01 +00:00
Evan Cheng
1073ae07b0
Added a temporary option -enable-x86-sse to enable sse support. It is used by
...
llc-beta.
llvm-svn: 25701
2006-01-27 21:49:34 +00:00
Evan Cheng
a814f0b31c
Bye bye Pattern ISel, hello DAG ISel.
...
llvm-svn: 25700
2006-01-27 21:26:54 +00:00
Evan Cheng
822f629538
X86 dag isel is now (soon) the default.
...
llvm-svn: 25699
2006-01-27 21:15:22 +00:00
Evan Cheng
7ca86912b7
These are fp stack test cases.
...
llvm-svn: 25698
2006-01-27 21:14:23 +00:00
Evan Cheng
a3b41703f0
XFAIL tailcall test cases until it's implemented.
...
llvm-svn: 25697
2006-01-27 21:13:27 +00:00
Nate Begeman
8c47c3a3b1
Remove TLI.LowerReturnTo, and just let targets custom lower ISD::RET for
...
the same functionality. This addresses another piece of bug 680. Next,
on to fixing Alpha VAARG, which I broke last time.
llvm-svn: 25696
2006-01-27 21:09:22 +00:00
Jim Laskey
0cda006a69
Using bit size of integers instead of ambiguous "long" et all.
...
llvm-svn: 25694
2006-01-27 20:31:25 +00:00
Evan Cheng
afab7aa8f2
A better workaround
...
llvm-svn: 25692
2006-01-27 19:30:30 +00:00
Jim Laskey
4a84e97421
Sorry - really folowing convention.
...
llvm-svn: 25691
2006-01-27 18:32:41 +00:00
Chris Lattner
4be147f456
force sse/3dnow off until they work. This fixes all the x86 failures last night
...
llvm-svn: 25690
2006-01-27 18:30:50 +00:00
Jim Laskey
116bb15473
Following convention.
...
llvm-svn: 25689
2006-01-27 18:28:31 +00:00
Chris Lattner
ed2bb8562f
Unbreak the JIT with SSE
...
llvm-svn: 25688
2006-01-27 18:27:18 +00:00
Andrew Lenharth
fc3eca9023
fix build
...
llvm-svn: 25687
2006-01-27 18:16:17 +00:00
Chris Lattner
ecd7e61a1f
Fix build error that is apparently only a warning with some compilers.
...
llvm-svn: 25686
2006-01-27 17:31:30 +00:00
Jim Laskey
2b6efa9d41
Forgot the version number.
...
llvm-svn: 25685
2006-01-27 15:46:54 +00:00
Jim Laskey
f98fc8441c
Improve visibility/correctness of operand indices in "llvm.db" objects.
...
Handle 64 in DIEs.
llvm-svn: 25684
2006-01-27 15:20:54 +00:00
Jim Laskey
064716abc7
Catch up on some of the file addition/deletions.
...
llvm-svn: 25683
2006-01-27 13:24:20 +00:00
Reid Spencer
76a8d45e32
Fix auto-upgrade of intrinsics to work properly with both assembly and
...
bytecode reading. This code is crufty, the result of much hacking to get things
working correctly. Cleanup patches will follow.
llvm-svn: 25682
2006-01-27 11:49:27 +00:00
Reid Spencer
6e2135d5f9
A test case for ensuring that conversion of old-format intrinsics with
...
signed arguments get auto-upgraded correctly.
llvm-svn: 25681
2006-01-27 11:28:48 +00:00
Reid Spencer
b3cd77f9c3
This now passes.
...
llvm-svn: 25680
2006-01-27 11:27:37 +00:00
Evan Cheng
cde9e30bc6
x86 CPU detection and proper subtarget support
...
llvm-svn: 25679
2006-01-27 08:10:46 +00:00
Evan Cheng
d98701c639
Subtarget feature can now set any variable to any value
...
llvm-svn: 25678
2006-01-27 08:09:42 +00:00
Chris Lattner
4d5a93ed28
Use printInlineAsm to, well, print inline asm's.
...
llvm-svn: 25677
2006-01-27 02:10:50 +00:00
Chris Lattner
061d9e2cf0
Stub out a method
...
llvm-svn: 25676
2006-01-27 02:10:10 +00:00
Chris Lattner
6f9cc46ace
add a method
...
llvm-svn: 25675
2006-01-27 02:09:16 +00:00
Chris Lattner
1240574609
PHI and INLINEASM are now built-in instructions provided by Target.td
...
llvm-svn: 25674
2006-01-27 01:46:15 +00:00
Chris Lattner
543fe4b6aa
PHI and INLINEASM are now builtin instructions provided by Target.td
...
llvm-svn: 25673
2006-01-27 01:45:06 +00:00
Chris Lattner
db2a5f09f1
If we want to emit things in enum order, use getInstructionsByEnumValue to
...
get the order, don't compute it ourselves.
Don't emit stuff like (14<<0), emit 14 instead.
Don't attempt to get target properties for builtin instructions.
llvm-svn: 25672
2006-01-27 01:44:09 +00:00
Chris Lattner
ac8b13b32b
There is at least a 'noitinerary' itinerary now
...
llvm-svn: 25671
2006-01-27 01:41:55 +00:00
Chris Lattner
1c341ac1fe
Add a default NoItinerary class for targets to use.
...
llvm-svn: 25670
2006-01-27 01:41:38 +00:00
Chris Lattner
ec249a3d30
Don't emit JIT code for these instructions
...
llvm-svn: 25669
2006-01-27 01:39:38 +00:00
Chris Lattner
4df279cfda
Teach the scheduler to emit the appropriate INLINEASM MachineInstr for an
...
ISD::INLINEASM node.
llvm-svn: 25668
2006-01-26 23:28:04 +00:00
Chris Lattner
f32b77c83d
Add a common INLINEASM opcode
...
llvm-svn: 25667
2006-01-26 23:27:02 +00:00
Chris Lattner
5815669251
Teach the dag selectors to select InlineAsm nodes.
...
Aren't we happy the pattern selectors are almost all gone?
llvm-svn: 25666
2006-01-26 23:08:55 +00:00
Jim Laskey
0f36e7b7d2
Dropped DwarfWriter::
...
llvm-svn: 25665
2006-01-26 22:25:04 +00:00
Chris Lattner
476e67be14
initial selectiondag support for new INLINEASM node. Note that inline asms
...
with outputs or inputs are not supported yet. :)
llvm-svn: 25664
2006-01-26 22:24:51 +00:00
Chris Lattner
63041f7215
Add new INLINEASM node
...
llvm-svn: 25663
2006-01-26 22:23:45 +00:00
Jim Laskey
0689dfad23
Use global information to fill out Dwarf compile units.
...
llvm-svn: 25662
2006-01-26 21:22:49 +00:00
Jeff Cohen
15a8c15a1f
Improve compatibility with VC2005, patch by Morten Ofstad!
...
llvm-svn: 25661
2006-01-26 20:41:32 +00:00
Chris Lattner
32fef53f5c
Implement a method for inline asm support
...
llvm-svn: 25660
2006-01-26 20:37:03 +00:00
Chris Lattner
b1cfa09db1
add some methods for case-insensitive string compares
...
llvm-svn: 25659
2006-01-26 20:36:29 +00:00
Jim Laskey
a6806e1a90
Update files lists.
...
llvm-svn: 25658
2006-01-26 20:32:00 +00:00
Jim Laskey
7fe302b558
Use find instead of lower_bounds.
...
llvm-svn: 25657
2006-01-26 20:30:51 +00:00
Chris Lattner
4ca4fd48d2
Add a method for inline asm support.
...
llvm-svn: 25656
2006-01-26 20:27:33 +00:00
Jim Laskey
0bbdc55333
Set up MachineDebugInfo to scan for debug information form "llvm.db"g globals.
...
Global Variable information is now pulled from "llvm.dbg.globals"
llvm-svn: 25655
2006-01-26 20:21:46 +00:00
Jim Laskey
32b5f41f15
Add support to find existing entries.
...
llvm-svn: 25654
2006-01-26 20:09:35 +00:00
Chris Lattner
ebbfb386a5
Improve compatibility with VC2005, patch by Morten Ofstad!
...
llvm-svn: 25653
2006-01-26 19:55:20 +00:00
Andrew Lenharth
4558e4ae10
dynamically allocate plugin space as needed
...
llvm-svn: 25652
2006-01-26 19:38:58 +00:00
Evan Cheng
e9025f1f3b
Another folding problem: if a node r/w chain or flag, don't fold it if it
...
has already been selected. The number of use check is not strong enough since
a node can be replaced with newly created target node. e.g. If the original
node has two uses, when it is selected for one of the uses it is replaced with
another. Each node now has a single use but isel still should not fold it.
llvm-svn: 25651
2006-01-26 19:13:45 +00:00
Andrew Lenharth
67e0189faa
Pass plugins on to children when optimizing.
...
llvm-svn: 25650
2006-01-26 18:37:21 +00:00
Andrew Lenharth
bb4c9c0bd7
Remember plugins should someone like bugpoint want to know them.
...
llvm-svn: 25649
2006-01-26 18:36:50 +00:00
Andrew Lenharth
b0a3ebd766
added a couple test cases, including the new vaarg breakage
...
llvm-svn: 25648
2006-01-26 17:43:42 +00:00
Jeff Cohen
272c009568
Teach Visual Studio about X86 subtargets.
...
llvm-svn: 25647
2006-01-26 16:49:00 +00:00
Jim Laskey
6af933005c
Split out Dwarf constants for use outside DwarfWriter.
...
llvm-svn: 25646
2006-01-26 14:45:22 +00:00
Evan Cheng
54c13da29c
Added preliminary x86 subtarget support.
...
llvm-svn: 25645
2006-01-26 09:53:06 +00:00
Duraid Madina
0ebb0b1c5c
fix stack corruption! Previously, 16-byte whole-FP-register stores were
...
being treated as needing only 8 bytes (though they were 16 byte aligned.)
This should fix a bunch of tests - anyone have any comments, though?
- in Target.td , SpillSize and SpillAlignment seem dead - is this what
Size and Alignment do now?
- in CodeGenRegisters.h/CodeGenTarget.cpp , DeclaredSpillSize and
DeclaredSpillAlignment seem dead.
- there are a bunch of comments here and there that don't clearly
distinguish between 'size' and 'spillsize' etc. hmm.
llvm-svn: 25644
2006-01-26 09:45:03 +00:00
Duraid Madina
c090ac13bd
some hoovering
...
llvm-svn: 25643
2006-01-26 09:08:31 +00:00
Chris Lattner
dbc2aac1e7
Rest of subtarget support, remove references to ppc
...
llvm-svn: 25642
2006-01-26 07:22:22 +00:00
Chris Lattner
e6842a9da6
Add trivial subtarget support
...
llvm-svn: 25641
2006-01-26 06:51:21 +00:00
Andrew Lenharth
0a01374299
minor renaming
...
llvm-svn: 25640
2006-01-26 03:24:15 +00:00
Andrew Lenharth
153f808f53
allow R28 to be used for frame calculations without entirely removing it from circulation
...
llvm-svn: 25639
2006-01-26 03:22:07 +00:00
Evan Cheng
fcdce6d26f
Work around some x86 Darwin assembler bugs
...
llvm-svn: 25638
2006-01-26 02:27:43 +00:00
Chris Lattner
c981b8e35a
add method for constraint parsing
...
llvm-svn: 25637
2006-01-26 02:21:59 +00:00
Chris Lattner
25a749ee25
add methods for constraint parsing
...
llvm-svn: 25636
2006-01-26 02:21:42 +00:00
Evan Cheng
dc8365d4f3
Add a FIXME comment.
...
llvm-svn: 25635
2006-01-26 02:13:31 +00:00
Evan Cheng
944d1e91ea
When trying to fold X86::SETCC into a Select, make a copy if it has more than
...
one use. This allows more CMOV instructions.
llvm-svn: 25634
2006-01-26 02:13:10 +00:00
Chris Lattner
120f31b1fd
teach the cloner to handle inline asms
...
llvm-svn: 25633
2006-01-26 01:55:22 +00:00
Chris Lattner
06070ea4ab
Allow use of isa<InlineAsm>(X) without #including InlineAsm.h
...
llvm-svn: 25632
2006-01-26 01:54:21 +00:00
Chris Lattner
8547e3ab16
parse and verify the constraint string.
...
llvm-svn: 25631
2006-01-26 00:48:33 +00:00
Evan Cheng
c4c339c3d0
Clean up some code; improve efficiency; and fixed a potential bug involving
...
chain successors.
llvm-svn: 25630
2006-01-26 00:30:29 +00:00
Evan Cheng
97c68f0f5c
Remove the uses of STATUS flag register. Rely on node property SDNPInFlag,
...
SDNPOutFlag, and SDNPOptInFlag instead.
llvm-svn: 25629
2006-01-26 00:29:36 +00:00
Evan Cheng
c1fc8819bd
Duh.
...
llvm-svn: 25628
2006-01-26 00:28:35 +00:00
Evan Cheng
ecfaa0a1c9
Incoming (and optional) flag bugs. They may be embedded inside a inner node of
...
a pattern. Also, nodes which take incoming flag should not be folded if it has
more than one use.
llvm-svn: 25627
2006-01-26 00:22:25 +00:00
Chris Lattner
41eb5cd9c3
Make sure the only user of InlineAsm's are direct calls.
...
llvm-svn: 25626
2006-01-26 00:08:45 +00:00
Chris Lattner
3ccaf6ecb0
new tests for actual inline asm expressions
...
llvm-svn: 25625
2006-01-25 23:49:54 +00:00
Chris Lattner
98f013cb0f
document the syntax of inline asm
...
llvm-svn: 25624
2006-01-25 23:47:57 +00:00
Andrew Lenharth
5c3dd5fafd
oops
...
llvm-svn: 25623
2006-01-25 23:33:32 +00:00
Chris Lattner
4e27e8d71b
update the bytecode format guide for the encoding of inline asm.
...
llvm-svn: 25622
2006-01-25 23:31:53 +00:00
Chris Lattner
4470691999
add bc reader/writer support for inline asm
...
llvm-svn: 25621
2006-01-25 23:08:15 +00:00
Andrew Lenharth
a852660e74
forgot one
...
llvm-svn: 25620
2006-01-25 22:28:07 +00:00
Chris Lattner
e0a4ee9db7
regenerate
...
llvm-svn: 25619
2006-01-25 22:27:16 +00:00
Chris Lattner
a02d603c18
Parse inline asm objects
...
llvm-svn: 25618
2006-01-25 22:26:43 +00:00
Chris Lattner
a2d810d935
Print InlineAsm objects
...
llvm-svn: 25617
2006-01-25 22:26:05 +00:00
Chris Lattner
ff45f0d5b7
add another method
...
llvm-svn: 25616
2006-01-25 22:10:35 +00:00
Andrew Lenharth
93fd315292
make things compile again
...
llvm-svn: 25614
2006-01-25 21:54:38 +00:00
Reid Spencer
5edde66863
Don't break the optimized build (by incorrect placement of #endif)
...
llvm-svn: 25613
2006-01-25 21:49:13 +00:00
Chris Lattner
1d0b33afc3
add some useful accessors :)
...
llvm-svn: 25612
2006-01-25 19:58:26 +00:00
Chris Lattner
8bbcda2fda
Change inline asms to be uniqued like constants, not embedded in a Module.
...
llvm-svn: 25610
2006-01-25 18:57:27 +00:00
Chris Lattner
d07c86465d
initialize an instance var, apparently I forgot to commit this long ago
...
llvm-svn: 25609
2006-01-25 18:57:15 +00:00
Evan Cheng
1880f8db02
No need to keep track of top and bottom nodes in a group since the vector is
...
already in order. Thanks Jim for pointing it out.
llvm-svn: 25608
2006-01-25 18:54:24 +00:00
Evan Cheng
030e002fb9
Set SchedulingForLatency to be the default scheduling preference for all.
...
llvm-svn: 25607
2006-01-25 18:52:42 +00:00
Nate Begeman
e74795cd70
First part of bug 680:
...
Remove TLI.LowerVA* and replace it with SDNodes that are lowered the same
way as everything else.
llvm-svn: 25606
2006-01-25 18:21:52 +00:00
Jeff Cohen
c3cafb8a67
Make it even more portable.
...
llvm-svn: 25605
2006-01-25 17:18:50 +00:00
Jeff Cohen
fb20616aa6
Fix VC++ compilation error.
...
llvm-svn: 25604
2006-01-25 17:17:49 +00:00
Evan Cheng
1092a02619
Default scheduling preference is SchedulingForLatency.
...
llvm-svn: 25603
2006-01-25 09:15:54 +00:00
Evan Cheng
83eeefbbd1
X86 prefer scheduling for reduced register pressure.
...
llvm-svn: 25602
2006-01-25 09:15:17 +00:00
Evan Cheng
ab49556cf4
Bottom up register usage reducing list scheduler.
...
llvm-svn: 25601
2006-01-25 09:14:32 +00:00
Evan Cheng
fbc88a624a
Keep track of bottom / top element of a set of flagged nodes.
...
llvm-svn: 25600
2006-01-25 09:13:41 +00:00
Evan Cheng
a6eff8a432
If scheduler choice is the default (-sched=default), use target scheduling
...
preference to determine which scheduler to use. SchedulingForLatency ==
Breadth first; SchedulingForRegPressure == bottom up register reduction list
scheduler.
llvm-svn: 25599
2006-01-25 09:12:57 +00:00
Evan Cheng
b4c8a4ecc9
Add a enum to specify target scheduling preference: SchedulingForLatency or
...
SchedulingForRegPressure. Added corresponding methods to set / get the value.
llvm-svn: 25598
2006-01-25 09:09:02 +00:00
Evan Cheng
ca5a57f3d2
Some minor scheduler changes.
...
llvm-svn: 25597
2006-01-25 09:07:50 +00:00
Evan Cheng
aff0800fd1
Fix a selectcc lowering bug. Make a copy of X86ISD::CMP when folding it.
...
llvm-svn: 25596
2006-01-25 09:05:09 +00:00
Chris Lattner
bc7226a7cc
Loosen up these checks to allow direct uses of ESP
...
llvm-svn: 25595
2006-01-25 08:00:36 +00:00
Jeff Cohen
a292744ecc
Portably cast a pointer to an integer.
...
llvm-svn: 25594
2006-01-25 02:40:10 +00:00
Duraid Madina
5ea06a9f13
add bundling! well not really, for now it's just stop-insertion.
...
llvm-svn: 25593
2006-01-25 02:23:38 +00:00
Andrew Lenharth
94150f0666
maintaining stackpointer alignment. Perhaps it doesn't matter
...
llvm-svn: 25592
2006-01-25 01:51:08 +00:00
Andrew Lenharth
1dbc389ad2
fix build on 64 bit hosts
...
llvm-svn: 25591
2006-01-24 21:26:43 +00:00
Evan Cheng
c5c228fa59
Fix an optional in flag bug.
...
llvm-svn: 25590
2006-01-24 20:46:50 +00:00
Evan Cheng
295e196558
Optional InFlag was not being included in node.
...
llvm-svn: 25588
2006-01-24 20:07:38 +00:00
Chris Lattner
c0f633a598
Fix Regression/Transforms/ScalarRepl/2006-01-24-IllegalUnionPromoteCrash.ll
...
llvm-svn: 25587
2006-01-24 19:36:27 +00:00
Chris Lattner
317b5d5efb
testcase that crashes scalarrepl
...
llvm-svn: 25586
2006-01-24 19:34:57 +00:00
Chris Lattner
27d30a5f42
use ESP directly, not a copy of ESP into some other register for fastcc calls
...
llvm-svn: 25584
2006-01-24 06:14:44 +00:00
Chris Lattner
0ff4b9914c
This is still broken
...
llvm-svn: 25583
2006-01-24 06:13:48 +00:00
Chris Lattner
f9a1e3aadc
Fix an infinite loop I caused by making sure to legalize the flag operand
...
of CALLSEQ_* nodes
llvm-svn: 25582
2006-01-24 05:48:21 +00:00
Chris Lattner
78c38a7bc7
add a method
...
llvm-svn: 25581
2006-01-24 05:47:05 +00:00
Chris Lattner
6f33eaeb81
Emit the copies out of call return registers *after* the ISD::CALLSEQ_END
...
node, fixing fastcc and the case where a function has a frame pointer due
to dynamic allocas.
llvm-svn: 25580
2006-01-24 05:17:12 +00:00
Chris Lattner
7ecf56aec4
new c front-end testcase
...
llvm-svn: 25579
2006-01-24 05:01:39 +00:00
Chris Lattner
68e62a5184
Allow jit-beta to work
...
llvm-svn: 25578
2006-01-24 04:50:48 +00:00
Jeff Cohen
12f8441c03
Fix VC++ compilation error.
...
llvm-svn: 25577
2006-01-24 04:43:17 +00:00
Jeff Cohen
b56a80061a
Remove unused variables.
...
llvm-svn: 25576
2006-01-24 04:42:53 +00:00
Jeff Cohen
22b692f219
Be consistent in using class/struct to keep Visual Studio happy.
...
llvm-svn: 25575
2006-01-24 04:41:48 +00:00
Jeff Cohen
cfdaf617a5
Add new files to Visual Studio.
...
llvm-svn: 25574
2006-01-24 04:40:54 +00:00
Jeff Cohen
f97f7252df
Track changes in config.h.in.
...
llvm-svn: 25573
2006-01-24 04:40:19 +00:00
Chris Lattner
00fcdfef0d
rename method
...
llvm-svn: 25572
2006-01-24 04:16:34 +00:00
Chris Lattner
8ebd2164eb
Rename method
...
llvm-svn: 25571
2006-01-24 04:14:29 +00:00
Chris Lattner
eef2fe72c0
Initial checkin of the InlineAsm class
...
llvm-svn: 25570
2006-01-24 04:13:11 +00:00
Jim Laskey
3e65f28ffe
Crude Dwarf global variable debugging.
...
llvm-svn: 25569
2006-01-24 00:49:18 +00:00
Chris Lattner
efaf35d52a
Pretty print file-scope asm blocks.
...
llvm-svn: 25568
2006-01-24 00:45:30 +00:00
Chris Lattner
3acaf5cb11
syntax change
...
llvm-svn: 25567
2006-01-24 00:40:17 +00:00
Chris Lattner
a1280ad4d9
minor syntax change
...
llvm-svn: 25566
2006-01-24 00:37:20 +00:00
Chris Lattner
e3a79268a2
Print file-scope inline asm blocks at the start of the output file.
...
llvm-svn: 25565
2006-01-23 23:47:53 +00:00
Chris Lattner
bc7b2581cb
Add support for reading/writing inline asm
...
llvm-svn: 25564
2006-01-23 23:43:17 +00:00
Chris Lattner
a10387b99a
Update for file-scope inline asm
...
llvm-svn: 25563
2006-01-23 23:38:09 +00:00
Chris Lattner
243f7296e5
new testcase
...
llvm-svn: 25562
2006-01-23 23:24:13 +00:00
Chris Lattner
91c15c40a7
document module-level inline asm support.
...
llvm-svn: 25561
2006-01-23 23:23:47 +00:00
Chris Lattner
dd2d3faf19
Add support for linking inline asm
...
llvm-svn: 25560
2006-01-23 23:08:37 +00:00
Chris Lattner
37992b34c2
When cloning a module, clone the inline asm.
...
llvm-svn: 25559
2006-01-23 23:06:28 +00:00
Chris Lattner
edd9b0389b
regenerate
...
llvm-svn: 25558
2006-01-23 23:05:42 +00:00
Chris Lattner
f09741f441
Add support for parsing global asm blocks
...
llvm-svn: 25557
2006-01-23 23:05:15 +00:00
Chris Lattner
6ed87bdeb4
Print out inline asm strings
...
llvm-svn: 25556
2006-01-23 23:03:36 +00:00
Chris Lattner
db1ea41b17
Add global scope asm support
...
llvm-svn: 25555
2006-01-23 23:02:28 +00:00
Andrew Lenharth
c0bf377f98
bye bye Pattern ISEL
...
llvm-svn: 25553
2006-01-23 21:56:07 +00:00
Andrew Lenharth
fef7dec9cc
added stores to lsmark
...
llvm-svn: 25552
2006-01-23 21:51:33 +00:00
Andrew Lenharth
683352382e
another couple selects
...
llvm-svn: 25551
2006-01-23 21:51:14 +00:00
Andrew Lenharth
208bbe9ca9
fix up more lsmark stuff
...
llvm-svn: 25550
2006-01-23 21:23:26 +00:00
Andrew Lenharth
ba97ea52d4
yea, lowering this stuff will basically work
...
llvm-svn: 25549
2006-01-23 20:59:50 +00:00
Andrew Lenharth
c28563874c
another selectto
...
llvm-svn: 25548
2006-01-23 20:59:12 +00:00
Jim Laskey
b8566fa10a
Typo.
...
llvm-svn: 25545
2006-01-23 13:34:04 +00:00
Evan Cheng
31272347d4
Skeleton of the list schedule.
...
llvm-svn: 25544
2006-01-23 08:26:10 +00:00
Evan Cheng
421cfe8006
Minor clean up.
...
llvm-svn: 25543
2006-01-23 08:25:34 +00:00
Reid Spencer
a609b65086
Update for including additional function tests.
...
llvm-svn: 25542
2006-01-23 08:15:53 +00:00
Reid Spencer
455d1217ea
Revert last patch because it messes up the JIT, amongst other things.
...
llvm-svn: 25541
2006-01-23 08:11:03 +00:00
Reid Spencer
281dcd6ace
For PR411:
...
No functionality changes, just improve the code by a) providing better
function names, b) eliminating a call to get_suffix and c) tightening up
a function elimination test to reduce further checking.
llvm-svn: 25540
2006-01-23 07:42:30 +00:00
Reid Spencer
95c05bf1b4
For PR411:
...
Don't try to be smart about fixing intrinsic functions when they're read
in, just fix them after the module is read when all names are resolved.
llvm-svn: 25539
2006-01-23 07:39:03 +00:00
Chris Lattner
763dfd7723
Fix Regression/CodeGen/SparcV8/2006-01-22-BitConvertLegalize.ll by making
...
sure that the result of expanding a BIT_CONVERT node is itself legalized.
llvm-svn: 25538
2006-01-23 07:30:46 +00:00
Chris Lattner
c7243b5b70
Testcase that failed due to a legalizer bug
...
llvm-svn: 25537
2006-01-23 07:30:14 +00:00
Chris Lattner
56b39c0c32
this option is gone, the dag isel is the default now
...
llvm-svn: 25536
2006-01-23 07:21:12 +00:00
Evan Cheng
87063b9986
Remove a couple of unnecessary #include's
...
llvm-svn: 25535
2006-01-23 07:21:01 +00:00
Chris Lattner
8935e3eb7d
remove the V8 simple isel
...
llvm-svn: 25534
2006-01-23 07:20:15 +00:00
Chris Lattner
117367e974
make this test harder
...
llvm-svn: 25533
2006-01-23 07:07:51 +00:00
Evan Cheng
c1e1d9724d
Factor out more instruction scheduler code to the base class.
...
llvm-svn: 25532
2006-01-23 07:01:07 +00:00
Duraid Madina
584fcad083
don't need this any more; the "#define hashes to trees" hack is coming
...
llvm-svn: 25531
2006-01-23 06:47:56 +00:00
Chris Lattner
5774040c09
add a bunch more optimizations for unary double math functions
...
llvm-svn: 25530
2006-01-23 06:24:46 +00:00
Chris Lattner
4bfe10dab1
add new tests
...
llvm-svn: 25529
2006-01-23 06:24:17 +00:00
Chris Lattner
6d5bdb0f9b
add checks for new functions. I'd appreciate it if someone could regen
...
the configure script :)
llvm-svn: 25528
2006-01-23 06:24:09 +00:00
Duraid Madina
37c8ad14f4
die, die!! r15, you are not callee-saved
...
llvm-svn: 25527
2006-01-23 06:11:45 +00:00
Duraid Madina
cc87402925
fix register corruption! (my god.) r15 is a scratch reg, using that as
...
a frame pointer is a pretty doofus thing to do. use r5 instead, and
mark it callee-saved, coz that's what it is!
llvm-svn: 25526
2006-01-23 06:08:46 +00:00
Chris Lattner
57a2863cbb
Refactor/genericize this, no functionality change
...
llvm-svn: 25525
2006-01-23 05:57:36 +00:00
Chris Lattner
fdcc0d99cd
Make sure this tests the right thing, xfail on solaris, which doesn't have floorf
...
llvm-svn: 25524
2006-01-23 05:56:34 +00:00
Chris Lattner
deda32a786
Fix bugs lowering stackrestore, fixing 2004-08-12-InlinerAndAllocas.c on
...
PPC.
llvm-svn: 25522
2006-01-23 05:22:07 +00:00
Chris Lattner
c66da83a89
Speedup and simplify pass registration by the observation that there is
...
exactly one PassInfo object per RegisterPass object and that their lifetimes
are the same. As such, there is no reason for the RegisterPass object to
dynamically allocate the PassInfo object at compiler startup time: just inline
the object by-value. This should reduce codesize, heap size, and startup time. Yaay.
llvm-svn: 25521
2006-01-23 01:01:04 +00:00
Chris Lattner
3090f923bd
Remove dead #include
...
llvm-svn: 25520
2006-01-23 00:38:14 +00:00
Chris Lattner
af044cc84b
It doesn't make sense to give llc a list of passes on the command line,
...
LLVM doesn't use it and it can't work anyway.
llvm-svn: 25519
2006-01-23 00:36:05 +00:00
Chris Lattner
8d8a19fa58
this doesn't work, remove it
...
llvm-svn: 25518
2006-01-23 00:32:33 +00:00
Chris Lattner
26aae65f6e
This only needs <iosfwd> not <iostream>
...
llvm-svn: 25517
2006-01-22 23:43:45 +00:00
Chris Lattner
01a325ed68
Add #include of <iostream>
...
llvm-svn: 25516
2006-01-22 23:41:42 +00:00
Chris Lattner
de02d7727f
Add explicit #includes of <iostream>
...
llvm-svn: 25515
2006-01-22 23:41:00 +00:00
Chris Lattner
c597b8a55e
Make iostream #inclusion explicit
...
llvm-svn: 25514
2006-01-22 23:32:06 +00:00
Chris Lattner
6806c02380
Add explicit iostream #includes
...
llvm-svn: 25513
2006-01-22 23:19:18 +00:00
Chris Lattner
33081b4648
Make this more efficient in the following ways:
...
1. Do not statically construct a map when the program starts up, this
is expensive and cannot be optimized. Instead, create a list.
2. Do not insert entries for all function in the module into a hashmap
that lives the full life of the compiler.
llvm-svn: 25512
2006-01-22 23:10:26 +00:00
Chris Lattner
fdb379d52b
This header should not pull in <iostream>
...
llvm-svn: 25511
2006-01-22 22:54:51 +00:00
Chris Lattner
03c032ce71
add explicit #includes of iostream
...
llvm-svn: 25510
2006-01-22 22:53:40 +00:00
Chris Lattner
469640e506
Add explicit #includes of <iostream>
...
llvm-svn: 25509
2006-01-22 22:53:01 +00:00
Chris Lattner
0d4ebfc15b
Several non-functionality changing changes:
...
1. Use the varargs version of getOrInsertFunction to simplify code.
2. remove #include
3. Reduce the number of #ifdef's.
4. remove extraneous vertical whitespace.
llvm-svn: 25508
2006-01-22 22:35:08 +00:00
Jeff Cohen
5d129e7389
Visual Studio still has issues at being left out.
...
llvm-svn: 25507
2006-01-22 20:37:25 +00:00
Jeff Cohen
b14a0874d5
Visual Studio neurotic about inconsistent class/struct usage.
...
llvm-svn: 25506
2006-01-22 20:36:43 +00:00
Chris Lattner
e23928c67f
Fix a bug in a recent refactor that caused a bunch of programs to miscompile
...
or the compiler to crash.
llvm-svn: 25503
2006-01-21 19:12:11 +00:00
Duraid Madina
4204e02fc6
insignificant, but next up is proper stack frame layout!
...
llvm-svn: 25497
2006-01-21 14:27:19 +00:00
Chris Lattner
44cab00045
Fix CodeGen/PowerPC/2006-01-20-ShiftPartsCrash.ll
...
llvm-svn: 25496
2006-01-21 04:27:00 +00:00
Chris Lattner
48021ed4d4
new testcase that crashes llc for ppc
...
llvm-svn: 25495
2006-01-21 04:25:07 +00:00
Evan Cheng
468fecdc99
Rename fcmovae to fcmovnb and fcmova to fcmovnbe (following Intel manual).
...
Some assemblers can't recognize the aliases.
llvm-svn: 25494
2006-01-21 02:55:41 +00:00