oota-llvm.git
17 years agoFix typo. Add more comment. Avoid extra hash_map search.
Devang Patel [Mon, 23 Oct 2006 23:57:53 +0000 (23:57 +0000)]
Fix typo. Add more comment. Avoid extra hash_map search.

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

17 years agoadd two helper methods
Chris Lattner [Mon, 23 Oct 2006 23:35:35 +0000 (23:35 +0000)]
add two helper methods

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

17 years agoAdd removeModule().
Devang Patel [Mon, 23 Oct 2006 23:12:26 +0000 (23:12 +0000)]
Add removeModule().

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

17 years agoEnable tail merging by default.
Chris Lattner [Mon, 23 Oct 2006 22:10:12 +0000 (22:10 +0000)]
Enable tail merging by default.

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

17 years agoUpdate test case.
Evan Cheng [Mon, 23 Oct 2006 21:47:11 +0000 (21:47 +0000)]
Update test case.

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

17 years agoimplement STRB and STRH
Rafael Espindola [Mon, 23 Oct 2006 20:34:27 +0000 (20:34 +0000)]
implement STRB and STRH

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

17 years agoexpand ISD::MEMSET
Rafael Espindola [Mon, 23 Oct 2006 20:08:22 +0000 (20:08 +0000)]
expand ISD::MEMSET

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

17 years agoMake these hack flags hidden, like other dsa hack flags
Andrew Lenharth [Mon, 23 Oct 2006 19:55:24 +0000 (19:55 +0000)]
Make these hack flags hidden, like other dsa hack flags

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

17 years agoRevert the aggressive inlining for now, it doesn't handle external correctly
Andrew Lenharth [Mon, 23 Oct 2006 19:53:37 +0000 (19:53 +0000)]
Revert the aggressive inlining for now, it doesn't handle external correctly

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

17 years agochange this back
Andrew Lenharth [Mon, 23 Oct 2006 19:52:54 +0000 (19:52 +0000)]
change this back

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

17 years agorestore these tests
Andrew Lenharth [Mon, 23 Oct 2006 19:52:27 +0000 (19:52 +0000)]
restore these tests

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

17 years agoHandle fallout from the recent branch-on-undef changes. This fixes
Chris Lattner [Mon, 23 Oct 2006 18:57:02 +0000 (18:57 +0000)]
Handle fallout from the recent branch-on-undef changes.  This fixes
Prolangs-C/agrep and SCCP/2006-10-23-IPSCCP-Crash.ll

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

17 years agonew testcase
Chris Lattner [Mon, 23 Oct 2006 18:54:35 +0000 (18:54 +0000)]
new testcase

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

17 years agoMinor tweak. Instead of generating:
Chris Lattner [Mon, 23 Oct 2006 18:38:22 +0000 (18:38 +0000)]
Minor tweak.  Instead of generating:

        movl 32(%esp), %eax
        cmpl $1, %eax
        je LBB1_1       #bb
LBB1_4: #entry
        cmpl $2, %eax
        je LBB1_2       #bb2
        jmp LBB1_3      #UnifiedReturnBlock
LBB1_1: #bb

notice that we would miss the fall through and emit this instead:

        movl 32(%esp), %eax
        cmpl $2, %eax
        je LBB1_2       #bb2
LBB1_4: #entry
        cmpl $1, %eax
        jne LBB1_3      #UnifiedReturnBlock
LBB1_1: #bb

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

17 years agoMore complete solution to deleting blocks and debug info.
Jim Laskey [Mon, 23 Oct 2006 14:56:37 +0000 (14:56 +0000)]
More complete solution to deleting blocks and debug info.

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

17 years ago[SU]int update - inactive code may get activated someday
Jim Laskey [Mon, 23 Oct 2006 14:39:22 +0000 (14:39 +0000)]
[SU]int update - inactive code may get activated someday

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

17 years agoFix test case.
Evan Cheng [Mon, 23 Oct 2006 05:11:09 +0000 (05:11 +0000)]
Fix test case.

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

17 years agoRemove the Backwards operation. Resolving now works at the time when a
Nick Lewycky [Mon, 23 Oct 2006 01:56:02 +0000 (01:56 +0000)]
Remove the Backwards operation. Resolving now works at the time when a
property is added by running through the list of uses of the value and
adding resolved properties to the property set.

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

