forked from OSchip/llvm-project
NewGVN: Reverse sense of this test to make it clearer
llvm-svn: 294851
This commit is contained in:
parent
1529bb93c9
commit
22a4a01ffa
|
@ -1450,11 +1450,13 @@ void NewGVN::initializeCongruenceClasses(Function &F) {
|
||||||
MemoryAccessToClass[MP] = InitialClass;
|
MemoryAccessToClass[MP] = InitialClass;
|
||||||
|
|
||||||
for (auto &I : B) {
|
for (auto &I : B) {
|
||||||
// Don't insert void terminators into the class
|
// Don't insert void terminators into the class. We don't value number
|
||||||
if (!isa<TerminatorInst>(I) || !I.getType()->isVoidTy()) {
|
// them, and they just end up sitting in INITIAL.
|
||||||
InitialValues.insert(&I);
|
if (isa<TerminatorInst>(I) && I.getType()->isVoidTy())
|
||||||
ValueToClass[&I] = InitialClass;
|
continue;
|
||||||
}
|
InitialValues.insert(&I);
|
||||||
|
ValueToClass[&I] = InitialClass;
|
||||||
|
|
||||||
// All memory accesses are equivalent to live on entry to start. They must
|
// All memory accesses are equivalent to live on entry to start. They must
|
||||||
// be initialized to something so that initial changes are noticed. For
|
// be initialized to something so that initial changes are noticed. For
|
||||||
// the maximal answer, we initialize them all to be the same as
|
// the maximal answer, we initialize them all to be the same as
|
||||||
|
|
Loading…
Reference in New Issue