Devang Patel
b16ace1014
If string field is empty then return NULL.
...
llvm-svn: 85630
2009-10-30 22:52:47 +00:00
Chris Lattner
3982885b51
if basic blocks are destroyed while there are *just* BlockAddress' hanging
...
around, then zap them. This is analogous to dangling constantexprs hanging
off functions.
llvm-svn: 85627
2009-10-30 22:39:36 +00:00
Dan Gohman
48f3169c77
Teach SimplifyCFG how to eliminate duplicate PHI nodes within a block.
...
This reduces codesize on a variety of codes by 1-2% on x86-64. It also
helps clean up after SSAUpdater.
llvm-svn: 85626
2009-10-30 22:39:04 +00:00
Chris Lattner
74ed905748
make hasAddressTaken() constant time by storing a refcount in BB's subclass data.
...
llvm-svn: 85625
2009-10-30 22:33:29 +00:00
Bob Wilson
1c2cbe3945
Add a note about Robert Muth's alternate jump table implementation.
...
llvm-svn: 85624
2009-10-30 22:22:46 +00:00
Dan Gohman
82139ffc65
Sort the incoming values in PHI nodes to match the predecessor order.
...
This helps expose duplicate PHIs, which will make it easier for them
to be eliminated.
llvm-svn: 85623
2009-10-30 22:22:22 +00:00
Dan Gohman
ad6c6a3d33
Fix MachineLICM to use the correct virtual register class when
...
unfolding loads for hoisting. getOpcodeAfterMemoryUnfold returns the
opcode of the original operation without the load, not the load
itself, MachineLICM needs to know the operand index in order to get
the correct register class. Extend getOpcodeAfterMemoryUnfold to
return this information.
llvm-svn: 85622
2009-10-30 22:18:41 +00:00
Chris Lattner
5b38f2ec49
it isn't valid to take the address of the entry block.
...
llvm-svn: 85621
2009-10-30 22:15:48 +00:00
Devang Patel
2b9d1ade65
If a type is derived from a derived type then calculate size appropriately.
...
llvm-svn: 85619
2009-10-30 22:09:30 +00:00
Jim Grosbach
88539d92a3
Build in ARM mode explicitly when on ARM Darwin
...
llvm-svn: 85615
2009-10-30 21:33:05 +00:00
Daniel Dunbar
45b7d65288
Add missing substitution for %llvmgcc_only.
...
llvm-svn: 85614
2009-10-30 21:13:59 +00:00
Jim Grosbach
16b4042036
Allow cross target build
...
llvm-svn: 85611
2009-10-30 20:54:59 +00:00
Bob Wilson
94d79c1f43
Fix a comment.
...
llvm-svn: 85610
2009-10-30 20:13:25 +00:00
Evan Cheng
8db8f72185
Add option to createGVNPass to disable PRE.
...
llvm-svn: 85609
2009-10-30 20:12:24 +00:00
Evan Cheng
52d6e56ac9
I forgot to commit this test.
...
llvm-svn: 85608
2009-10-30 20:03:40 +00:00
Jim Grosbach
e0e5896a29
When cross-building, the CFLAGS and CXXFLAGS are for the target, and don't
...
apply to the build tools. If we want to allow build tool flags input, we
should have separate inputs (BUILD_CFLAGS and BUILD_CXXFLAGS, perhaps).
llvm-svn: 85607
2009-10-30 19:53:38 +00:00
Jim Grosbach
7f05d433e0
Remove extraneous comment line
...
llvm-svn: 85606
2009-10-30 19:52:05 +00:00
Jim Grosbach
85fb2965a5
update name check for Apple style builds to be more permissive
...
llvm-svn: 85605
2009-10-30 19:51:32 +00:00
Lang Hames
68c94340cb
Stop the iterator in ValueLiveAt from potentially running off the end of the interval.
...
llvm-svn: 85599
2009-10-30 18:12:09 +00:00
Rafael Espindola
d4fadd76da
This fixes functions like
...
void f (int a1, int a2, int a3, int a4, int a5,...)
In ARMTargetLowering::LowerFormalArguments if the function has 4 or
more regular arguments we used to set VarArgsFrameIndex using an
offset of 0, which is only correct if the function has exactly 4
regular arguments.
llvm-svn: 85590
2009-10-30 14:33:14 +00:00
Oscar Fuentes
8072b6dafe
CMake: install .def files from source `include/llvm' directory.
...
llvm-svn: 85587
2009-10-30 11:42:08 +00:00
Evan Cheng
eb9c268ba0
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
95064e348a
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
84554e8eb2
Most stack straces don't need 3 digits worth of levels.
...
llvm-svn: 85575
2009-10-30 02:45:10 +00:00
Dan Gohman
2f18203b64
Don't delete blocks which have their address taken.
...
llvm-svn: 85572
2009-10-30 02:13:27 +00:00
Dan Gohman
2a0216ff1c
Mention if a block has its address taken in debug output.
...
llvm-svn: 85571
2009-10-30 02:08:26 +00:00
Dan Gohman
42e985b07a
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
468aef9289
Add support for BlockAddress static initializers.
...
llvm-svn: 85562
2009-10-30 01:45:18 +00:00
Dan Gohman
aa62f675db
Add a FIXME comment.
...
llvm-svn: 85559
2009-10-30 01:38:20 +00:00
Dan Gohman
a0fc491716
Add some comments.
...
llvm-svn: 85558
2009-10-30 01:34:35 +00:00
Dan Gohman
2767aa065e
Initial x86 support for BlockAddresses.
...
llvm-svn: 85557
2009-10-30 01:28:02 +00:00
Dan Gohman
6b7d1390d7
Initial target-independent CodeGen support for BlockAddresses.
...
llvm-svn: 85556
2009-10-30 01:27:03 +00:00
Devang Patel
134ea45684
Remove dead code.
...
llvm-svn: 85551
2009-10-30 00:39:25 +00:00
Dan Gohman
adf4f4b7f2
Add a BlockAddress MachineOperand kind.
...
llvm-svn: 85549
2009-10-30 00:20:08 +00:00
Dan Gohman
acbd7911fb
Remove a redundant copy constructor.
...
llvm-svn: 85547
2009-10-30 00:14:33 +00:00
Jim Grosbach
95e1ff2dba
Dial back the realignment a bit.
...
llvm-svn: 85546
2009-10-30 00:08:40 +00:00
David Goodwin
9a91b1fe3d
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
ed15829b83
Remove some unnecessary spaces in debug output.
...
llvm-svn: 85536
2009-10-29 23:30:06 +00:00
Dan Gohman
7f5acc4b57
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
ad8a169be4
Fix a couple of bugs in aggressive anti-dep breaking.
...
llvm-svn: 85522
2009-10-29 19:17:04 +00:00
Bob Wilson
e99d5530a3
Refactor complicated predicate into a separate function.
...
llvm-svn: 85519
2009-10-29 18:40:06 +00:00
Devang Patel
093d35bd8a
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
3393a4c997
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
4620ed7bb7
Refactor the code for unfolding a load into a separate function.
...
llvm-svn: 85515
2009-10-29 17:47:20 +00:00
Bill Wendling
c0aefdd3db
Reapply r85338.
...
llvm-svn: 85514
2009-10-29 17:39:46 +00:00
Benjamin Kramer
c2ed14cdb8
Fix MSVC build.
...
llvm-svn: 85505
2009-10-29 12:55:32 +00:00
Nick Lewycky
5207d16c05
Apply some cleanups. No functionality changes.
...
llvm-svn: 85498
2009-10-29 07:35:15 +00:00
Chris Lattner
57a8d8d4e0
add sanity check for indbr.
...
llvm-svn: 85496
2009-10-29 05:53:32 +00:00
Chris Lattner
e83554145a
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
9bc4a421e2
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