17 years agoFix phi node updating for switches lowered to linear sequences of branches.
Chris Lattner [Sun, 22 Oct 2006 23:00:53 +0000 (23:00 +0000)]
Fix phi node updating for switches lowered to linear sequences of branches.

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

17 years agodisable this code for now, it's not yet safely updating phi nodes
Chris Lattner [Sun, 22 Oct 2006 22:47:10 +0000 (22:47 +0000)]
disable this code for now, it's not yet safely updating phi nodes

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

17 years agoFix similar missing optimization opportunity in XOR.
Nick Lewycky [Sun, 22 Oct 2006 22:22:58 +0000 (22:22 +0000)]
Fix similar missing optimization opportunity in XOR.

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

17 years agothis part implemented.
Chris Lattner [Sun, 22 Oct 2006 21:40:12 +0000 (21:40 +0000)]
this part implemented.

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

17 years agoWhoops! Add missing NULL check.
Nick Lewycky [Sun, 22 Oct 2006 21:38:24 +0000 (21:38 +0000)]
Whoops! Add missing NULL check.

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

17 years agoDo section switching right way for Mingw\Cygwin and Linux.
Anton Korobeynikov [Sun, 22 Oct 2006 21:37:13 +0000 (21:37 +0000)]
Do section switching right way for Mingw\Cygwin and Linux.
This will allow (after llvm-gcc linkage fix) more dummy tests using
libstdc++ to pass on mingw :)

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

17 years agoImplement PR964 and Regression/CodeGen/Generic/SwitchLowering.ll
Chris Lattner [Sun, 22 Oct 2006 21:36:53 +0000 (21:36 +0000)]
Implement PR964 and Regression/CodeGen/Generic/SwitchLowering.ll

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

17 years agoHandle "if ((x|y) != 0)" for ints like we do for bools. Fixes missed
Nick Lewycky [Sun, 22 Oct 2006 21:36:41 +0000 (21:36 +0000)]
Handle "if ((x|y) != 0)" for ints like we do for bools. Fixes missed
optimization opportunity pointed out by Chris Lattner.

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

17 years agonew testcase for PR964
Chris Lattner [Sun, 22 Oct 2006 21:36:06 +0000 (21:36 +0000)]
new testcase for PR964

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

17 years agoAllocaInst can't return a null pointer. Fixes missed optimization
Nick Lewycky [Sun, 22 Oct 2006 19:53:27 +0000 (19:53 +0000)]
AllocaInst can't return a null pointer. Fixes missed optimization
opportunity pointed out by Andrew Lewycky.

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

17 years agoAdd a workaround for PR962, disabling the more aggressive form of this
Chris Lattner [Sun, 22 Oct 2006 18:42:26 +0000 (18:42 +0000)]
Add a workaround for PR962, disabling the more aggressive form of this
transformation.  This speeds up a C++ app 2.25x.

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

17 years agoDon't generate a prototype for _setjmp. At least on Linux, this function
Reid Spencer [Sun, 22 Oct 2006 09:58:21 +0000 (09:58 +0000)]
Don't generate a prototype for _setjmp. At least on Linux, this function
has a different prototype than the one #included from <setjmp.h>. This
patch fixes siod and a number of other test cases on Linux that were
failing the CBE because of this _setjmp issue.

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

17 years agoRegenerate.
Reid Spencer [Sun, 22 Oct 2006 07:03:43 +0000 (07:03 +0000)]
Regenerate.

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

17 years agoRemove unneeded CHECK_FOR_ERROR invocations.
Reid Spencer [Sun, 22 Oct 2006 07:03:09 +0000 (07:03 +0000)]
Remove unneeded CHECK_FOR_ERROR invocations.

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

17 years agoregenerate
Chris Lattner [Sun, 22 Oct 2006 06:08:13 +0000 (06:08 +0000)]
regenerate

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

17 years agochange keyword to datalayout
Chris Lattner [Sun, 22 Oct 2006 06:07:41 +0000 (06:07 +0000)]
change keyword to datalayout

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

