Skip to content

Commit 1293477

Browse files
Check if the pass was disabled when adding the pass via the pass' pointer
Signed-off-by: Mikhail R. Gadelha <[email protected]>
1 parent b49d6d3 commit 1293477

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

llvm/lib/CodeGen/TargetPassConfig.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -707,6 +707,10 @@ void TargetPassConfig::addPass(Pass *P) {
707707
// and shouldn't reference it.
708708
AnalysisID PassID = P->getPassID();
709709

710+
IdentifyingPassPtr TargetID = getPassSubstitution(PassID);
711+
if (!overridePass(PassID, TargetID).isValid())
712+
return;
713+
710714
if (StartBefore == PassID && StartBeforeCount++ == StartBeforeInstanceNum)
711715
Started = true;
712716
if (StopBefore == PassID && StopBeforeCount++ == StopBeforeInstanceNum)

0 commit comments

Comments
 (0)