[PATCH] D139283: [llvm-exegesis] parallel snippet generator: avoid Read-After-Write pitfail for instrs w/ tied variables

Clement Courbet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 5 23:28:45 PST 2022


courbet accepted this revision.
courbet added inline comments.
This revision is now accepted and ready to land.


================
Comment at: llvm/tools/llvm-exegesis/lib/ParallelSnippetGenerator.cpp:227
+
+    std::variant<std::nullopt_t, MCOperand, Register> r =
+        generateSingleRegisterForInstrAvoidingDefUseOverlap(
----------------
[nit] R

(for the record I also hate having uppercase variable names :) )


================
Comment at: llvm/tools/llvm-exegesis/lib/ParallelSnippetGenerator.cpp:141
+    return "one unique register for each use position";
+  case UseRegRandomizationStrategy::SingleStaticUseReg:
+    return "reusing the same register for all uses";
----------------
lebedev.ri wrote:
> courbet wrote:
> > Are there cases when this is worse than the previous option ? I'm under the impression that we could just always do that.
> If we only have a single register for all use positions,
> then we may unintentionally stumble into zero idioms and such,
> which is useful, but not always intended,
> I think we should just keep all three choices here.
Ack, thanks.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D139283



More information about the llvm-commits mailing list