Skip to content

Commit

Permalink
Move moduleClone pass up the chain.
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel-Durov committed Sep 28, 2024
1 parent e055222 commit f4ab756
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions llvm/lib/CodeGen/TargetPassConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1143,6 +1143,11 @@ bool TargetPassConfig::addISelPasses() {
addIRPasses();
addCodeGenPrepare();
addPassesToHandleExceptions();

if (YkModuleClone) {
addPass(createYkModuleClonePass());
}

if (YkBlockDisambiguate)
addPass(createYkBlockDisambiguatePass());

Expand Down Expand Up @@ -1186,11 +1191,6 @@ bool TargetPassConfig::addISelPasses() {
}
addPass(createYkSplitBlocksAfterCallsPass());
}
// `YkModuleClone` needs to run before `YkBasicBlockTracerPass` and
// `YkInsertStackMaps` because they both skip cloned functions.
if (YkModuleClone) {
addPass(createYkModuleClonePass());
}

if (YkInsertStackMaps) {
addPass(createYkStackmapsPass());
Expand Down

0 comments on commit f4ab756

Please sign in to comment.