aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Transforms/Utils/SSAUpdater.h
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2010-04-03 03:50:38 +0000
committerBob Wilson <bob.wilson@apple.com>2010-04-03 03:50:38 +0000
commit49c283fd3f8f81e04b84dc848981b4bf17b2d706 (patch)
treea124478e56c3577ec8be4b25959c731417f9318c /include/llvm/Transforms/Utils/SSAUpdater.h
parent4cc3c26834892dd7541a09759da4d31052f8a9f3 (diff)
Revert all my SSAUpdater patches. The PHI placement algorithm is not correct
(what was I thinking?) and there's also a problem with LCSSA. I'll try again later with fixes. --- Reverse-merging r100263 into '.': U lib/Transforms/Utils/SSAUpdater.cpp --- Reverse-merging r100177 into '.': G lib/Transforms/Utils/SSAUpdater.cpp --- Reverse-merging r100148 into '.': G lib/Transforms/Utils/SSAUpdater.cpp --- Reverse-merging r100147 into '.': U include/llvm/Transforms/Utils/SSAUpdater.h G lib/Transforms/Utils/SSAUpdater.cpp --- Reverse-merging r100131 into '.': G include/llvm/Transforms/Utils/SSAUpdater.h G lib/Transforms/Utils/SSAUpdater.cpp --- Reverse-merging r100130 into '.': G lib/Transforms/Utils/SSAUpdater.cpp --- Reverse-merging r100126 into '.': G include/llvm/Transforms/Utils/SSAUpdater.h G lib/Transforms/Utils/SSAUpdater.cpp --- Reverse-merging r100050 into '.': D test/Transforms/GVN/2010-03-31-RedundantPHIs.ll --- Reverse-merging r100047 into '.': G include/llvm/Transforms/Utils/SSAUpdater.h G lib/Transforms/Utils/SSAUpdater.cpp git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100264 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Transforms/Utils/SSAUpdater.h')
-rw-r--r--include/llvm/Transforms/Utils/SSAUpdater.h32
1 files changed, 9 insertions, 23 deletions
diff --git a/include/llvm/Transforms/Utils/SSAUpdater.h b/include/llvm/Transforms/Utils/SSAUpdater.h
index b29b749e8d..927e156abf 100644
--- a/include/llvm/Transforms/Utils/SSAUpdater.h
+++ b/include/llvm/Transforms/Utils/SSAUpdater.h
@@ -27,28 +27,22 @@ namespace llvm {
/// transformation wants to rewrite a set of uses of one value with uses of a
/// set of values.
class SSAUpdater {
-public:
- class BBInfo;
-
-private:
/// AvailableVals - This keeps track of which value to use on a per-block
- /// basis. When we insert PHI nodes, we keep track of them here.
- //typedef DenseMap<BasicBlock*, Value*> AvailableValsTy;
+ /// basis. When we insert PHI nodes, we keep track of them here. We use
+ /// TrackingVH's for the value of the map because we RAUW PHI nodes when we
+ /// eliminate them, and want the TrackingVH's to track this.
+ //typedef DenseMap<BasicBlock*, TrackingVH<Value> > AvailableValsTy;
void *AV;
/// PrototypeValue is an arbitrary representative value, which we derive names
/// and a type for PHI nodes.
Value *PrototypeValue;
- /// BBMap - The GetValueAtEndOfBlock method maintains this mapping from
- /// basic blocks to BBInfo structures.
- /// typedef DenseMap<BasicBlock*, BBInfo*> BBMapTy;
- void *BM;
-
- /// Allocator - The GetValueAtEndOfBlock method uses this BumpPtrAllocator to
- /// hold its internal data. The allocator and its storage is created and
- /// discarded for each invocation of GetValueAtEndOfBlock.
- void *BPA;
+ /// IncomingPredInfo - We use this as scratch space when doing our recursive
+ /// walk. This should only be used in GetValueInBlockInternal, normally it
+ /// should be empty.
+ //std::vector<std::pair<BasicBlock*, TrackingVH<Value> > > IncomingPredInfo;
+ void *IPI;
/// InsertedPHIs - If this is non-null, the SSAUpdater adds all PHI nodes that
/// it creates to the vector.
@@ -105,14 +99,6 @@ public:
private:
Value *GetValueAtEndOfBlockInternal(BasicBlock *BB);
- void FindPHIPlacement(BasicBlock *BB, BBInfo *Info, bool &Changed,
- unsigned Counter);
- void FindAvailableVal(BasicBlock *BB, BBInfo *Info, unsigned Counter);
- void FindExistingPHI(BasicBlock *BB);
- bool CheckIfPHIMatches(PHINode *PHI);
- void RecordMatchingPHI(PHINode *PHI);
- void ClearPHITags(PHINode *PHI);
-
void operator=(const SSAUpdater&); // DO NOT IMPLEMENT
SSAUpdater(const SSAUpdater&); // DO NOT IMPLEMENT
};