diff options
author | Derek Schuff <dschuff@google.com> | 2016-04-04 17:09:25 +0000 |
---|---|---|
committer | Derek Schuff <dschuff@google.com> | 2016-04-04 17:09:25 +0000 |
commit | 1dbf7a571f39c07d8c301ffa29bb9c27d8417539 (patch) | |
tree | 1112ae62d73ab1c5efa0b5b0cd4f15335c6cae5b /llvm/lib/Target/X86 | |
parent | cdaf1df6579f0b932db4f4a29b176bab74305ae5 (diff) | |
download | bcm5719-llvm-1dbf7a571f39c07d8c301ffa29bb9c27d8417539.tar.gz bcm5719-llvm-1dbf7a571f39c07d8c301ffa29bb9c27d8417539.zip |
Add MachineFunctionProperty checks for AllVRegsAllocated for target passes
Summary:
This adds the same checks that were added in r264593 to all
target-specific passes that run after register allocation.
Reviewers: qcolombet
Subscribers: jyknight, dsanders, llvm-commits
Differential Revision: http://reviews.llvm.org/D18525
llvm-svn: 265313
Diffstat (limited to 'llvm/lib/Target/X86')
-rw-r--r-- | llvm/lib/Target/X86/X86ExpandPseudo.cpp | 5 | ||||
-rw-r--r-- | llvm/lib/Target/X86/X86FixupBWInsts.cpp | 5 | ||||
-rw-r--r-- | llvm/lib/Target/X86/X86FixupLEAs.cpp | 6 | ||||
-rw-r--r-- | llvm/lib/Target/X86/X86FloatingPoint.cpp | 5 | ||||
-rw-r--r-- | llvm/lib/Target/X86/X86PadShortFunction.cpp | 5 | ||||
-rw-r--r-- | llvm/lib/Target/X86/X86VZeroUpper.cpp | 4 |
6 files changed, 30 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86ExpandPseudo.cpp b/llvm/lib/Target/X86/X86ExpandPseudo.cpp index d7d0d3cb561..1ce52da3d93 100644 --- a/llvm/lib/Target/X86/X86ExpandPseudo.cpp +++ b/llvm/lib/Target/X86/X86ExpandPseudo.cpp @@ -48,6 +48,11 @@ public: bool runOnMachineFunction(MachineFunction &Fn) override; + MachineFunctionProperties getRequiredProperties() const override { + return MachineFunctionProperties().set( + MachineFunctionProperties::Property::AllVRegsAllocated); + } + const char *getPassName() const override { return "X86 pseudo instruction expansion pass"; } diff --git a/llvm/lib/Target/X86/X86FixupBWInsts.cpp b/llvm/lib/Target/X86/X86FixupBWInsts.cpp index 60222edcffc..68ac0979270 100644 --- a/llvm/lib/Target/X86/X86FixupBWInsts.cpp +++ b/llvm/lib/Target/X86/X86FixupBWInsts.cpp @@ -112,6 +112,11 @@ public: /// where performance or code size can be improved. bool runOnMachineFunction(MachineFunction &MF) override; + MachineFunctionProperties getRequiredProperties() const override { + return MachineFunctionProperties().set( + MachineFunctionProperties::Property::AllVRegsAllocated); + } + private: MachineFunction *MF; diff --git a/llvm/lib/Target/X86/X86FixupLEAs.cpp b/llvm/lib/Target/X86/X86FixupLEAs.cpp index 1dd69e8a6a5..dc8f6d5f0bc 100644 --- a/llvm/lib/Target/X86/X86FixupLEAs.cpp +++ b/llvm/lib/Target/X86/X86FixupLEAs.cpp @@ -92,6 +92,12 @@ public: /// if needed and when possible. bool runOnMachineFunction(MachineFunction &MF) override; + // This pass runs after regalloc and doesn't support VReg operands. + MachineFunctionProperties getRequiredProperties() const override { + return MachineFunctionProperties().set( + MachineFunctionProperties::Property::AllVRegsAllocated); + } + private: MachineFunction *MF; const X86InstrInfo *TII; // Machine instruction info. diff --git a/llvm/lib/Target/X86/X86FloatingPoint.cpp b/llvm/lib/Target/X86/X86FloatingPoint.cpp index f5da3ce7e12..26c54049886 100644 --- a/llvm/lib/Target/X86/X86FloatingPoint.cpp +++ b/llvm/lib/Target/X86/X86FloatingPoint.cpp @@ -76,6 +76,11 @@ namespace { bool runOnMachineFunction(MachineFunction &MF) override; + MachineFunctionProperties getRequiredProperties() const override { + return MachineFunctionProperties().set( + MachineFunctionProperties::Property::AllVRegsAllocated); + } + const char *getPassName() const override { return "X86 FP Stackifier"; } private: diff --git a/llvm/lib/Target/X86/X86PadShortFunction.cpp b/llvm/lib/Target/X86/X86PadShortFunction.cpp index 0f425e28fa7..96e8b9b274d 100644 --- a/llvm/lib/Target/X86/X86PadShortFunction.cpp +++ b/llvm/lib/Target/X86/X86PadShortFunction.cpp @@ -55,6 +55,11 @@ namespace { bool runOnMachineFunction(MachineFunction &MF) override; + MachineFunctionProperties getRequiredProperties() const override { + return MachineFunctionProperties().set( + MachineFunctionProperties::Property::AllVRegsAllocated); + } + const char *getPassName() const override { return "X86 Atom pad short functions"; } diff --git a/llvm/lib/Target/X86/X86VZeroUpper.cpp b/llvm/lib/Target/X86/X86VZeroUpper.cpp index 172f8665fad..4c8f2a77c64 100644 --- a/llvm/lib/Target/X86/X86VZeroUpper.cpp +++ b/llvm/lib/Target/X86/X86VZeroUpper.cpp @@ -38,6 +38,10 @@ namespace { VZeroUpperInserter() : MachineFunctionPass(ID) {} bool runOnMachineFunction(MachineFunction &MF) override; + MachineFunctionProperties getRequiredProperties() const override { + return MachineFunctionProperties().set( + MachineFunctionProperties::Property::AllVRegsAllocated); + } const char *getPassName() const override {return "X86 vzeroupper inserter";} private: |