[all-commits] [llvm/llvm-project] 31ecf8: [NewPM][CodeGen] Introduce CodeGenPassBuilder to h...
Yuanfang Chen via All-commits
all-commits at lists.llvm.org
Fri Sep 11 16:41:59 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 31ecf8d29d81d196374a562c6d2bd2c25a62861e
https://github.com/llvm/llvm-project/commit/31ecf8d29d81d196374a562c6d2bd2c25a62861e
Author: Yuanfang Chen <yuanfang.chen at sony.com>
Date: 2020-09-11 (Fri, 11 Sep 2020)
Changed paths:
A llvm/include/llvm/CodeGen/CGPassBuilderOption.h
A llvm/include/llvm/CodeGen/CodeGenPassBuilder.h
A llvm/include/llvm/CodeGen/MachinePassRegistry.def
M llvm/include/llvm/Passes/StandardInstrumentations.h
M llvm/include/llvm/Target/TargetMachine.h
M llvm/lib/CodeGen/CMakeLists.txt
A llvm/lib/CodeGen/CodeGenPassBuilder.cpp
M llvm/lib/CodeGen/LLVMTargetMachine.cpp
M llvm/lib/CodeGen/TargetPassConfig.cpp
Log Message:
-----------
[NewPM][CodeGen] Introduce CodeGenPassBuilder to help build codegen pipeline
Following up on D67687.
Please refer to the RFC here http://lists.llvm.org/pipermail/llvm-dev/2020-July/143309.html
`CodeGenPassBuilder` is the NPM counterpart of `TargetPassConfig` with below differences.
- Debugging features (MIR print/verify, disable pass, start/stop-before/after, etc.) living in `TargetPassConfig` are moved to use PassInstrument as much as possible. (Implementation also lives in `TargetPassConfig.cpp`)
- `TargetPassConfig` is a polymorphic base (virtual inheritance) to build the target-dependent pipeline whereas `CodeGenPassBuilder` is the CRTP base/helper to implement the target-dependent pipeline. The motivation is flexibility for targets to customize the pipeline, inlining opportunity, and fits the overall NPM value semantics design.
- `TargetPassConfig` is a legacy immutable pass to declare hooks for targets to customize some target-independent codegen layer behavior. This is partially ported to TargetMachine::options. The rest, such as `createMachineScheduler/createPostMachineScheduler`, are left out for now. They should be implemented in LLVMTargetMachine in the future.
Reviewed By: arsenm
Differential Revision: https://reviews.llvm.org/D83608
More information about the All-commits
mailing list