summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/ImplicitNullChecks.cpp
diff options
context:
space:
mode:
authorDerek Schuff <dschuff@google.com>2016-03-28 17:05:30 +0000
committerDerek Schuff <dschuff@google.com>2016-03-28 17:05:30 +0000
commitad154c837e4428842cfe5c0f9dbfcc42ba7a1454 (patch)
treed2814494f2f8e2c72605d033d9ef6b566fa6e223 /llvm/lib/CodeGen/ImplicitNullChecks.cpp
parent77e2128580e0fdaf6091454d8f04277e8abf74f7 (diff)
downloadbcm5719-llvm-ad154c837e4428842cfe5c0f9dbfcc42ba7a1454.tar.gz
bcm5719-llvm-ad154c837e4428842cfe5c0f9dbfcc42ba7a1454.zip
Introduce MachineFunctionProperties and the AllVRegsAllocated property
MachineFunctionProperties represents a set of properties that a MachineFunction can have at particular points in time. Existing examples of this idea are MachineRegisterInfo::isSSA() and MachineRegisterInfo::tracksLiveness() which will eventually be switched to use this mechanism. This change introduces the AllVRegsAllocated property; i.e. the property that all virtual registers have been allocated and there are no VReg operands left. With this mechanism, passes can declare that they require a particular property to be set, or that they set or clear properties by implementing e.g. MachineFunctionPass::getRequiredProperties(). The MachineFunctionPass base class verifies that the requirements are met, and handles the setting and clearing based on the delcarations. Passes can also directly query and update the current properties of the MF if they want to have conditional behavior. This change annotates the target-independent post-regalloc passes; future changes will also annotate target-specific ones. Reviewers: qcolombet, hfinkel Differential Revision: http://reviews.llvm.org/D18421 llvm-svn: 264593
Diffstat (limited to 'llvm/lib/CodeGen/ImplicitNullChecks.cpp')
-rw-r--r--llvm/lib/CodeGen/ImplicitNullChecks.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/ImplicitNullChecks.cpp b/llvm/lib/CodeGen/ImplicitNullChecks.cpp
index a413aebac23..2c03f72601c 100644
--- a/llvm/lib/CodeGen/ImplicitNullChecks.cpp
+++ b/llvm/lib/CodeGen/ImplicitNullChecks.cpp
@@ -106,6 +106,11 @@ public:
}
bool runOnMachineFunction(MachineFunction &MF) override;
+
+ MachineFunctionProperties getRequiredProperties() const override {
+ return MachineFunctionProperties().set(
+ MachineFunctionProperties::Property::AllVRegsAllocated);
+ }
};
/// \brief Detect re-ordering hazards and dependencies.
OpenPOWER on IntegriCloud