oota-llvm.git
17 years agoHave ConstantExprs upgrade opcodes the same way as instructions.
Reid Spencer [Sat, 18 Nov 2006 04:37:19 +0000 (04:37 +0000)]
Have ConstantExprs upgrade opcodes the same way as instructions.

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

17 years agoon ppc64, float arguments take 8-byte stack slots not 4-byte stack slots.
Chris Lattner [Sat, 18 Nov 2006 01:57:19 +0000 (01:57 +0000)]
on ppc64, float arguments take 8-byte stack slots not 4-byte stack slots.
Also, valist should create a pointer RC reg class value, not a GPRC value.

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

17 years agomake sure to safe LR8 in the right stack slot for PPC64
Chris Lattner [Sat, 18 Nov 2006 01:34:43 +0000 (01:34 +0000)]
make sure to safe LR8 in the right stack slot for PPC64

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

17 years agoPretty print 'rldicr r2, r2, 2, 61' as 'sldi r2, r2, 2'.
Chris Lattner [Sat, 18 Nov 2006 01:23:56 +0000 (01:23 +0000)]
Pretty print 'rldicr r2, r2, 2, 61' as 'sldi r2, r2, 2'.

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

17 years agoRewrite the branch selector to be correct in the face of large functions.
Chris Lattner [Sat, 18 Nov 2006 00:32:03 +0000 (00:32 +0000)]
Rewrite the branch selector to be correct in the face of large functions.
The algorithm it used before wasn't 100% correct, we now use an iterative
expansion model.  This fixes assembler errors when compiling 403.gcc with
tail merging enabled.

Change the way the branch selector works overall: Now, the isel generates
PPC::BCC instructions (as it used to) directly, and these BCC instructions
are emitted to the output or jitted directly if branches don't need
expansion.  Only if branches need expansion are instructions rewritten
and created.  This should make branch select faster, and eliminates the
Bxx instructions from the .td file.

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

17 years agoadd encoding for BCC, after finally wrestling strange ppc/tblgen endianness
Chris Lattner [Fri, 17 Nov 2006 23:53:28 +0000 (23:53 +0000)]
add encoding for BCC, after finally wrestling strange ppc/tblgen endianness
issues to the ground.

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

17 years agoconvert PPC::BCC to use the 'pred' operand instead of separate predicate
Chris Lattner [Fri, 17 Nov 2006 22:37:34 +0000 (22:37 +0000)]
convert PPC::BCC to use the 'pred' operand instead of separate predicate
value and CR reg #.  This requires swapping the order of these everywhere
that touches BCC and requires us to write custom matching logic for
PPCcondbranch :(

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

17 years agorename PPC::COND_BRANCH to PPC::BCC
Chris Lattner [Fri, 17 Nov 2006 22:14:47 +0000 (22:14 +0000)]
rename PPC::COND_BRANCH to PPC::BCC

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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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

17 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