Jim Laskey
2221ac79d5
Sorry - really folowing convention.
...
llvm-svn: 25691
2006-01-27 18:32:41 +00:00
Jim Laskey
479abc37ff
Following convention.
...
llvm-svn: 25689
2006-01-27 18:28:31 +00:00
Andrew Lenharth
67e53709df
fix build
...
llvm-svn: 25687
2006-01-27 18:16:17 +00:00
Chris Lattner
e4128dc8dc
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
5ed7bc82cc
Forgot the version number.
...
llvm-svn: 25685
2006-01-27 15:46:54 +00:00
Jim Laskey
89492c12bb
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
Chris Lattner
09d8aa244e
Stub out a method
...
llvm-svn: 25676
2006-01-27 02:10:10 +00:00
Chris Lattner
a1769576f0
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
b2771c7fcb
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
Jim Laskey
df47d0df3e
Use global information to fill out Dwarf compile units.
...
llvm-svn: 25662
2006-01-26 21:22:49 +00:00
Jim Laskey
583aae3110
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
Evan Cheng
fcd2a73349
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
Reid Spencer
f45272f413
Don't break the optimized build (by incorrect placement of #endif)
...
llvm-svn: 25613
2006-01-25 21:49:13 +00:00
Evan Cheng
168b8c5b29
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
Nate Begeman
c29fac7fce
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
fdbce069c5
Make it even more portable.
...
llvm-svn: 25605
2006-01-25 17:18:50 +00:00
Jeff Cohen
7d0e421a42
Fix VC++ compilation error.
...
llvm-svn: 25604
2006-01-25 17:17:49 +00:00
Evan Cheng
0296933dbe
Bottom up register usage reducing list scheduler.
...
llvm-svn: 25601
2006-01-25 09:14:32 +00:00
Evan Cheng
d95c4530e7
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
69d30b1c55
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
Jeff Cohen
3218a69301
Portably cast a pointer to an integer.
...
llvm-svn: 25594
2006-01-25 02:40:10 +00:00
Andrew Lenharth
0940295a7a
fix build on 64 bit hosts
...
llvm-svn: 25591
2006-01-24 21:26:43 +00:00
Chris Lattner
cfb7a75ce9
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
Jeff Cohen
ed41a16e5f
Fix VC++ compilation error.
...
llvm-svn: 25577
2006-01-24 04:43:17 +00:00
Jeff Cohen
7c5aa59551
Remove unused variables.
...
llvm-svn: 25576
2006-01-24 04:42:53 +00:00
Chris Lattner
d09c95f83c
rename method
...
llvm-svn: 25572
2006-01-24 04:16:34 +00:00
Jim Laskey
18ba7ce7b3
Crude Dwarf global variable debugging.
...
llvm-svn: 25569
2006-01-24 00:49:18 +00:00
Chris Lattner
ba1b666382
Print file-scope inline asm blocks at the start of the output file.
...
llvm-svn: 25565
2006-01-23 23:47:53 +00:00
Andrew Lenharth
35efa9c2d9
another couple selects
...
llvm-svn: 25551
2006-01-23 21:51:14 +00:00
Andrew Lenharth
28a8d211f6
another selectto
...
llvm-svn: 25548
2006-01-23 20:59:12 +00:00
Jim Laskey
e4ff0868a1
Typo.
...
llvm-svn: 25545
2006-01-23 13:34:04 +00:00
Evan Cheng
f622869383
Skeleton of the list schedule.
...
llvm-svn: 25544
2006-01-23 08:26:10 +00:00
Evan Cheng
8cae3b8cdb
Minor clean up.
...
llvm-svn: 25543
2006-01-23 08:25:34 +00:00
Chris Lattner
3b0a29a694
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
Evan Cheng
b6bc5af6c8
Remove a couple of unnecessary #include's
...
llvm-svn: 25535
2006-01-23 07:21:01 +00:00
Evan Cheng
37c62244a6
Factor out more instruction scheduler code to the base class.
...
llvm-svn: 25532
2006-01-23 07:01:07 +00:00
Chris Lattner
adb63115bc
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
aafc339b4e
Add explicit #includes of <iostream>
...
llvm-svn: 25515
2006-01-22 23:41:00 +00:00
Chris Lattner
a7ff02319f
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
Chris Lattner
9f233fa260
Fix CodeGen/PowerPC/2006-01-20-ShiftPartsCrash.ll
...
llvm-svn: 25496
2006-01-21 04:27:00 +00:00
Evan Cheng
4a57a7551f
Do some code refactoring on Jim's scheduler in preparation of the new list
...
scheduler.
llvm-svn: 25493
2006-01-21 02:32:06 +00:00
Jim Laskey
75adb3d269
Simplify search for abbreviations.
...
llvm-svn: 25491
2006-01-21 01:13:18 +00:00
Jim Laskey
08d15fdc02
Correct some simple errors.
...
llvm-svn: 25490
2006-01-21 00:59:54 +00:00
Jim Laskey
946caff856
Right size integer values before emitting.
...
llvm-svn: 25489
2006-01-20 21:02:36 +00:00
Jim Laskey
b2abea6ab6
Reworked how Dwarf debug info entries and abbreviations are handled. Added
...
pubnames and debuy str sections.
llvm-svn: 25487
2006-01-20 20:34:06 +00:00
Chris Lattner
a348dc9195
remove some unintentionally committed code
...
llvm-svn: 25483
2006-01-20 18:40:10 +00:00
Chris Lattner
737a8dab41
If the target doesn't support f32 natively, insert the FP_EXTEND in target-indep
...
code, so that the LowerReturn code doesn't have to handle it.
llvm-svn: 25482
2006-01-20 18:38:32 +00:00
Evan Cheng
3f6b496700
Another typo
...
llvm-svn: 25440
2006-01-19 04:54:52 +00:00
Andrew Lenharth
c7a7422412
was ignoring the legalized chain in this case, fixed SPASS on alpha
...
llvm-svn: 25428
2006-01-18 23:19:08 +00:00
Nate Begeman
6b2bebd70a
Get rid of code in the DAGCombiner that is duplicated in SelectionDAG.cpp
...
Now all constant folding in the code generator is in one place.
llvm-svn: 25426
2006-01-18 22:35:16 +00:00
Chris Lattner
9bc0f6cd90
Temporary work around for a libcall insertion bug: If a target doesn't
...
support FSIN/FCOS nodes, do not lower sin/cos to them.
llvm-svn: 25425
2006-01-18 21:50:14 +00:00
Chris Lattner
f7004ffd51
Fix a backwards conditional that caused an inf loop in some cases. This
...
fixes: test/Regression/CodeGen/Generic/2005-01-18-SetUO-InfLoop.ll
llvm-svn: 25419
2006-01-18 19:13:41 +00:00
Jim Laskey
6b25a4e659
Added minimum Dwarf aranges. Cleaned up some section headers. Line number
...
support now works in gdb.
llvm-svn: 25417
2006-01-18 16:54:26 +00:00
Jim Laskey
52d9832e70
Add frame work for additional dwarf sections. Comments will improve as code
...
is added.
llvm-svn: 25410
2006-01-17 20:41:40 +00:00
Robert Bocchino
dc31d8561b
Support for the insertelement operation.
...
llvm-svn: 25405
2006-01-17 20:06:42 +00:00
Evan Cheng
b456305355
Bug fix: missing LegalizeOp() on newly created nodes.
...
llvm-svn: 25401
2006-01-17 19:47:13 +00:00
Jim Laskey
0c4202b0ba
Adding basic support for Dwarf line number debug information.
...
I promise to keep future commits smaller.
llvm-svn: 25396
2006-01-17 17:31:53 +00:00
Reid Spencer
3cecd3c4cf
For PR411:
...
This patch is an incremental step towards supporting a flat symbol table.
It de-overloads the intrinsic functions by providing type-specific intrinsics
and arranging for automatically upgrading from the old overloaded name to
the new non-overloaded name. Specifically:
llvm.isunordered -> llvm.isunordered.f32, llvm.isunordered.f64
llvm.sqrt -> llvm.sqrt.f32, llvm.sqrt.f64
llvm.ctpop -> llvm.ctpop.i8, llvm.ctpop.i16, llvm.ctpop.i32, llvm.ctpop.i64
llvm.ctlz -> llvm.ctlz.i8, llvm.ctlz.i16, llvm.ctlz.i32, llvm.ctlz.i64
llvm.cttz -> llvm.cttz.i8, llvm.cttz.i16, llvm.cttz.i32, llvm.cttz.i64
New code should not use the overloaded intrinsic names. Warnings will be
emitted if they are used.
llvm-svn: 25366
2006-01-16 21:12:35 +00:00
Nate Begeman
ea80828ef2
Constant fold ctpop/ctlz/cttz, and a couple other small cleanups
...
llvm-svn: 25357
2006-01-16 08:07:10 +00:00
Nate Begeman
61d6a364ed
Expand case for 64b Legalize, even though no one should end up using this
...
(itanium supports bswap natively, alpha should custom lower it using the
VAX floating point swapload, ha ha).
llvm-svn: 25356
2006-01-16 07:59:13 +00:00
Nate Begeman
d98be53c67
Add BSWAP stuff to intrinsic lowering for CBE & friends.
...
llvm-svn: 25355
2006-01-16 07:57:00 +00:00
Chris Lattner
0feeddc8ee
Disable two transformations that contribute to bus errors on SparcV8.
...
llvm-svn: 25339
2006-01-15 18:58:59 +00:00
Chris Lattner
4b3181512b
Allow the target to specify 'expand' if they just require the amount to
...
be subtracted from the stack pointer.
llvm-svn: 25331
2006-01-15 08:54:32 +00:00
Chris Lattner
acf02c3510
Fix custom lowering of dynamic_stackalloc
...
llvm-svn: 25329
2006-01-15 08:43:08 +00:00
Chris Lattner
c23f5e6dc7
add a missing node name
...
llvm-svn: 25327
2006-01-15 08:39:35 +00:00
Chris Lattner
e92e4a4342
Token chain results are not always the first or last result. Consider copyfromreg nodes, where they are the middle result (the flag result is last)
...
llvm-svn: 25325
2006-01-14 22:41:46 +00:00
Nate Begeman
956b57ce43
Remove some duplicated code
...
llvm-svn: 25313
2006-01-14 03:18:27 +00:00
Nate Begeman
85b2dc0c4e
bswap implementation
...
llvm-svn: 25312
2006-01-14 03:14:10 +00:00
Chris Lattner
91b83a2448
If a target specified a stack pointer with setStackPointerRegisterToSaveRestore,
...
lower STACKSAVE/STACKRESTORE into a copy from/to that register.
llvm-svn: 25276
2006-01-13 17:48:44 +00:00
Chris Lattner
4107b4d7ee
Compile llvm.stacksave/restore into STACKSAVE/STACKRESTORE nodes, and allow
...
targets to custom expand them as they desire.
llvm-svn: 25273
2006-01-13 02:50:02 +00:00
Chris Lattner
fac137d4bd
add stacksave/stackrestore nodes
...
llvm-svn: 25270
2006-01-13 02:39:42 +00:00
Chris Lattner
5ab0813f3a
Add "support" for stacksave/stackrestore to the dag isel
...
llvm-svn: 25268
2006-01-13 02:24:42 +00:00
Chris Lattner
5f8aeedc58
Add "support" for the llvm.stacksave/stackrestore intrinsics, this is
...
used by the C backend.
llvm-svn: 25267
2006-01-13 02:22:08 +00:00
Chris Lattner
f997ab779f
Add a simple missing fold to produce this:
...
subfic r3, r2, 33
instead of this:
subfic r2, r2, 32
addi r3, r2, 1
llvm-svn: 25255
2006-01-12 20:22:43 +00:00
Chris Lattner
c9d03f7b02
If using __main, emit global ctor/dtor list like any other global
...
llvm-svn: 25251
2006-01-12 19:17:23 +00:00
Chris Lattner
ac8df987d5
Don't create rotate instructions in unsupported types, because we don't have
...
promote/expand code yet. This fixes the 177.mesa failure on PPC.
llvm-svn: 25250
2006-01-12 18:57:33 +00:00
Evan Cheng
c2241561ae
Allow custom lowering of DYNAMIC_STACKALLOC.
...
llvm-svn: 25224
2006-01-11 22:14:47 +00:00
Evan Cheng
7bd69b756e
ignore register #0
...
llvm-svn: 25223
2006-01-11 22:13:48 +00:00
Nate Begeman
cff96008ac
Add bswap, rotl, and rotr nodes
...
Add dag combiner code to recognize rotl, rotr
Add ppc code to match rotl
Targets should add rotl/rotr patterns if they have them
llvm-svn: 25222
2006-01-11 21:21:00 +00:00
Chris Lattner
da0089a5c7
silence a warning
...
llvm-svn: 25184
2006-01-10 19:43:26 +00:00
Robert Bocchino
38060df8d1
Added selection DAG support for the extractelement operation.
...
llvm-svn: 25179
2006-01-10 19:04:57 +00:00
Chris Lattner
d455e0ce54
Minor cleanup, no functionality change for current targets
...
llvm-svn: 25173
2006-01-10 05:41:59 +00:00
Chris Lattner
8026872e44
Fix an exponential function in libcall insertion to not be exponential. :)
...
llvm-svn: 25165
2006-01-09 23:21:49 +00:00
Evan Cheng
a8064e0723
* Allow custom lowering of ADD_PARTS, SUB_PARTS, SHL_PARTS, SRA_PARTS,
...
and SRL_PARTS.
* Fix a bug that caused *_PARTS to be custom lowered twice.
llvm-svn: 25157
2006-01-09 18:31:59 +00:00
Evan Cheng
7a32c047d9
New getNode() variants.
...
llvm-svn: 25156
2006-01-09 18:29:18 +00:00
Chris Lattner
ae1bace70a
Unbreak the build :(
...
llvm-svn: 25124
2006-01-06 05:47:48 +00:00
Evan Cheng
105a0cc17e
Revert the previous check-in. Leave shl x, 1 along for target to deal with.
...
llvm-svn: 25121
2006-01-06 01:56:02 +00:00
Evan Cheng
efe621adce
fold (shl x, 1) -> (add x, x)
...
llvm-svn: 25120
2006-01-06 01:06:31 +00:00
Evan Cheng
133170cb5c
Support for custom lowering of ISD::RET.
...
llvm-svn: 25116
2006-01-06 00:41:43 +00:00
Jim Laskey
5eddaee9f3
Added initial support for DEBUG_LABEL allowing debug specific labels to be
...
inserted in the code.
llvm-svn: 25104
2006-01-05 01:25:28 +00:00
Jim Laskey
61138e28ff
Applied some recommend changes from sabre. The dominate one beginning "let the
...
pass manager do it's thing." Fixes crash when compiling -g files and suppresses
dwarf statements if no debug info is present.
llvm-svn: 25100
2006-01-04 22:28:25 +00:00
Jim Laskey
897ad8ddb7
Add unique id to debug location for debug label use (work in progress.)
...
llvm-svn: 25096
2006-01-04 15:04:11 +00:00
Jim Laskey
9c9c46a7a4
Add check for debug presence.
...
llvm-svn: 25095
2006-01-04 14:30:12 +00:00
Jim Laskey
62b29812a6
Tie dwarf generation to darwin assembler.
...
llvm-svn: 25093
2006-01-04 13:52:30 +00:00
Jim Laskey
881126a42d
Moving MachineDebugInfo to module level location.
...
llvm-svn: 25090
2006-01-04 13:43:56 +00:00
Jim Laskey
1b0399e8f0
Change how MachineDebugInfo is fetched.
...
llvm-svn: 25089
2006-01-04 13:42:59 +00:00
Jim Laskey
013cfc7698
Extending MachineDebugInfo.
...
llvm-svn: 25086
2006-01-04 13:36:38 +00:00
Chris Lattner
19343b85fd
Add support for targets (like Alpha) that have terminator instructions which
...
use virtual registers. We now allow the first instruction in a block of
terminators to use virtual registers, and update phi elimination to correctly
update livevar when eliminating phi's. This fixes a problem on a testcase
Andrew sent me.
llvm-svn: 25083
2006-01-04 07:12:21 +00:00
Chris Lattner
c3ff71cc3a
Add an assertion, update DefInst even though no one uses it (dangling pointers
...
don't help anyone)
llvm-svn: 25081
2006-01-04 06:47:48 +00:00
Chris Lattner
f00c43e105
Add a LiveVariables::VarInfo::dump method
...
llvm-svn: 25080
2006-01-04 05:40:30 +00:00