Commit Graph

27254 Commits

Author SHA1 Message Date
Reid Spencer
0de0c5da42 Fix a problem introduced by a last-minute change (logic negation).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31302 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-30 23:34:32 +00:00
Chris Lattner
1d75400e2e fix miscompilation of llvm.isunordered, where we branched on the opposite
condition.  This fixes miscompilation of Olden/bh and many others.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31301 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-30 23:02:25 +00:00
Reid Spencer
6ac310d5e9 Don't mislead readers by claiming a variable is defaulted to false when
the default is actually true.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31300 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-30 22:46:49 +00:00
Reid Spencer
02b8511364 Add debug support for X86/ELF targets (Linux). This allows llvm-gcc4
generated object modules to be debugged with gdb. Hopefully this helps
pre-release debugging.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31299 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-30 22:32:30 +00:00
Chris Lattner
6ce644392e fix wonky indentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31298 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-30 22:27:23 +00:00
Devang Patel
b79a59dcfc Update comment. Valid option is -debug-pass=Structures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31297 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-30 19:25:54 +00:00
Jim Laskey
a9c83fe5e1 Switch abbreviations to use the folding set.a.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31296 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-30 15:59:54 +00:00
Jim Laskey
6519546eda Simplify DwarfWriter header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31295 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-30 13:35:07 +00:00
Evan Cheng
c35497fc2a All targets expand BR_JT for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31294 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-30 08:02:39 +00:00
Evan Cheng
3d4ce11085 Lower jumptable to BR_JT. The legalizer can lower it to a BRIND or let the target custom lower it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31293 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-30 08:00:44 +00:00
Evan Cheng
c41cd9c391 Added a new SDNode type: BR_JT for jumptable branch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31292 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-30 07:59:36 +00:00
Chris Lattner
55d7244f69 fix this regtest
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31291 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-30 05:24:03 +00:00
Chris Lattner
09b6ac92d8 add a new form of insert.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31290 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-30 05:07:51 +00:00
Chris Lattner
dd94c8d6b2 Add SmallString a (currently) minimal class that adapts SmallVector to be
more string-like.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31289 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-30 03:39:20 +00:00
Chris Lattner
6c1645ce7d add a method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31288 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-30 03:14:15 +00:00
Chris Lattner
463c4a1ae9 add newline at end of file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31287 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-29 23:47:01 +00:00
Chris Lattner
23d7b36117 add a highly efficient hash table that is specialized for mapping C strings
to some other type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31286 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-29 23:42:03 +00:00
Chris Lattner
9f617d64c5 Add a new llvm::Allocator abstraction, which will be used by a container
I'm about to add.  This is similar to, but necessarily different than, the
STL allocator class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31285 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-29 22:08:03 +00:00
Chris Lattner
120bc21576 Fix SimplifyCFG/2006-10-29-InvokeCrash.ll, a crash compiling QT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31284 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-29 21:21:20 +00:00
Chris Lattner
7c94454c56 new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31283 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-29 21:20:56 +00:00
Chris Lattner
6b0e3f8907 Make CanFallThrough more intelligent (so it can handle blocks with (e.g.) no
successors), and make island block movement more general.

This compiles CodeGen/X86/2006-04-27-ISelFoldingBug.ll to:

_loadAndRLEsource_no_exit_2E_1_label_2E_0:
        subl $8, %esp
        movl %esi, 4(%esp)
        movl %ebx, (%esp)
        movl 16(%esp), %eax
        movl 12(%esp), %ecx
LBB1_3: #label.0
        movl _last, %edx
        movl %edx, %esi
        incl %esi
        movl %esi, _last
        movl %ecx, %ebx
        # TRUNCATE movb %bl, %bl
        movl _block, %esi
        movb %bl, 1(%esi,%edx)
        cmpl %eax, _last
        jge LBB1_2      #codeRepl5.exitStub
LBB1_4: #label.0
        cmpl $257, %ecx
        je LBB1_2       #codeRepl5.exitStub
LBB1_1: #label.0.no_exit.1_crit_edge.exitStub
        movl $1, %eax
        movl (%esp), %ebx
        movl 4(%esp), %esi
        addl $8, %esp
        ret
LBB1_2: #codeRepl5.exitStub
        xorl %eax, %eax
        movl (%esp), %ebx
        movl 4(%esp), %esi
        addl $8, %esp
        ret

instead of:

_loadAndRLEsource_no_exit_2E_1_label_2E_0:
        subl $8, %esp
        movl %esi, 4(%esp)
        movl %ebx, (%esp)
        movl 16(%esp), %eax
        movl 12(%esp), %ecx
        jmp LBB1_3      #label.0
LBB1_1: #label.0.no_exit.1_crit_edge.exitStub
        movl $1, %eax
        movl (%esp), %ebx
        movl 4(%esp), %esi
        addl $8, %esp
        ret
