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 | dafa198c96d29b5cb3694494a3cb01da72745772 (patch) | |
| tree | b4e7a6bdd39285946278c987701eef1cc4579fad /llvm/lib/Target/AArch64 | |
| parent | 9c70d48cb2e9aafbfb3193aa366a53fccd3c7b2f (diff) | |
| download | bcm5719-llvm-dafa198c96d29b5cb3694494a3cb01da72745772.tar.gz bcm5719-llvm-dafa198c96d29b5cb3694494a3cb01da72745772.zip | |
[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/Target/AArch64')
| -rw-r--r-- | llvm/lib/Target/AArch64/AArch64InstrInfo.h | 2 | ||||
| -rw-r--r-- | llvm/lib/Target/AArch64/AArch64TargetMachine.cpp | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64InstrInfo.h b/llvm/lib/Target/AArch64/AArch64InstrInfo.h index 0e5e7976f93..80cae6c6071 100644 --- a/llvm/lib/Target/AArch64/AArch64InstrInfo.h +++ b/llvm/lib/Target/AArch64/AArch64InstrInfo.h @@ -236,8 +236,6 @@ public: ArrayRef<std::pair<MachineMemOperand::Flags, const char *>> getSerializableMachineMemOperandTargetFlags() const override; - /// AArch64 supports the MachineOutliner. - bool useMachineOutliner() const override { return true; } bool isFunctionSafeToOutlineFrom(MachineFunction &MF, bool OutlineFromLinkOnceODRs) const override; outliner::TargetCostInfo getOutlininingCandidateInfo( diff --git a/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp b/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp index b25bcdb7edc..01a997e5aed 100644 --- a/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp +++ b/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp @@ -252,6 +252,9 @@ AArch64TargetMachine::AArch64TargetMachine(const Target &T, const Triple &TT, // Enable GlobalISel at or below EnableGlobalISelAt0. if (getOptLevel() <= EnableGlobalISelAtO) setGlobalISel(true); + + // AArch64 supports the MachineOutliner. + setMachineOutliner(true); } AArch64TargetMachine::~AArch64TargetMachine() = default; |

