Commit Graph

15156 Commits

Author SHA1 Message Date
Chris Lattner
7ed96abc09 add a note noticed through source inspection
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30418 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-16 23:57:51 +00:00
Chris Lattner
8829dc88a8 Oh yeah, this is needed too
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30407 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-16 05:08:34 +00:00
Chris Lattner
88640b5ecd add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30406 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-16 03:30:19 +00:00
Chris Lattner
f6bd07c7fe Fix Transforms/InstCombine/2006-09-15-CastToBool.ll and PR913
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30405 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-16 03:14:10 +00:00
Chris Lattner
a89654b1a1 simplify control flow, no functionality change
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30403 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-16 00:21:44 +00:00
Chris Lattner
7d7bffe157 Allow custom expand of mul
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30402 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-16 00:09:24 +00:00
Chris Lattner
cbce2f6c1b add a nate note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30399 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-15 20:31:36 +00:00
Chris Lattner
94876527af revert previous two patches. They cause miscompilation of MultiSource/Applications/Burg
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30397 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-15 17:24:45 +00:00
Owen Anderson
46f022a7f1 Revert my previous work on ArgumentPromotion. Further investigation has revealed these
changes to be incorrect.  They just weren't showing up in any of our current testcases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30385 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-15 05:22:51 +00:00
Chris Lattner
c6336273d9 Unbreak the JIT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30384 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-15 04:56:11 +00:00
Chris Lattner
428b92eb83 Keep track of the start of MBB's in a separate map from instructions. This
is faster and is needed for future improvements.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30383 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-15 03:57:23 +00:00
Evan Cheng
c45a2c72cc Remove a unnecessary check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30382 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-14 23:55:02 +00:00
Devang Patel
697e590580 Undo previous check-in.
Reintroduce recursive assignDFSNumber().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30380 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-14 21:43:24 +00:00
Chris Lattner
1ec72738ac Fold (X & C1) | (Y & C2) -> (X|Y) & C3 when possible.
This implements CodeGen/X86/and-or-fold.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30379 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-14 21:11:37 +00:00
Chris Lattner
f0613e1e7c add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30377 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-14 20:56:30 +00:00
Chris Lattner
516b962b5a Split rotate matching code out to its own function. Make it stronger, by
matching things like ((x >> c1) & c2) | ((x << c3) & c4) to (rot x, c5) & c6


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30376 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-14 20:50:57 +00:00
Anton Korobeynikov
43e3aad6af Adding generated files for the last commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30375 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-14 18:25:26 +00:00
Anton Korobeynikov
b74ed07bfd Adding dllimport, dllexport and external weak linkage types.
DLL* linkages got full (I hope) codegeneration support in C & both x86
assembler backends.
External weak linkage added for future use, we don't provide any
codegeneration, etc. support for it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30374 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-14 18:23:27 +00:00
Evan Cheng
a17cf0a7e2 Use getOffset() instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30327 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-14 07:41:12 +00:00
Evan Cheng
d5a99d7810 Use MachineConstantPoolEntry getOffset() and getType() accessors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30326 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-14 07:35:00 +00:00
Chris Lattner
5f1d01393c Use new config.h macro
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30321 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-14 06:21:59 +00:00
Chris Lattner
26b6c0ba5d On Mac OS/X, make Process::PreventCoreFiles disable crash reporter for
the process in addition to disabling core file emission.  This speeds up
bugpoint on default-configured macs by several orders of magnitude.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30317 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-14 06:01:41 +00:00
Evan Cheng
9abd7c3867 A MachineConstantPool may have mixed Constant* and MachineConstantPoolValue* values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30316 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-14 05:50:57 +00:00
Devang Patel
57d12f962d Avoid recursion in assignDFSNumber(). Move def from ET-Forest.h
to Dominators.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30309 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-14 01:27:42 +00:00
Chris Lattner
08c33011d1 add note about switch lowering
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30308 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-13 23:37:16 +00:00
Chris Lattner
a4646b61e4 Second half of the fix for Transforms/Inline/inline_cleanup.ll
This folds unconditional branches that are often produced by code
specialization.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30307 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-13 21:27:00 +00:00
Nick Lewycky
668a1d0fd2 Add some more consistency checks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30305 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-13 19:32:53 +00:00
Nick Lewycky
977be254c6 Fix unionSets so that it can merge correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30304 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-13 19:24:01 +00:00
Chris Lattner
33bb3c8be3 Implement the first half of Transforms/Inline/inline_cleanup.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30303 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-13 19:23:57 +00:00
Evan Cheng
80543c8305 Skip over first operand when determining REX prefix for two-address code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30300 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-13 19:07:28 +00:00
Nick Lewycky
cf2112a0a0 Erase dead instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30298 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-13 18:55:37 +00:00
Chris Lattner
bfd68a7858 Turn X < 0 -> TEST X,X js
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30294 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-13 17:04:54 +00:00
Chris Lattner
7a6366de86 The sense of this branch was inverted :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30293 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-13 16:56:12 +00:00
Chris Lattner
8a650095fc Fix a ton of jit failures
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30292 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-13 16:21:10 +00:00
Rafael Espindola
3ad5e5cf99 add shifts to addressing mode 1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30291 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-13 12:09:43 +00:00
Chris Lattner
c970f062e0 If LSR went through a lot of trouble to put constants (e.g. the addr of a global
in a specific BB, don't undo this!).  This allows us to compile
CodeGen/X86/loop-hoist.ll into:

_foo:
        xorl %eax, %eax
***     movl L_Arr$non_lazy_ptr, %ecx
        movl 4(%esp), %edx
LBB1_1: #cond_true
        movl %eax, (%ecx,%eax,4)
        incl %eax
        cmpl %edx, %eax
        jne LBB1_1      #cond_true
LBB1_2: #return
        ret

instead of:

_foo:
        xorl %eax, %eax
        movl 4(%esp), %ecx
LBB1_1: #cond_true
***     movl L_Arr$non_lazy_ptr, %edx
        movl %eax, (%edx,%eax,4)
        incl %eax
        cmpl %ecx, %eax
        jne LBB1_1      #cond_true
LBB1_2: #return
        ret

This was noticed in 464.h264ref.  This doesn't usually affect PPC,
but strikes X86 all the time.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30290 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-13 06:02:42 +00:00
Chris Lattner
0f27fc34f7 Fix a regression in the 32-bit port from the 64-bit port landing.
We now compile CodeGen/X86/lea-2.ll into:

_test:
        movl 4(%esp), %eax
        movl 8(%esp), %ecx
        leal -5(%ecx,%eax,4), %eax
        ret

instead of:

_test:
        movl 4(%esp), %eax
        leal (,%eax,4), %eax
        addl 8(%esp), %eax
        addl $4294967291, %eax
        ret


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30288 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-13 04:45:25 +00:00
Chris Lattner
d1468d3332 new note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30286 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-13 04:19:50 +00:00
Chris Lattner
95af34e33f new note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30285 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-13 03:54:54 +00:00
Chris Lattner
79980b07da Compile X << 1 (where X is a long-long) to:
addl %ecx, %ecx
        adcl %eax, %eax

instead of:

        movl %ecx, %edx
        addl %edx, %edx
        shrl $31, %ecx
        addl %eax, %eax
        orl %ecx, %eax

and to:

        addc r5, r5, r5
        adde r4, r4, r4

instead of:

        slwi r2,r9,1
        srwi r0,r11,31
        slwi r3,r11,1
        or r2,r0,r2

on PPC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30284 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-13 03:50:39 +00:00
Chris Lattner
f95705163f Compile X > -1 -> text X,X; js dest
This implements CodeGen/X86/jump_sign.ll.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30283 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-13 03:22:10 +00:00
Devang Patel
56eac5f6f7 Initialize DontInternalize.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30281 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-13 01:02:26 +00:00
Evan Cheng
c356a572e3 Reflects MachineConstantPoolEntry changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30279 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-12 21:04:05 +00:00
Evan Cheng
d6594ae54c Added support for machine specific constantpool values. These are useful for
representing expressions that can only be resolved at link time, etc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30278 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-12 21:00:35 +00:00
Evan Cheng
cd5731d98b Reflect MachineConstantPoolEntry changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30277 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-12 20:59:59 +00:00
Chris Lattner
92f7365740 An sinkable instruction may exist with uses, if those uses are in dead blocks.
Handle this.  This fixes PR908 and Transforms/LICM/2006-09-12-DeadUserOfSunkInstr.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30275 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-12 19:17:09 +00:00
Chris Lattner
adaa38f13d add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30271 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-12 06:36:01 +00:00
Chris Lattner
0bfd7fde43 Testcase noticed from PR906
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30269 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-11 23:00:56 +00:00
Chris Lattner
2a33a3f08d add compilable testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30268 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-11 22:57:51 +00:00
Chris Lattner
63d3220dae Fix PR905 and InstCombine/2006-09-11-EmptyStructCrash.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30266 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-11 21:43:16 +00:00