oota-llvm.git
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

18 years agofold c1 << (x + c2) into (c1 << c2) << x. fix a warning.
Nate Begeman [Sun, 5 Feb 2006 08:07:24 +0000 (08:07 +0000)]
fold c1 << (x + c2) into (c1 << c2) << x.  fix a warning.

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

18 years agosome stuff is done
Chris Lattner [Sun, 5 Feb 2006 07:54:37 +0000 (07:54 +0000)]
some stuff is done

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

18 years agoTurn A % (C << N), where C is 2^k, into A & ((C << N)-1) [urem only].
Chris Lattner [Sun, 5 Feb 2006 07:54:04 +0000 (07:54 +0000)]
Turn A % (C << N), where C is 2^k, into A & ((C << N)-1) [urem only].
Turn A / (C1 << N), where C1 is "1<<C2" into A >> (N+C2) [udiv only].

Tested with: rem.ll:test5, div.ll:test10

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

18 years agonew testcases
Chris Lattner [Sun, 5 Feb 2006 07:52:47 +0000 (07:52 +0000)]
new testcases

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

18 years agoHandle urem by shifted powers of 2.
Nate Begeman [Sun, 5 Feb 2006 07:36:48 +0000 (07:36 +0000)]
Handle urem by shifted powers of 2.

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

18 years agohandle combining A / (B << N) into A >>u (log2(B)+N) when B is a power of 2
Nate Begeman [Sun, 5 Feb 2006 07:20:23 +0000 (07:20 +0000)]
handle combining A / (B << N) into A >>u (log2(B)+N) when B is a power of 2

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

18 years agoUse SelectRoot() as the entry to any tblgen based isel.
Evan Cheng [Sun, 5 Feb 2006 06:51:51 +0000 (06:51 +0000)]
Use SelectRoot() as the entry to any tblgen based isel.

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

18 years agoUse SelectRoot() as entry of any tblgen based isel.
Evan Cheng [Sun, 5 Feb 2006 06:46:41 +0000 (06:46 +0000)]
Use SelectRoot() as entry of any tblgen based isel.

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

18 years agoEncourage use of the V8 ABI over the V9 ABI.
Chris Lattner [Sun, 5 Feb 2006 06:44:17 +0000 (06:44 +0000)]
Encourage use of the V8 ABI over the V9 ABI.

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

18 years agoAllow more loads to be folded which were previously prevented from happening
Evan Cheng [Sun, 5 Feb 2006 06:43:12 +0000 (06:43 +0000)]
Allow more loads to be folded which were previously prevented from happening
due to ordering issue. i.e. they were selected for chain use first.
Now at load select time, check if it is being selected for a chain use and if
it has only a single real use. If so, return a HANDLENODE (with the load as
its operand) in its place and record it.
When it is folded or the load is selected for a real use, the isel records it
as the replacement for the HANDLENODE. The replacement is done when all nodes
are selected.
This scheme exposed a couple of problems where cycles can happen. (See comments
in EmitMatchCode() for descriptions of the problems and their workaround /
solutions.) These problems have been resolved with a small compile time
penality.

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

