[llvm] [RISCV] Move RISCVIndirectBranchTracking before Branch Relaxation (PR #139993)
Sam Elliott via llvm-commits
llvm-commits at lists.llvm.org
Wed May 14 22:05:24 PDT 2025
================
@@ -570,6 +570,7 @@ void RISCVPassConfig::addPreEmitPass() {
addPass(createMachineCopyPropagationPass(true));
if (TM->getOptLevel() >= CodeGenOptLevel::Default)
addPass(createRISCVLateBranchOptPass());
+ addPass(createRISCVIndirectBranchTrackingPass());
----------------
lenary wrote:
Please can you add your message as a comment before this line? Correctly handling late passes with these kinds of target-specific dependencies is difficult, documenting the relative ordering constraints will help with future maintenance.
I don't expect a comment for every pass added, but given you know the reasoning for this ordering, we can write it down.
https://github.com/llvm/llvm-project/pull/139993
More information about the llvm-commits
mailing list