oota-llvm.git
18 years agoFix Transforms/InstCombine/2006-10-26-VectorReassoc.ll
Chris Lattner [Thu, 26 Oct 2006 18:27:26 +0000 (18:27 +0000)]
Fix Transforms/InstCombine/2006-10-26-VectorReassoc.ll

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

18 years agonew testcase, should not reassoc fp vector
Chris Lattner [Thu, 26 Oct 2006 18:26:53 +0000 (18:26 +0000)]
new testcase, should not reassoc fp vector

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

18 years agoAdd isFPOrFPVector() method, which indicates if a type is either FP or a
Chris Lattner [Thu, 26 Oct 2006 18:22:45 +0000 (18:22 +0000)]
Add isFPOrFPVector() method, which indicates if a type is either FP or a
vector of FP types.

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

18 years agoinitial support for frame pointers
Rafael Espindola [Thu, 26 Oct 2006 13:31:26 +0000 (13:31 +0000)]
initial support for frame pointers

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

18 years agoEnclose a case in { and } so that the pickier compilers don't complain.
Reid Spencer [Thu, 26 Oct 2006 06:17:40 +0000 (06:17 +0000)]
Enclose a case in { and } so that the pickier compilers don't complain.

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

18 years agoFor PR950:
Reid Spencer [Thu, 26 Oct 2006 06:15:43 +0000 (06:15 +0000)]
For PR950:
Make necessary changes to support DIV -> [SUF]Div. This changes llvm to
have three division instructions: signed, unsigned, floating point. The
bytecode and assembler are bacwards compatible, however.

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

18 years agoFix 2006-10-25-AddSetCC. A relational operator (like setlt) can never
Nick Lewycky [Thu, 26 Oct 2006 02:35:18 +0000 (02:35 +0000)]
Fix 2006-10-25-AddSetCC. A relational operator (like setlt) can never
produce an EQ property.

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

18 years agoHandling of setlt/le/gt/ge is broken at the moment; predsimplify removes
Nick Lewycky [Thu, 26 Oct 2006 02:33:51 +0000 (02:33 +0000)]
Handling of setlt/le/gt/ge is broken at the moment; predsimplify removes
the call the pass2.

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

18 years agoMake the makefile tell us when Intrinsics.gen is being updated.
Reid Spencer [Thu, 26 Oct 2006 01:42:23 +0000 (01:42 +0000)]
Make the makefile tell us when Intrinsics.gen is being updated.

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

18 years agoThis testcase was logically wrong! Fixing, and including the test for the
Nick Lewycky [Thu, 26 Oct 2006 00:51:58 +0000 (00:51 +0000)]
This testcase was logically wrong! Fixing, and including the test for the
mistake that I made in the file too.

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

18 years agoResurrect r1.25.
Nick Lewycky [Wed, 25 Oct 2006 23:48:24 +0000 (23:48 +0000)]
Resurrect r1.25.
Fix and comment the "or", "and" and "xor" transformations.

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

18 years agosimplify code
Chris Lattner [Wed, 25 Oct 2006 22:21:37 +0000 (22:21 +0000)]
simplify code

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

18 years agoNew shuffle test case.
Evan Cheng [Wed, 25 Oct 2006 21:59:00 +0000 (21:59 +0000)]
New shuffle test case.

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

18 years agoDuring vector shuffle lowering, we sometimes commute a vector shuffle to try
Evan Cheng [Wed, 25 Oct 2006 21:49:50 +0000 (21:49 +0000)]
During vector shuffle lowering, we sometimes commute a vector shuffle to try
to match MOVL (movss, movsd, etc.). Don't forget to commute it back and try
unpck* and shufp* if that doesn't pan out.

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

18 years agoX86ISD::PEXTRW 3rd operand type is always target pointer type.
Evan Cheng [Wed, 25 Oct 2006 21:35:05 +0000 (21:35 +0000)]
X86ISD::PEXTRW 3rd operand type is always target pointer type.

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

18 years agohide symbols properly
Chris Lattner [Wed, 25 Oct 2006 21:14:31 +0000 (21:14 +0000)]
hide symbols properly

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

18 years agoRemove -disable-x86-shuffle-opti
Evan Cheng [Wed, 25 Oct 2006 20:48:19 +0000 (20:48 +0000)]
Remove -disable-x86-shuffle-opti

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

