oota-llvm.git
18 years agoReform the unswitching code in terms of edge splitting, not block splitting.
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

18 years agoNicer code. :-)
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

18 years agoAdded X86 isel debugging stuff.
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

18 years agoRemove a level of indirection.
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

18 years agoFix a case where UnswitchTrivialCondition broke critical edges with
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

18 years agoUse the auto-generated call matcher. Remove a broken impl of the frameaddr/returnaddr
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

18 years agoUpdate to new-style flags usage, simplifying the .td file
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

18 years agoRemove a completed entry; add a new entry about fisttp op
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

18 years agoadd some notes, move some code around. Implement unswitching of loops
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

18 years agoMove code around to be more logical, no functionality change.
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

18 years agoWhen unswitching a trivial loop, do admit we are doing it! :)
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

18 years agoImplement unconditional unswitching of 'trivial' loops, those loops that contain
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

18 years agoSimplify control flow a bit, note that unswitch preserves canonical loop form
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

18 years agoMatch tblgen change.
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

18 years agoCall InsertISelMapEntry rather than map insertion operator to prevent overly
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

18 years agoAdded SelectionDAG::InsertISelMapEntry(). This is used to workaround the gcc
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

18 years agoMake the threshold a parameter
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

18 years agoDone
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

18 years agoEnable LSR by default for SPARC: it is a clear win.
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

18 years agoSimplify the loop-unswitch pass, by not even trying to unswitch loops with
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

18 years agoFix 80-column violations
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

18 years agoEnhance MVIZ in three ways:
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

18 years agonew testcase
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

18 years agoMatch getTargetNode() changes (now return SDNode* instead of SDOperand).
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

18 years agoMatch getTargetNode() changes (now returns SDNode* instead of SDOperand).
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

18 years agoMore changes to reduce frame size.
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

18 years agothis apparently passes on linux
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

18 years agoadd an option to turn on LSR.
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

18 years agosimplify this code now that each constant pool entry is not separately allocated
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

18 years agoAdjust to MachineConstantPool interface change: instead of keeping a
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

18 years agoinstead of keeping track of Constant/alignment pairs, actually compute the
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

18 years agorename fields of constant pool entries
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

18 years agoUse a MachineConstantPoolEntry struct instead of a pair to hold
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

18 years agoSimplify code, alignment must be specified now.
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

18 years agoAssert invariants
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

18 years agoRequire an alignment.
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

18 years agoMake MachineConstantPool entries alignments explicit
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

18 years agoAlways pass in an alignment.
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

18 years agoprovide an explicit alignment for cp entries
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

18 years agoAdd a comment: value is log2
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

18 years agoChange Select() from
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

18 years agoDarwin doesn't support #APP/#NO_APP
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

18 years agoAdd support for assembler directives that wrap inline asm
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

18 years agoRename BSel -> PPCBSel for the benefit of doxygen users.
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

18 years agoDisable this test for the time being as debug is brought up to speed.
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

18 years agoadd a simple optimization
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

18 years agoMention that delta can be used to reduce some Front-end problems.
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

18 years agoAdd SRoA to the lexicon. Patch by Marco Matthies!
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

18 years agoAdded options -cflag, -cxxflags, and -ldflags to override the default C
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

18 years agoSimplify some code, reducing calls to MaskedValueIsZero. Implement a minor
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

18 years agoRemove -pedantic. It no longer works.
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

18 years agomore email -> README moving
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

18 years agoEmit the 'mr' pseudoop for easier reading.
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

18 years agoAdd some random notes, not high-prio
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

18 years agoMove emails from nate into public places
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

18 years agoUse EraseInstFromFunction in a few cases to put the uses of the removed
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

18 years agoImplement some more interesting select sccp cases. This implements:
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

18 years agonew testcase for more interesting select sccp cases
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

18 years agoCompile this:
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

18 years agoAdd some happy helper methods.
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

18 years agoFix a problem in my patch yesterday, causing a miscompilation of 176.gcc
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

18 years agoFixed a local common symbol bug.
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

