oota-llvm.git
18 years agostart using PPC predicates more consistently.
Chris Lattner [Fri, 17 Nov 2006 22:10:59 +0000 (22:10 +0000)]
start using PPC predicates more consistently.

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

18 years agoFor unsigned 8-bit division. Use movzbw to set the lower 8 bits of AX while
Evan Cheng [Fri, 17 Nov 2006 22:10:14 +0000 (22:10 +0000)]
For unsigned 8-bit division. Use movzbw to set the lower 8 bits of AX while
clearing the upper 8-bits instead of issuing two instructions. This also
eliminates the need to target the AH register which can be problematic on
x86-64.

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

18 years agoHopefully a good crack at making debugging work on intel -disable-fp-elim.
Jim Laskey [Fri, 17 Nov 2006 21:19:15 +0000 (21:19 +0000)]
Hopefully a good crack at making debugging work on intel -disable-fp-elim.

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

18 years agoAdd a x86-64 test case: movb %sil, %ah is illegal.
Evan Cheng [Fri, 17 Nov 2006 20:41:55 +0000 (20:41 +0000)]
Add a x86-64 test case: movb %sil, %ah is illegal.

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

18 years agoAssert unhandled case.
Jim Laskey [Fri, 17 Nov 2006 18:49:39 +0000 (18:49 +0000)]
Assert unhandled case.

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

18 years agoCase sensitive not.
Jim Laskey [Fri, 17 Nov 2006 18:00:39 +0000 (18:00 +0000)]
Case sensitive not.

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

18 years agoCheck for MaxAlign.
Jim Laskey [Fri, 17 Nov 2006 17:19:49 +0000 (17:19 +0000)]
Check for MaxAlign.

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

18 years agoTests to verify PowerPC ABI.
Jim Laskey [Fri, 17 Nov 2006 16:54:21 +0000 (16:54 +0000)]
Tests to verify PowerPC ABI.

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

18 years ago1. Ignore the -disable-fp-elim when the routine is a leaf.
Jim Laskey [Fri, 17 Nov 2006 16:09:31 +0000 (16:09 +0000)]
1. Ignore the -disable-fp-elim when the routine is a leaf.
2. Offsets on 64-bit stores are still in bytes.

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

18 years agoTypo. Fix the nightly tests.
Jim Laskey [Fri, 17 Nov 2006 14:06:41 +0000 (14:06 +0000)]
Typo. Fix the nightly tests.

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

18 years agoFixing the ENABLE_OPTIMIZED=1 DISABLE_ASSERTIONS=1 build.
Jim Laskey [Fri, 17 Nov 2006 13:07:55 +0000 (13:07 +0000)]
Fixing the ENABLE_OPTIMIZED=1 DISABLE_ASSERTIONS=1 build.

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

18 years agoNeed <iostream> for the time being.
Bill Wendling [Fri, 17 Nov 2006 10:09:22 +0000 (10:09 +0000)]
Need <iostream> for the time being.

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

18 years agoNeed iostream to be included for the time being.
Bill Wendling [Fri, 17 Nov 2006 10:05:07 +0000 (10:05 +0000)]
Need iostream to be included for the time being.

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

18 years agoMoved definition of llvm_ostream wrappers to the Streams.cpp file.
Bill Wendling [Fri, 17 Nov 2006 09:54:47 +0000 (09:54 +0000)]
Moved definition of llvm_ostream wrappers to the Streams.cpp file.

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

18 years agoUsed llvm_ostream instead of std::ostream objects. This will reduce use
Bill Wendling [Fri, 17 Nov 2006 09:52:49 +0000 (09:52 +0000)]
Used llvm_ostream instead of std::ostream objects. This will reduce use
of the icky <iostream> class.

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

18 years agoAdded wrappers for the std::cerr/std::cout objects. The wrappers will
Bill Wendling [Fri, 17 Nov 2006 09:51:22 +0000 (09:51 +0000)]
Added wrappers for the std::cerr/std::cout objects. The wrappers will
soon replace all uses of those objects.

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

