[PATCH] D78264: [AArch64CondBrTuning] Ignore debug insts when scanning for NZCV clobbers [9/10]

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 16 13:23:35 PDT 2020


vsk marked 2 inline comments as done.
vsk added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64InstrInfo.cpp:3179
+                                           const TargetRegisterInfo *TRI) {
+  for (const MachineInstr &I : instructionsWithoutDebug(
+           std::next(DefMI.getIterator()), UseMI.getIterator()))
----------------
fhahn wrote:
> nit: could be something like  
> 
> ```
> return any_of(instructionsWithoutDebug( std::next(DefMI.getIterator()), UseMI.getIterator()), [TRI](MachineInstr &I) {
>   return I.modifiesRegister(AArch64::NZCV, TRI) || I.readsRegister(AArch64::NZCV, TRI);
> });
> ```
Thanks, I'll fold this into the change prior to landing it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D78264





More information about the llvm-commits mailing list