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

Chad Rosier via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 15 12:58:55 PDT 2017


mcrosier added inline comments.


================
Comment at: lib/Target/AArch64/AArch64CondBrTuning.cpp:76
+void AArch64CondBrTuning::getAnalysisUsage(AnalysisUsage &AU) const {
+  MachineFunctionPass::getAnalysisUsage(AU);
+}
----------------
gberry wrote:
> 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.
Oh, right.  I guess we'll just have to recompute in that case.


https://reviews.llvm.org/D34220





More information about the llvm-commits mailing list