18 years agoNeeded <iostream> for now.
Bill Wendling [Fri, 17 Nov 2006 09:44:28 +0000 (09:44 +0000)]
Needed <iostream> for now.

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

18 years agoNeeds the iostream include.
Bill Wendling [Fri, 17 Nov 2006 09:38:03 +0000 (09:38 +0000)]
Needs the iostream include.

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

18 years agoRemoved iostream #includes. Replaced std::cerr with DOUT.
Bill Wendling [Fri, 17 Nov 2006 08:03:48 +0000 (08:03 +0000)]
Removed iostream #includes. Replaced std::cerr with DOUT.

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

18 years agoRemoved even more std::cerr and #include <iostream> things.
Bill Wendling [Fri, 17 Nov 2006 07:52:03 +0000 (07:52 +0000)]
Removed even more std::cerr and #include <iostream> things.

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

18 years agoReplaced DEBUG(std::cerr with DOUT.
Bill Wendling [Fri, 17 Nov 2006 07:36:54 +0000 (07:36 +0000)]
Replaced DEBUG(std::cerr with DOUT.

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

18 years agoReplace DEBUG(std::cerr with DOUT. Removed some iostream #includes.
Bill Wendling [Fri, 17 Nov 2006 07:33:59 +0000 (07:33 +0000)]
Replace DEBUG(std::cerr with DOUT. Removed some iostream #includes.

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

18 years agoRemoved unneeded <iostream> #include.
Bill Wendling [Fri, 17 Nov 2006 07:10:51 +0000 (07:10 +0000)]
Removed unneeded <iostream> #include.

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

18 years agoIf an indvar with a variable stride is used by the exit condition, go ahead
Chris Lattner [Fri, 17 Nov 2006 06:17:33 +0000 (06:17 +0000)]
If an indvar with a variable stride is used by the exit condition, go ahead
and handle it like constant stride vars.  This fixes some bad codegen in
variable stride cases.  For example, it compiles this:

void foo(int k, int i) {
  for (k=i+i; k <= 8192; k+=i)
    flags2[k] = 0;
}

to:

LBB1_1: #bb.preheader
        movl %eax, %ecx
        addl %ecx, %ecx
        movl L_flags2$non_lazy_ptr, %edx
LBB1_2: #bb
        movb $0, (%edx,%ecx)
        addl %eax, %ecx
        cmpl $8192, %ecx
        jle LBB1_2      #bb
LBB1_5: #return
        ret

or (if the array is local and we are in dynamic-nonpic or static mode):

LBB3_2: #bb
        movb $0, _flags2(%ecx)
        addl %eax, %ecx
        cmpl $8192, %ecx
        jle LBB3_2      #bb

and:

        lis r2, ha16(L_flags2$non_lazy_ptr)
        lwz r2, lo16(L_flags2$non_lazy_ptr)(r2)
        slwi r3, r4, 1
LBB1_2: ;bb
        li r5, 0
        add r6, r4, r3
        stbx r5, r2, r3
        cmpwi cr0, r6, 8192
        bgt cr0, LBB1_5 ;return

instead of:

        leal (%eax,%eax,2), %ecx
        movl %eax, %edx
        addl %edx, %edx
        addl L_flags2$non_lazy_ptr, %edx
        xorl %esi, %esi
LBB1_2: #bb
        movb $0, (%edx,%esi)
        movl %eax, %edi
        addl %esi, %edi
        addl %ecx, %esi
        cmpl $8192, %esi
        jg LBB1_5       #return

and:

        lis r2, ha16(L_flags2$non_lazy_ptr)
        lwz r2, lo16(L_flags2$non_lazy_ptr)(r2)
        mulli r3, r4, 3
        slwi r5, r4, 1
        li r6, 0
        add r2, r2, r5
LBB1_2: ;bb
        li r5, 0
        add r7, r3, r6
        stbx r5, r2, r6
        add r6, r4, r6
        cmpwi cr0, r7, 8192
        ble cr0, LBB1_2 ;bb

This speeds up Benchmarks/Shootout/sieve from 8.533s to 6.464s and
implements LoopStrengthReduce/var_stride_used_by_compare.ll

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

18 years agoNew testcase.
Chris Lattner [Fri, 17 Nov 2006 06:09:49 +0000 (06:09 +0000)]
New testcase.

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

18 years agoUndo removal of the runtime libraries. While this may have been a bit
Reid Spencer [Fri, 17 Nov 2006 03:32:33 +0000 (03:32 +0000)]
Undo removal of the runtime libraries. While this may have been a bit
premature, these libraries will be going away for the 2.0 release. Other
arrangements for profiling, gc, etc. should be made in the next few months.

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

18 years agoMore removal of std::cerr and DEBUG, replacing with DOUT instead.
Bill Wendling [Fri, 17 Nov 2006 02:09:07 +0000 (02:09 +0000)]
More removal of std::cerr and DEBUG, replacing with DOUT instead.

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

18 years agoimplement a todo: change a map into a vector
Chris Lattner [Fri, 17 Nov 2006 01:52:23 +0000 (01:52 +0000)]
implement a todo: change a map into a vector

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

18 years agoAdd opcode to TargetInstrDescriptor.
Evan Cheng [Fri, 17 Nov 2006 01:46:27 +0000 (01:46 +0000)]
Add opcode to TargetInstrDescriptor.

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

18 years ago#ifndef NDEBUG the "if (Stream) ..." stuff.
Bill Wendling [Fri, 17 Nov 2006 01:43:48 +0000 (01:43 +0000)]
#ifndef NDEBUG the "if (Stream) ..." stuff.

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

18 years agoAdd opcode to TargetInstrDescriptor.
Evan Cheng [Fri, 17 Nov 2006 01:36:01 +0000 (01:36 +0000)]
Add opcode to TargetInstrDescriptor.

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

18 years agoAdjusted the // comments so that doxygen picks them up.
Bill Wendling [Fri, 17 Nov 2006 01:13:12 +0000 (01:13 +0000)]
Adjusted the // comments so that doxygen picks them up.

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

18 years agoReplace std::cerr uses of the "DEBUG" macro with "DOUT" instead. Removes
Bill Wendling [Fri, 17 Nov 2006 00:50:36 +0000 (00:50 +0000)]
Replace std::cerr uses of the "DEBUG" macro with "DOUT" instead. Removes
a #include of iostream.

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

18 years agofix typo
Chris Lattner [Fri, 17 Nov 2006 00:49:36 +0000 (00:49 +0000)]
fix typo

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

18 years agoAdded "DOUT" macro. This is used as a replacement for the std::cerr
Bill Wendling [Fri, 17 Nov 2006 00:49:12 +0000 (00:49 +0000)]
Added "DOUT" macro. This is used as a replacement for the std::cerr
stream. It centralizes the use of std::cerr so that static c'tor/d'tors
aren't scattered around all over the place. The way to use it is like this:

       DOUT << "This is a status line: " << Var << "\n";

If "-debug" is specified, it will print. Otherwise, it'll not print. If
NDEBUG is defined, the DOUT does nothing.

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

18 years agoimplicit_def_vrrc doesn't generate code.
Chris Lattner [Thu, 16 Nov 2006 23:49:52 +0000 (23:49 +0000)]
implicit_def_vrrc doesn't generate code.

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

18 years agoNew test case.
Evan Cheng [Thu, 16 Nov 2006 23:38:21 +0000 (23:38 +0000)]
New test case.

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

18 years agoCorrect instructions for moving data between GR64 and SSE registers; also correct...
Evan Cheng [Thu, 16 Nov 2006 23:33:25 +0000 (23:33 +0000)]
Correct instructions for moving data between GR64 and SSE registers; also correct load i64 / store i64 from v2i64.

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

18 years agoFix a potential bug: MOVPDI2DI, etc. are not copy instructions.
Evan Cheng [Thu, 16 Nov 2006 23:22:26 +0000 (23:22 +0000)]
Fix a potential bug: MOVPDI2DI, etc. are not copy instructions.

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

18 years agoIn LLVM 2.0 we won't use the runtime libraries as llvm-gcc3 support will
Reid Spencer [Thu, 16 Nov 2006 23:17:27 +0000 (23:17 +0000)]
In LLVM 2.0 we won't use the runtime libraries as llvm-gcc3 support will
be dropped. This patch pertains to removing the runtime directory from LLVM.

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

18 years agoThis is a general clean up of the PowerPC ABI. Address several problems and
Jim Laskey [Thu, 16 Nov 2006 22:43:37 +0000 (22:43 +0000)]
This is a general clean up of the PowerPC ABI.  Address several problems and
bugs including making sure that the TOS links back to the previous frame,
that the maximum call frame size is not included twice when using frame
pointers, no longer growing the frame on calls, double storing of SP and
a cleaner/faster dynamic alloca.

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

18 years agofix a regression that I introduced. stdu should scale the offset by 4
Chris Lattner [Thu, 16 Nov 2006 21:45:30 +0000 (21:45 +0000)]
fix a regression that I introduced.  stdu should scale the offset by 4
before printing it.

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

18 years agoAlign stubs on 4 byte boundary. This fixes 447.dealII.
Evan Cheng [Thu, 16 Nov 2006 20:13:34 +0000 (20:13 +0000)]
Align stubs on 4 byte boundary. This fixes 447.dealII.

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

18 years ago*** empty log message ***
Bill Wendling [Thu, 16 Nov 2006 20:11:33 +0000 (20:11 +0000)]
*** empty log message ***

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

18 years agoAllow target to specify alignment for function stub.
Evan Cheng [Thu, 16 Nov 2006 20:04:54 +0000 (20:04 +0000)]
Allow target to specify alignment for function stub.

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

18 years agoMatch MachineCodeEmitter changes.
Evan Cheng [Thu, 16 Nov 2006 20:04:04 +0000 (20:04 +0000)]
Match MachineCodeEmitter changes.

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

18 years agoUse a release version of bugpoint, if found. Include gccld passes.
Reid Spencer [Thu, 16 Nov 2006 18:32:47 +0000 (18:32 +0000)]
Use a release version of bugpoint, if found. Include gccld passes.

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

18 years agoadd a statistic
Chris Lattner [Thu, 16 Nov 2006 18:13:49 +0000 (18:13 +0000)]
add a statistic

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

18 years agoCleaned up the document. Added "doc_code" divisions for code examples.
Bill Wendling [Thu, 16 Nov 2006 09:31:19 +0000 (09:31 +0000)]
Cleaned up the document. Added "doc_code" divisions for code examples.

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

18 years agoDon't recompute getNumOperands for each iteration.
Bill Wendling [Thu, 16 Nov 2006 07:35:18 +0000 (07:35 +0000)]
Don't recompute getNumOperands for each iteration.

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

18 years agoAdded "removeRange", which takes and removes an entire LiveRange.
Bill Wendling [Thu, 16 Nov 2006 02:43:32 +0000 (02:43 +0000)]
Added "removeRange", which takes and removes an entire LiveRange.

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

18 years agoAdded a new method "CreateNewLiveInterval" which, given a list of
Bill Wendling [Thu, 16 Nov 2006 02:41:50 +0000 (02:41 +0000)]
Added a new method "CreateNewLiveInterval" which, given a list of
LiveRanges, creates a new LiveInterval from them. The LiveRanges should
have existed already in another LiveInterval, but removed.

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

18 years agomake this harder
Chris Lattner [Thu, 16 Nov 2006 01:22:52 +0000 (01:22 +0000)]
make this harder

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

18 years agofix broken encoding
Chris Lattner [Thu, 16 Nov 2006 01:01:28 +0000 (01:01 +0000)]
fix broken encoding

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

18 years agoenable the branch folding pass for the JIT.
Chris Lattner [Thu, 16 Nov 2006 01:00:07 +0000 (01:00 +0000)]
enable the branch folding pass for the JIT.

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

18 years agoadd ppc64 r+i stores with update.
Chris Lattner [Thu, 16 Nov 2006 00:57:19 +0000 (00:57 +0000)]
add ppc64 r+i stores with update.

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

18 years agoadd patterns for ppc32 preinc stores. ppc64 next.
Chris Lattner [Thu, 16 Nov 2006 00:41:37 +0000 (00:41 +0000)]
add patterns for ppc32 preinc stores.  ppc64 next.

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

18 years agoswitch these back to the 'bad old way'
Chris Lattner [Thu, 16 Nov 2006 00:33:34 +0000 (00:33 +0000)]
switch these back to the 'bad old way'

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

18 years agoFix an incorrectly inverted condition.
Evan Cheng [Thu, 16 Nov 2006 00:08:20 +0000 (00:08 +0000)]
Fix an incorrectly inverted condition.

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

18 years agoChangeToRegister should clear IsImp bit.
Evan Cheng [Wed, 15 Nov 2006 23:55:03 +0000 (23:55 +0000)]
ChangeToRegister should clear IsImp bit.

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

18 years agoFix ppc64 epilog bug.
Chris Lattner [Wed, 15 Nov 2006 23:35:30 +0000 (23:35 +0000)]
Fix ppc64 epilog bug.

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

18 years agoStop using isTwoAddress, switching to operand constraints instead.
Chris Lattner [Wed, 15 Nov 2006 23:24:18 +0000 (23:24 +0000)]
Stop using isTwoAddress, switching to operand constraints instead.

Tell the codegen emitter that specific operands are not to be encoded, fixing
JIT regressions w.r.t. pre-inc loads and stores (e.g. lwzu, which we generate
even when general preinc loads are not enabled).

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

18 years agoRemove the isTwoAddress property from the CodeGenInstruction class. It should
Chris Lattner [Wed, 15 Nov 2006 23:23:02 +0000 (23:23 +0000)]
Remove the isTwoAddress property from the CodeGenInstruction class.  It should
not be used for anything other than backwards compat constraint handling.

Add support for a new DisableEncoding property which contains a list of
registers that should not be encoded by the generated code emitter.  Convert
the codeemitter generator to use this, fixing some PPC JIT regressions.

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

18 years agoadd a new field needed by the code emitter generator.
Chris Lattner [Wed, 15 Nov 2006 22:55:04 +0000 (22:55 +0000)]
add a new field needed by the code emitter generator.

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

18 years agoFix typo pointed out by Bryan Adams
Chris Lattner [Wed, 15 Nov 2006 21:04:15 +0000 (21:04 +0000)]
Fix typo pointed out by Bryan Adams

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

18 years agoProperly transfer kill / dead info.
Evan Cheng [Wed, 15 Nov 2006 20:58:11 +0000 (20:58 +0000)]
Properly transfer kill / dead info.

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

18 years agoKill / dead info has been moved to MI's.
Evan Cheng [Wed, 15 Nov 2006 20:56:39 +0000 (20:56 +0000)]
Kill / dead info has been moved to MI's.

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

18 years agocommuteInstruction should propagate kill / dead info.
Evan Cheng [Wed, 15 Nov 2006 20:56:03 +0000 (20:56 +0000)]
commuteInstruction should propagate kill / dead info.

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

18 years agoMatch live variable changes.
Evan Cheng [Wed, 15 Nov 2006 20:55:15 +0000 (20:55 +0000)]
Match live variable changes.

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

18 years agoMinor updates.
Evan Cheng [Wed, 15 Nov 2006 20:54:29 +0000 (20:54 +0000)]
Minor updates.

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

18 years agoA register def can be partially dead when the whole register has use(s) but a subreg...
Evan Cheng [Wed, 15 Nov 2006 20:54:11 +0000 (20:54 +0000)]
A register def can be partially dead when the whole register has use(s) but a subreg does not.

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

18 years agoDo away with kill / dead maps. Move kill / dead info onto MI's.
Evan Cheng [Wed, 15 Nov 2006 20:51:59 +0000 (20:51 +0000)]
Do away with kill / dead maps. Move kill / dead info onto MI's.

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

18 years agoAdd copyKillDeadInfo to copy kill / dead info; other minor updates.
Evan Cheng [Wed, 15 Nov 2006 20:48:17 +0000 (20:48 +0000)]
Add copyKillDeadInfo to copy kill / dead info; other minor updates.

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

18 years agofix ldu/stu jit encoding. Swith 64-bit preinc load instrs to use memri
Chris Lattner [Wed, 15 Nov 2006 19:55:13 +0000 (19:55 +0000)]
fix ldu/stu jit encoding. Swith 64-bit preinc load instrs to use memri
addrmodes.

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

18 years agoAdd run(Function &F) support in FunctionPassManager_New
Devang Patel [Wed, 15 Nov 2006 19:39:54 +0000 (19:39 +0000)]
Add run(Function &F) support in FunctionPassManager_New

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

18 years agoSimplify IntrinsicLowering and clarify that it is only for use by the
Chris Lattner [Wed, 15 Nov 2006 18:00:10 +0000 (18:00 +0000)]
Simplify IntrinsicLowering and clarify that it is only for use by the
CBE and interpreter.

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

18 years agoRemove unneeded forward decls
Chris Lattner [Wed, 15 Nov 2006 17:53:13 +0000 (17:53 +0000)]
Remove unneeded forward decls

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

18 years agoremove dead #include
Chris Lattner [Wed, 15 Nov 2006 17:51:15 +0000 (17:51 +0000)]
remove dead #include

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

18 years agoFix the PPC regressions last night
Chris Lattner [Wed, 15 Nov 2006 17:40:51 +0000 (17:40 +0000)]
Fix the PPC regressions last night

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

18 years agoFix a gcc 4.2 warning.
Chris Lattner [Wed, 15 Nov 2006 04:53:24 +0000 (04:53 +0000)]
Fix a gcc 4.2 warning.

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

18 years agoAdd a method to get the bit width of a packed type.
Reid Spencer [Wed, 15 Nov 2006 03:02:41 +0000 (03:02 +0000)]
Add a method to get the bit width of a packed type.

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

18 years agoSwitch loads over to use memri as the operand instead of a reg/imm operand
Chris Lattner [Wed, 15 Nov 2006 02:43:19 +0000 (02:43 +0000)]
Switch loads over to use memri as the operand instead of a reg/imm operand
pair for cleanliness.  Add instructions for PPC32 preinc-stores with commented
out patterns.  More improvement is needed to enable the patterns, but we're
getting close.

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

18 years agoADd support for adding constraints to suboperands
Chris Lattner [Wed, 15 Nov 2006 02:38:17 +0000 (02:38 +0000)]
ADd support for adding constraints to suboperands

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

18 years agoAdd doInitialization and doFinalization support in FunctionManager_New.
Devang Patel [Wed, 15 Nov 2006 02:07:25 +0000 (02:07 +0000)]
Add doInitialization and doFinalization support in FunctionManager_New.

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

18 years agoTidy up marking of last analysis user pass.
Devang Patel [Wed, 15 Nov 2006 01:48:14 +0000 (01:48 +0000)]
Tidy up marking of last analysis user pass.

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

18 years agoAdd doInitialization and doFinalization support in FunctionManager_New.
Devang Patel [Wed, 15 Nov 2006 01:27:05 +0000 (01:27 +0000)]
Add doInitialization and doFinalization support in FunctionManager_New.

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

18 years agoDo not derive CommonPassManagerImpl from Pass.
Devang Patel [Wed, 15 Nov 2006 01:11:27 +0000 (01:11 +0000)]
Do not derive CommonPassManagerImpl from Pass.
Now BasicBlockPassManager_New is a FunctionPass,
FunctionPassManager_New is a ModulePass

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

18 years agorestore some 'magic' code that I removed: it is needed. Add comments explaining
Chris Lattner [Tue, 14 Nov 2006 22:17:10 +0000 (22:17 +0000)]
restore some 'magic' code that I removed: it is needed.  Add comments explaining
why.

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

18 years agominimal hack to get patterns whose result type is iPTR to be selected.
Chris Lattner [Tue, 14 Nov 2006 21:50:27 +0000 (21:50 +0000)]
minimal hack to get patterns whose result type is iPTR to be selected.

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

18 years agoCopy initializeAnalysisImpl() implementation from PassManagerT.
Devang Patel [Tue, 14 Nov 2006 21:49:36 +0000 (21:49 +0000)]
Copy initializeAnalysisImpl() implementation from PassManagerT.
Update LastUser to recursively walk required transitive set.

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

18 years agoremove some dead code
Chris Lattner [Tue, 14 Nov 2006 21:41:35 +0000 (21:41 +0000)]
remove some dead code

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

18 years agoAdd support for nodes that return iPTR.
Chris Lattner [Tue, 14 Nov 2006 21:32:01 +0000 (21:32 +0000)]
Add support for nodes that return iPTR.

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

18 years agochanges to get ptr_rc to be accepted in patterns. This is needed for ppc preinc
Chris Lattner [Tue, 14 Nov 2006 21:18:40 +0000 (21:18 +0000)]
changes to get ptr_rc to be accepted in patterns.  This is needed for ppc preinc
stores.

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

18 years agoRevert. This wasn't meant to be checked in.
Evan Cheng [Tue, 14 Nov 2006 19:20:33 +0000 (19:20 +0000)]
Revert. This wasn't meant to be checked in.

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

18 years agogroup load and store instructions together. No functionality change.
Chris Lattner [Tue, 14 Nov 2006 19:19:53 +0000 (19:19 +0000)]
group load and store instructions together.  No functionality change.

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

18 years agoFix predicates for unindexed stores so they don't accidentally match indexed
Chris Lattner [Tue, 14 Nov 2006 19:13:39 +0000 (19:13 +0000)]
Fix predicates for unindexed stores so they don't accidentally match indexed
stores.

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

18 years agoRework PPC64 calls. Now we have a LR8/CTR8 register which the PPC64 calls
Chris Lattner [Tue, 14 Nov 2006 18:44:47 +0000 (18:44 +0000)]
Rework PPC64 calls.  Now we have a LR8/CTR8 register which the PPC64 calls
clobber.  This allows LR8 to be save/restored correctly as a 64-bit quantity,
instead of handling it as a 32-bit quantity.  This unbreaks ppc64 codegen when
the code is actually located above the 4G boundary.

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

18 years agoremove a ton of custom selection logic no longer needed
Chris Lattner [Tue, 14 Nov 2006 18:43:11 +0000 (18:43 +0000)]
remove a ton of custom selection logic no longer needed

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

18 years agoFix a bug handling nodes with variable arguments. The code was fixed to assume
Chris Lattner [Tue, 14 Nov 2006 18:41:38 +0000 (18:41 +0000)]
Fix a bug handling nodes with variable arguments.  The code was fixed to assume
that there were two input operands before the variable operand portion.  This
*happened* to be true for all call instructions, which took a chain and a
destination, but was not true for the PPC BCTRL instruction, whose destination
is implicit.

Making this code more general allows elimination of the custom selection logic
for BCTRL.

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

18 years agoit would be nice of ctlz were lowered to bsf etc.
Chris Lattner [Tue, 14 Nov 2006 08:08:46 +0000 (08:08 +0000)]
it would be nice of ctlz were lowered to bsf etc.

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