[PATCH] D44812: Remove MachineLoopInfo dependency from AsmPrinter.

Michael Zolotukhin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 22 16:57:21 PDT 2018


mzolotukhin created this revision.
mzolotukhin added reviewers: opaparo, gadi.haber, rafael, craig.topper, zvi.
Herald added subscribers: hiraditya, javed.absar, rengolin.

Currently MachineLoopInfo is used in only two places:

1. for computing IsBasicBlockInsideInnermostLoop field of MCCodePaddingContext, and it is never used.
2. in emitBasicBlockLoopComments, which is called only if `isVerbose()` is true.

Despite that, we currently have a dependency on MachineLoopInfo, which makes
pass manager to compute it and MachineDominator Tree. This patch removes the
use (1) and makes the use (2) lazy, thus avoiding some redundant
recomputations.


Repository:
  rL LLVM

https://reviews.llvm.org/D44812

Files:
  llvm/include/llvm/CodeGen/AsmPrinter.h
  llvm/include/llvm/MC/MCCodePadder.h
  llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
  llvm/test/CodeGen/AArch64/O0-pipeline.ll
  llvm/test/CodeGen/AArch64/O3-pipeline.ll
  llvm/test/CodeGen/AArch64/arm64-opt-remarks-lazy-bfi.ll
  llvm/test/CodeGen/X86/O0-pipeline.ll
  llvm/test/CodeGen/X86/O3-pipeline.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44812.139533.patch
Type: text/x-patch
Size: 7429 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180322/88716c0d/attachment.bin>


More information about the llvm-commits mailing list