summaryrefslogtreecommitdiff
path: root/lib/Transforms/Scalar/CodeGenPrepare.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2009-12-17 09:39:49 +0000
committerEvan Cheng <evan.cheng@apple.com>2009-12-17 09:39:49 +0000
commit04149f7ffd033773adfe85e4acf3f560e29bd47d (patch)
tree69544150a5eb39de609a017553b043d80a924888 /lib/Transforms/Scalar/CodeGenPrepare.cpp
parent90b5d04772cabd20812dd478beb65f3fd6571b9e (diff)
downloadllvm-04149f7ffd033773adfe85e4acf3f560e29bd47d.tar.gz
llvm-04149f7ffd033773adfe85e4acf3f560e29bd47d.tar.bz2
llvm-04149f7ffd033773adfe85e4acf3f560e29bd47d.tar.xz
Revert 91280-91283, 91286-91289, 91291, 91293, 91295-91296. It apparently introduced a non-deterministic behavior in the optimizer somewhere.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91598 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/CodeGenPrepare.cpp')
-rw-r--r--lib/Transforms/Scalar/CodeGenPrepare.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/Transforms/Scalar/CodeGenPrepare.cpp b/lib/Transforms/Scalar/CodeGenPrepare.cpp
index e4c4ae5f39..372616c869 100644
--- a/lib/Transforms/Scalar/CodeGenPrepare.cpp
+++ b/lib/Transforms/Scalar/CodeGenPrepare.cpp
@@ -48,7 +48,7 @@ namespace {
/// TLI - Keep a pointer of a TargetLowering to consult for determining
/// transformation profitability.
const TargetLowering *TLI;
- ProfileInfo *PI;
+ ProfileInfo *PFI;
/// BackEdges - Keep a set of all the loop back edges.
///
@@ -99,7 +99,7 @@ void CodeGenPrepare::findLoopBackEdges(const Function &F) {
bool CodeGenPrepare::runOnFunction(Function &F) {
bool EverMadeChange = false;
- PI = getAnalysisIfAvailable<ProfileInfo>();
+ PFI = getAnalysisIfAvailable<ProfileInfo>();
// First pass, eliminate blocks that contain only PHI nodes and an
// unconditional branch.
EverMadeChange |= EliminateMostlyEmptyBlocks(F);
@@ -288,9 +288,9 @@ void CodeGenPrepare::EliminateMostlyEmptyBlock(BasicBlock *BB) {
// The PHIs are now updated, change everything that refers to BB to use
// DestBB and remove BB.
BB->replaceAllUsesWith(DestBB);
- if (PI) {
- PI->replaceAllUses(BB, DestBB);
- PI->removeEdge(ProfileInfo::getEdge(BB, DestBB));
+ if (PFI) {
+ PFI->replaceAllUses(BB, DestBB);
+ PFI->removeEdge(ProfileInfo::getEdge(BB, DestBB));
}
BB->eraseFromParent();
@@ -368,9 +368,9 @@ static void SplitEdgeNicely(TerminatorInst *TI, unsigned SuccNum,
// If we found a workable predecessor, change TI to branch to Succ.
if (FoundMatch) {
- ProfileInfo *PI = P->getAnalysisIfAvailable<ProfileInfo>();
- if (PI)
- PI->splitEdge(TIBB, Dest, Pred);
+ ProfileInfo *PFI = P->getAnalysisIfAvailable<ProfileInfo>();
+ if (PFI)
+ PFI->splitEdge(TIBB, Dest, Pred);
Dest->removePredecessor(TIBB);
TI->setSuccessor(SuccNum, Pred);
return;