17 years agoChange keyword to datalayout
Chris Lattner [Sun, 22 Oct 2006 06:06:56 +0000 (06:06 +0000)]
Change keyword to datalayout

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

17 years ago3 Changes:
Chris Lattner [Sun, 22 Oct 2006 05:59:17 +0000 (05:59 +0000)]
3 Changes:
1. Better document what is going on here.
2. Only hack on one branch per iteration, making the results less conservative.
3. Handle the problematic case by marking edges executable instead of by
   playing with value lattice states.  This is far less pessimistic, and fixes
   SCCP/ipsccp-gvar.ll.

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

17 years agoNew, wonderful isSuccessor method
Chris Lattner [Sat, 21 Oct 2006 06:50:05 +0000 (06:50 +0000)]
New, wonderful isSuccessor method

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

17 years agodon't break infinite loops
Chris Lattner [Sat, 21 Oct 2006 06:11:43 +0000 (06:11 +0000)]
don't break infinite loops

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

17 years agoImplement support for branch reversal, fix a bug in branch analysis.
Chris Lattner [Sat, 21 Oct 2006 06:03:11 +0000 (06:03 +0000)]
Implement support for branch reversal, fix a bug in branch analysis.
This provides stuff like:

        cmpw cr0, r15, r29
        mr r14, r15
-       bge cr0, LBB3_111       ;bb656
-       b LBB3_90       ;bb501
+       blt cr0, LBB3_90        ;bb501
 LBB3_111:      ;bb656
        lwz r18, 68(r1)

which is particularly good for dispatch group formation.

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

17 years agoUse branch reversal to do stuff like this:
Chris Lattner [Sat, 21 Oct 2006 05:54:00 +0000 (05:54 +0000)]
Use branch reversal to do stuff like this:

        call L_strcmp$stub
        testl %eax, %eax
-       jne LBB26_208   #cond_true6020
-       jmp LBB26_227   #bb7119
+       je LBB26_227    #bb7119
 LBB26_208:     #cond_true6020
        movl $l31_str14, 4(%esp)

        testl %eax, %eax
-       jne LBB26_704   #cond_true13042
-       jmp LBB26_713   #bb13151
+       je LBB26_713    #bb13151
 LBB26_704:     #cond_true13042
        movl $_str52, 4(%esp)

        cmpl 76(%ecx), %eax
-       jge LBB26_1628  #cond_false63.i.i
-       jmp LBB26_1769  #_Z8makeGridP13mrSurfaceListidiidd.exit.i
+       jl LBB26_1769   #_Z8makeGridP13mrSurfaceListidiidd.exit.i
 LBB26_1628:    #cond_false63.i.i
        movl $0, 48964(%esp)

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

17 years agoImplement support for branch condition reversal.
Chris Lattner [Sat, 21 Oct 2006 05:52:40 +0000 (05:52 +0000)]
Implement support for branch condition reversal.

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

17 years agoTransform code like:
Chris Lattner [Sat, 21 Oct 2006 05:43:30 +0000 (05:43 +0000)]
Transform code like:

  jle FOO
  jmp BAR
BAR:

into:

  jle FOO
BAR:

... whoa!

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

17 years agoSimplify code, no functionality change
Chris Lattner [Sat, 21 Oct 2006 05:42:09 +0000 (05:42 +0000)]
Simplify code, no functionality change

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

17 years agoimplement support for inserting a cond branch
Chris Lattner [Sat, 21 Oct 2006 05:36:13 +0000 (05:36 +0000)]
implement support for inserting a cond branch

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

17 years agoallow insertion of a conditional branch with fall-through
Chris Lattner [Sat, 21 Oct 2006 05:34:23 +0000 (05:34 +0000)]
allow insertion of a conditional branch with fall-through

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

17 years agoThree changes:
Chris Lattner [Sat, 21 Oct 2006 05:08:28 +0000 (05:08 +0000)]
Three changes:
1. Remove a bunch of ifdef'd code.
2. When a block just contains an uncond branch, change all blocks branching
   to it to jump to the destination instead.
3. If branch analysis tells us some edges in the machinecfg are not actually
   possible, remove them.

