Commit Graph

1886 Commits

Author SHA1 Message Date
Owen Anderson
ab8702787d Fix a subtle miscompilation. This allows 197.parser to be compiled correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40791 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-03 19:59:35 +00:00
Owen Anderson
4b55c3b0f1 Fix a subtle iterator invalidation bug in a recursive algorithm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40776 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-03 11:03:26 +00:00
Chris Lattner
b0e71edb6b Fix an accidental commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40758 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-02 21:33:36 +00:00
Owen Anderson
9fed589912 Fix 80 col. violations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40751 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-02 18:20:52 +00:00
Owen Anderson
830db6a00e Fix 80 col. violations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40750 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-02 18:16:06 +00:00
Owen Anderson
666f6fe0ce Fix 80 col. violations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40749 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-02 18:11:11 +00:00
Owen Anderson
1c2763d3fe Fix a bug that was causing several miscompilations on SPEC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40746 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-02 17:56:05 +00:00
Chris Lattner
5543a856ff Replacing a cast with another one does not reduce the number of
casts in the input.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40741 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-02 17:23:38 +00:00
Chris Lattner
b014678eb3 Disable an xform that causes an infinite loop. This fixes PR1594
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40739 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-02 16:56:32 +00:00
Chris Lattner
684b22df79 wrap some long lines. Major offenders that are left include
gvn, gvnpre, dse, and predsimplify.  To see these, use:

  make check-line-length



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40738 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-02 16:53:43 +00:00
Devang Patel
1ff61385c8 Update dominator info for the middle blocks created while spliting
exit edge to preserve LCSSA.

Fix dominance frontier update during loop unswitch. This fixes PR 1589, again



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40737 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-02 15:25:57 +00:00
Chris Lattner
951626b437 Enhance instcombine to be more aggressive about folding casts of
operations of casts.  This implements InstCombine/zext-fold.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40726 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-02 06:11:14 +00:00
Chris Lattner
9dd7a5178f Fix PR1575 and test/Transforms/CondProp/2007-08-01-InvalidRead.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40720 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-02 04:47:05 +00:00
Devang Patel
2f2e519083 Undo previous check-in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40698 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-01 23:24:50 +00:00
Devang Patel
28ae151c48 Update dominator info for the middle blocks created while spliting
exit edge to preserve LCSSA.

Fix dominance frontier update during loop unswitch. This fixes PR 1589.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40695 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-01 22:23:50 +00:00
Owen Anderson
9066020993 Make non-local memdep not be recursive, and fix a bug on 403.gcc that this exposed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40692 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-01 22:01:54 +00:00
Dan Gohman
c2bbfc18e9 More explicit keywords.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40673 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-01 15:32:29 +00:00
Owen Anderson
f6a05f949f Rename FastDSE to just DSE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40668 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-01 06:36:51 +00:00
Owen Anderson
a56c34f90b Move FastDSE in to DeadStoreElimination.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40667 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-01 06:30:51 +00:00
Owen Anderson
e739bae8da Remove old DSE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40666 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-01 06:30:10 +00:00
David Greene
52eec54820 New CallInst interface to address GLIBCXX_DEBUG errors caused by
indexing an empty std::vector.

