[PATCH] D158759: [RISCV] Add a pass to rewrite rd to x0 for AMO instrs whose return values are unused
Yingwei Zheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 24 11:58:29 PDT 2023
dtcxzyw added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVTargetMachine.cpp:398
insertPass(&DetectDeadLanesID, &RISCVInitUndefID);
-
+ insertPass(&DetectDeadLanesID, &RISCVOptAMOInstrsID);
TargetPassConfig::addOptimizedRegAlloc();
----------------
craig.topper wrote:
> Does this depend on DetectDeadLanes?
>
> AArch64 has a pass called AArch64DeadRegisterDefinitions that is inserted in addPreRegAlloc.
Yes, it currently depends on DetectDeadLanes to mark dead defs.
AArch64DeadRegisterDefinitions is better than this implementation.
I will update the implementation soon. Thank you!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D158759/new/
https://reviews.llvm.org/D158759
More information about the llvm-commits
mailing list