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

Sjoerd Meijer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 3 06:45:42 PST 2021


SjoerdMeijer added a comment.

Thanks for those results.

I think the summary of those results is: it doesn't make things worse, which is also difficult to imagine from this change, and it improves a few cases. 
I am ignoring the first 3 rows of the llvm test suite results, that just looks like noise to me. The TSVC ones look like individual test cases from that vectoriser suite, are very small, and is probably just noise. I would be good to confirm that though, just have a brief look if there are any meaningful codegen difference in e.g. `TSVC/Searching-dbl/Searching-dbl.test`.

SPEC looks good: even tough it was not our motivating example, it does a little bit of good (or doesn't make things worse, or shows surprises).



================
Comment at: llvm/include/llvm/CodeGen/TargetInstrInfo.h:1943
+  virtual unsigned
+  getTailDuplicateSizeOverride(CodeGenOpt::Level OptLevel) const {
+    return OptLevel >= CodeGenOpt::Aggressive ? 4 : 2;
----------------
Bikeshedding names: don't think we need the `Override` part in the name.


================
Comment at: llvm/test/CodeGen/AArch64/aarch64-tail-dup-size.ll:4
+; RUN: llc -mtriple=aarch64-none-linux -O3 < %s | FileCheck %s --check-prefix=CHECK-O3
+
+%struct.record = type { %struct.record*, i32, %union.anon }
----------------
Can we add a RUN line with `tail-dup-size=4`, which should give the same result as the O2 one.


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