[PATCH] D40831: [AArch64] Only use writeback in the load/store optimizer when needed

Geoff Berry via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 5 11:00:04 PST 2017


gberry added inline comments.


================
Comment at: lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp:1346
+  // We need to use writeback only when the base register is used afterwards.
+  bool UseWriteback = !getLdStBaseOp(*I).isKill();
+  unsigned NewOpc;
----------------
john.brawn wrote:
> junbuml wrote:
> > I'm not  sure if it's safe enough to use the kill marker here? Is this information still valid for us to rely on? 
> The load/store optimizer in the ARM backend relies on it, so I would assume so. After some searching around I found TargetRegisterInfo::trackLivenessAfterRegAlloc which the AArch64 backend does return true for, and I couldn't find anything else that we would need to do to make sure it's valid.
The kill markers are slowly being phased out.  They should always be correct, but they are conservative (e.g. a lot of passes just delete them in regions of code they transform since that is the easiest way to keep them correct) and will become more so over time.


Repository:
  rL LLVM

https://reviews.llvm.org/D40831





More information about the llvm-commits mailing list