[PATCH] D51632: [New PM][PassInstrumentation] enhancing PassInstrumentation with PassManager tracking

Fedor Sergeev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 4 07:43:29 PDT 2018


fedor.sergeev created this revision.
fedor.sergeev added reviewers: philip.pfaffe, chandlerc.
Herald added a subscriber: mehdi_amini.

In order to implement -time-passes functionality we need to be able to pause
PassManager's own timer when starting execution (and timer) for nested passes.

For that we need to be able to track which PassManager is currently being executed.

Adding startPassManager/endPassManager points to PassInstrumentation and call them
in all the pass managers/pass adaptors. Also adding startIteration point for
repeating adaptors (e.g RepeatPass) since that was pretty much the only
remaining piece of nontrivial pass execution tracking we were lacking
(albeit not needed for -time-passes).

Introducing PassExecutionLocation which improves PassExecutionCounter with
a value of currently-active pass manager instance. All the callbacks now
take PassExecutionCounter.

Majority of the changes are rather mechanical ones.


Repository:
  rL LLVM

https://reviews.llvm.org/D51632

Files:
  include/llvm/Analysis/CGSCCPassManager.h
  include/llvm/Analysis/PrintIR.h
  include/llvm/IR/PassInstrumentation.h
  include/llvm/IR/PassManager.h
  include/llvm/Transforms/Scalar/LoopPassManager.h
  lib/Analysis/CGSCCPassManager.cpp
  lib/Analysis/PrintIR.cpp
  lib/IR/PassInstrumentation.cpp
  lib/Transforms/Scalar/LoopPassManager.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51632.163817.patch
Type: text/x-patch
Size: 26005 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180904/0406c938/attachment.bin>


More information about the llvm-commits mailing list