Commit Graph

27813 Commits

Author SHA1 Message Date
Bill Wendling c8e81b8d48 Removed even more std::cerr and #include <iostream> things.
llvm-svn: 31813
2006-11-17 07:52:03 +00:00
Bill Wendling 4b1a04ac62 Replaced DEBUG(std::cerr with DOUT.
llvm-svn: 31812
2006-11-17 07:36:54 +00:00
Bill Wendling fc9063e9cd Replace DEBUG(std::cerr with DOUT. Removed some iostream #includes.
llvm-svn: 31811
2006-11-17 07:33:59 +00:00
Bill Wendling 3216551491 Removed unneeded <iostream> #include.
llvm-svn: 31810
2006-11-17 07:10:51 +00:00
Chris Lattner 21eba2da26 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

llvm-svn: 31809
2006-11-17 06:17:33 +00:00
Chris Lattner 0727eeaeac New testcase.
llvm-svn: 31808
2006-11-17 06:09:49 +00:00
Reid Spencer 4b8067f37b 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.

llvm-svn: 31807
2006-11-17 03:32:33 +00:00
Bill Wendling 9d46fcd59c More removal of std::cerr and DEBUG, replacing with DOUT instead.
llvm-svn: 31806
2006-11-17 02:09:07 +00:00
Chris Lattner 3b7261b18e implement a todo: change a map into a vector
llvm-svn: 31805
2006-11-17 01:52:23 +00:00
Evan Cheng 71adba6dce Add opcode to TargetInstrDescriptor.
llvm-svn: 31804
2006-11-17 01:46:27 +00:00
Bill Wendling ca6f6a43e0 #ifndef NDEBUG the "if (Stream) ..." stuff.
llvm-svn: 31803
2006-11-17 01:43:48 +00:00
Evan Cheng 84dd67e08a Add opcode to TargetInstrDescriptor.
llvm-svn: 31802
2006-11-17 01:36:01 +00:00
Bill Wendling fc01016c75 Adjusted the // comments so that doxygen picks them up.
llvm-svn: 31801
2006-11-17 01:13:12 +00:00
Bill Wendling d108b9a60d Replace std::cerr uses of the "DEBUG" macro with "DOUT" instead. Removes
a #include of iostream.

llvm-svn: 31800
2006-11-17 00:50:36 +00:00
Chris Lattner be1a4d80b3 fix typo
llvm-svn: 31799
2006-11-17 00:49:36 +00:00
Bill Wendling d7fda04420 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.

llvm-svn: 31798
2006-11-17 00:49:12 +00:00
Chris Lattner a715288b40 implicit_def_vrrc doesn't generate code.
llvm-svn: 31797
2006-11-16 23:49:52 +00:00
Evan Cheng 538e9cafae New test case.
llvm-svn: 31796
2006-11-16 23:38:21 +00:00
Evan Cheng 572dc9cb4e Correct instructions for moving data between GR64 and SSE registers; also correct load i64 / store i64 from v2i64.
llvm-svn: 31795
2006-11-16 23:33:25 +00:00
Evan Cheng 7ae482c52a Fix a potential bug: MOVPDI2DI, etc. are not copy instructions.
llvm-svn: 31794
2006-11-16 23:22:26 +00:00
Reid Spencer 3f97d03f86 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.

llvm-svn: 31793
2006-11-16 23:17:27 +00:00
Jim Laskey 48850c10c0 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.

llvm-svn: 31792
2006-11-16 22:43:37 +00:00
Chris Lattner 30055b9208 fix a regression that I introduced. stdu should scale the offset by 4
before printing it.

llvm-svn: 31791
2006-11-16 21:45:30 +00:00
Evan Cheng c5e769710e Align stubs on 4 byte boundary. This fixes 447.dealII.
llvm-svn: 31790
2006-11-16 20:13:34 +00:00
Bill Wendling 8969ebca44 *** empty log message ***
llvm-svn: 31789
2006-11-16 20:11:33 +00:00
Evan Cheng e03ca9b0b4 Allow target to specify alignment for function stub.
llvm-svn: 31788
2006-11-16 20:04:54 +00:00
Evan Cheng 9fd73b8a7f Match MachineCodeEmitter changes.
llvm-svn: 31787
2006-11-16 20:04:04 +00:00
Reid Spencer b3030c42e0 Use a release version of bugpoint, if found. Include gccld passes.
llvm-svn: 31786
2006-11-16 18:32:47 +00:00
Chris Lattner 96d7386006 add a statistic
llvm-svn: 31785
2006-11-16 18:13:49 +00:00
Bill Wendling ae2a3097e6 Cleaned up the document. Added "doc_code" divisions for code examples.
llvm-svn: 31784
2006-11-16 09:31:19 +00:00
Bill Wendling d811cc6818 Don't recompute getNumOperands for each iteration.
llvm-svn: 31783
2006-11-16 07:35:18 +00:00
Bill Wendling cc9816c87b Added "removeRange", which takes and removes an entire LiveRange.
llvm-svn: 31781
2006-11-16 02:43:32 +00:00
Bill Wendling c7969fd1e7 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.

llvm-svn: 31780
2006-11-16 02:41:50 +00:00
Chris Lattner 2ccd16c0af make this harder
llvm-svn: 31779
2006-11-16 01:22:52 +00:00
Chris Lattner a7ff5162b0 fix broken encoding
llvm-svn: 31778
2006-11-16 01:01:28 +00:00
Chris Lattner e0a70388c2 enable the branch folding pass for the JIT.
llvm-svn: 31777
2006-11-16 01:00:07 +00:00
Chris Lattner e742d9a4b7 add ppc64 r+i stores with update.
llvm-svn: 31776
2006-11-16 00:57:19 +00:00
Chris Lattner 6f5840c409 add patterns for ppc32 preinc stores. ppc64 next.
llvm-svn: 31775
2006-11-16 00:41:37 +00:00
Chris Lattner 3a494989a6 switch these back to the 'bad old way'
llvm-svn: 31774
2006-11-16 00:33:34 +00:00
Evan Cheng f64da389f8 Fix an incorrectly inverted condition.
llvm-svn: 31773
2006-11-16 00:08:20 +00:00
Evan Cheng 8ae58b5828 ChangeToRegister should clear IsImp bit.
llvm-svn: 31772
2006-11-15 23:55:03 +00:00
Chris Lattner b4e911d15a Fix ppc64 epilog bug.
llvm-svn: 31771
2006-11-15 23:35:30 +00:00
Chris Lattner 5771156be0 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).

llvm-svn: 31770
2006-11-15 23:24:18 +00:00
Chris Lattner 78a403f90e 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.

llvm-svn: 31769
2006-11-15 23:23:02 +00:00
Chris Lattner 5c23899c7d add a new field needed by the code emitter generator.
llvm-svn: 31768
2006-11-15 22:55:04 +00:00
Chris Lattner 7cab3de0da Fix typo pointed out by Bryan Adams
llvm-svn: 31766
2006-11-15 21:04:15 +00:00
Evan Cheng dc2c8748a7 Properly transfer kill / dead info.
llvm-svn: 31765
2006-11-15 20:58:11 +00:00
Evan Cheng bbbcac39e6 Kill / dead info has been moved to MI's.
llvm-svn: 31764
2006-11-15 20:56:39 +00:00
Evan Cheng c57819d4a3 commuteInstruction should propagate kill / dead info.
llvm-svn: 31763
2006-11-15 20:56:03 +00:00
Evan Cheng 0ffff1c629 Match live variable changes.
llvm-svn: 31762
2006-11-15 20:55:15 +00:00