#2 triggers a suprisingly large number of times.

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

17 years agoupdate assert message
Chris Lattner [Sat, 21 Oct 2006 04:42:29 +0000 (04:42 +0000)]
update assert message

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

17 years agoAdd an experimental cross-jumping implementation.
Chris Lattner [Sat, 21 Oct 2006 00:47:49 +0000 (00:47 +0000)]
Add an experimental cross-jumping implementation.
This is currently disabled by default and limited in several ways, but does
have a positive effect.

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

17 years agotypo
Chris Lattner [Fri, 20 Oct 2006 22:44:45 +0000 (22:44 +0000)]
typo

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

17 years agoimplement MachineOperand::isIdenticalTo
Chris Lattner [Fri, 20 Oct 2006 22:39:59 +0000 (22:39 +0000)]
implement MachineOperand::isIdenticalTo

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

17 years agoadd isIdenticalTo method to machineinstr/operand.
Chris Lattner [Fri, 20 Oct 2006 22:39:36 +0000 (22:39 +0000)]
add isIdenticalTo method to machineinstr/operand.

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

17 years agollvm-extract should remove module-level asm
Chris Lattner [Fri, 20 Oct 2006 21:35:41 +0000 (21:35 +0000)]
llvm-extract should remove module-level asm

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

17 years agobugfix
Chris Lattner [Fri, 20 Oct 2006 20:44:34 +0000 (20:44 +0000)]
bugfix

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

17 years agoFix an ugly problem in SCCP. This fixes Benchmarks/Misc-C++/mandel-text.cpp
Chris Lattner [Fri, 20 Oct 2006 20:19:08 +0000 (20:19 +0000)]
Fix an ugly problem in SCCP.  This fixes Benchmarks/Misc-C++/mandel-text.cpp

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

17 years agoFix miscompilation of MallocBench/espresso which code review pointed out
Chris Lattner [Fri, 20 Oct 2006 18:20:21 +0000 (18:20 +0000)]
Fix miscompilation of MallocBench/espresso which code review pointed out
but apparently didn't make it into the final patch.

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

17 years agoChanged the pattern matching so that it will hopefully work on Linux.
Bill Wendling [Fri, 20 Oct 2006 18:15:24 +0000 (18:15 +0000)]
Changed the pattern matching so that it will hopefully work on Linux.

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

17 years agoTest case for
Devang Patel [Fri, 20 Oct 2006 18:06:37 +0000 (18:06 +0000)]
Test case for
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20061016/038780.html

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

17 years agoMake flag and chain edges visually distinguishable from value edges in DOT
Chris Lattner [Fri, 20 Oct 2006 18:06:09 +0000 (18:06 +0000)]
Make flag and chain edges visually distinguishable from value edges in DOT
output.

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

17 years agoadd method
Chris Lattner [Fri, 20 Oct 2006 18:00:03 +0000 (18:00 +0000)]
add method

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

17 years agoImplement branch analysis/xform hooks required by the branch folding pass.
Chris Lattner [Fri, 20 Oct 2006 17:42:20 +0000 (17:42 +0000)]
Implement branch analysis/xform hooks required by the branch folding pass.

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

17 years agoFix a comment to be accurate.
Reid Spencer [Fri, 20 Oct 2006 07:24:55 +0000 (07:24 +0000)]
Fix a comment to be accurate.

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

17 years agoFor PR950:
Reid Spencer [Fri, 20 Oct 2006 07:07:24 +0000 (07:07 +0000)]
For PR950:
This patch implements the first increment for the Signless Types feature.
All changes pertain to removing the ConstantSInt and ConstantUInt classes
in favor of just using ConstantInt.

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

17 years agoWhile creating mask, use 1ULL instead of 1.
Devang Patel [Fri, 20 Oct 2006 01:16:56 +0000 (01:16 +0000)]
While creating mask, use 1ULL instead of 1.

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

17 years agoFix SimplifyCFG/2006-10-19-UncondDiv.ll by disabling a bad xform.
Chris Lattner [Fri, 20 Oct 2006 00:42:07 +0000 (00:42 +0000)]
Fix SimplifyCFG/2006-10-19-UncondDiv.ll by disabling a bad xform.

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

