Daniel Dunbar [Wed, 11 Nov 2009 00:43:14 +0000 (00:43 +0000)]
Add Triple::str() which returns the contents of the Triple as a string, as a more readable alternative to getTriple().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86773
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 11 Nov 2009 00:31:36 +0000 (00:31 +0000)]
Do not assume first function scope seen represents current function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86771
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 11 Nov 2009 00:28:53 +0000 (00:28 +0000)]
Add From arguments to StringRef search functions, and tweak doxyments.
Also, add unittests for find_first_of and find_first_not_of.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86770
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 11 Nov 2009 00:28:38 +0000 (00:28 +0000)]
llvm-gcc/clang don't (won't?) need this hack.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86769
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 11 Nov 2009 00:27:54 +0000 (00:27 +0000)]
oops, didn't mean to commit this, no harm, but add a todoops, didn't mean to commit this, no harm, but add a todoo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86768
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 11 Nov 2009 00:22:30 +0000 (00:22 +0000)]
Stub out a new lazy value info pass, which will eventually
vend value constraint information to the optimizer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86767
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 11 Nov 2009 00:21:58 +0000 (00:21 +0000)]
add a fixme
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86766
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 11 Nov 2009 00:21:21 +0000 (00:21 +0000)]
remove redundant foward declaration. This function is already in
Analysis/Passes.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86765
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 11 Nov 2009 00:18:40 +0000 (00:18 +0000)]
While creating DbgScopes, do not forget parent scope.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86763
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 11 Nov 2009 00:00:21 +0000 (00:00 +0000)]
Block terminator may be a switch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86761
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 10 Nov 2009 23:54:10 +0000 (23:54 +0000)]
jump threading does everything that condprop does any more. This passes
bootstrap on darwin i386.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86758
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 10 Nov 2009 23:47:45 +0000 (23:47 +0000)]
add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86756
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 10 Nov 2009 23:40:49 +0000 (23:40 +0000)]
I did this a week or two ago
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86754
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 10 Nov 2009 23:20:04 +0000 (23:20 +0000)]
Ignore variable if scope info is not available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86753
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 10 Nov 2009 23:18:33 +0000 (23:18 +0000)]
Test this on Darwin only.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86752
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Tue, 10 Nov 2009 23:16:41 +0000 (23:16 +0000)]
Emit correct code when making a ConstantPool entry for a vector
constant whose component type is not a legal type for the target.
(If the target ConstantPool cannot handle this type either, it has
an opportunity to merge elements. In practice any target with
8-bit bytes must support i8 *as data*).
7320806 (partial).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86751
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 10 Nov 2009 23:06:00 +0000 (23:06 +0000)]
Implement support to debug inlined functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86748
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 10 Nov 2009 22:56:15 +0000 (22:56 +0000)]
in -dot-cfg and -dot-cfg-only, when rendering switch instructions,
put the switch value in the successor boxes like we put T/F for branches.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86747
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 10 Nov 2009 22:39:16 +0000 (22:39 +0000)]
implement a TODO by teaching jump threading about "xor x, 1".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86739
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 10 Nov 2009 22:26:15 +0000 (22:26 +0000)]
move some generally useful functions out of jump threading
into libanalysis and transformutils.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86735
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 10 Nov 2009 22:16:57 +0000 (22:16 +0000)]
Don't mark conditional branch instructions as control barriers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86732
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 10 Nov 2009 22:14:04 +0000 (22:14 +0000)]
Modify how the prologue encoded the "move" information for the FDE. GCC
generates a sequence similar to this:
__Z4funci:
LFB2:
mflr r0
LCFI0:
stmw r30,-8(r1)
LCFI1:
stw r0,8(r1)
LCFI2:
stwu r1,-80(r1)
LCFI3:
mr r30,r1
LCFI4:
where LCFI3 and LCFI4 are used by the FDE to indicate what the FP, LR, and other
things are. We generated something more like this:
Leh_func_begin1:
mflr r0
stw r31, 20(r1)
stw r0, 8(r1)
Llabel1:
stwu r1, -80(r1)
Llabel2:
mr r31, r1
Note that we are missing the "mr" instruction. This patch makes it more like the
GCC output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86729
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 10 Nov 2009 22:05:35 +0000 (22:05 +0000)]
Process InlinedAt location info.
Update InsertDeclare to return newly inserted llvm.dbg.declare intrinsic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86727
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 10 Nov 2009 22:02:09 +0000 (22:02 +0000)]
fix a crash in SCCP handling extractvalue of an array, pointed out and
tracked down by Stephan Reiter!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86726
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 10 Nov 2009 22:01:05 +0000 (22:01 +0000)]
Teach PHIElimination to split critical edges when -split-phi-edges is enabled.
Critical edges leading to a PHI node are split when the PHI source variable is
live out from the predecessor block. This help the coalescer eliminate more
PHI joins.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86725
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 10 Nov 2009 22:00:56 +0000 (22:00 +0000)]
Refactoring: Extract method PHIElimination::isLiveOut().
Clean up some whitespace.
No functional changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86724
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 10 Nov 2009 21:45:09 +0000 (21:45 +0000)]
improve comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86723
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 10 Nov 2009 21:40:01 +0000 (21:40 +0000)]
Make jump threading eliminate blocks that just contain phi nodes,
debug intrinsics, and an unconditional branch when possible. This
reuses the TryToSimplifyUncondBranchFromEmptyBlock function split
out of simplifycfg.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86722
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 10 Nov 2009 21:14:05 +0000 (21:14 +0000)]
Generalize lsr code that optimize loop to count down towards zero.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86715
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 10 Nov 2009 21:02:18 +0000 (21:02 +0000)]
Optimize test more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86714
91177308-0d34-0410-b5e6-
96231b3b80d8
Victor Hernandez [Tue, 10 Nov 2009 19:53:28 +0000 (19:53 +0000)]
make this handle redefinition of malloc function with different prototype correctly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86712
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 10 Nov 2009 19:48:13 +0000 (19:48 +0000)]
Change Thumb1 address mode printing, instead of
[r0, #2 * 4]
Now
[r0, #8]
This makes Thumb2 assembly more uniform and frankly the scale doesn't add much.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86707
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 10 Nov 2009 19:44:56 +0000 (19:44 +0000)]
Add a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86706
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 10 Nov 2009 19:36:40 +0000 (19:36 +0000)]
Add defensive break.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86705
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 10 Nov 2009 18:24:37 +0000 (18:24 +0000)]
Add a monstrous hack to improve X86ISelDAGToDAG compile time.
- Force NDEBUG on in any Release build. This drops the compile time to ~100s
from ~600s, in Release mode.
- This may just be a temporary workaround, I don't know the true nature of the
gcc-4.2 compile time performance problem.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86695
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 10 Nov 2009 18:21:37 +0000 (18:21 +0000)]
Fix obvious typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86694
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 10 Nov 2009 17:00:47 +0000 (17:00 +0000)]
clarify logic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86689
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 10 Nov 2009 15:30:33 +0000 (15:30 +0000)]
CMake: Add Darwin-specific linker flags for building loadable modules
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86684
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 10 Nov 2009 13:49:50 +0000 (13:49 +0000)]
Teach DSE to eliminate useless trampolines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86683
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 10 Nov 2009 09:32:10 +0000 (09:32 +0000)]
Add brackets to make gcc-4.4 happy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86681
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 10 Nov 2009 09:08:09 +0000 (09:08 +0000)]
Codegen support for the llvm.invariant/lifetime.start/end intrinsics:
just throw them away.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86678
91177308-0d34-0410-b5e6-
96231b3b80d8
Victor Hernandez [Tue, 10 Nov 2009 08:32:25 +0000 (08:32 +0000)]
Update computeArraySize() to use ComputeMultiple() to determine the array size associated with a malloc; also extend PerformHeapAllocSRoA() to check if the optimized malloc's arg had its highest bit set, so that it is safe for ComputeMultiple() to look through sext instructions while determining the optimized malloc's array size
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86676
91177308-0d34-0410-b5e6-
96231b3b80d8
Victor Hernandez [Tue, 10 Nov 2009 08:28:35 +0000 (08:28 +0000)]
Add ComputeMultiple() analysis function that recursively determines if a Value V is a multiple of unsigned Base
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86675
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 10 Nov 2009 07:44:36 +0000 (07:44 +0000)]
optimize test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86672
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 10 Nov 2009 07:23:37 +0000 (07:23 +0000)]
unify the code that determines whether it is a good idea to change the type
of a computation. This fixes some infinite loops when dealing with TD that
has no native types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86670
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Tue, 10 Nov 2009 07:00:43 +0000 (07:00 +0000)]
Simplify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86668
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Tue, 10 Nov 2009 06:46:40 +0000 (06:46 +0000)]
Reapply r86359, "Teach dead store elimination that certain intrinsics write to
memory just like a store" with bug fixed (partial-overwrite.ll is the
regression test).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86667
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 10 Nov 2009 05:59:26 +0000 (05:59 +0000)]
refactor TryToSimplifyUncondBranchFromEmptyBlock out of SimplifyCFG.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86666
91177308-0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Tue, 10 Nov 2009 02:45:37 +0000 (02:45 +0000)]
CMake: Support for building llvm loadable modules.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86656
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 10 Nov 2009 02:41:27 +0000 (02:41 +0000)]
lit: Start documentation testing architecture.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86655
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 10 Nov 2009 02:41:17 +0000 (02:41 +0000)]
lit: Add ExampleTests, for testing lit and demonstrating test suite features.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86654
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 10 Nov 2009 02:40:21 +0000 (02:40 +0000)]
lit: Fix bug in --show-suites which accidentally override the list of tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86653
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Tue, 10 Nov 2009 02:35:13 +0000 (02:35 +0000)]
Fix PR5445
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86651
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 10 Nov 2009 02:04:54 +0000 (02:04 +0000)]
I misread the parens, not so redundant after all.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86648
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 10 Nov 2009 01:57:31 +0000 (01:57 +0000)]
make jump threading recursively simplify expressions instead of doing it
just one level deep. On the testcase we go from getting this:
F1: ; preds = %T2
%F = and i1 true, %cond ; <i1> [#uses=1]
br i1 %F, label %X, label %Y
to a fully threaded:
F1: ; preds = %T2
br label %Y
This changes gets us to the point where we're forming (too many) switch
instructions on doug's strswitch testcase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86646
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 10 Nov 2009 01:56:04 +0000 (01:56 +0000)]
remove some redundant parens.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86645
91177308-0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Tue, 10 Nov 2009 01:45:05 +0000 (01:45 +0000)]
CMake: Remove unnecessary `unset' which was not supported by old cmake
releases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86644
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 10 Nov 2009 01:37:57 +0000 (01:37 +0000)]
Remove an unused variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86642
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 10 Nov 2009 01:36:20 +0000 (01:36 +0000)]
Minor code simplification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86641
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 10 Nov 2009 01:33:08 +0000 (01:33 +0000)]
Trim a bunch of unneeded code from this testcase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86640
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 10 Nov 2009 01:19:06 +0000 (01:19 +0000)]
don't invalidate PN, rewrite of this code is in progress anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86639
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 10 Nov 2009 01:08:51 +0000 (01:08 +0000)]
add a new SimplifyInstruction API, which is like ConstantFoldInstruction,
except that the result may not be a constant. Switch jump threading to
use it so that it gets things like (X & 0) -> 0, which occur when phi preds
are deleted and the remaining phi pred was a zero.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86637
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeffrey Yasskin [Tue, 10 Nov 2009 01:02:17 +0000 (01:02 +0000)]
Fix DenseMap iterator constness.
This patch forbids implicit conversion of DenseMap::const_iterator to
DenseMap::iterator which was possible because DenseMapIterator inherited
(publicly) from DenseMapConstIterator. Conversion the other way around is now
allowed as one may expect.
The template DenseMapConstIterator is removed and the template parameter
IsConst which specifies whether the iterator is constant is added to
DenseMapIterator.
Actually IsConst parameter is not necessary since the constness can be
determined from KeyT but this is not relevant to the fix and can be addressed
later.
Patch by Victor Zverovich!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86636
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 10 Nov 2009 00:55:12 +0000 (00:55 +0000)]
factor simplification logic for AND and OR out to InstSimplify from instcombine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86635
91177308-0d34-0410-b5e6-
96231b3b80d8
David Goodwin [Tue, 10 Nov 2009 00:48:55 +0000 (00:48 +0000)]
Fixed to address code review. No functional changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86634
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 10 Nov 2009 00:43:58 +0000 (00:43 +0000)]
Fix MemoryBuffer::getSTDIN to *not* return null if stdin is empty, this is a lame API.
Also, Stringrefify some more MemoryBuffer functions, and add two performance FIXMEs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86630
91177308-0d34-0410-b5e6-
96231b3b80d8
David Goodwin [Tue, 10 Nov 2009 00:15:47 +0000 (00:15 +0000)]
Allow targets to specify register classes whose member registers should not be renamed to break anti-dependencies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86628
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 9 Nov 2009 23:55:12 +0000 (23:55 +0000)]
pull a bunch of logic out of instcombine into instsimplify for compare
simplification, this handles the foldable fcmp x,x cases among many others.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86627
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 9 Nov 2009 23:34:17 +0000 (23:34 +0000)]
Pass the (optional) TargetData object to ConstantFoldInstOperands
and ConstantFoldCompareInstOperands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86626
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 9 Nov 2009 23:31:49 +0000 (23:31 +0000)]
inline a simple function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86625
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 9 Nov 2009 23:28:39 +0000 (23:28 +0000)]
rename SimplifyCompare -> SimplifyCmpInst and split it into
Simplify[IF]Cmp pieces. Add some predicates to CmpInst to
determine whether a predicate is fp or int.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86624
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Mon, 9 Nov 2009 23:11:45 +0000 (23:11 +0000)]
Now that the default is 'enabled,' a separate command line option for ARM is
not necessary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86621
91177308-0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Mon, 9 Nov 2009 23:10:49 +0000 (23:10 +0000)]
Add testcase for recent checkin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86620
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 9 Nov 2009 23:06:58 +0000 (23:06 +0000)]
fix ConstantFoldCompareInstOperands to take the LHS/RHS as
individual operands instead of taking a temporary array
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86619
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 9 Nov 2009 23:05:44 +0000 (23:05 +0000)]
Add StringSwitch::Cases overloads, for matching multiple strings to a single
value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86618
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 9 Nov 2009 23:00:14 +0000 (23:00 +0000)]
use instructionsimplify instead of a weak clone of ad-hoc folding stuff.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86616
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Mon, 9 Nov 2009 22:59:01 +0000 (22:59 +0000)]
Update test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86614
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 9 Nov 2009 22:57:59 +0000 (22:57 +0000)]
stub out a new libanalysis "instruction simplify" interface that
takes decimated instructions and applies identities to them. This
is pretty minimal at this point, but I plan to pull some instcombine
logic out into these and similar routines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86613
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeffrey Yasskin [Mon, 9 Nov 2009 22:34:19 +0000 (22:34 +0000)]
Remove dlsym stubs, with Nate Begeman's permission.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86606
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Mon, 9 Nov 2009 22:32:40 +0000 (22:32 +0000)]
Enable dynamic stack realignment by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86604
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 9 Nov 2009 22:32:36 +0000 (22:32 +0000)]
stub out a new form of BasicBlock::RemovePredecessorAndSimplify which
simplifies instruction users of PHIs when the phi is eliminated. This
will be moved to transforms/utils after some other refactoring.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86603
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Mon, 9 Nov 2009 22:32:03 +0000 (22:32 +0000)]
Set dynamic stack realignment to real values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86602
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 9 Nov 2009 22:28:30 +0000 (22:28 +0000)]
Remove an unneeded #include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86601
91177308-0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Mon, 9 Nov 2009 22:28:21 +0000 (22:28 +0000)]
Fix for 64-bit builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86600
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 9 Nov 2009 21:45:26 +0000 (21:45 +0000)]
Similar to r86588, but for Darwin this time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86592
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 9 Nov 2009 21:20:14 +0000 (21:20 +0000)]
The jump table was being generated before the end label for exception handling
was generated. This caused code like this:
## The asm code for the function
.section __TEXT,__const
.align 2
lJTI11_0:
LJTI11_0:
.long LBB11_16
.long LBB11_4
.long LBB11_5
.long LBB11_6
.long LBB11_7
.long LBB11_8
.long LBB11_9
.long LBB11_10
.long LBB11_11
.long LBB11_12
.long LBB11_13
.long LBB11_14
Leh_func_end11: ## <---now in the wrong section!
The `Leh_func_end11' would then end up in the wrong section, causing the
resulting EH frame information to be wrong:
__ZL11CheckRightsjPKcbRbRP6NSData.eh:
.set Lset500eh,Leh_frame_end11-Leh_frame_begin11
.long Lset500eh ; Length of Frame Information Entry
Leh_frame_begin11:
.long Leh_frame_begin11-Leh_frame_common
.long Leh_func_begin11-.
.set Lset501eh,Leh_func_end11-Leh_func_begin11
.long Lset501eh ; FDE address range
`Lset501eh' is now something huge instead of the real value.
The X86 back-end generates the jump table after the EH information is
emitted. Do the same here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86588
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 9 Nov 2009 19:38:45 +0000 (19:38 +0000)]
Print "..." instead of all the uninteresting register clobbers on call
instructions. This makes CodeGen dumps significantly less noisy.
Example before:
BL <ga:@bar>, %R0<imp-def>, %R1<imp-def,dead>, %R2<imp-def,dead>, %R3<imp-def,dead>, %R12<imp-def,dead>, %LR<imp-def,dead>, %D0<imp-def,dead>, %D1<imp-def,dead>, %D2<imp-def,dead>, %D3<imp-def,dead>, %D4<imp-def,dead>, %D5<imp-def,dead>, %D6<imp-def,dead>, %D7<imp-def,dead>, %D16<imp-def,dead>, %D17<imp-def,dead>, %D18<imp-def,dead>, %D19<imp-def,dead>, %D20<imp-def,dead>, %D21<imp-def,dead>, %D22<imp-def,dead>, %D23<imp-def,dead>, %D24<imp-def,dead>, %D25<imp-def,dead>, %D26<imp-def,dead>, %D27<imp-def,dead>, %D28<imp-def,dead>, %D29<imp-def,dead>, %D30<imp-def,dead>, %D31<imp-def,dead>, %CPSR<imp-def,dead>, %FPSCR<imp-def,dead>
Same example after:
BL <ga:@bar>, %R0<imp-def>, %R1<imp-def,dead>, %LR<imp-def,dead>, %CPSR<imp-def,dead>, ...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86583
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 9 Nov 2009 19:29:11 +0000 (19:29 +0000)]
Default-addressspace null pointers don't alias anything. This allows
GVN to be more aggressive. Patch by Hans Wennborg! (with a comment added by me)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86582
91177308-0d34-0410-b5e6-
96231b3b80d8
David Goodwin [Mon, 9 Nov 2009 19:22:17 +0000 (19:22 +0000)]
Fix dependencies added to model memory aliasing for post-RA scheduling. The dependencies were overly conservative for memory access that are known not to alias.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86580
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 9 Nov 2009 19:01:53 +0000 (19:01 +0000)]
The inbounds keyword isn't relevant to overindexing of
static array types. Thanks to Duncan for pointing this out!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86576
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 9 Nov 2009 18:59:22 +0000 (18:59 +0000)]
Fix a comment in a typo that Duncan noticed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86575
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 9 Nov 2009 18:40:39 +0000 (18:40 +0000)]
Remove the "special case" for zero-length arrays, and rephrase this
paragraph to be more precise.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86572
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 9 Nov 2009 18:28:24 +0000 (18:28 +0000)]
Generalize LCSSA to handle loops with exits with predecessors outside
the loop. This is needed because with indirectbr it may not be possible
for LoopSimplify to guarantee that all loop exit predecessors are
inside the loop. This fixes PR5437.
LCCSA no longer actually requires LoopSimplify form, but for now it
must still have the dependency because the PassManager doesn't know
how to schedule LoopSimplify otherwise.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86569
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 9 Nov 2009 18:20:38 +0000 (18:20 +0000)]
Fix an 80-column violation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86567
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 9 Nov 2009 18:19:43 +0000 (18:19 +0000)]
Minor tidiness fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86565
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 9 Nov 2009 18:18:49 +0000 (18:18 +0000)]
Constify MachineFunctionAnalysis' TargetMachine reference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86564
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 9 Nov 2009 17:06:51 +0000 (17:06 +0000)]
Fix a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86558
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 9 Nov 2009 17:06:23 +0000 (17:06 +0000)]
Suppress implicit copy ctor and copy assignment for MachineFunction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86557
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 9 Nov 2009 16:38:15 +0000 (16:38 +0000)]
Use ',' separation in XFAILs, lit doesn't evaluate them as regexs (easy to add,
but might as well use the more standard syntax).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86553
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Mon, 9 Nov 2009 15:36:28 +0000 (15:36 +0000)]
add zextOrTrunc and sextOrTrunc methods, that are similar to the ones in APInt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86549
91177308-0d34-0410-b5e6-
96231b3b80d8