[PATCH] D104579: [SampleFDO] Add two passes of MIRAddFSDiscriminatorsPass

Hongtao Yu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 11 09:42:45 PDT 2021


hoy accepted this revision.
hoy added a comment.

Nice to see the win from RegAlloc!



================
Comment at: llvm/lib/CodeGen/TargetPassConfig.cpp:1116-1118
+  if (EnableFSDiscriminator)
+    addPass(createMIRAddFSDiscriminatorsPass(
+        sampleprof::FSDiscriminatorPass::Pass1));
----------------
wenlei wrote:
> wmi wrote:
> > How about adding a comment that the pass is intentionally placed before regalloc, in case some other passes are inserted in between in the future. 
> name `FSDiscriminatorPass::Pass1` as something like `FSDiscriminatorPass::RegAlloc` might help too.
Either way sounds good to me. Was wondering if Pass1, Pass2... should be named more specifically by the pass they are preceding. On a second thought, if they are moved around in the future, their name may need be changed too. 


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D104579/new/

https://reviews.llvm.org/D104579



More information about the llvm-commits mailing list