18 years agoFix for PR960. Improves bugpoint so that it removes global variable
Bill Wendling [Wed, 25 Oct 2006 18:36:14 +0000 (18:36 +0000)]
Fix for PR960. Improves bugpoint so that it removes global variable
initializers as well. This is only a first pass. It can be slow because
it clones the module for each pass. An obvious improvement is not to do that.

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

18 years agoSupply alignment info to linker through LLVMSymbol.
Devang Patel [Wed, 25 Oct 2006 18:10:07 +0000 (18:10 +0000)]
Supply alignment info to linker through LLVMSymbol.

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

18 years agoturn off tail merging for now
Chris Lattner [Wed, 25 Oct 2006 18:08:50 +0000 (18:08 +0000)]
turn off tail merging for now

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

18 years agobe more aggressive about matching identical instructions.
Chris Lattner [Wed, 25 Oct 2006 18:08:14 +0000 (18:08 +0000)]
be more aggressive about matching identical instructions.

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

18 years agoAllow this to pass on ppc
Chris Lattner [Wed, 25 Oct 2006 16:37:47 +0000 (16:37 +0000)]
Allow this to pass on ppc

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

18 years agoModernize the testcase, allow it to pass on ppc
Chris Lattner [Wed, 25 Oct 2006 16:35:10 +0000 (16:35 +0000)]
Modernize the testcase, allow it to pass on ppc

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

18 years agoTargetData is not subclassed. So no need to have virtual method.
Devang Patel [Tue, 24 Oct 2006 20:48:29 +0000 (20:48 +0000)]
TargetData is not subclassed. So no need to have virtual method.

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

18 years agoTargets should depend on all the intrinsics.td files also, otherwise they
Chris Lattner [Tue, 24 Oct 2006 20:32:44 +0000 (20:32 +0000)]
Targets should depend on all the intrinsics.td files also, otherwise they
will compute a locally wrong numbering for the intrinsics.  This fixes a
nasty issue where the x86 backend started miscompiling stuff in a 'cvs up'd
build after the altivec intrinsics were added.

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

18 years agoMove getPreferredAlignmentLog from AsmPrinter to TargetData
Devang Patel [Tue, 24 Oct 2006 20:32:14 +0000 (20:32 +0000)]
Move getPreferredAlignmentLog from AsmPrinter to TargetData

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

18 years agoexpand ISD::VACOPY
Rafael Espindola [Tue, 24 Oct 2006 20:15:21 +0000 (20:15 +0000)]
expand ISD::VACOPY

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

18 years agoRemoved extraneous semi-colon; this was prevening the grammar file from
John Criswell [Tue, 24 Oct 2006 19:09:48 +0000 (19:09 +0000)]
Removed extraneous semi-colon; this was prevening the grammar file from
bison'ing correctly.

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

18 years agoInstead of hard coding global prefix, use TargetAsmInfo.
Devang Patel [Tue, 24 Oct 2006 18:41:02 +0000 (18:41 +0000)]
Instead of hard coding global prefix, use TargetAsmInfo.
Add LTO destructor.

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

18 years agovisitSwitchCase knows how to insert conditional branches well. Change
Chris Lattner [Tue, 24 Oct 2006 18:07:37 +0000 (18:07 +0000)]
visitSwitchCase knows how to insert conditional branches well.  Change
visitBr to just call visitSwitchCase, eliminating duplicate logic.

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

18 years agoGeneralize CaseBlock a bit more:
Chris Lattner [Tue, 24 Oct 2006 17:57:59 +0000 (17:57 +0000)]
Generalize CaseBlock a bit more:

Rename LHSBB/RHSBB to TrueBB/FalseBB.  Allow the RHS value to be null,
in which case the LHS is treated as a bool.

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

18 years agoupdate comment
Chris Lattner [Tue, 24 Oct 2006 17:41:22 +0000 (17:41 +0000)]
update comment

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

18 years agoFix CodeGen/IA64/ret-0.ll, which has apparently been broken since some of the
Chris Lattner [Tue, 24 Oct 2006 17:09:43 +0000 (17:09 +0000)]
Fix CodeGen/IA64/ret-0.ll, which has apparently been broken since some of the
isel changes happened months ago.

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

18 years agonew testcase
Chris Lattner [Tue, 24 Oct 2006 17:09:20 +0000 (17:09 +0000)]
new testcase

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

