Chris Lattner [Mon, 13 Feb 2006 22:41:07 +0000 (22:41 +0000)]
If any of the sign extended bits are demanded, the input sign bit is demanded
for a sign extension.
This fixes InstCombine/2006-02-13-DemandedMiscompile.ll and Ptrdist/bc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26152
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 13 Feb 2006 22:31:50 +0000 (22:31 +0000)]
testcase reduced from Ptrdist/bc that is miscompiled by recent instcombine changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26151
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 13 Feb 2006 22:22:42 +0000 (22:22 +0000)]
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
Chris Lattner [Mon, 13 Feb 2006 21:43:26 +0000 (21:43 +0000)]
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
Andrew Lenharth [Mon, 13 Feb 2006 18:52:29 +0000 (18:52 +0000)]
improved zap discovery
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26148
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Lenharth [Mon, 13 Feb 2006 18:52:01 +0000 (18:52 +0000)]
test for improved zap discovery
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26147
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Laskey [Mon, 13 Feb 2006 16:56:43 +0000 (16:56 +0000)]
Sync up the tag numbers with gcc4.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26146
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Laskey [Mon, 13 Feb 2006 12:50:39 +0000 (12:50 +0000)]
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
Chris Lattner [Mon, 13 Feb 2006 09:18:02 +0000 (09:18 +0000)]
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
Chris Lattner [Mon, 13 Feb 2006 09:00:43 +0000 (09:00 +0000)]
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
Chris Lattner [Mon, 13 Feb 2006 08:55:29 +0000 (08:55 +0000)]
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
Chris Lattner [Mon, 13 Feb 2006 08:54:46 +0000 (08:54 +0000)]
Add a method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26141
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 13 Feb 2006 07:26:36 +0000 (07:26 +0000)]
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
Chris Lattner [Mon, 13 Feb 2006 07:02:50 +0000 (07:02 +0000)]
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
Chris Lattner [Mon, 13 Feb 2006 06:09:08 +0000 (06:09 +0000)]
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
Evan Cheng [Sun, 12 Feb 2006 10:24:00 +0000 (10:24 +0000)]
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
Nate Begeman [Sun, 12 Feb 2006 09:09:52 +0000 (09:09 +0000)]
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
Chris Lattner [Sun, 12 Feb 2006 08:07:37 +0000 (08:07 +0000)]
remove some more dead special case code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26135
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 12 Feb 2006 08:02:11 +0000 (08:02 +0000)]
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
Chris Lattner [Sun, 12 Feb 2006 08:01:35 +0000 (08:01 +0000)]
tweaks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26133
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 12 Feb 2006 02:07:56 +0000 (02:07 +0000)]
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
Chris Lattner [Sun, 12 Feb 2006 02:06:31 +0000 (02:06 +0000)]
new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26130
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 12 Feb 2006 02:02:43 +0000 (02:02 +0000)]
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
Chris Lattner [Sun, 12 Feb 2006 01:59:10 +0000 (01:59 +0000)]
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
Chris Lattner [Sun, 12 Feb 2006 01:32:58 +0000 (01:32 +0000)]
Make these tests fail if opt crashes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26127
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 11 Feb 2006 21:24:54 +0000 (21:24 +0000)]
Fix for my previously reverted patch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26126
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 11 Feb 2006 09:37:07 +0000 (09:37 +0000)]
Update comments to be actually accurate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26124
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 11 Feb 2006 09:33:28 +0000 (09:33 +0000)]
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
Chris Lattner [Sat, 11 Feb 2006 09:31:47 +0000 (09:31 +0000)]
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
Chris Lattner [Sat, 11 Feb 2006 08:47:47 +0000 (08:47 +0000)]
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
Duraid Madina [Sat, 11 Feb 2006 07:33:17 +0000 (07:33 +0000)]
fix storing booleans (grawp missed this one)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26120
91177308-0d34-0410-b5e6-
96231b3b80d8
Duraid Madina [Sat, 11 Feb 2006 07:32:15 +0000 (07:32 +0000)]
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
Chris Lattner [Sat, 11 Feb 2006 02:13:17 +0000 (02:13 +0000)]
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
Evan Cheng [Sat, 11 Feb 2006 02:05:36 +0000 (02:05 +0000)]
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
Chris Lattner [Sat, 11 Feb 2006 01:43:37 +0000 (01:43 +0000)]
remove dead expr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26116
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Laskey [Sat, 11 Feb 2006 01:01:30 +0000 (01:01 +0000)]
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
Chris Lattner [Sat, 11 Feb 2006 00:43:37 +0000 (00:43 +0000)]
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
Chris Lattner [Fri, 10 Feb 2006 23:26:14 +0000 (23:26 +0000)]
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
Chris Lattner [Fri, 10 Feb 2006 23:16:39 +0000 (23:16 +0000)]
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
Evan Cheng [Fri, 10 Feb 2006 22:46:26 +0000 (22:46 +0000)]
Nicer code. :-)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26111
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 10 Feb 2006 22:24:32 +0000 (22:24 +0000)]
Added X86 isel debugging stuff.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26110
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 10 Feb 2006 21:32:11 +0000 (21:32 +0000)]
Remove a level of indirection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26109
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 10 Feb 2006 19:08:15 +0000 (19:08 +0000)]
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
Chris Lattner [Fri, 10 Feb 2006 07:35:42 +0000 (07:35 +0000)]
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
Chris Lattner [Fri, 10 Feb 2006 06:58:25 +0000 (06:58 +0000)]
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
Evan Cheng [Fri, 10 Feb 2006 05:48:15 +0000 (05:48 +0000)]
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
Chris Lattner [Fri, 10 Feb 2006 02:30:37 +0000 (02:30 +0000)]
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
Chris Lattner [Fri, 10 Feb 2006 02:01:22 +0000 (02:01 +0000)]
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
Chris Lattner [Fri, 10 Feb 2006 01:36:35 +0000 (01:36 +0000)]
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
Chris Lattner [Fri, 10 Feb 2006 01:24:09 +0000 (01:24 +0000)]
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
Chris Lattner [Thu, 9 Feb 2006 22:15:42 +0000 (22:15 +0000)]
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
Evan Cheng [Thu, 9 Feb 2006 22:12:53 +0000 (22:12 +0000)]
Match tblgen change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26096
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 9 Feb 2006 22:12:27 +0000 (22:12 +0000)]
Call InsertISelMapEntry rather than map insertion operator to prevent overly
aggrssive inlining. This reduces Select_store frame size from 24k to 10k.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26095
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 9 Feb 2006 22:11:03 +0000 (22:11 +0000)]
Added SelectionDAG::InsertISelMapEntry(). This is used to workaround the gcc
problem where it inline the map insertion call too aggressively. Before this
change it was producing a frame size of 24k for Select_store(), now it's down
to 10k (by calling this method rather than calling the map insertion operator).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26094
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 9 Feb 2006 20:15:48 +0000 (20:15 +0000)]
Make the threshold a parameter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26093
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 9 Feb 2006 20:00:19 +0000 (20:00 +0000)]
Done
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26091
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 9 Feb 2006 19:59:55 +0000 (19:59 +0000)]
Enable LSR by default for SPARC: it is a clear win.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26090
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 9 Feb 2006 19:14:52 +0000 (19:14 +0000)]
Simplify the loop-unswitch pass, by not even trying to unswitch loops with
uses of loop values outside the loop. We need loop-closed SSA form to do
this right, or to use SSA rewriting if we really care.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26089
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 9 Feb 2006 07:41:14 +0000 (07:41 +0000)]
Fix 80-column violations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26088
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 9 Feb 2006 07:38:58 +0000 (07:38 +0000)]
Enhance MVIZ in three ways:
1. Teach it new tricks: in particular how to propagate through signed shr and sexts.
2. Teach it to return a bitset of known-1 and known-0 bits, instead of just zero.
3. Teach instcombine (AND X, C) to fold when we know all C bits of X.
This implements Regression/Transforms/InstCombine/bittest.ll, and allows
future things to be simplified.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26087
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 9 Feb 2006 07:38:30 +0000 (07:38 +0000)]
new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26086
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 9 Feb 2006 07:17:49 +0000 (07:17 +0000)]
Match getTargetNode() changes (now return SDNode* instead of SDOperand).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26085
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 9 Feb 2006 07:16:09 +0000 (07:16 +0000)]
Match getTargetNode() changes (now returns SDNode* instead of SDOperand).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26084
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 9 Feb 2006 07:15:23 +0000 (07:15 +0000)]
More changes to reduce frame size.
Move all getTargetNode() out of SelectionDAG.h into SelectionDAG.cpp. This
prevents them from being inlined.
Change getTargetNode() so they return SDNode * instead of SDOperand to prevent
copying. It should also help compilation speed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26083
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 9 Feb 2006 07:12:13 +0000 (07:12 +0000)]
this apparently passes on linux
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26082
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 9 Feb 2006 05:06:36 +0000 (05:06 +0000)]
add an option to turn on LSR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26080
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 9 Feb 2006 04:49:59 +0000 (04:49 +0000)]
simplify this code now that each constant pool entry is not separately allocated
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26079
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 9 Feb 2006 04:46:04 +0000 (04:46 +0000)]
Adjust to MachineConstantPool interface change: instead of keeping a
value/alignment pair for each constant, keep a value/offset pair.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26078
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 9 Feb 2006 04:44:32 +0000 (04:44 +0000)]
instead of keeping track of Constant/alignment pairs, actually compute the
offset of each entry from the start of the constant pool.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26077
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 9 Feb 2006 04:22:52 +0000 (04:22 +0000)]
rename fields of constant pool entries
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26076
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 9 Feb 2006 04:21:49 +0000 (04:21 +0000)]
Use a MachineConstantPoolEntry struct instead of a pair to hold
constant pool entries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26075
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 9 Feb 2006 02:26:04 +0000 (02:26 +0000)]
Simplify code, alignment must be specified now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26074
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 9 Feb 2006 02:25:42 +0000 (02:25 +0000)]
Assert invariants
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26073
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 9 Feb 2006 02:24:25 +0000 (02:24 +0000)]
Require an alignment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26072
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 9 Feb 2006 02:23:13 +0000 (02:23 +0000)]
Make MachineConstantPool entries alignments explicit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26071
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 9 Feb 2006 02:19:16 +0000 (02:19 +0000)]
Always pass in an alignment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26070
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 9 Feb 2006 02:15:30 +0000 (02:15 +0000)]
provide an explicit alignment for cp entries
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26069
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 9 Feb 2006 02:10:15 +0000 (02:10 +0000)]
Add a comment: value is log2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26068
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 9 Feb 2006 00:37:58 +0000 (00:37 +0000)]
Change Select() from
SDOperand Select(SDOperand N);
to
void Select(SDOperand &Result, SDOperand N);
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26067
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 8 Feb 2006 23:42:22 +0000 (23:42 +0000)]
Darwin doesn't support #APP/#NO_APP
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26066
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 8 Feb 2006 23:41:56 +0000 (23:41 +0000)]
Add support for assembler directives that wrap inline asm
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26065
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 8 Feb 2006 19:33:26 +0000 (19:33 +0000)]
Rename BSel -> PPCBSel for the benefit of doxygen users.
Move the methods out of line.
Remove unused Debug.h stuff.
Teach getNumBytesForInstruction to know the size of an inline asm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26064
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Laskey [Wed, 8 Feb 2006 18:17:06 +0000 (18:17 +0000)]
Disable this test for the time being as debug is brought up to speed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26063
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 8 Feb 2006 17:47:22 +0000 (17:47 +0000)]
add a simple optimization
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26062
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 8 Feb 2006 17:01:37 +0000 (17:01 +0000)]
Mention that delta can be used to reduce some Front-end problems.
Patch by Marco Matthies, thanks!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26061
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 8 Feb 2006 16:59:49 +0000 (16:59 +0000)]
Add SRoA to the lexicon. Patch by Marco Matthies!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26060
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 8 Feb 2006 09:08:06 +0000 (09:08 +0000)]
Added options -cflag, -cxxflags, and -ldflags to override the default C
compilation, C++ compilation, and linker options.
e.g. This is the options I use for testing on my x86 iMac:
nice ./NightlyTest.pl -release -cflags "-Os -DNDEBUG -fomit-frame-pointer" -cxxflags "-Os -DNDEBUG -finline-functions -felide-constructors -fomit-frame-pointer"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26057
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 8 Feb 2006 07:34:50 +0000 (07:34 +0000)]
Simplify some code, reducing calls to MaskedValueIsZero. Implement a minor
optimization where we reduce the number of bits in AND masks when possible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26056
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 8 Feb 2006 07:28:22 +0000 (07:28 +0000)]
Remove -pedantic. It no longer works.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26055
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 8 Feb 2006 07:12:07 +0000 (07:12 +0000)]
more email -> README moving
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26054
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 8 Feb 2006 06:56:40 +0000 (06:56 +0000)]
Emit the 'mr' pseudoop for easier reading.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26053
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 8 Feb 2006 06:52:06 +0000 (06:52 +0000)]
Add some random notes, not high-prio
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26052
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 8 Feb 2006 06:43:51 +0000 (06:43 +0000)]
Move emails from nate into public places
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26051
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 8 Feb 2006 03:25:32 +0000 (03:25 +0000)]
Use EraseInstFromFunction in a few cases to put the uses of the removed
instruction onto the worklist (in case they are now dead).
Add a really trivial local DSE implementation to help out bitfield code.
We now fold this:
struct S {
unsigned char a : 1, b : 1, c : 1, d : 2, e : 3;
S();
};
S::S() : a(0), b(0), c(1), d(0), e(6) {}
to this:
void %_ZN1SC1Ev(%struct.S* %this) {
entry:
%tmp.1 = getelementptr %struct.S* %this, int 0, uint 0
store ubyte 38, ubyte* %tmp.1
ret void
}
much earlier (in gccas instead of only in gccld after DSE runs).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26050
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 8 Feb 2006 02:38:11 +0000 (02:38 +0000)]
Implement some more interesting select sccp cases. This implements:
test/Regression/Transforms/SCCP/select.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26049
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 8 Feb 2006 02:37:40 +0000 (02:37 +0000)]
new testcase for more interesting select sccp cases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26048
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 8 Feb 2006 02:13:15 +0000 (02:13 +0000)]
Compile this:
xori r6, r2, 1
rlwinm r6, r6, 0, 31, 31
cmpwi cr0, r6, 0
bne cr0, LBB1_3 ; endif
to this:
rlwinm r6, r2, 0, 31, 31
cmpwi cr0, r6, 0
beq cr0, LBB1_3 ; endif
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26047
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 8 Feb 2006 02:05:45 +0000 (02:05 +0000)]
Add some happy helper methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26046
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 8 Feb 2006 01:20:23 +0000 (01:20 +0000)]
Fix a problem in my patch yesterday, causing a miscompilation of 176.gcc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26045
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 7 Feb 2006 23:32:58 +0000 (23:32 +0000)]
Fixed a local common symbol bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26044
91177308-0d34-0410-b5e6-
96231b3b80d8