[PATCH] D126079: [NFC][LLVM] Merge shouldExpandAtomic*InIR into shouldExpandAtomicInstInIR

Artem Belevich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 23 11:21:19 PDT 2022


tra added a comment.

Looks like it's a wash -- public API is smaller, but the implementations didn't really benefit much. If anything, they got a bit less readable.

I'm fine with dropping this change.



================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:19702
+AArch64TargetLowering::shouldExpandAtomicInstInIR(Instruction *I) const {
+  if (auto *SI = dyn_cast<StoreInst>(I)) {
+    // Loads and stores less than 128-bits are already atomic; ones above that
----------------
For targets that do have distinct per-instruction logic it may make sense to keep it in separate functions and just add a top-level dispatch function calling the right variant.



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D126079



More information about the llvm-commits mailing list