oota-llvm.git
18 years agoAdd all that branch mangling niftiness
Andrew Lenharth [Tue, 31 Oct 2006 16:49:55 +0000 (16:49 +0000)]
Add all that branch mangling niftiness

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

18 years agoadd support for calling functions when the caller has variable sized objects
Rafael Espindola [Tue, 31 Oct 2006 13:03:26 +0000 (13:03 +0000)]
add support for calling functions when the caller has variable sized objects

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

18 years ago1. Clean up code due to changes in SwitchTo*Section(2)
Anton Korobeynikov [Tue, 31 Oct 2006 08:31:24 +0000 (08:31 +0000)]
1. Clean up code due to changes in SwitchTo*Section(2)
2. Added partial debug support for mingw\cygwin targets (the same as
   Linux\ELF). Please note, that currently mingw\cygwin uses 'stabs' format
   for storing debug info by default, thus many (runtime) libraries has
   this information included. These formats shouldn't be mixed in one binary
   ('stabs' & 'DWARF'), otherwise binutils tools will be confused.

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

18 years agoTurn an assert into an error message. This is commonly triggered when
Chris Lattner [Tue, 31 Oct 2006 07:33:13 +0000 (07:33 +0000)]
Turn an assert into an error message.  This is commonly triggered when
we don't support a specific constraint yet.  When this happens, print the
unsupported constraint.

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

18 years agoadd a note
Chris Lattner [Tue, 31 Oct 2006 06:26:10 +0000 (06:26 +0000)]
add a note

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

18 years agonew testcase
Chris Lattner [Tue, 31 Oct 2006 06:25:13 +0000 (06:25 +0000)]
new testcase

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

18 years agonew testcase
Chris Lattner [Tue, 31 Oct 2006 06:15:14 +0000 (06:15 +0000)]
new testcase

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

18 years agoUnbreaking static ctors patch.
Anton Korobeynikov [Tue, 31 Oct 2006 06:11:06 +0000 (06:11 +0000)]
Unbreaking static ctors patch.
Defaulting second arguments of SwitchTo*Section, this should make things
somehow clearer.

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

18 years agoFix a typo which can break jumptables.
Evan Cheng [Tue, 31 Oct 2006 02:31:00 +0000 (02:31 +0000)]
Fix a typo which can break jumptables.

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

18 years agoMake this compile again.
Reid Spencer [Tue, 31 Oct 2006 01:45:56 +0000 (01:45 +0000)]
Make this compile again.

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

18 years agoApply Aton's LLVM patch for PR973: Linux ctors / dtors support.
Evan Cheng [Tue, 31 Oct 2006 01:26:55 +0000 (01:26 +0000)]
Apply Aton's LLVM patch for PR973: Linux ctors / dtors support.

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

18 years agoFix a problem introduced by a last-minute change (logic negation).
Reid Spencer [Mon, 30 Oct 2006 23:34:32 +0000 (23:34 +0000)]
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

18 years agofix miscompilation of llvm.isunordered, where we branched on the opposite
Chris Lattner [Mon, 30 Oct 2006 23:02:25 +0000 (23:02 +0000)]
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

18 years agoDon't mislead readers by claiming a variable is defaulted to false when
Reid Spencer [Mon, 30 Oct 2006 22:46:49 +0000 (22:46 +0000)]
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

18 years agoAdd debug support for X86/ELF targets (Linux). This allows llvm-gcc4
Reid Spencer [Mon, 30 Oct 2006 22:32:30 +0000 (22:32 +0000)]
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

18 years agofix wonky indentation
Chris Lattner [Mon, 30 Oct 2006 22:27:23 +0000 (22:27 +0000)]
fix wonky indentation

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

18 years agoUpdate comment. Valid option is -debug-pass=Structures.
Devang Patel [Mon, 30 Oct 2006 19:25:54 +0000 (19:25 +0000)]
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

18 years agoSwitch abbreviations to use the folding set.a.
Jim Laskey [Mon, 30 Oct 2006 15:59:54 +0000 (15:59 +0000)]
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

18 years agoSimplify DwarfWriter header.
Jim Laskey [Mon, 30 Oct 2006 13:35:07 +0000 (13:35 +0000)]
Simplify DwarfWriter header.

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

18 years agoAll targets expand BR_JT for now.
Evan Cheng [Mon, 30 Oct 2006 08:02:39 +0000 (08:02 +0000)]
All targets expand BR_JT for now.

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

