Evan Cheng
484dba893c
Rather than having llvm-gcc changing the meaning of OptimizeSize, just make sure loop unswitch is conservative when optimization level is < 3.
...
llvm-svn: 85581
2009-10-30 07:23:49 +00:00
Bob Wilson
1cf0b03064
Add ARM codegen for indirect branches.
...
clang/test/CodeGen/indirect-goto.c runs! (unoptimized)
llvm-svn: 85577
2009-10-30 05:45:42 +00:00
Dan Gohman
b0cad70c24
Most stack straces don't need 3 digits worth of levels.
...
llvm-svn: 85575
2009-10-30 02:45:10 +00:00
Dan Gohman
64997909a6
Don't delete blocks which have their address taken.
...
llvm-svn: 85572
2009-10-30 02:13:27 +00:00
Dan Gohman
e0a8b8fc56
Mention if a block has its address taken in debug output.
...
llvm-svn: 85571
2009-10-30 02:08:26 +00:00
Dan Gohman
43c574068b
Simplify this code and avoid an extra space character in the output.
...
llvm-svn: 85568
2009-10-30 02:01:10 +00:00
Dan Gohman
4246f00e0c
Add support for BlockAddress static initializers.
...
llvm-svn: 85562
2009-10-30 01:45:18 +00:00
Dan Gohman
2f8ccf2bf4
Add a FIXME comment.
...
llvm-svn: 85559
2009-10-30 01:38:20 +00:00
Dan Gohman
c83dc4b506
Add some comments.
...
llvm-svn: 85558
2009-10-30 01:34:35 +00:00
Dan Gohman
f7c4299312
Initial x86 support for BlockAddresses.
...
llvm-svn: 85557
2009-10-30 01:28:02 +00:00
Dan Gohman
6c9388011b
Initial target-independent CodeGen support for BlockAddresses.
...
llvm-svn: 85556
2009-10-30 01:27:03 +00:00
Devang Patel
fe480c5e62
Remove dead code.
...
llvm-svn: 85551
2009-10-30 00:39:25 +00:00
Dan Gohman
126193a9b5
Add a BlockAddress MachineOperand kind.
...
llvm-svn: 85549
2009-10-30 00:20:08 +00:00
Dan Gohman
8c9b10f4e8
Remove a redundant copy constructor.
...
llvm-svn: 85547
2009-10-30 00:14:33 +00:00
Jim Grosbach
8578068302
Dial back the realignment a bit.
...
llvm-svn: 85546
2009-10-30 00:08:40 +00:00
David Goodwin
faa7660fd0
Between scheduling regions, correctly maintain anti-dep breaking state so that we don't incorrectly rename registers that span these regions.
...
llvm-svn: 85537
2009-10-29 23:30:59 +00:00
Dan Gohman
05efd893db
Remove some unnecessary spaces in debug output.
...
llvm-svn: 85536
2009-10-29 23:30:06 +00:00
Dan Gohman
554a75a973
Move some code from being emitted as boilerplate duplicated in every
...
*ISelDAGToDAG.cpp to being regular code in SelectionDAGISel.cpp.
llvm-svn: 85530
2009-10-29 22:30:23 +00:00
David Goodwin
9f1b2d4619
Fix a couple of bugs in aggressive anti-dep breaking.
...
llvm-svn: 85522
2009-10-29 19:17:04 +00:00
Bob Wilson
94f8f87890
Refactor complicated predicate into a separate function.
...
llvm-svn: 85519
2009-10-29 18:40:06 +00:00
Devang Patel
78c327f171
First bitcase use may not lead to a dbg.declare intrinsic. Iterate uses until one find's dbg.declare intrinsic.
...
Patch by Sunae Seo.
llvm-svn: 85518
2009-10-29 18:20:34 +00:00
Dan Gohman
453d64c9f5
Rename usesCustomDAGSchedInserter to usesCustomInserter, and update a
...
bunch of associated comments, because it doesn't have anything to do
with DAGs or scheduling. This is another step in decoupling MachineInstr
emitting from scheduling.
llvm-svn: 85517
2009-10-29 18:10:34 +00:00
Dan Gohman
104f57cae8
Refactor the code for unfolding a load into a separate function.
...
llvm-svn: 85515
2009-10-29 17:47:20 +00:00
Bill Wendling
c44768ae69
Reapply r85338.
...
llvm-svn: 85514
2009-10-29 17:39:46 +00:00
Benjamin Kramer
5e1db97573
Fix MSVC build.
...
llvm-svn: 85505
2009-10-29 12:55:32 +00:00
Nick Lewycky
b43a43a8fd
Apply some cleanups. No functionality changes.
...
llvm-svn: 85498
2009-10-29 07:35:15 +00:00
Chris Lattner
6747b4ca30
add sanity check for indbr.
...
llvm-svn: 85496
2009-10-29 05:53:32 +00:00
Chris Lattner
312748848f
just for the hell of it, allow globalopt to statically evaluate
...
static constructors with indirect gotos :)
llvm-svn: 85495
2009-10-29 05:51:50 +00:00
Chris Lattner
0c778f70e9
add interpreter support for indirect goto / blockaddress. The interpreter
...
now correctly runs clang's test/CodeGen/indirect-goto.c. The JIT will abort
on it until someone feels compelled to implement this.
llvm-svn: 85488
2009-10-29 05:26:09 +00:00
Zhongxing Xu
b71fae8098
add newline to make cl.exe happy.
...
llvm-svn: 85483
2009-10-29 05:07:14 +00:00
Zhongxing Xu
0590837d34
fix 80-col.
...
llvm-svn: 85480
2009-10-29 04:41:24 +00:00
Chris Lattner
e9006fe142
greatly improve the LLVM IR bitcode encoding documentation,
...
patch by Peter Housel!
llvm-svn: 85479
2009-10-29 04:25:46 +00:00
Zhongxing Xu
d74ffbde67
Explicitly convert to double to suppress Visual C++ 2008 build error C2668 pow is ambiguous call to overloaded function
...
llvm-svn: 85478
2009-10-29 03:43:06 +00:00
Jim Grosbach
b352d76480
To get more thorough testing from llc-beta nightly runs, do dynamic stack
...
realignment regardless of whether it's strictly necessary.
llvm-svn: 85476
2009-10-29 02:41:21 +00:00
Jim Grosbach
cad78a7634
When the function is doing dynamic stack realignment, the spill slot will be
...
indexed via the stack pointer, even if a frame pointer is present. Update the
heuristic to place it nearest the stack pointer in that case, rather than
nearest the frame pointer.
llvm-svn: 85474
2009-10-29 02:33:47 +00:00
Johnny Chen
8107289624
Sorry to break the build.
...
I was trying to check the WIP file to some local repository, but ended up
checking in the llvm repository. Oops!
llvm-svn: 85470
2009-10-29 02:04:53 +00:00
Johnny Chen
c3d9a47d03
Minor tweak to forgo the the curly braces for most case blocks, except when
...
declaring local variables.
llvm-svn: 85467
2009-10-29 01:45:07 +00:00
Chris Lattner
ee8b951e73
teach various passes about blockaddress. We no longer
...
crash on any clang tests.
llvm-svn: 85465
2009-10-29 01:21:20 +00:00
Dale Johannesen
8829fc3a18
When there is a 2-instruction spill sequence, record
...
the second (store) instruction in SpillSlotToUsesMap
consistently. I don't think this matters functionally,
but it's cleaner and Evan wants it this way.
llvm-svn: 85463
2009-10-29 01:15:40 +00:00
Bill Wendling
3505c94923
Don't put in these EH changes.
...
llvm-svn: 85460
2009-10-29 00:37:35 +00:00
Douglas Gregor
a6f3e7edeb
A switch-on-string-literal construct that is a nice alternative to
...
cascading "ifs" of strcmps/memcmps.
llvm-svn: 85459
2009-10-29 00:34:30 +00:00
Chris Lattner
be060382e9
teach ValueMapper about BlockAddress', making bugpoint a lot more useful.
...
llvm-svn: 85458
2009-10-29 00:31:02 +00:00
Chris Lattner
cf5a47d63d
unindent massive blocks, no functionality change.
...
llvm-svn: 85457
2009-10-29 00:28:30 +00:00
Bill Wendling
a8eceedb82
Reverting r85338 for now. It's causing a bootstrap failure on PPC darwin9.
...
--- Reverse-merging r85338 into '.':
U lib/CodeGen/SimpleRegisterCoalescing.cpp
U lib/CodeGen/SimpleRegisterCoalescing.h
llvm-svn: 85454
2009-10-29 00:22:16 +00:00
Dan Gohman
d7db2dedaa
Add indirectbr and blockaddress to the vim syntax highlighting file.
...
llvm-svn: 85451
2009-10-29 00:14:44 +00:00
Dan Gohman
3903320a48
Add a hasAddressTaken for BasicBlock.
...
llvm-svn: 85449
2009-10-29 00:09:08 +00:00
Chris Lattner
48d9995d2b
add IRBuilder support for IndirectBr
...
llvm-svn: 85445
2009-10-28 23:25:00 +00:00
Bob Wilson
3ab552ec74
Reimplement BranchFolding change to avoid tail merging for a 1 instruction
...
common tail, except when the OptimizeForSize function attribute is present.
Radar 7338114.
llvm-svn: 85441
2009-10-28 22:10:20 +00:00
Dale Johannesen
14f162d9dc
When we generate spill code, then decide we don't need
...
to spill after all, we weren't handling 2-instruction
spill sequences correctly (PPC Altivec). We need to
remove the store in this case. Removing the other
instruction(s) would be goodness but is not needed for
correctness, and isn't done here. 7331562.
llvm-svn: 85437
2009-10-28 21:56:18 +00:00
Eric Christopher
1fd4c577d2
Make sure we return the right sized type here.
...
llvm-svn: 85436
2009-10-28 21:32:16 +00:00