Skip to content

Commit 4f7d190

Browse files
michalpaszkowskiigcbot
authored andcommitted
Fix segfault when running analysis passes after SCCP
SCCPLegacyPassWrapper runs new PM SCCPPass, which can change CFG and delete basic blocks. The wrapper incorrectly declared DominatorTreeWrapperPass as preserved without updating the legacy PM DomTree, leaving stale DomTree nodes that could reference freed BBs and crash later loop analyses. Fix by removing DomTree preservation in the SCCP wrapper so DT is invalidated and recomputed when required.
1 parent 6788a72 commit 4f7d190

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

  • IGC/WrapperLLVM/lib/llvmWrapper/Transforms/Scalar

IGC/WrapperLLVM/lib/llvmWrapper/Transforms/Scalar/SCCP.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ bool SCCPLegacyPassWrapper::runOnFunction(Function &F) {
3838
void SCCPLegacyPassWrapper::getAnalysisUsage(AnalysisUsage &AU) const {
3939
AU.addRequired<TargetLibraryInfoWrapperPass>();
4040
AU.addPreserved<GlobalsAAWrapperPass>();
41-
AU.addPreserved<DominatorTreeWrapperPass>();
4241
}
4342

4443
char SCCPLegacyPassWrapper::ID = 0;

0 commit comments

Comments
 (0)