18 years agoThis document is out of date. :(
Chris Lattner [Sun, 5 Feb 2006 06:40:12 +0000 (06:40 +0000)]
This document is out of date.  :(

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

18 years agoV8 -> Sparc
Chris Lattner [Sun, 5 Feb 2006 06:39:36 +0000 (06:39 +0000)]
V8 -> Sparc

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

18 years agoRemove the SparcV8 backend. It has been renamed to be the Sparc backend.
Chris Lattner [Sun, 5 Feb 2006 06:33:29 +0000 (06:33 +0000)]
Remove the SparcV8 backend.  It has been renamed to be the Sparc backend.

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

18 years agoremove V8 reference
Chris Lattner [Sun, 5 Feb 2006 06:32:59 +0000 (06:32 +0000)]
remove V8 reference

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

18 years ago* Added SDNode::isOnlyUse().
Evan Cheng [Sun, 5 Feb 2006 06:29:23 +0000 (06:29 +0000)]
* Added SDNode::isOnlyUse().
* Fix hasNUsesOfValue(), it should be const.

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

18 years agoSparcV8 -> Sparc
Chris Lattner [Sun, 5 Feb 2006 06:26:43 +0000 (06:26 +0000)]
SparcV8 -> Sparc

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

18 years agoSparcV8 -> Sparc
Chris Lattner [Sun, 5 Feb 2006 05:56:51 +0000 (05:56 +0000)]
SparcV8 -> Sparc

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

18 years agoThese were moved to ../SPARC
Chris Lattner [Sun, 5 Feb 2006 05:53:48 +0000 (05:53 +0000)]
These were moved to ../SPARC

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

18 years agomove V8 testcases here
Chris Lattner [Sun, 5 Feb 2006 05:52:55 +0000 (05:52 +0000)]
move V8 testcases here

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

18 years agoRename SPARC V8 target to be the LLVM SPARC target.
Chris Lattner [Sun, 5 Feb 2006 05:50:24 +0000 (05:50 +0000)]
Rename SPARC V8 target to be the LLVM SPARC target.

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

18 years agoadd a note
Chris Lattner [Sun, 5 Feb 2006 05:27:35 +0000 (05:27 +0000)]
add a note

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

18 years agoRe-commit the last bit of change that was backed out.
Evan Cheng [Sun, 5 Feb 2006 05:25:07 +0000 (05:25 +0000)]
Re-commit the last bit of change that was backed out.

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

18 years agoRe-committing the last bit of change. It shouldn't break PPC this time.
Evan Cheng [Sun, 5 Feb 2006 05:22:18 +0000 (05:22 +0000)]
Re-committing the last bit of change. It shouldn't break PPC this time.

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

18 years agomake sure that global doubles are aligned to 8 bytes
Chris Lattner [Sun, 5 Feb 2006 01:46:49 +0000 (01:46 +0000)]
make sure that global doubles are aligned to 8 bytes

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

18 years agoUse getPreferredAlignmentLog.
Chris Lattner [Sun, 5 Feb 2006 01:45:04 +0000 (01:45 +0000)]
Use getPreferredAlignmentLog.

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

18 years agoUse the asmprinter to find out what the preferred alignment of a global is.
Chris Lattner [Sun, 5 Feb 2006 01:30:45 +0000 (01:30 +0000)]
Use the asmprinter to find out what the preferred alignment of a global is.
This patch speeds up 172.mgrid from 31.81s to 11.39s on darwin/ppc.
Many many thanks to Nate for tracking down the root cause of the issue.

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

18 years agoImplement the AsmPrinter::getPreferredAlignmentLog method.
Chris Lattner [Sun, 5 Feb 2006 01:29:18 +0000 (01:29 +0000)]
Implement the AsmPrinter::getPreferredAlignmentLog method.

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

18 years agoadd a new method, getPreferredAlignmentLog.
Chris Lattner [Sun, 5 Feb 2006 01:24:06 +0000 (01:24 +0000)]
add a new method, getPreferredAlignmentLog.

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

18 years agolinkage fix for weak functions
Andrew Lenharth [Sat, 4 Feb 2006 19:13:09 +0000 (19:13 +0000)]
linkage fix for weak functions

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

18 years agoFix VC++ warning.
Jeff Cohen [Sat, 4 Feb 2006 16:20:31 +0000 (16:20 +0000)]
Fix VC++ warning.

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

18 years agoUse SCEVExpander::InsertCastOfTo instead of our own code. This reduces
Chris Lattner [Sat, 4 Feb 2006 09:52:43 +0000 (09:52 +0000)]
Use SCEVExpander::InsertCastOfTo instead of our own code.  This reduces
#LLVM LOC, and auto-cse's cast instructions.

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

18 years agoPull the InsertCastOfTo out of the header, implement CSE'ing of arguments.
Chris Lattner [Sat, 4 Feb 2006 09:51:53 +0000 (09:51 +0000)]
Pull the InsertCastOfTo out of the header, implement CSE'ing of arguments.

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

18 years agoRefactor a bunch of code into a non-inlined method
Chris Lattner [Sat, 4 Feb 2006 09:51:33 +0000 (09:51 +0000)]
Refactor a bunch of code into a non-inlined method

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

18 years agoTemporarily revert this patch, which probably breaks with the
Chris Lattner [Sat, 4 Feb 2006 09:24:16 +0000 (09:24 +0000)]
Temporarily revert this patch, which probably breaks with the
tblgen patch reverted.

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

18 years agoTemporarily revert the last change, which breaks PPC and other targets that
Chris Lattner [Sat, 4 Feb 2006 09:23:06 +0000 (09:23 +0000)]
Temporarily revert the last change, which breaks PPC and other targets that
DO select things.

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

18 years agoValue# select instructions, allowing -gcse to remove duplicates
Chris Lattner [Sat, 4 Feb 2006 09:15:29 +0000 (09:15 +0000)]
Value# select instructions, allowing -gcse to remove duplicates

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

18 years agoComplex pattern's custom matcher should not call Select() on any operands.
Evan Cheng [Sat, 4 Feb 2006 08:50:49 +0000 (08:50 +0000)]
Complex pattern's custom matcher should not call Select() on any operands.
Select them afterwards if it returns true.

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

18 years agoCustom lower VAARG for the case when we are doing vaarg(double). In this
Chris Lattner [Sat, 4 Feb 2006 08:31:30 +0000 (08:31 +0000)]
Custom lower VAARG for the case when we are doing vaarg(double).  In this
case, the double being loaded may not be 8-byte aligned, so we have to use
our standard bit_convert game.

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

18 years agoFix a nasty typo that broke functions with big stack frames.
Chris Lattner [Sat, 4 Feb 2006 08:04:21 +0000 (08:04 +0000)]
Fix a nasty typo that broke functions with big stack frames.

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

18 years agofix a bug in my last checkin
Chris Lattner [Sat, 4 Feb 2006 07:48:46 +0000 (07:48 +0000)]
fix a bug in my last checkin

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

18 years agoFix two significant bugs in LSR:
Chris Lattner [Sat, 4 Feb 2006 07:36:50 +0000 (07:36 +0000)]
Fix two significant bugs in LSR:

1. When rewriting code in outer loops, sometimes we would insert code into
   inner loops that is invariant in that loop.
2. Notice that 4*(2+x) is 8+4*x and use that to simplify expressions.

This is a performance neutral change.

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

18 years agoRemove some stuff that now works
Nate Begeman [Sat, 4 Feb 2006 07:29:35 +0000 (07:29 +0000)]
Remove some stuff that now works

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

18 years agoadd a note
Chris Lattner [Sat, 4 Feb 2006 07:07:31 +0000 (07:07 +0000)]
add a note

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

18 years agoTwo changes:
Chris Lattner [Sat, 4 Feb 2006 06:58:46 +0000 (06:58 +0000)]
Two changes:

1. Treat FMOVD as a copy instruction, to help with coallescing in V9 mode
2. When in V9 mode, insert FMOVD instead of FpMOVD instructions, as we don't
   ever rewrite FpMOVD instructions into FMOVS instructions, thus we just end
   up with commented out copies!
This should fix a bunch of failures in V9 mode on sparc.

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

18 years agoGet rid of some memory leaks identified by Valgrind
Evan Cheng [Sat, 4 Feb 2006 06:49:00 +0000 (06:49 +0000)]
Get rid of some memory leaks identified by Valgrind

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

18 years agoadd a method
Chris Lattner [Sat, 4 Feb 2006 05:49:01 +0000 (05:49 +0000)]
add a method

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

18 years agoLet bugpoint work on sparc with v9 instructions enabled.
Chris Lattner [Sat, 4 Feb 2006 05:02:27 +0000 (05:02 +0000)]
Let bugpoint work on sparc with v9 instructions enabled.

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

18 years agoFix VC++ warning.
Jeff Cohen [Sat, 4 Feb 2006 03:27:39 +0000 (03:27 +0000)]
Fix VC++ warning.

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

18 years agoKeep Visual Studio informed.
Jeff Cohen [Sat, 4 Feb 2006 03:27:04 +0000 (03:27 +0000)]
Keep Visual Studio informed.

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

18 years agoAdd initial support for immediates. This allows us to compile this:
Chris Lattner [Sat, 4 Feb 2006 02:26:14 +0000 (02:26 +0000)]
Add initial support for immediates.  This allows us to compile this:

int %rlwnm(int %A, int %B) {
  %C = call int asm "rlwnm $0, $1, $2, $3, $4", "=r,r,r,n,n"(int %A, int %B, int 4, int 17)
  ret int %C
}

into:

_rlwnm:
        or r2, r3, r3
        or r3, r4, r4
        rlwnm r2, r2, r3, 4, 17    ;; note the immediates :)
        or r3, r2, r2
        blr

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