18 years agoLower jumptable to BR_JT. The legalizer can lower it to a BRIND or let the target...
Evan Cheng [Mon, 30 Oct 2006 08:00:44 +0000 (08:00 +0000)]
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

18 years agoAdded a new SDNode type: BR_JT for jumptable branch.
Evan Cheng [Mon, 30 Oct 2006 07:59:36 +0000 (07:59 +0000)]
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

18 years agofix this regtest
Chris Lattner [Mon, 30 Oct 2006 05:24:03 +0000 (05:24 +0000)]
fix this regtest

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

18 years agoadd a new form of insert.
Chris Lattner [Mon, 30 Oct 2006 05:07:51 +0000 (05:07 +0000)]
add a new form of insert.

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

18 years agoAdd SmallString a (currently) minimal class that adapts SmallVector to be
Chris Lattner [Mon, 30 Oct 2006 03:39:20 +0000 (03:39 +0000)]
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

18 years agoadd a method
Chris Lattner [Mon, 30 Oct 2006 03:14:15 +0000 (03:14 +0000)]
add a method

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

18 years agoadd newline at end of file
Chris Lattner [Sun, 29 Oct 2006 23:47:01 +0000 (23:47 +0000)]
add newline at end of file

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

18 years agoadd a highly efficient hash table that is specialized for mapping C strings
Chris Lattner [Sun, 29 Oct 2006 23:42:03 +0000 (23:42 +0000)]
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

18 years agoAdd a new llvm::Allocator abstraction, which will be used by a container
Chris Lattner [Sun, 29 Oct 2006 22:08:03 +0000 (22:08 +0000)]
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

18 years agoFix SimplifyCFG/2006-10-29-InvokeCrash.ll, a crash compiling QT.
Chris Lattner [Sun, 29 Oct 2006 21:21:20 +0000 (21:21 +0000)]
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

18 years agonew testcase
Chris Lattner [Sun, 29 Oct 2006 21:20:56 +0000 (21:20 +0000)]
new testcase

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

