[PATCH] D34398: [ARM] Improve if-conversion for M-class CPUs without branch predictors

John Brawn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 20 05:51:58 PDT 2017


john.brawn created this revision.
Herald added subscribers: kristof.beyls, javed.absar, aemerson.

The current heuristic in isProfitableToIfCvt assumes we have a branch predictor, and so gives the wrong answer in some cases when we don't. This patch adds a subtarget feature to indicate that a subtarget has no branch predictor, and changes the heuristic in isProfitableToiIfCvt when it's present. This gives a slight overall improvement in a set of embedded benchmarks on Cortex-M4 and Cortex-M33.


Repository:
  rL LLVM

https://reviews.llvm.org/D34398

Files:
  lib/Target/ARM/ARM.td
  lib/Target/ARM/ARMBaseInstrInfo.cpp
  lib/Target/ARM/ARMSchedule.td
  lib/Target/ARM/ARMScheduleM3.td
  lib/Target/ARM/ARMSubtarget.h
  test/CodeGen/Thumb2/ifcvt-no-branch-predictor.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34398.103189.patch
Type: text/x-patch
Size: 11674 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170620/ed05414a/attachment.bin>


More information about the llvm-commits mailing list