1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-18 18:42:46 +02:00
llvm-mirror/unittests/IR
Fedor Sergeev 817b214094 [New PM] Introducing PassInstrumentation framework
Pass Execution Instrumentation interface enables customizable instrumentation
of pass execution, as per "RFC: Pass Execution Instrumentation interface"
posted 06/07/2018 on llvm-dev@

The intent is to provide a common machinery to implement all
the pass-execution-debugging features like print-before/after,
opt-bisect, time-passes etc.

Here we get a basic implementation consisting of:
* PassInstrumentationCallbacks class that handles registration of callbacks
  and access to them.

* PassInstrumentation class that handles instrumentation-point interfaces
  that call into PassInstrumentationCallbacks.

* Callbacks accept StringRef which is just a name of the Pass right now.
  There were some ideas to pass an opaque wrapper for the pointer to pass instance,
  however it appears that pointer does not actually identify the instance
  (adaptors and managers might have the same address with the pass they govern).
  Hence it was decided to go simple for now and then later decide on what the proper
  mental model of identifying a "pass in a phase of pipeline" is.

* Callbacks accept llvm::Any serving as a wrapper for const IRUnit*, to remove direct dependencies
  on different IRUnits (e.g. Analyses).

* PassInstrumentationAnalysis analysis is explicitly requested from PassManager through
  usual AnalysisManager::getResult. All pass managers were updated to run that
  to get PassInstrumentation object for instrumentation calls.

* Using tuples/index_sequence getAnalysisResult helper to extract generic AnalysisManager's extra
  args out of a generic PassManager's extra args. This is the only way I was able to explicitly
  run getResult for PassInstrumentationAnalysis out of a generic code like PassManager::run or
  RepeatedPass::run.
  TODO: Upon lengthy discussions we agreed to accept this as an initial implementation
  and then get rid of getAnalysisResult by improving RepeatedPass implementation.

* PassBuilder takes PassInstrumentationCallbacks object to pass it further into
  PassInstrumentationAnalysis. Callbacks registration should be performed directly
  through PassInstrumentationCallbacks.

* new-pm tests updated to account for PassInstrumentationAnalysis being run

* Added PassInstrumentation tests to PassBuilderCallbacks unit tests.
  Other unit tests updated with registration of the now-required PassInstrumentationAnalysis.

Reviewers: chandlerc, philip.pfaffe
Differential Revision: https://reviews.llvm.org/D47858

llvm-svn: 342597
2018-09-19 22:42:57 +00:00
..
AsmWriterTest.cpp [IR] Don't print "!DIExpression() = !DIExpression()" when dumping 2017-08-30 20:40:36 +00:00
AttributesTest.cpp [Attributes] Fix a bug in AttributeList::get so it can handle a mix of FunctionIndex and ReturnIndex/arg indices at the same time 2018-04-16 17:05:01 +00:00
BasicBlockTest.cpp [STLExtras] Add size() for ranges, and remove distance() 2018-05-16 23:20:42 +00:00
CFGBuilder.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
CFGBuilder.h [Dominators] Define Arc less-than operator inline. 2017-07-13 23:11:57 +00:00
CMakeLists.txt [Dominators] Remove the DeferredDominance class 2018-08-11 08:12:07 +00:00
ConstantRangeTest.cpp [ConstantRange] Add support of mul in makeGuaranteedNoWrapRegion. 2018-06-26 18:54:10 +00:00
ConstantsTest.cpp Fix a bunch of places where operator-> was used directly on the return from dyn_cast. 2018-05-05 01:57:00 +00:00
DebugInfoTest.cpp Formatting with clang-format patch r280700 2016-09-06 17:03:02 +00:00
DebugTypeODRUniquingTest.cpp Add DWARF for discriminated unions 2018-02-06 23:45:59 +00:00
DominatorTreeBatchUpdatesTest.cpp [DomTree] Cleanup Update and LegalizeUpdate API moved to Support header. 2018-08-14 17:12:30 +00:00
DominatorTreeTest.cpp [Dominators] Change getNode parameter type to const NodeT * (NFC). 2018-06-16 14:47:05 +00:00
DomTreeUpdaterTest.cpp [Dominators] Refine the logic of recalculate() in the DomTreeUpdater 2018-08-03 06:51:35 +00:00
FunctionTest.cpp [GlobalObject] Fix setSection("") 2017-02-15 21:42:42 +00:00
InstructionsTest.cpp [IR] add shuffle queries for identity extend/extract 2018-08-30 15:05:38 +00:00
IntrinsicsTest.cpp
IRBuilderTest.cpp [DebugInfo] Refactoring DIType::setFlags to DIType::cloneWithFlags, NFC 2018-06-01 23:15:09 +00:00
LegacyPassManagerTest.cpp allow custom OptBisect classes set to LLVMContext 2018-04-05 10:29:37 +00:00
ManglerTest.cpp [IR] Avoid the need to prefix MS C++ symbols with '\01' 2018-03-16 20:13:32 +00:00
MDBuilderTest.cpp
MetadataTest.cpp Prevent DILocation::getMergedLocation() from creating invalid metadata. 2018-08-24 23:30:57 +00:00
ModuleTest.cpp Have Module::createRNG return a unique_ptr 2017-07-12 08:03:44 +00:00
PassBuilderCallbacksTest.cpp [New PM] Introducing PassInstrumentation framework 2018-09-19 22:42:57 +00:00
PassManagerTest.cpp [New PM] Introducing PassInstrumentation framework 2018-09-19 22:42:57 +00:00
PatternMatch.cpp [PatternMatch] Add m_Store pattern match helper 2018-06-20 07:27:45 +00:00
TypeBuilderTest.cpp Suppress all uses of LLVM_END_WITH_NULL. NFC. 2017-05-09 19:31:13 +00:00
TypesTest.cpp
UserTest.cpp Re-sort #include lines for unittests. This uses a slightly modified 2017-06-06 11:06:56 +00:00
UseTest.cpp Remove redundant includes from unittests. 2017-12-13 21:31:05 +00:00
ValueHandleTest.cpp Add a new WeakVH value handle; NFC 2017-05-01 17:07:54 +00:00
ValueMapTest.cpp s/LLVM_ON_WIN32/_WIN32/, llvm 2018-04-29 00:45:03 +00:00
ValueTest.cpp [MIR] Making MIR Printing, opt -dot-cfg, and -debug printing faster 2018-03-22 21:29:07 +00:00
VerifierTest.cpp Move the stripping of invalid debug info from the Verifier to AutoUpgrade. 2017-10-02 18:31:29 +00:00
WaymarkTest.cpp