Please use GitHub pull requests for new patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
llvm/lib/Transforms/Scalar/GVN.cpp
Show First 20 Lines • Show All 1,667 Lines • ▼ Show 20 Lines | bool GVN::processNonLocalLoad(LoadInst *Load) { | ||||
} | } | ||||
// Step 4: Eliminate partial redundancy. | // Step 4: Eliminate partial redundancy. | ||||
if (!isPREEnabled() || !isLoadPREEnabled()) | if (!isPREEnabled() || !isLoadPREEnabled()) | ||||
return Changed; | return Changed; | ||||
if (!isLoadInLoopPREEnabled() && LI && LI->getLoopFor(Load->getParent())) | if (!isLoadInLoopPREEnabled() && LI && LI->getLoopFor(Load->getParent())) | ||||
return Changed; | return Changed; | ||||
return Changed || PerformLoadPRE(Load, ValuesPerBlock, UnavailableBlocks) || | return Changed || | ||||
performLoopLoadPRE(Load, ValuesPerBlock, UnavailableBlocks); | performLoopLoadPRE(Load, ValuesPerBlock, UnavailableBlocks) || | ||||
PerformLoadPRE(Load, ValuesPerBlock, UnavailableBlocks); | |||||
} | } | ||||
static bool impliesEquivalanceIfTrue(CmpInst* Cmp) { | static bool impliesEquivalanceIfTrue(CmpInst* Cmp) { | ||||
if (Cmp->getPredicate() == CmpInst::Predicate::ICMP_EQ) | if (Cmp->getPredicate() == CmpInst::Predicate::ICMP_EQ) | ||||
return true; | return true; | ||||
// Floating point comparisons can be equal, but not equivalent. Cases: | // Floating point comparisons can be equal, but not equivalent. Cases: | ||||
// NaNs for unordered operators | // NaNs for unordered operators | ||||
▲ Show 20 Lines • Show All 1,414 Lines • Show Last 20 Lines |