17 years agonew testcase for PR957
Chris Lattner [Fri, 20 Oct 2006 00:41:31 +0000 (00:41 +0000)]
new testcase for PR957

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

17 years agoadd a method to determine whether evaluation of a constant can trap.
Chris Lattner [Fri, 20 Oct 2006 00:27:06 +0000 (00:27 +0000)]
add a method to determine whether evaluation of a constant can trap.

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

17 years agoTestcase for P926
Bill Wendling [Thu, 19 Oct 2006 23:21:59 +0000 (23:21 +0000)]
Testcase for P926

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

17 years agoPartially in response to PR926: insert the newly created machine basic
Bill Wendling [Thu, 19 Oct 2006 21:46:38 +0000 (21:46 +0000)]
Partially in response to PR926: insert the newly created machine basic
blocks into the basic block list when lowering the switch inst. into a
binary tree of if-then statements. This allows the "visitSwitchCase" func
to allow for fall-through behavior.

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

17 years agoIt is OK to remove extra cast if operation is EQ/NE even though source
Devang Patel [Thu, 19 Oct 2006 20:59:13 +0000 (20:59 +0000)]
It is OK to remove extra cast if operation is EQ/NE even though source
and destination sign may not match but other conditions are met.

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

17 years agoTypo Typo.
Devang Patel [Thu, 19 Oct 2006 19:21:36 +0000 (19:21 +0000)]
Typo Typo.

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

17 years agoTypo.
Devang Patel [Thu, 19 Oct 2006 19:05:38 +0000 (19:05 +0000)]
Typo.

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

17 years agoFix bug in PR454 resolution. Added new test case.
Devang Patel [Thu, 19 Oct 2006 18:54:08 +0000 (18:54 +0000)]
Fix bug in PR454 resolution. Added new test case.
This fixes llvmAsmParser.cpp miscompile by llvm on PowerPC Darwin.

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

17 years agouse Pat to implement extloadi8 and extloadi16
Rafael Espindola [Thu, 19 Oct 2006 17:05:03 +0000 (17:05 +0000)]
use Pat to implement extloadi8 and extloadi16

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

17 years ago80 cols fix.
Reid Spencer [Thu, 19 Oct 2006 15:24:04 +0000 (15:24 +0000)]
80 cols fix.

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

17 years agoimplement undef
Rafael Espindola [Thu, 19 Oct 2006 13:45:00 +0000 (13:45 +0000)]
implement undef

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

17 years agoprint common symbols
Rafael Espindola [Thu, 19 Oct 2006 13:30:40 +0000 (13:30 +0000)]
print common symbols

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

17 years agoimplement extloadi8 and extloadi16
Rafael Espindola [Thu, 19 Oct 2006 12:45:04 +0000 (12:45 +0000)]
implement extloadi8 and extloadi16

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

17 years agoexpand SIGN_EXTEND_INREG
Rafael Espindola [Thu, 19 Oct 2006 12:06:50 +0000 (12:06 +0000)]
expand SIGN_EXTEND_INREG

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

17 years agoexpand brind so that we don't have to implement jump tables right now
Rafael Espindola [Thu, 19 Oct 2006 10:56:43 +0000 (10:56 +0000)]
expand brind so that we don't have to implement jump tables right now

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

17 years agoBeef up the output from DiffFilesWithTolerance by setting the error code
Reid Spencer [Wed, 18 Oct 2006 20:23:52 +0000 (20:23 +0000)]
Beef up the output from DiffFilesWithTolerance by setting the error code
to describe the difference being reported. This assists with understanding
differences an llvm-test and should help with bugpoint too.

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

17 years agoAdd llvm.spec, a generated file.
Reid Spencer [Wed, 18 Oct 2006 19:23:56 +0000 (19:23 +0000)]
Add llvm.spec, a generated file.

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

17 years agoAdd option for controlling inclusion of global AA.
Jim Laskey [Wed, 18 Oct 2006 19:08:31 +0000 (19:08 +0000)]
Add option for controlling inclusion of global AA.

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

17 years agofit in 80 cols
Chris Lattner [Wed, 18 Oct 2006 18:26:48 +0000 (18:26 +0000)]
fit in 80 cols

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