18 years agoFor ELF, .comm takes alignment value as the optional 3rd argument. It must be
Evan Cheng [Tue, 7 Feb 2006 21:54:08 +0000 (21:54 +0000)]
For ELF, .comm takes alignment value as the optional 3rd argument. It must be
specified in bytes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26043 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoImplement getConstraintType for PPC.
Chris Lattner [Tue, 7 Feb 2006 20:16:30 +0000 (20:16 +0000)]
Implement getConstraintType for PPC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26042 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agogetConstraintType should be virtual.
Chris Lattner [Tue, 7 Feb 2006 20:13:44 +0000 (20:13 +0000)]
getConstraintType should be virtual.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26041 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoFix Transforms/InstCombine/2006-02-07-SextZextCrash.ll
Chris Lattner [Tue, 7 Feb 2006 19:07:40 +0000 (19:07 +0000)]
Fix Transforms/InstCombine/2006-02-07-SextZextCrash.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26040 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agonew testcase that caused instcombine to crash on 176.gcc last night.
Chris Lattner [Tue, 7 Feb 2006 19:07:25 +0000 (19:07 +0000)]
new testcase that caused instcombine to crash on 176.gcc last night.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26039 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoDarwin ABI issues: weak, linkonce, etc. dynamic-no-pic support is complete.
Evan Cheng [Tue, 7 Feb 2006 08:38:37 +0000 (08:38 +0000)]
Darwin ABI issues: weak, linkonce, etc. dynamic-no-pic support is complete.
Also fixed a function stub bug. Added weak and linkonce support for
x86 Linux.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26038 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoRemind myself to add PIC and static asm printer support.
Evan Cheng [Tue, 7 Feb 2006 08:35:44 +0000 (08:35 +0000)]
Remind myself to add PIC and static asm printer support.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26037 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoGeneralize MaskedValueIsZero into a ComputeMaskedNonZeroBits function, which
Chris Lattner [Tue, 7 Feb 2006 08:05:22 +0000 (08:05 +0000)]
Generalize MaskedValueIsZero into a ComputeMaskedNonZeroBits function, which
is just as efficient as MVIZ and is also more general.

Fix a few minor bugs introduced in recent patches

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26036 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoMake MaskedValueIsZero take a uint64_t instead of a ConstantIntegral as a
Chris Lattner [Tue, 7 Feb 2006 07:27:52 +0000 (07:27 +0000)]
Make MaskedValueIsZero take a uint64_t instead of a ConstantIntegral as a
mask.  This allows the code to be simpler and more efficient.

Also, generalize some of the cases in MVIZ a bit, making it slightly more aggressive.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26035 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoUse Type::getIntegralTypeMask() to simplify some code
Chris Lattner [Tue, 7 Feb 2006 07:00:41 +0000 (07:00 +0000)]
Use Type::getIntegralTypeMask() to simplify some code

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26034 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoImplement the beginnings of a facility for simplifying expressions based on
Chris Lattner [Tue, 7 Feb 2006 06:56:34 +0000 (06:56 +0000)]
Implement the beginnings of a facility for simplifying expressions based on
'demanded bits', inspired by Nate's work in the dag combiner.  This isn't
complete, but needs to unrelated instcombiner changes to continue.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26033 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoadd a new Type::getIntegralTypeMask() method, which is useful for clients that
Chris Lattner [Tue, 7 Feb 2006 06:17:10 +0000 (06:17 +0000)]
add a new Type::getIntegralTypeMask() method, which is useful for clients that
want to do bitwise inspection of integer types.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26032 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoThe interpreter assumes that the caller of runFunction() must be lli, and
Jeff Cohen [Tue, 7 Feb 2006 05:29:44 +0000 (05:29 +0000)]
The interpreter assumes that the caller of runFunction() must be lli, and
therefore the function being called must be a main() returning an int.  The
consequences when these assumptions are false are not good, so don't assume
them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26031 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoTeach the interpreter to handle global variables that are added to a module after
Jeff Cohen [Tue, 7 Feb 2006 05:11:57 +0000 (05:11 +0000)]
Teach the interpreter to handle global variables that are added to a module after
interpretation has begun.  The JIT already handles this situation correctly, and
the interpreter can already handle new functions being added.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26030 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoFix some truncation warnings.
Jeff Cohen [Tue, 7 Feb 2006 03:34:35 +0000 (03:34 +0000)]
Fix some truncation warnings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26029 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agofix an error compiling with -pedantic
Chris Lattner [Tue, 7 Feb 2006 01:12:49 +0000 (01:12 +0000)]
fix an error compiling with -pedantic

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26028 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoAdd the simple PPC integer constraints
Chris Lattner [Tue, 7 Feb 2006 00:47:13 +0000 (00:47 +0000)]
Add the simple PPC integer constraints

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26027 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoHoist all SDOperand declarations within a Select_{opcode}() to the top level
Evan Cheng [Tue, 7 Feb 2006 00:37:41 +0000 (00:37 +0000)]
Hoist all SDOperand declarations within a Select_{opcode}() to the top level
to reduce stack memory usage. This is intended to work around the gcc bug.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26026 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoEliminate the printCallOperand method, using a 'call' modifier on
Chris Lattner [Mon, 6 Feb 2006 23:41:19 +0000 (23:41 +0000)]
Eliminate the printCallOperand method, using a 'call' modifier on
printOperand instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26025 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoAdd support for modifier strings in machine instr descriptions. This allows
Chris Lattner [Mon, 6 Feb 2006 23:40:48 +0000 (23:40 +0000)]
Add support for modifier strings in machine instr descriptions.  This allows
us to avoid creating lots of "Operand" types with different printers, instead
we can fold several together and use modifiers.  For example, we can now use:

