[PATCH] D95631: [CodeGen][AArch64] Add TargetInstrInfo hook to modify the TailDuplicateSize default threshold

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 4 00:41:33 PST 2021


dmgreen added a comment.

Like we were talking about offline, there's a chance this isn't as good as the first version that altered the taildup threshold directly - this done earlier might give more scheduling freedom and other optimization opportunities to the folded tails. It's now only done in machine block placement late in the pipeline. If this version is working that's great, but check it's still OK.



================
Comment at: llvm/include/llvm/CodeGen/TargetInstrInfo.h:1943
+  virtual unsigned
+  getTailDuplicateSizeOverride(CodeGenOpt::Level OptLevel) const {
+    return OptLevel >= CodeGenOpt::Aggressive ? 4 : 2;
----------------
SjoerdMeijer wrote:
> Bikeshedding names: don't think we need the `Override` part in the name.
+1 to removing override. It's probably worth calling out that this is the threshold used in machineblockplacement now, not the one used in the other taildup passes. It seems to be called TailDupPlacementThreshold there.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95631



More information about the llvm-commits mailing list