[PATCH] D34220: [AArch64] Prefer B.cond to CBZ/CBNZ/TBZ/TBNZ when NZCV flags can be set for "free"

Geoff Berry via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 15 12:18:31 PDT 2017


gberry added inline comments.


================
Comment at: lib/Target/AArch64/AArch64CondBrTuning.cpp:76
+void AArch64CondBrTuning::getAnalysisUsage(AnalysisUsage &AU) const {
+  MachineFunctionPass::getAnalysisUsage(AU);
+}
----------------
mcrosier wrote:
> gberry wrote:
> > You should be able to at least do AU.setPreservesCFG() here, otherwise there's no need to override this to just call the parent version.
> I also noticed MachineTraceMetrics was being clobbered, so I've marked that as preserved as well.  Please let me know if that's not correct.
I don't think that is correct since you are potentially changing opcodes and latencies.


https://reviews.llvm.org/D34220





More information about the llvm-commits mailing list