18 years agofix warning about missing newline at end of file
Rafael Espindola [Tue, 24 Oct 2006 17:07:11 +0000 (17:07 +0000)]
fix warning about missing newline at end of file

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

18 years agogeneralize 'CaseBlock'. It really allows any comparison to be inserted.
Chris Lattner [Tue, 24 Oct 2006 17:03:35 +0000 (17:03 +0000)]
generalize 'CaseBlock'.  It really allows any comparison to be inserted.

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

18 years agoimplement uncond branch insertion, mark branches with isBranch.
Chris Lattner [Tue, 24 Oct 2006 16:47:57 +0000 (16:47 +0000)]
implement uncond branch insertion, mark branches with isBranch.

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

18 years agoimplement uncond branch insertion for the branch folding pass
Chris Lattner [Tue, 24 Oct 2006 16:44:55 +0000 (16:44 +0000)]
implement uncond branch insertion for the branch folding pass

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

18 years agoimplement uncond branch insertion so alpha works work branchfolding.
Chris Lattner [Tue, 24 Oct 2006 16:41:36 +0000 (16:41 +0000)]
implement uncond branch insertion so alpha works work branchfolding.

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

18 years agoimplement uncond branch insertion for sparc to fix regressions from last night
Chris Lattner [Tue, 24 Oct 2006 16:39:19 +0000 (16:39 +0000)]
implement uncond branch insertion for sparc to fix regressions from last night
due to branchfolding

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

18 years agonew bad case
Chris Lattner [Tue, 24 Oct 2006 16:12:47 +0000 (16:12 +0000)]
new bad case

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

18 years agoDon't do dead block elimination in fast mode.
Jim Laskey [Tue, 24 Oct 2006 16:11:49 +0000 (16:11 +0000)]
Don't do dead block elimination in fast mode.

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

18 years agofix assert comment
Rafael Espindola [Tue, 24 Oct 2006 14:47:28 +0000 (14:47 +0000)]
fix assert comment

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

18 years agoLinearScanner hotspot.
Jim Laskey [Tue, 24 Oct 2006 14:35:25 +0000 (14:35 +0000)]
LinearScanner hotspot.

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

18 years agoTighter data structure for deleted debug labels.
Jim Laskey [Tue, 24 Oct 2006 11:50:43 +0000 (11:50 +0000)]
Tighter data structure for deleted debug labels.

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

18 years agoFix Transforms/ScalarRepl/2006-10-23-PointerUnionCrash.ll
Chris Lattner [Tue, 24 Oct 2006 06:26:32 +0000 (06:26 +0000)]
Fix Transforms/ScalarRepl/2006-10-23-PointerUnionCrash.ll

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

18 years agoNew testcase that crashes scalarrepl
Chris Lattner [Tue, 24 Oct 2006 06:26:08 +0000 (06:26 +0000)]
New testcase that crashes scalarrepl

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

18 years agomove single basic blocks that are neither fallen into nor fall out of into
Chris Lattner [Tue, 24 Oct 2006 01:12:32 +0000 (01:12 +0000)]
move single basic blocks that are neither fallen into nor fall out of into
a place more useful.  In particular, if we can put them in a place where code
will be able to fall into it, do so.  Otherwise, put it in a place it can fall
through into a successor.  Otherwise, if preventing a fallthrough, move to the
end of the function, out of the way.

This deletes several hundred unconditional branches from spass.

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

18 years agoAdd intrinsics for the rest of the DCB* instructions.
Chris Lattner [Tue, 24 Oct 2006 01:08:42 +0000 (01:08 +0000)]
Add intrinsics for the rest of the DCB* instructions.

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

18 years agoadd missing dcb* intrinsics
Chris Lattner [Tue, 24 Oct 2006 01:07:39 +0000 (01:07 +0000)]
add missing dcb* intrinsics

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

18 years agoRevert back to r1.21, which was the last revision of predsimplify that
Chris Lattner [Tue, 24 Oct 2006 00:36:21 +0000 (00:36 +0000)]
Revert back to r1.21, which was the last revision of predsimplify that
passes llvm-gcc bootstrap.

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

18 years agoadd moveBefore/moveAfter helper methods
Chris Lattner [Tue, 24 Oct 2006 00:02:26 +0000 (00:02 +0000)]
add moveBefore/moveAfter helper methods

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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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

18 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