18 years agoMake CanFallThrough more intelligent (so it can handle blocks with (e.g.) no
Chris Lattner [Sun, 29 Oct 2006 21:05:41 +0000 (21:05 +0000)]
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

18 years agofix Generic/2006-10-29-Crash.ll
Chris Lattner [Sun, 29 Oct 2006 21:01:20 +0000 (21:01 +0000)]
fix Generic/2006-10-29-Crash.ll

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

18 years agonew testcase
Chris Lattner [Sun, 29 Oct 2006 21:00:55 +0000 (21:00 +0000)]
new testcase

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

18 years agoFix a load folding issue that Evan noticed: there is no need to export values
Chris Lattner [Sun, 29 Oct 2006 18:23:37 +0000 (18:23 +0000)]
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

18 years agoTry again.
Jim Laskey [Sun, 29 Oct 2006 09:19:59 +0000 (09:19 +0000)]
Try again.

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

18 years agoNot handling zero length strings.
Jim Laskey [Sun, 29 Oct 2006 08:27:07 +0000 (08:27 +0000)]
Not handling zero length strings.

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

18 years agoVLOAD is not the LoadSDNode opcode.
Evan Cheng [Sun, 29 Oct 2006 06:14:47 +0000 (06:14 +0000)]
VLOAD is not the LoadSDNode opcode.

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

18 years agoRemove spurious case. EXTLOAD is not one of the node opcodes.
Nick Lewycky [Sun, 29 Oct 2006 02:26:30 +0000 (02:26 +0000)]
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

18 years agosplit critical edges more carefully and intelligently. In particular, critical
Chris Lattner [Sat, 28 Oct 2006 19:22:10 +0000 (19:22 +0000)]
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

18 years agoTeach branch folding to fold identical jump tables together and to delete
Chris Lattner [Sat, 28 Oct 2006 18:34:47 +0000 (18:34 +0000)]
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

18 years agoadd an assertion
Chris Lattner [Sat, 28 Oct 2006 18:21:51 +0000 (18:21 +0000)]
add an assertion

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

18 years agoremove dead method
Chris Lattner [Sat, 28 Oct 2006 18:21:29 +0000 (18:21 +0000)]
remove dead method

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

18 years agoadd a method for hacking on JTIdx's
Chris Lattner [Sat, 28 Oct 2006 18:18:36 +0000 (18:18 +0000)]
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

18 years agoconst'ify jump table stuff
Chris Lattner [Sat, 28 Oct 2006 18:17:09 +0000 (18:17 +0000)]
const'ify jump table stuff

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

18 years agoadd a method for deleting dead jump tables.
Chris Lattner [Sat, 28 Oct 2006 18:12:00 +0000 (18:12 +0000)]
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

18 years agoadd an assert
Chris Lattner [Sat, 28 Oct 2006 18:11:20 +0000 (18:11 +0000)]
add an assert

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

18 years agodon't print dead jump tables
Chris Lattner [Sat, 28 Oct 2006 18:10:06 +0000 (18:10 +0000)]
don't print dead jump tables

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

18 years agodetermine whether a change was made
Chris Lattner [Sat, 28 Oct 2006 18:00:05 +0000 (18:00 +0000)]
determine whether a change was made

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

18 years agoimplement the BlockHasNoFallThrough hook
Chris Lattner [Sat, 28 Oct 2006 17:35:02 +0000 (17:35 +0000)]
implement the BlockHasNoFallThrough hook

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

18 years agoimprove deletion of blocks that just contain branches by knowing that
Chris Lattner [Sat, 28 Oct 2006 17:32:47 +0000 (17:32 +0000)]
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

18 years agoadd another target hook for branch folding.
Chris Lattner [Sat, 28 Oct 2006 17:29:57 +0000 (17:29 +0000)]
add another target hook for branch folding.

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

18 years agoLoad and stores have not been uniqued properly.
Jim Laskey [Sat, 28 Oct 2006 17:25:28 +0000 (17:25 +0000)]
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

18 years agoSplit *all* critical edges before isel. This resolves issues with spill code
Chris Lattner [Sat, 28 Oct 2006 17:04:37 +0000 (17:04 +0000)]
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

18 years agonew testcase
Chris Lattner [Sat, 28 Oct 2006 17:04:16 +0000 (17:04 +0000)]
new testcase

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

18 years agoadd option to isCriticalEdge
Chris Lattner [Sat, 28 Oct 2006 06:58:17 +0000 (06:58 +0000)]
add option to isCriticalEdge

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

18 years agobreak edges more intelligently
Chris Lattner [Sat, 28 Oct 2006 06:45:33 +0000 (06:45 +0000)]
break edges more intelligently

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

18 years agoExpose a smarter way to break critical edges.
Chris Lattner [Sat, 28 Oct 2006 06:44:56 +0000 (06:44 +0000)]
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

18 years agoSplitCriticalEdge checks to see if an edge is critical, don't check twice
Chris Lattner [Sat, 28 Oct 2006 06:38:14 +0000 (06:38 +0000)]
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

18 years agoFix a serious bug that caused any x86 vector stuff to infinite loop
Chris Lattner [Sat, 28 Oct 2006 06:15:26 +0000 (06:15 +0000)]
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

18 years agoDoh. Must check if GV is constant first before putting it in .cstring.
Evan Cheng [Sat, 28 Oct 2006 05:56:51 +0000 (05:56 +0000)]
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

18 years agoDoh. Must check if GV is constant first.
Evan Cheng [Sat, 28 Oct 2006 05:56:06 +0000 (05:56 +0000)]
Doh. Must check if GV is constant first.

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

18 years agoEmitting raw bytecode is awfully rude. Add -disable-output.
Nick Lewycky [Sat, 28 Oct 2006 02:34:41 +0000 (02:34 +0000)]
Emitting raw bytecode is awfully rude. Add -disable-output.
Clarify the test.

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

18 years agoEditorial clean up.
Jim Laskey [Sat, 28 Oct 2006 01:34:21 +0000 (01:34 +0000)]
Editorial clean up.

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

18 years agoadd a method
Chris Lattner [Sat, 28 Oct 2006 01:24:05 +0000 (01:24 +0000)]
add a method

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

18 years agoprepare for a change I'm about to make
Chris Lattner [Sat, 28 Oct 2006 00:59:20 +0000 (00:59 +0000)]
prepare for a change I'm about to make

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

18 years agodon't dist internal readme
Chris Lattner [Sat, 28 Oct 2006 00:51:15 +0000 (00:51 +0000)]
don't dist internal readme

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

18 years agodon't dist internal readme's
Chris Lattner [Sat, 28 Oct 2006 00:49:54 +0000 (00:49 +0000)]
don't dist internal readme's

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

18 years agodon't distribute internal readme's
Chris Lattner [Sat, 28 Oct 2006 00:48:27 +0000 (00:48 +0000)]
don't distribute internal readme's

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

18 years agoMake sure all the readme files get distributed.
Reid Spencer [Sat, 28 Oct 2006 00:11:39 +0000 (00:11 +0000)]
Make sure all the readme files get distributed.

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

18 years agoClean up.
Jim Laskey [Fri, 27 Oct 2006 23:52:51 +0000 (23:52 +0000)]
Clean up.

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

18 years agoFix a bug in merged condition handling (CodeGen/Generic/2006-10-27-CondFolding.ll).
Chris Lattner [Fri, 27 Oct 2006 23:50:33 +0000 (23:50 +0000)]
Fix a bug in merged condition handling (CodeGen/Generic/2006-10-27-CondFolding.ll).

Add many fewer CFG edges and PHI node entries.  If there is a switch which has
the same block as multiple destinations, only add that block once as a successor/phi
node (in the jumptable case)

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

18 years agonew testcase
Chris Lattner [Fri, 27 Oct 2006 23:47:34 +0000 (23:47 +0000)]
new testcase

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

18 years agoSwitch over from SelectionNodeCSEMap to FoldingSet.
Jim Laskey [Fri, 27 Oct 2006 23:46:08 +0000 (23:46 +0000)]
Switch over from SelectionNodeCSEMap to FoldingSet.

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

18 years agoUse doc_code class.
Devang Patel [Fri, 27 Oct 2006 23:06:27 +0000 (23:06 +0000)]
Use doc_code class.

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

18 years agoClean up
Jim Laskey [Fri, 27 Oct 2006 22:52:02 +0000 (22:52 +0000)]
Clean up

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

18 years agoDocument removeModule().
Devang Patel [Fri, 27 Oct 2006 22:02:30 +0000 (22:02 +0000)]
Document removeModule().

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

18 years agothis doesn't occur any more in mason
Chris Lattner [Fri, 27 Oct 2006 22:02:19 +0000 (22:02 +0000)]
this doesn't occur any more in mason

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

18 years agothe code in question is now:
Chris Lattner [Fri, 27 Oct 2006 22:00:55 +0000 (22:00 +0000)]
the code in question is now:

        cmpw cr0, r7, r3
        ble cr0, LBB1_5 ;bb25
LBB1_8: ;bb17
        cmpw cr0, r8, r5
        bgt cr0, LBB1_2 ;bb

which is just as good as crnand.

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

18 years agoDocument getAlignment()
Devang Patel [Fri, 27 Oct 2006 21:58:31 +0000 (21:58 +0000)]
Document getAlignment()

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

18 years agoremove debug code
Chris Lattner [Fri, 27 Oct 2006 21:58:03 +0000 (21:58 +0000)]
remove debug code

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

18 years agoCodegen cond&cond with two branches. This compiles (f.e.) PowerPC/and-branch.ll to:
Chris Lattner [Fri, 27 Oct 2006 21:54:23 +0000 (21:54 +0000)]
Codegen cond&cond with two branches.  This compiles (f.e.) PowerPC/and-branch.ll to:

        cmpwi cr0, r4, 4
        bgt cr0, LBB1_2 ;UnifiedReturnBlock
LBB1_3: ;entry
        cmplwi cr0, r3, 0
        bne cr0, LBB1_2 ;UnifiedReturnBlock

instead of:

        cmpwi cr7, r4, 4
        mfcr r2
        addic r4, r3, -1
        subfe r3, r4, r3
        rlwinm r2, r2, 30, 31, 31
        or r2, r2, r3
        cmplwi cr0, r2, 0
        bne cr0, LBB1_2 ;UnifiedReturnBlock
LBB1_1: ;cond_true

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

18 years agonew testcase
Chris Lattner [Fri, 27 Oct 2006 21:52:39 +0000 (21:52 +0000)]
new testcase

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

18 years agoTurn conditions like x<Y|z==q into multiple blocks.
Chris Lattner [Fri, 27 Oct 2006 21:36:01 +0000 (21:36 +0000)]
Turn conditions like x<Y|z==q  into multiple blocks.

This compiles Regression/CodeGen/X86/or-branch.ll into:

_foo:
        subl $12, %esp
        call L_bar$stub
        movl 20(%esp), %eax
        movl 16(%esp), %ecx
        cmpl $5, %eax
        jl LBB1_1       #cond_true
LBB1_3: #entry
        testl %ecx, %ecx
        jne LBB1_2      #UnifiedReturnBlock
LBB1_1: #cond_true
        call L_bar$stub
        addl $12, %esp
        ret
LBB1_2: #UnifiedReturnBlock
        addl $12, %esp
        ret

instead of:

_foo:
        subl $12, %esp
        call L_bar$stub
        movl 20(%esp), %eax
        movl 16(%esp), %ecx
        cmpl $4, %eax
        setg %al
        testl %ecx, %ecx
        setne %cl
        testb %cl, %al
        jne LBB1_2      #UnifiedReturnBlock
LBB1_1: #cond_true
        call L_bar$stub
        addl $12, %esp
        ret
LBB1_2: #UnifiedReturnBlock
        addl $12, %esp
        ret

And on ppc to:

        cmpwi cr0, r29, 5
        blt cr0, LBB1_1 ;cond_true
LBB1_3: ;entry
        cmplwi cr0, r30, 0
        bne cr0, LBB1_2 ;UnifiedReturnBlock

instead of:

        cmpwi cr7, r4, 4
        mfcr r2
        addic r4, r3, -1
        subfe r30, r4, r3
        rlwinm r29, r2, 30, 31, 31
        and r2, r29, r30
        cmplwi cr0, r2, 0
        bne cr0, LBB1_2 ;UnifiedReturnBlock

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

18 years agonew testcase
Chris Lattner [Fri, 27 Oct 2006 21:32:10 +0000 (21:32 +0000)]
new testcase

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

18 years agoFixed a significant bug where unpcklpd is incorrectly used to extract element 1 from...
Evan Cheng [Fri, 27 Oct 2006 21:08:32 +0000 (21:08 +0000)]
Fixed a significant bug where unpcklpd is incorrectly used to extract element 1 from a v2f64 value.

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

18 years agoAdd a new vextract test case.
Evan Cheng [Fri, 27 Oct 2006 21:05:18 +0000 (21:05 +0000)]
Add a new vextract test case.

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

18 years agoForgot a }
Bill Wendling [Fri, 27 Oct 2006 20:22:04 +0000 (20:22 +0000)]
Forgot a }

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