LBB1_2: #codeRepl5.exitStub
        xorl %eax, %eax
        movl (%esp), %ebx
        movl 4(%esp), %esi
        addl $8, %esp
        ret
LBB1_3: #label.0
        movl _last, %edx
        movl %edx, %esi
        incl %esi
        movl %esi, _last
        movl %ecx, %ebx
        # TRUNCATE movb %bl, %bl
        movl _block, %esi
        movb %bl, 1(%esi,%edx)
        cmpl %eax, _last
        jge LBB1_2      #codeRepl5.exitStub
LBB1_4: #label.0
        cmpl $257, %ecx
        jne LBB1_1      #label.0.no_exit.1_crit_edge.exitStub
        jmp LBB1_2      #codeRepl5.exitStub

... which is much better layout :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31282 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-29 21:05:41 +00:00
Chris Lattner
6a586c8d9a fix Generic/2006-10-29-Crash.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31281 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-29 21:01:20 +00:00
Chris Lattner
1bc33f7c81 new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31280 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-29 21:00:55 +00:00
Chris Lattner
5a145f0094 Fix a load folding issue that Evan noticed: there is no need to export values
used by comparisons in the main block.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31279 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-29 18:23:37 +00:00
Jim Laskey
a97c67c866 Try again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31278 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-29 09:19:59 +00:00
Jim Laskey
d8cb446aa2 Not handling zero length strings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31277 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-29 08:27:07 +00:00
Evan Cheng
ba726ab3ec VLOAD is not the LoadSDNode opcode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31276 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-29 06:14:47 +00:00
Nick Lewycky
f6aaaaa39e Remove spurious case. EXTLOAD is not one of the node opcodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31275 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-29 02:26:30 +00:00
Chris Lattner
bad7f48c70 split critical edges more carefully and intelligently. In particular, critical
edges whose destinations are not phi nodes don't bother us.  Also, share
split edges, since the split edge can't have a phi.  This significantly
reduces the complexity of generated code in some cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31274 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-28 19:22:10 +00:00
Chris Lattner
6acfe12dd6 Teach branch folding to fold identical jump tables together and to delete
jump tables that are dead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31273 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-28 18:34:47 +00:00
Chris Lattner
c4aacac056 add an assertion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31272 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-28 18:21:51 +00:00
Chris Lattner
5f8d61bbd8 remove dead method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31271 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-28 18:21:29 +00:00
Chris Lattner
4976dfb4b9 add a method for hacking on JTIdx's
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31270 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-28 18:18:36 +00:00
Chris Lattner
a4eb44a285 const'ify jump table stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31269 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-28 18:17:09 +00:00
Chris Lattner
95e4786a76 add a method for deleting dead jump tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31268 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-28 18:12:00 +00:00
Chris Lattner
e7251a0377 add an assert
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31267 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-28 18:11:20 +00:00
Chris Lattner
0737188220 don't print dead jump tables
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31266 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-28 18:10:06 +00:00
Chris Lattner
5bd0c00b80 determine whether a change was made
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31265 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-28 18:00:05 +00:00
Chris Lattner
ef13982aa7 implement the BlockHasNoFallThrough hook
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31264 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-28 17:35:02 +00:00
Chris Lattner
cf420cca57 improve deletion of blocks that just contain branches by knowing that
the pred block doesn't fall through into them if it's a jumptable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31263 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-28 17:32:47 +00:00
Chris Lattner
c24ff8ed12 add another target hook for branch folding.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31262 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-28 17:29:57 +00:00
Jim Laskey
1c6f01aaa5 Load and stores have not been uniqued properly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31261 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-28 17:25:28 +00:00
Chris Lattner
47e32e6b83 Split *all* critical edges before isel. This resolves issues with spill code
being inserted on unsplit critical edges, which introduces (sometimes large
amounts of) partially dead spill code.

This also fixes PR925 + CodeGen/Generic/switch-crit-edge-constant.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31260 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-28 17:04:37 +00:00
Chris Lattner
49bb78ce9f new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31259 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-28 17:04:16 +00:00
Chris Lattner
b57de3328d add option to isCriticalEdge
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31258 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-28 06:58:17 +00:00
Chris Lattner
0997fadc37 break edges more intelligently
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31257 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-28 06:45:33 +00:00
Chris Lattner
27e1f90d85 Expose a smarter way to break critical edges.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31256 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-28 06:44:56 +00:00
Chris Lattner
f6de8ad1a2 SplitCriticalEdge checks to see if an edge is critical, don't check twice
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31255 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-28 06:38:14 +00:00
Chris Lattner
6fb6ef4d65 Fix a serious bug that caused any x86 vector stuff to infinite loop
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31254 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-28 06:15:26 +00:00
Evan Cheng
31b6ddad31 Doh. Must check if GV is constant first before putting it in .cstring.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31253 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-28 05:56:51 +00:00