Commit Graph

22732 Commits

Author SHA1 Message Date
Chris Lattner
f9a05329a1 Another hack due to allowing multiple symbols with the same name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26150 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-13 22:22:42 +00:00
Chris Lattner
ed1e1e232f Another work around for the 'symbols with different types can have the same
name' issue.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26149 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-13 21:43:26 +00:00
Andrew Lenharth
40ec5037fa improved zap discovery
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26148 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-13 18:52:29 +00:00
Andrew Lenharth
bd7c22cdcc test for improved zap discovery
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26147 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-13 18:52:01 +00:00
Jim Laskey
f198eb9c62 Sync up the tag numbers with gcc4.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26146 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-13 16:56:43 +00:00
Jim Laskey
d96185aa62 Rename to better reflect usage (current and planned.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26145 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-13 12:50:39 +00:00
Chris Lattner
6831a81599 Completely rewrite libcall insertion by the legalizer, providing the
following handy-dandy properties:

1. it is always correct now
2. it is much faster than before
3. it is easier to understand

This implementation builds off of the recent simplifications of the
legalizer that made it single-pass instead of iterative.

This fixes JM/lencod, JM/ldecod, and
CodeGen/Generic/2006-02-12-InsertLibcall.ll (at least on PPC).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26144 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-13 09:18:02 +00:00
Chris Lattner
94dd29216c Switch targets over to using SelectionDAG::getCALLSEQ_START to create
CALLSEQ_START nodes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26143 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-13 09:00:43 +00:00
Chris Lattner
45b3976db7 Switch to using getCALLSEQ_START instead of using our own creation calls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26142 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-13 08:55:29 +00:00
Chris Lattner
6a5b6d7633 Add a method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26141 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-13 08:54:46 +00:00
Chris Lattner
3b6059285b this passes now, due to Nate's recent efforts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26140 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-13 07:26:36 +00:00
Chris Lattner
d1157dd535 Reduce this testcase a bit more, with the help of llvm-extract and some hand tweaks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26139 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-13 07:02:50 +00:00
Chris Lattner
c15637bafc Be careful not to request or look at bits shifted in from outside the size
of the input.  This fixes the mediabench/gsm/toast failure last night.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26138 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-13 06:09:08 +00:00
Evan Cheng
50b5c2ebd9 Added a test case for a libcall insertion bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26137 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-12 10:24:00 +00:00
Nate Begeman
789fd42320 Add missing patterns for andi. and andis., fixing test/Regression/CodeGen/
PowerPC/and-imm.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26136 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-12 09:09:52 +00:00
Chris Lattner
8d6bbdbbcb remove some more dead special case code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26135 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-12 08:07:37 +00:00
Chris Lattner
f8c36f502b Eliminate special case hacks that are superceded by general purpose hacks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26134 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-12 08:02:11 +00:00
Chris Lattner
6261d766f9 tweaks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26133 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-12 08:01:35 +00:00
Chris Lattner
bf5d8a8270 Three changes:
1. Teach GetConstantInType to handle boolean constants.
2. Teach instcombine to fold (compare X, CST) when X has known 0/1 bits.
   Testcase here: set.ll:test22
3. Improve the "(X >> c1) & C2 == 0" folding code to allow a noop cast
   between the shift and and.  More aggressive bitfolding for other reasons
   was turning signed shr's into unsigned shr's, leaving the noop cast in
   the way.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26131 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-12 02:07:56 +00:00
Chris Lattner
e7df1a27f9 new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26130 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-12 02:06:31 +00:00
Chris Lattner
ecd9653981 move a failing testcase from bit-tracking.ll to narrow.ll, and move the
xfail marker with it


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26129 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-12 02:02:43 +00:00
Chris Lattner
ee628cfefb Revert my last patch. It too breaks stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26128 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-12 01:59:10 +00:00
Chris Lattner
82b98a0646 Make these tests fail if opt crashes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26127 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-12 01:32:58 +00:00
Chris Lattner
d308ddcd67 Fix for my previously reverted patch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26126 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-11 21:24:54 +00:00
Chris Lattner
539c337148 Update comments to be actually accurate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26124 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-11 09:37:07 +00:00
Chris Lattner
92aa95fc76 This is implemented by the simplify-libcalls pass, not instcombine
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26123 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-11 09:33:28 +00:00
Chris Lattner
255d8919b6 Port the recent innovations in ComputeMaskedBits to SimplifyDemandedBits.
This allows us to simplify on conditions where bits are not known, but they
are not demanded either!  This also fixes a couple of bugs in
ComputeMaskedBits that were exposed during this work.

In the future, swaths of instcombine should be removed, as this code
subsumes a bunch of ad-hockery.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26122 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-11 09:31:47 +00:00
Chris Lattner
5077c7be92 revert my previous change, it exposed other problems.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26121 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-11 08:47:47 +00:00
Duraid Madina
b20f97959e fix storing booleans (grawp missed this one)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26120 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-11 07:33:17 +00:00
Duraid Madina
631a140054 now short immediates will get matched (previously constants were all
triggering movl 64bit imm fat instructions)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26119 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-11 07:32:15 +00:00
Chris Lattner
8587eb3a51 Make this check stricter. Disallow loop exit blocks from being shared by
loops and their subloops.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26118 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-11 02:13:17 +00:00
Evan Cheng
2486af1b53 Prevent certain nodes that have already been selected from being folded into
X86 addressing mode. Currently we do not allow any node whose target node
produces a chain as well as any node that is at the root of the addressing
mode expression tree.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26117 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-11 02:05:36 +00:00
Chris Lattner
441365c46e remove dead expr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26116 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-11 01:43:37 +00:00
Jim Laskey
ce72b1755f Reorg for integration with gcc4. Old style debug info will not be passed though
to SelIDAG.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26115 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-11 01:01:30 +00:00
Chris Lattner
c23580969f implement unswitching of loops with switch stmts and selects in them
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26114 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-11 00:43:37 +00:00
Chris Lattner
e825593bf2 Update PHI nodes in successors of exit blocks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26113 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-10 23:26:14 +00:00
Chris Lattner
b2bc315eac Reform the unswitching code in terms of edge splitting, not block splitting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26112 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-10 23:16:39 +00:00
Evan Cheng
23addc061c Nicer code. :-)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26111 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-10 22:46:26 +00:00
Evan Cheng
f597dc78f8 Added X86 isel debugging stuff.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26110 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-10 22:24:32 +00:00
Chris Lattner
ebccc040e5 Remove a level of indirection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26109 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-10 21:32:11 +00:00
Chris Lattner
81be2e961b Fix a case where UnswitchTrivialCondition broke critical edges with
phi's in the successors


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26108 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-10 19:08:15 +00:00
Chris Lattner
ad7a3e6208 Use the auto-generated call matcher. Remove a broken impl of the frameaddr/returnaddr
intrinsics.

Autogen frameindex matcher


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26107 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-10 07:35:42 +00:00
Chris Lattner
f613fcb741 Update to new-style flags usage, simplifying the .td file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26106 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-10 06:58:25 +00:00
Evan Cheng
c57e5c17bc Remove a completed entry; add a new entry about fisttp op
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26105 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-10 05:48:15 +00:00
Chris Lattner
708e1a5c9c add some notes, move some code around. Implement unswitching of loops
with branches on partially invariant computations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26104 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-10 02:30:37 +00:00
Chris Lattner
dd3ee6d086 Move code around to be more logical, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26103 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-10 02:01:22 +00:00
Chris Lattner
4d1ca946ea When unswitching a trivial loop, do admit we are doing it! :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26102 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-10 01:36:35 +00:00
Chris Lattner
4c41d49a92 Implement unconditional unswitching of 'trivial' loops, those loops that contain
branches in their entry block that control whether or not the loop is a noop or not.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26101 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-10 01:24:09 +00:00
Chris Lattner
f4f5f4e56f Simplify control flow a bit, note that unswitch preserves canonical loop form
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26098 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-09 22:15:42 +00:00
Evan Cheng
7d82d607c5 Match tblgen change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26096 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-09 22:12:53 +00:00