18 years agoRe-added the part where it tries to remove all global variables first.
Bill Wendling [Fri, 27 Oct 2006 20:18:06 +0000 (20:18 +0000)]
Re-added the part where it tries to remove all global variables first.

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

18 years agoSmallVector append not insert.
Jim Laskey [Fri, 27 Oct 2006 19:38:32 +0000 (19:38 +0000)]
SmallVector append not insert.

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

18 years agoGrrr.
Jim Laskey [Fri, 27 Oct 2006 19:20:12 +0000 (19:20 +0000)]
Grrr.

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

18 years agoTemp patch for missing functionality.
Jim Laskey [Fri, 27 Oct 2006 19:14:16 +0000 (19:14 +0000)]
Temp patch for missing functionality.

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

18 years agoMake the Value and Type methods print a newline so it prints nicely in gdb
Reid Spencer [Fri, 27 Oct 2006 18:58:54 +0000 (18:58 +0000)]
Make the Value and Type methods print a newline so it prints nicely in gdb

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

18 years agoFix for PR968: expand vector sdiv, udiv, srem, urem.
Evan Cheng [Fri, 27 Oct 2006 18:49:08 +0000 (18:49 +0000)]
Fix for PR968: expand vector sdiv, udiv, srem, urem.

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

18 years agoMathExtras isn't in the llvm/ADT directory but in the llvm/Support directory.
Bill Wendling [Fri, 27 Oct 2006 18:47:29 +0000 (18:47 +0000)]
MathExtras isn't in the llvm/ADT directory but in the llvm/Support directory.

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

18 years agoApply editorials.
Jim Laskey [Fri, 27 Oct 2006 18:05:12 +0000 (18:05 +0000)]
Apply editorials.

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

18 years agoImprove cvs ignoring of test results.
Reid Spencer [Fri, 27 Oct 2006 16:43:34 +0000 (16:43 +0000)]
Improve cvs ignoring of test results.

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

18 years agoBreakout folding hash set from SelectionDAGCSEMap.
Jim Laskey [Fri, 27 Oct 2006 16:16:16 +0000 (16:16 +0000)]
Breakout folding hash set from SelectionDAGCSEMap.

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

18 years agoInitialize CStringSection member var.
Reid Spencer [Fri, 27 Oct 2006 16:14:06 +0000 (16:14 +0000)]
Initialize CStringSection member var.

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

18 years agoAdd a run line to this test.
Reid Spencer [Fri, 27 Oct 2006 05:30:23 +0000 (05:30 +0000)]
Add a run line to this test.

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