aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineOutliner.cpp
diff options
context:
space:
mode:
authorJessica Paquette <jpaquette@apple.com>2018-06-28 17:45:43 +0000
committerJessica Paquette <jpaquette@apple.com>2018-06-28 17:45:43 +0000
commitdafa198c96d29b5cb3694494a3cb01da72745772 (patch)
treeb4e7a6bdd39285946278c987701eef1cc4579fad /llvm/lib/CodeGen/MachineOutliner.cpp
parent9c70d48cb2e9aafbfb3193aa366a53fccd3c7b2f (diff)
downloadllvm-dafa198c96d29b5cb3694494a3cb01da72745772.zip
llvm-dafa198c96d29b5cb3694494a3cb01da72745772.tar.gz
llvm-dafa198c96d29b5cb3694494a3cb01da72745772.tar.bz2
[MachineOutliner] Define MachineOutliner support in TargetOptions
Targets should be able to define whether or not they support the outliner without the outliner being added to the pass pipeline. Before this, the outliner pass would be added, and ask the target whether or not it supports the outliner. After this, it's possible to query the target in TargetPassConfig, before the outliner pass is created. This ensures that passing -enable-machine-outliner will not modify the pass pipeline of any target that does not support it. https://reviews.llvm.org/D48683 llvm-svn: 335887
Diffstat (limited to 'llvm/lib/CodeGen/MachineOutliner.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineOutliner.cpp9
1 files changed, 0 insertions, 9 deletions
diff --git a/llvm/lib/CodeGen/MachineOutliner.cpp b/llvm/lib/CodeGen/MachineOutliner.cpp
index 8f78240..8e92cd4 100644
--- a/llvm/lib/CodeGen/MachineOutliner.cpp
+++ b/llvm/lib/CodeGen/MachineOutliner.cpp
@@ -1331,15 +1331,6 @@ bool MachineOutliner::runOnModule(Module &M) {
const TargetRegisterInfo *TRI = STI.getRegisterInfo();
const TargetInstrInfo *TII = STI.getInstrInfo();
- // Does the target implement the MachineOutliner? If it doesn't, quit here.
- if (!TII->useMachineOutliner()) {
- // No. So we're done.
- LLVM_DEBUG(
- dbgs()
- << "Skipping pass: Target does not support the MachineOutliner.\n");
- return false;
- }
-
// If the user specifies that they want to outline from linkonceodrs, set
// it here.
OutlineFromLinkOnceODRs = EnableLinkOnceODROutlining;