summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2010-09-30 20:53:04 +0000
committerOwen Anderson <resistor@mac.com>2010-09-30 20:53:04 +0000
commit3170a25a8498926a19a07547dbeeaf2debc1007f (patch)
tree13b26ceb9655449133d38370e195348621ae4e3e /llvm/lib/Transforms
parenteb12f49fb7e3be3d49629b21dd712605175b0db7 (diff)
downloadbcm5719-llvm-3170a25a8498926a19a07547dbeeaf2debc1007f.tar.gz
bcm5719-llvm-3170a25a8498926a19a07547dbeeaf2debc1007f.zip
We do want to allow LoadPRE to perform LICM-like transformations: we already consider PHI nodes to be negligible for
code size (making this transform code size neutral), and it allows us to hoist values out of loops, which is always a good thing. llvm-svn: 115205
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/GVN.cpp13
1 files changed, 0 insertions, 13 deletions
diff --git a/llvm/lib/Transforms/Scalar/GVN.cpp b/llvm/lib/Transforms/Scalar/GVN.cpp
index de99c3f8b69..f1272d4956d 100644
--- a/llvm/lib/Transforms/Scalar/GVN.cpp
+++ b/llvm/lib/Transforms/Scalar/GVN.cpp
@@ -1545,19 +1545,6 @@ bool GVN::processNonLocalLoad(LoadInst *LI,
assert(TmpBB);
LoadBB = TmpBB;
- // If we have a repl set with LI itself in it, this means we have a loop where
- // at least one of the values is LI. Since this means that we won't be able
- // to eliminate LI even if we insert uses in the other predecessors, we will
- // end up increasing code size. Reject this by scanning for LI.
- for (unsigned i = 0, e = ValuesPerBlock.size(); i != e; ++i) {
- if (ValuesPerBlock[i].isSimpleValue() &&
- ValuesPerBlock[i].getSimpleValue() == LI) {
- // Skip cases where LI is the only definition, even for EnableFullLoadPRE.
- if (!EnableFullLoadPRE || e == 1)
- return false;
- }
- }
-
// FIXME: It is extremely unclear what this loop is doing, other than
// artificially restricting loadpre.
if (isSinglePred) {
OpenPOWER on IntegriCloud