Dan Gohman [Fri, 30 Oct 2009 23:18:27 +0000 (23:18 +0000)]
Fix the -mattr line for this test so that it passes on hosts that lack SSSE3.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85637
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 30 Oct 2009 23:16:10 +0000 (23:16 +0000)]
Add a testcase for the recent duplicate PHI elimination changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85636
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 30 Oct 2009 23:15:43 +0000 (23:15 +0000)]
Add a comment about a missed opportunity.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85635
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 30 Oct 2009 23:15:21 +0000 (23:15 +0000)]
Optimize around the fact that pred_iterator is slow: instead of sorting
PHI operands by the predecessor order, sort them by the order used by the
first PHI in the block. This is still suffucient to expose duplicates.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85634
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Fri, 30 Oct 2009 22:55:57 +0000 (22:55 +0000)]
Updates to the ARM target assembler for llvm-mc per review comments from
Daniel Dunbar.
- Reordered the fields in the ARMOperand Mem struct to make the struct smaller.
Making bool's into 1 bit fields and put the MCExpr* fields adjacent to each
other.
- Fixed a number of places in ARMAsmParser.cpp so they have doxygen comments.
- Change the name of ARMAsmParser::ParseRegister() to MaybeParseRegister and
added the bool ParseWriteBack parameter.
- Changed ARMAsmParser::ParseMemory() to call MaybeParseRegister().
- Added ARMAsmParser::ParseMemoryOffsetReg to factor out parsing the offset of a
memory operand. And use it for both parsing both preindexed and post indexing
addressing forms in ARMAsmParser::ParseMemory.
- Changed the first argument to ParseShift() to a reference.
- Changed ParseShift() to check for Rrx first and return to reduce nesting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85632
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 30 Oct 2009 22:52:47 +0000 (22:52 +0000)]
If string field is empty then return NULL.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85630
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 30 Oct 2009 22:39:36 +0000 (22:39 +0000)]
if basic blocks are destroyed while there are *just* BlockAddress' hanging
around, then zap them. This is analogous to dangling constantexprs hanging
off functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85627
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 30 Oct 2009 22:39:04 +0000 (22:39 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85626
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 30 Oct 2009 22:33:29 +0000 (22:33 +0000)]
make hasAddressTaken() constant time by storing a refcount in BB's subclass data.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85625
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Fri, 30 Oct 2009 22:22:46 +0000 (22:22 +0000)]
Add a note about Robert Muth's alternate jump table implementation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85624
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 30 Oct 2009 22:22:22 +0000 (22:22 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85623
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 30 Oct 2009 22:18:41 +0000 (22:18 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85622
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 30 Oct 2009 22:15:48 +0000 (22:15 +0000)]
it isn't valid to take the address of the entry block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85621
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 30 Oct 2009 22:09:30 +0000 (22:09 +0000)]
If a type is derived from a derived type then calculate size appropriately.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85619
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 30 Oct 2009 21:33:05 +0000 (21:33 +0000)]
Build in ARM mode explicitly when on ARM Darwin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85615
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 30 Oct 2009 21:13:59 +0000 (21:13 +0000)]
Add missing substitution for %llvmgcc_only.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85614
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 30 Oct 2009 20:54:59 +0000 (20:54 +0000)]
Allow cross target build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85611
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Fri, 30 Oct 2009 20:13:25 +0000 (20:13 +0000)]
Fix a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85610
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 30 Oct 2009 20:12:24 +0000 (20:12 +0000)]
Add option to createGVNPass to disable PRE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85609
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 30 Oct 2009 20:03:40 +0000 (20:03 +0000)]
I forgot to commit this test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85608
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 30 Oct 2009 19:53:38 +0000 (19:53 +0000)]
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).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85607
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 30 Oct 2009 19:52:05 +0000 (19:52 +0000)]
Remove extraneous comment line
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85606
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 30 Oct 2009 19:51:32 +0000 (19:51 +0000)]
update name check for Apple style builds to be more permissive
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85605
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Fri, 30 Oct 2009 18:12:09 +0000 (18:12 +0000)]
Stop the iterator in ValueLiveAt from potentially running off the end of the interval.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85599
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 30 Oct 2009 14:33:14 +0000 (14:33 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85590
91177308-0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Fri, 30 Oct 2009 11:42:08 +0000 (11:42 +0000)]
CMake: install .def files from source `include/llvm' directory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85587
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 30 Oct 2009 07:23:49 +0000 (07:23 +0000)]
Rather than having llvm-gcc changing the meaning of OptimizeSize, just make sure loop unswitch is conservative when optimization level is < 3.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85581
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Fri, 30 Oct 2009 05:45:42 +0000 (05:45 +0000)]
Add ARM codegen for indirect branches.
clang/test/CodeGen/indirect-goto.c runs! (unoptimized)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85577
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 30 Oct 2009 02:45:10 +0000 (02:45 +0000)]
Most stack straces don't need 3 digits worth of levels.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85575
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 30 Oct 2009 02:13:27 +0000 (02:13 +0000)]
Don't delete blocks which have their address taken.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85572
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 30 Oct 2009 02:08:26 +0000 (02:08 +0000)]
Mention if a block has its address taken in debug output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85571
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 30 Oct 2009 02:01:10 +0000 (02:01 +0000)]
Simplify this code and avoid an extra space character in the output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85568
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 30 Oct 2009 01:45:18 +0000 (01:45 +0000)]
Add support for BlockAddress static initializers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85562
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 30 Oct 2009 01:38:20 +0000 (01:38 +0000)]
Add a FIXME comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85559
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 30 Oct 2009 01:34:35 +0000 (01:34 +0000)]
Add some comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85558
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 30 Oct 2009 01:28:02 +0000 (01:28 +0000)]
Initial x86 support for BlockAddresses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85557
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 30 Oct 2009 01:27:03 +0000 (01:27 +0000)]
Initial target-independent CodeGen support for BlockAddresses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85556
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 30 Oct 2009 00:39:25 +0000 (00:39 +0000)]
Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85551
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 30 Oct 2009 00:20:08 +0000 (00:20 +0000)]
Add a BlockAddress MachineOperand kind.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85549
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 30 Oct 2009 00:17:14 +0000 (00:17 +0000)]
Add svn:ignore properties.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85548
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 30 Oct 2009 00:14:33 +0000 (00:14 +0000)]
Remove a redundant copy constructor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85547
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 30 Oct 2009 00:08:40 +0000 (00:08 +0000)]
Dial back the realignment a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85546
91177308-0d34-0410-b5e6-
96231b3b80d8
David Goodwin [Thu, 29 Oct 2009 23:30:59 +0000 (23:30 +0000)]
Between scheduling regions, correctly maintain anti-dep breaking state so that we don't incorrectly rename registers that span these regions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85537
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 29 Oct 2009 23:30:06 +0000 (23:30 +0000)]
Remove some unnecessary spaces in debug output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85536
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 29 Oct 2009 22:30:23 +0000 (22:30 +0000)]
Move some code from being emitted as boilerplate duplicated in every
*ISelDAGToDAG.cpp to being regular code in SelectionDAGISel.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85530
91177308-0d34-0410-b5e6-
96231b3b80d8
David Goodwin [Thu, 29 Oct 2009 19:17:04 +0000 (19:17 +0000)]
Fix a couple of bugs in aggressive anti-dep breaking.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85522
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Thu, 29 Oct 2009 18:40:06 +0000 (18:40 +0000)]
Refactor complicated predicate into a separate function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85519
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 29 Oct 2009 18:20:34 +0000 (18:20 +0000)]
First bitcase use may not lead to a dbg.declare intrinsic. Iterate uses until one find's dbg.declare intrinsic.
Patch by Sunae Seo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85518
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 29 Oct 2009 18:10:34 +0000 (18:10 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85517
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 29 Oct 2009 17:47:20 +0000 (17:47 +0000)]
Refactor the code for unfolding a load into a separate function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85515
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 29 Oct 2009 17:39:46 +0000 (17:39 +0000)]
Reapply r85338.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85514
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 29 Oct 2009 12:55:32 +0000 (12:55 +0000)]
Fix MSVC build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85505
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 29 Oct 2009 07:35:15 +0000 (07:35 +0000)]
Apply some cleanups. No functionality changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85498
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 29 Oct 2009 05:53:32 +0000 (05:53 +0000)]
add sanity check for indbr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85496
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 29 Oct 2009 05:51:50 +0000 (05:51 +0000)]
just for the hell of it, allow globalopt to statically evaluate
static constructors with indirect gotos :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85495
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 29 Oct 2009 05:26:09 +0000 (05:26 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85488
91177308-0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Thu, 29 Oct 2009 05:07:14 +0000 (05:07 +0000)]
add newline to make cl.exe happy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85483
91177308-0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Thu, 29 Oct 2009 04:41:24 +0000 (04:41 +0000)]
fix 80-col.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85480
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 29 Oct 2009 04:25:46 +0000 (04:25 +0000)]
greatly improve the LLVM IR bitcode encoding documentation,
patch by Peter Housel!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85479
91177308-0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Thu, 29 Oct 2009 03:43:06 +0000 (03:43 +0000)]
Explicitly convert to double to suppress Visual C++ 2008 build error C2668 pow is ambiguous call to overloaded function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85478
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Thu, 29 Oct 2009 02:41:21 +0000 (02:41 +0000)]
To get more thorough testing from llc-beta nightly runs, do dynamic stack
realignment regardless of whether it's strictly necessary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85476
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Thu, 29 Oct 2009 02:33:47 +0000 (02:33 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85474
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Thu, 29 Oct 2009 02:04:53 +0000 (02:04 +0000)]
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!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85470
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Thu, 29 Oct 2009 01:45:07 +0000 (01:45 +0000)]
Minor tweak to forgo the the curly braces for most case blocks, except when
declaring local variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85467
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 29 Oct 2009 01:21:20 +0000 (01:21 +0000)]
teach various passes about blockaddress. We no longer
crash on any clang tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85465
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Thu, 29 Oct 2009 01:15:40 +0000 (01:15 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85463
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 29 Oct 2009 00:37:35 +0000 (00:37 +0000)]
Don't put in these EH changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85460
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 29 Oct 2009 00:34:30 +0000 (00:34 +0000)]
A switch-on-string-literal construct that is a nice alternative to
cascading "ifs" of strcmps/memcmps.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85459
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 29 Oct 2009 00:31:02 +0000 (00:31 +0000)]
teach ValueMapper about BlockAddress', making bugpoint a lot more useful.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85458
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 29 Oct 2009 00:28:30 +0000 (00:28 +0000)]
unindent massive blocks, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85457
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 29 Oct 2009 00:22:16 +0000 (00:22 +0000)]
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85454
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 29 Oct 2009 00:14:44 +0000 (00:14 +0000)]
Add indirectbr and blockaddress to the vim syntax highlighting file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85451
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 29 Oct 2009 00:09:08 +0000 (00:09 +0000)]
Add a hasAddressTaken for BasicBlock.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85449
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 28 Oct 2009 23:25:00 +0000 (23:25 +0000)]
add IRBuilder support for IndirectBr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85445
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Wed, 28 Oct 2009 22:10:20 +0000 (22:10 +0000)]
Reimplement BranchFolding change to avoid tail merging for a 1 instruction
common tail, except when the OptimizeForSize function attribute is present.
Radar
7338114.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85441
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Wed, 28 Oct 2009 21:56:18 +0000 (21:56 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85437
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 28 Oct 2009 21:32:16 +0000 (21:32 +0000)]
Make sure we return the right sized type here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85436
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Wed, 28 Oct 2009 20:46:46 +0000 (20:46 +0000)]
Revert r85346 change to control tail merging by CodeGenOpt::Level.
I'm going to redo this using the OptimizeForSize function attribute.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85426
91177308-0d34-0410-b5e6-
96231b3b80d8
Victor Hernandez [Wed, 28 Oct 2009 20:18:55 +0000 (20:18 +0000)]
Extend getMallocArraySize() to determine the array size if the malloc argument is:
ArraySize * ElementSize
ElementSize * ArraySize
ArraySize << log2(ElementSize)
ElementSize << log2(ArraySize)
Refactor isArrayMallocHelper and delete isSafeToGetMallocArraySize, so that there is only 1 copy of the malloc array determining logic.
Update users of getMallocArraySize() to not bother calling isArrayMalloc() as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85421
91177308-0d34-0410-b5e6-
96231b3b80d8
Viktor Kutuzov [Wed, 28 Oct 2009 18:55:55 +0000 (18:55 +0000)]
Fix to pass options from Gold plugin to LTO codegen
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85419
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 28 Oct 2009 18:37:31 +0000 (18:37 +0000)]
Teach cmake that mk[sd]temp is defined in stdlib.h on some systems.
This fixes parallel build with clang on glibc platforms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85414
91177308-0d34-0410-b5e6-
96231b3b80d8
David Goodwin [Wed, 28 Oct 2009 18:29:54 +0000 (18:29 +0000)]
Make AntiDepReg.h internal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85412
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Wed, 28 Oct 2009 18:26:41 +0000 (18:26 +0000)]
Add a Thumb BRIND pattern. Change the ARM BRIND assembly to separate the
opcode and operand with a tab. Check for these instructions in the usual
places.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85411
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 28 Oct 2009 18:19:56 +0000 (18:19 +0000)]
fconsts and fconstd are obviously re-materializable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85410
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 28 Oct 2009 17:33:28 +0000 (17:33 +0000)]
Cleanup now that frame index scavenging via post-pass is working for ARM and Thumb2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85406
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 28 Oct 2009 16:51:52 +0000 (16:51 +0000)]
llvm.dbg.global_variables do not exist anymore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85402
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 28 Oct 2009 15:32:19 +0000 (15:32 +0000)]
add a new 'SetCurrentDebugType' API (requested by Andrew Haley for JIT
stuff) to programmatically control the current debug flavor. While
I'm at it, doxygenate Debug.h and clean it up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85395
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 28 Oct 2009 15:28:02 +0000 (15:28 +0000)]
Don't call SDNode::isPredecessorOf when it isn't necessary. If the load's
chains have no users, they can't be predecessors of the condition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85394
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 28 Oct 2009 15:23:36 +0000 (15:23 +0000)]
Simplify this code: if the unfolded load can't be hoisted, just delete
the new instructions and leave the old one in place.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85393
91177308-0d34-0410-b5e6-
96231b3b80d8
Edward O'Callaghan [Wed, 28 Oct 2009 15:04:53 +0000 (15:04 +0000)]
No newline at end of file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85390
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 28 Oct 2009 13:29:18 +0000 (13:29 +0000)]
Update CMake file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85389
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Wed, 28 Oct 2009 13:14:50 +0000 (13:14 +0000)]
use metavariable <result> instead of SSA name %result for consistency
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85388
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Wed, 28 Oct 2009 13:05:07 +0000 (13:05 +0000)]
ooops, SSA name should not be part of the link
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85387
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Wed, 28 Oct 2009 09:21:30 +0000 (09:21 +0000)]
advertise new syntax for unnamed instructions
and eliminate confusing double-use of SSA names
(work in progress)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85385
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 28 Oct 2009 07:05:35 +0000 (07:05 +0000)]
Treat lifetime begin/end markers as allocations/frees respectively for the
purposes for GVN/DSE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85383
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Wed, 28 Oct 2009 07:03:15 +0000 (07:03 +0000)]
Add ABCD, a generalized implementation of the Elimination of Array Bounds
Checks on Demand algorithm which looks at arbitrary branches instead of loop
iterations. This is GSoC work by Andre Tavares with only editorial changes
applied!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85382
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 28 Oct 2009 06:55:03 +0000 (06:55 +0000)]
Give ARMISD::EH_SJLJ_LONGJMP and EH_SJLJ_SETJMP names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85381
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 28 Oct 2009 06:30:52 +0000 (06:30 +0000)]
Be more careful about invariance reasoning on "store" queries. Stores still need
to depend on Ref and ModRef calls within the invariant region.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85380
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 28 Oct 2009 06:30:34 +0000 (06:30 +0000)]
X86 palignr intrinsics immediate field is in bits. ISel must transform it into bytes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85379
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 28 Oct 2009 06:18:42 +0000 (06:18 +0000)]
Add trivial support for the invariance intrinsics to memdep. This logic is
purely local for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85378
91177308-0d34-0410-b5e6-
96231b3b80d8