${target:call} to say that the operand should be printed like a 'call' operand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26024 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoSimplify the variant handling code, no functionality change.
Chris Lattner [Mon, 6 Feb 2006 22:43:28 +0000 (22:43 +0000)]
Simplify the variant handling code, no functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26023 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoChange prototype
Chris Lattner [Mon, 6 Feb 2006 22:18:19 +0000 (22:18 +0000)]
Change prototype

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26022 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoAdd support for modifier characters to operand printers
Chris Lattner [Mon, 6 Feb 2006 22:17:23 +0000 (22:17 +0000)]
Add support for modifier characters to operand printers

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26021 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoChange the prototype of PrintAsmOperand
Chris Lattner [Mon, 6 Feb 2006 22:16:41 +0000 (22:16 +0000)]
Change the prototype of PrintAsmOperand

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26020 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoGoodbye nasty macro.
Jim Laskey [Mon, 6 Feb 2006 21:54:05 +0000 (21:54 +0000)]
Goodbye nasty macro.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26019 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoEdit requests from Sabre.
Jim Laskey [Mon, 6 Feb 2006 19:12:02 +0000 (19:12 +0000)]
Edit requests from Sabre.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26018 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agosee what this allignment thing will do
Andrew Lenharth [Mon, 6 Feb 2006 17:15:17 +0000 (17:15 +0000)]
see what this allignment thing will do

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26017 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoChanging model for the construction of debug information.
Jim Laskey [Mon, 6 Feb 2006 15:33:21 +0000 (15:33 +0000)]
Changing model for the construction of debug information.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26016 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoWe seem to have settled to __DWARF for section name.
Jim Laskey [Mon, 6 Feb 2006 14:16:15 +0000 (14:16 +0000)]
We seem to have settled to __DWARF for section name.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26015 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoAt the end of isel, select a replacement node for each handle that does not
Evan Cheng [Mon, 6 Feb 2006 08:12:55 +0000 (08:12 +0000)]
At the end of isel, select a replacement node for each handle that does not
have one. This can happen if a load's real uses are dead (i.e. they do not
have uses themselves).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26014 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoName change.
Evan Cheng [Mon, 6 Feb 2006 06:03:35 +0000 (06:03 +0000)]
Name change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26013 91177308-0d34-0410-b5e6-96231b3b80d8

18 years ago- Update load folding checks to match those auto-generated by tblgen.
Evan Cheng [Mon, 6 Feb 2006 06:02:33 +0000 (06:02 +0000)]
- Update load folding checks to match those auto-generated by tblgen.
- Manually select SDOperand's returned by TryFoldLoad which make up the
  load address.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26012 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoHandle HANDLENODE: just return itself.
Evan Cheng [Sun, 5 Feb 2006 08:46:14 +0000 (08:46 +0000)]
Handle HANDLENODE: just return itself.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26011 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoComplex pattern isel code shouldn't select nodes.
Evan Cheng [Sun, 5 Feb 2006 08:45:01 +0000 (08:45 +0000)]
Complex pattern isel code shouldn't select nodes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26010 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoFix the Sparc backend with Evan's recent tblgen changes
Chris Lattner [Sun, 5 Feb 2006 08:35:50 +0000 (08:35 +0000)]
Fix the Sparc backend with Evan's recent tblgen changes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26009 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoSparcV8 -> Sparc
Chris Lattner [Sun, 5 Feb 2006 08:30:45 +0000 (08:30 +0000)]
SparcV8 -> Sparc

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26008 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoThis xform isn't safe
Chris Lattner [Sun, 5 Feb 2006 08:26:16 +0000 (08:26 +0000)]
This xform isn't safe

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26007 91177308-0d34-0410-b5e6-96231b3b80d8

18 years agoBack out previous commit, it isn't safe.
Nate Begeman [Sun, 5 Feb 2006 08:23:00 +0000 (08:23 +0000)]
Back out previous commit, it isn't safe.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26006 91177308-0d34-0410-b5e6-96231b3b80d8