forked from OSchip/llvm-project
[RS4GC] Use an value handle to help isolate errors quickly
Inspired by the bug reported in 25846. Whatever we end up doing about that one, the value handle change is a generally good one since it will help catch this type of mistake more quickly. Patch by: Manuel Jacob llvm-svn: 255984
This commit is contained in:
parent
f3348095e8
commit
dd0948a1b6
|
@ -641,7 +641,7 @@ public:
|
|||
|
||||
private:
|
||||
Status status;
|
||||
Value *base; // non null only if status == base
|
||||
AssertingVH<Value> base; // non null only if status == base
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -1098,10 +1098,10 @@ static Value *findBasePointer(Value *I, DefiningValueMapTy &cache) {
|
|||
NewInsts.erase(BaseI);
|
||||
ReverseMap.erase(BaseI);
|
||||
BaseI->replaceAllUsesWith(Replacement);
|
||||
BaseI->eraseFromParent();
|
||||
assert(States.count(BDV));
|
||||
assert(States[BDV].isConflict() && States[BDV].getBase() == BaseI);
|
||||
States[BDV] = BDVState(BDVState::Conflict, Replacement);
|
||||
BaseI->eraseFromParent();
|
||||
};
|
||||
const DataLayout &DL = cast<Instruction>(def)->getModule()->getDataLayout();
|
||||
while (!Worklist.empty()) {
|
||||
|
|
Loading…
Reference in New Issue