17 years agoadd a note
Chris Lattner [Wed, 18 Oct 2006 17:04:09 +0000 (17:04 +0000)]
add a note

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

17 years agoadd blx
Rafael Espindola [Wed, 18 Oct 2006 16:21:43 +0000 (16:21 +0000)]
add blx

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

17 years agoadd isTerminatortto b and bcond
Rafael Espindola [Wed, 18 Oct 2006 16:20:57 +0000 (16:20 +0000)]
add isTerminatortto b and bcond

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

17 years agoUse global info for alias analysis.
Jim Laskey [Wed, 18 Oct 2006 12:29:57 +0000 (12:29 +0000)]
Use global info for alias analysis.

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

17 years agoimplement CallingConv::Fast as CallingConv::C
Rafael Espindola [Wed, 18 Oct 2006 12:03:07 +0000 (12:03 +0000)]
implement CallingConv::Fast as CallingConv::C

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

17 years agoFixed mingw\cygwin linkonce linkage once again.
Anton Korobeynikov [Wed, 18 Oct 2006 09:12:29 +0000 (09:12 +0000)]
Fixed mingw\cygwin linkonce linkage once again.
Added workaround for linker bug with linkonce sections.
Changed sections prefix to allow linker merge them
(PE loader doesn't like too much long-named sections :) )
All of this unbreaks libstdc++ on mingw32 allowing (small)
programs to be compiled, linked and run.

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

17 years agoAdd LCSSA to the LLVM lexicon.
Owen Anderson [Wed, 18 Oct 2006 05:50:12 +0000 (05:50 +0000)]
Add LCSSA to the LLVM lexicon.

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

17 years agoAdd support for the new "target data" information in .ll files. This provides
Owen Anderson [Wed, 18 Oct 2006 02:21:48 +0000 (02:21 +0000)]
Add support for the new "target data" information in .ll files.  This provides
a better encoding of the targets data layout, rather than trying to guess it
from the endianness and pointersize like before.

Update the generated files.

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

17 years agoAdd support for the new "target data" information in .ll files. This provides
Owen Anderson [Wed, 18 Oct 2006 02:21:12 +0000 (02:21 +0000)]
Add support for the new "target data" information in .ll files.  This provides
a better encoding of the targets data layout, rather than trying to guess it
from the endianness and pointersize like before.

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

17 years agonew testcase
Chris Lattner [Wed, 18 Oct 2006 01:21:35 +0000 (01:21 +0000)]
new testcase

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

17 years agoset the ppc64 stack pointer right, dynamic alloca now works for ppc64
Chris Lattner [Wed, 18 Oct 2006 01:20:43 +0000 (01:20 +0000)]
set the ppc64 stack pointer right, dynamic alloca now works for ppc64

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

17 years agoExpand alloca for ppc64
Chris Lattner [Wed, 18 Oct 2006 01:18:48 +0000 (01:18 +0000)]
Expand alloca for ppc64

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

17 years agoTeach the branch folder to update debug info if it removes blocks with line
Chris Lattner [Tue, 17 Oct 2006 23:17:27 +0000 (23:17 +0000)]
Teach the branch folder to update debug info if it removes blocks with line
# notes in it.

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

17 years agoadd a method to remove a line # record.
Chris Lattner [Tue, 17 Oct 2006 23:16:42 +0000 (23:16 +0000)]
add a method to remove a line # record.

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

17 years agoexpose DWARF_LABEL opcode# so the branch folder can update debug info properly.
Chris Lattner [Tue, 17 Oct 2006 22:41:45 +0000 (22:41 +0000)]
expose DWARF_LABEL opcode# so the branch folder can update debug info properly.

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

17 years agoupdate comment
Chris Lattner [Tue, 17 Oct 2006 22:12:15 +0000 (22:12 +0000)]
update comment

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

17 years agoDo not leak all of the SourceLineInfo objects. Do not bother mallocing each
Chris Lattner [Tue, 17 Oct 2006 22:06:46 +0000 (22:06 +0000)]
Do not leak all of the SourceLineInfo objects.  Do not bother mallocing each
one separately.

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