Updates to all clients.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40660 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-01 03:43:44 +00:00
Owen Anderson
bf7d0bc4e5 Don't let the memory allocator outsmart GVN. ;-)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40655 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-31 23:27:13 +00:00
Owen Anderson
b95f9d565f Fix a failure I accidentally caused in my last commit by mishandling the
removal of redundant phis.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40650 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-31 20:18:28 +00:00
Lauro Ramos Venancio
c7d1114ade Fix a bug in GetKnownAlignment of packed structs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40649 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-31 20:13:21 +00:00
Owen Anderson
054ab94bff Fix a misoptimization in aha.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40642 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-31 17:43:14 +00:00
Dan Gohman
a9cfed77b6 Use SCEVExpander::InsertCastOfTo instead of calling new IntToPtrInst
directly, because the insert point used by the SCEVExpander may vary
from what LSR originally computes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40641 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-31 17:22:27 +00:00
Devang Patel
8d246f09cb Add note.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40638 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-31 16:52:25 +00:00
Devang Patel
15c260adff Loop unswitch preserves dom info.
Use simple analysis interface to preserve analysis info maintained by other loop passes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40627 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-31 08:03:26 +00:00
Devang Patel
91d22c8b1e Implement Simple Analysis interfaces - cloneBasicBlockAnalysis and deleteAnalysisValue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40626 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-31 08:01:41 +00:00
Devang Patel
6f62af6e64 If loop can be unswitched again, then do it yourself.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40609 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-30 23:07:10 +00:00
Owen Anderson
891eecb040 Avoid potential iterator invalidation problems.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40607 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-30 21:26:39 +00:00
Devang Patel
df5cf2074c Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40606 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-30 21:10:44 +00:00
Devang Patel
d9a6dcba9f Loop Rotation pass preserves dominator tree and frontier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40603 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-30 20:22:53 +00:00
Devang Patel
96b651c627 LICM preserves scalar evolution and dom frontier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40602 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-30 20:19:59 +00:00
Reid Spencer
ed3fa8552a Fix a typo/thinko.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40599 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-30 19:53:57 +00:00
Owen Anderson
45c8388e2a Use more caching when computing non-local dependence. This makes bzip2 not
use up the entire 32-bit address space.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40596 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-30 17:29:24 +00:00
Owen Anderson
4f9ba7c40c Fix a bug caused by indiscriminantly asking for the dominators of a predecessor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40595 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-30 16:57:08 +00:00
Chuck Rose III
936baaa5ae VStudio compiler errors and placing Function*->ExFunc map under ManagedStatic control.
This commit fixes two things.  One is a pair of VStudio compiler errors stemming from variables
which defined within the for loop statement and also within the body of the for loop.  I fixed these 
by renaming one of the two variables.  Additionally, I've made the Function*->ExFunc map in 
ExternalFunctions.cpp a ManagedStatic object, so that cleanup will be done on llvm_shutdown.  In repeated
uses of the interpreter, where the same Function* address may get used for completely differnet functions,
this was causing a crash.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40558 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-27 18:26:35 +00:00
Devang Patel
70b36d96b3 Fix thinko. Update return status appropriately.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40546 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-26 20:21:42 +00:00
Owen Anderson
45537917ee Fix a couple more bugs in the phi construction by pulling in code that does
almost the same things from LCSSA.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40540 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-26 18:26:51 +00:00
Dan Gohman
c2dfd066c0 Remove a bogus return statement, what appears to have been a pasto
from Relation::contradicts in Relation::incorporate.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40531 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-26 15:29:35 +00:00
Owen Anderson
febc7e3613 Fix what is _hopefully_ the last corner case for loops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40503 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-25 23:54:42 +00:00
Owen Anderson
9f435740b1 My last commit was not correct for nested loops. Fix it, and add a testcase for it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40498 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-25 22:19:40 +00:00
Owen Anderson
0d16988690 Fix an infinite loop on 300.twolf.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40497 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-25 22:03:06 +00:00
Owen Anderson
2e3d6b4a27 Fix a bug that was causing GVN to crash on 252.eon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40494 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-25 21:13:41 +00:00
Owen Anderson
0cd320362e Add basic support for performing whole-function RLE.
Note: This has not yet been thoroughly tested.  Use at your own risk.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40489 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-25 19:57:03 +00:00
Owen Anderson
1ad2cb7555 Add a GVN pass, using the value numbering code I developed for GVNPRE and the
load elimination code from RedundantLoadElimination.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40469 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-24 17:55:58 +00:00
Owen Anderson
a7f98e2919 Rename a lot of things to change FastDLE to RedundantLoadElimination.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40457 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-24 00:17:04 +00:00
Owen Anderson
e2a1624da3 Rename FastDLE as RedundantLoadElimination.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40456 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-24 00:08:38 +00:00
Owen Anderson
6b8894bb67 Don't delete volatile loads. Doing so is not safe.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40448 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-23 22:05:54 +00:00