2012-06-21 17:51:26 +08:00
|
|
|
set(LLVM_LINK_COMPONENTS
|
2013-12-10 19:13:32 +08:00
|
|
|
Analysis
|
|
|
|
AsmParser
|
|
|
|
Core
|
|
|
|
Support
|
[PM] Enable registration of out-of-tree passes with PassBuilder
Summary:
This patch adds a callback registration API to the PassBuilder,
enabling registering out-of-tree passes with it.
Through the Callback API, callers may register callbacks with the
various stages at which passes are added into pass managers, including
parsing of a pass pipeline as well as at extension points within the
default -O pipelines.
Registering utilities like `require<>` and `invalidate<>` needs to be
handled manually by the caller, but a helper is provided.
Additionally, adding passes at pipeline extension points is exposed
through the opt tool. This patch adds a `-passes-ep-X` commandline
option for every extension point X, which opt parses into pipelines
inserted into that extension point.
Reviewers: chandlerc
Reviewed By: chandlerc
Subscribers: lksbhm, grosser, davide, mehdi_amini, llvm-commits, mgorny
Differential Revision: https://reviews.llvm.org/D33464
llvm-svn: 307532
2017-07-10 18:57:55 +08:00
|
|
|
Passes
|
2012-06-21 17:51:26 +08:00
|
|
|
)
|
|
|
|
|
2018-05-15 03:23:31 +08:00
|
|
|
add_llvm_unittest(IRTests
|
2016-01-08 04:14:30 +08:00
|
|
|
AsmWriterTest.cpp
|
2013-01-12 22:13:45 +08:00
|
|
|
AttributesTest.cpp
|
2017-05-26 11:10:00 +08:00
|
|
|
BasicBlockTest.cpp
|
2017-07-14 05:16:01 +08:00
|
|
|
CFGBuilder.cpp
|
2014-03-04 20:24:34 +08:00
|
|
|
ConstantRangeTest.cpp
|
2012-06-21 17:51:26 +08:00
|
|
|
ConstantsTest.cpp
|
2019-03-08 18:44:06 +08:00
|
|
|
DataLayoutTest.cpp
|
2014-10-04 04:01:09 +08:00
|
|
|
DebugInfoTest.cpp
|
2016-04-20 01:11:06 +08:00
|
|
|
DebugTypeODRUniquingTest.cpp
|
2012-06-21 17:51:26 +08:00
|
|
|
DominatorTreeTest.cpp
|
2017-08-17 00:12:52 +08:00
|
|
|
DominatorTreeBatchUpdatesTest.cpp
|
2016-04-06 14:38:15 +08:00
|
|
|
FunctionTest.cpp
|
[PM] Enable registration of out-of-tree passes with PassBuilder
Summary:
This patch adds a callback registration API to the PassBuilder,
enabling registering out-of-tree passes with it.
Through the Callback API, callers may register callbacks with the
various stages at which passes are added into pass managers, including
parsing of a pass pipeline as well as at extension points within the
default -O pipelines.
Registering utilities like `require<>` and `invalidate<>` needs to be
handled manually by the caller, but a helper is provided.
Additionally, adding passes at pipeline extension points is exposed
through the opt tool. This patch adds a `-passes-ep-X` commandline
option for every extension point X, which opt parses into pipelines
inserted into that extension point.
Reviewers: chandlerc
Reviewed By: chandlerc
Subscribers: lksbhm, grosser, davide, mehdi_amini, llvm-commits, mgorny
Differential Revision: https://reviews.llvm.org/D33464
llvm-svn: 307532
2017-07-10 18:57:55 +08:00
|
|
|
PassBuilderCallbacksTest.cpp
|
2012-07-16 15:44:45 +08:00
|
|
|
IRBuilderTest.cpp
|
2012-06-21 17:51:26 +08:00
|
|
|
InstructionsTest.cpp
|
2016-01-27 06:33:19 +08:00
|
|
|
IntrinsicsTest.cpp
|
2013-11-09 20:26:54 +08:00
|
|
|
LegacyPassManagerTest.cpp
|
2012-07-16 07:26:50 +08:00
|
|
|
MDBuilderTest.cpp
|
2018-03-17 04:13:32 +08:00
|
|
|
ManglerTest.cpp
|
2012-06-21 17:51:26 +08:00
|
|
|
MetadataTest.cpp
|
ADT: Split out simple_ilist, a simple intrusive list
Split out a new, low-level intrusive list type with clear semantics.
Unlike iplist (and ilist), all operations on simple_ilist are intrusive,
and simple_ilist never takes ownership of its nodes. This enables an
intuitive API that has the right defaults for intrusive lists.
- insert() takes references (not pointers!) to nodes (in iplist/ilist,
passing a reference will cause the node to be copied).
- erase() takes only iterators (like std::list), and does not destroy
the nodes.
- remove() takes only references and has the same behaviour as erase().
- clear() does not destroy the nodes.
- The destructor does not destroy the nodes.
- New API {erase,remove,clear}AndDispose() take an extra Disposer
functor for callsites that want to call some disposal routine (e.g.,
std::default_delete).
This list is not currently configurable, and has no callbacks.
The initial motivation was to fix iplist<>::sort to work correctly (even
with callbacks in ilist_traits<>). iplist<> uses simple_ilist<>::sort
directly. The new test in unittests/IR/ModuleTest.cpp crashes without
this commit.
Fixing sort() via a low-level layer provided a good opportunity to:
- Unit test the low-level functionality thoroughly.
- Modernize the API, largely inspired by other intrusive list
implementations.
Here's a sketch of a longer-term plan:
- Create BumpPtrList<>, a non-intrusive list implemented using
simple_ilist<>, and use it for the Token list in
lib/Support/YAMLParser.cpp. This will factor out the only real use of
createNode().
- Evolve the iplist<> and ilist<> APIs in the direction of
simple_ilist<>, making allocation/deallocation explicit at call sites
(similar to simple_ilist<>::eraseAndDispose()).
- Factor out remaining calls to createNode() and deleteNode() and remove
the customization from ilist_traits<>.
- Transition uses of iplist<>/ilist<> that don't need callbacks over to
simple_ilist<>.
llvm-svn: 280107
2016-08-31 00:23:55 +08:00
|
|
|
ModuleTest.cpp
|
2013-11-09 21:09:08 +08:00
|
|
|
PassManagerTest.cpp
|
2013-05-05 10:14:28 +08:00
|
|
|
PatternMatch.cpp
|
2012-08-04 17:52:39 +08:00
|
|
|
TypesTest.cpp
|
2014-07-24 08:53:19 +08:00
|
|
|
UseTest.cpp
|
2014-04-17 17:07:50 +08:00
|
|
|
UserTest.cpp
|
2014-03-04 19:17:44 +08:00
|
|
|
ValueHandleTest.cpp
|
2012-06-21 17:51:26 +08:00
|
|
|
ValueMapTest.cpp
|
2013-04-12 16:33:11 +08:00
|
|
|
ValueTest.cpp
|
2012-06-21 17:51:26 +08:00
|
|
|
VerifierTest.cpp
|
2012-11-12 18:01:17 +08:00
|
|
|
WaymarkTest.cpp
|
2012-06-21 17:51:26 +08:00
|
|
|
)
|
2018-10-17 18:36:23 +08:00
|
|
|
|
|
|
|
target_link_libraries(IRTests PRIVATE LLVMTestingSupport)
|