diff options
author | Jessica Paquette <jpaquette@apple.com> | 2018-06-28 17:45:43 +0000 |
---|---|---|
committer | Jessica Paquette <jpaquette@apple.com> | 2018-06-28 17:45:43 +0000 |
commit | 28e2769fe5aaca58c7c03549e3bffc6a60a2a2e8 (patch) | |
tree | 3b93afab152f3ef1ca68e0e17163f2cbe386361d /llvm/lib/Target/X86/X86TargetMachine.cpp | |
parent | f76495c0f425dff7eff808b2d101bf12d9bf2b1b (diff) |
[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
Diffstat (limited to 'llvm/lib/Target/X86/X86TargetMachine.cpp')
-rw-r--r-- | llvm/lib/Target/X86/X86TargetMachine.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86TargetMachine.cpp b/llvm/lib/Target/X86/X86TargetMachine.cpp index 9b45e3bddc8..c5f476b54b9 100644 --- a/llvm/lib/Target/X86/X86TargetMachine.cpp +++ b/llvm/lib/Target/X86/X86TargetMachine.cpp @@ -234,6 +234,10 @@ X86TargetMachine::X86TargetMachine(const Target &T, const Triple &TT, this->Options.NoTrapAfterNoreturn = TT.isOSBinFormatMachO(); } + // Outlining is available for x86-64. + if (TT.getArch() == Triple::x86_64) + setMachineOutliner(true); + initAsmInfo(); } |