diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-04-16 16:01:22 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-04-16 16:01:22 +0000 |
commit | 71d5a2540a98c81f5bcaeb48805e0e2881f530ef (patch) | |
tree | 5343938942df402b49ec7300a1c25a2d4ccd5821 /include/llvm/CodeGen/LiveRegMatrix.h | |
parent | 31bbf64f3a4974a2d6c8b3b27ad2f519caf74057 (diff) |
Diffstat (limited to 'include/llvm/CodeGen/LiveRegMatrix.h')
-rw-r--r-- | include/llvm/CodeGen/LiveRegMatrix.h | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/include/llvm/CodeGen/LiveRegMatrix.h b/include/llvm/CodeGen/LiveRegMatrix.h index e169058ca563..fa6827f6b1f9 100644 --- a/include/llvm/CodeGen/LiveRegMatrix.h +++ b/include/llvm/CodeGen/LiveRegMatrix.h @@ -1,4 +1,4 @@ -//===-- LiveRegMatrix.h - Track register interference ---------*- C++ -*---===// +//===- LiveRegMatrix.h - Track register interference ----------*- C++ -*---===// // // The LLVM Compiler Infrastructure // @@ -27,11 +27,14 @@ #include "llvm/ADT/BitVector.h" #include "llvm/CodeGen/LiveIntervalUnion.h" #include "llvm/CodeGen/MachineFunctionPass.h" +#include <memory> namespace llvm { +class AnalysisUsage; class LiveInterval; -class LiveIntervalAnalysis; +class LiveIntervals; +class MachineFunction; class TargetRegisterInfo; class VirtRegMap; @@ -41,7 +44,7 @@ class LiveRegMatrix : public MachineFunctionPass { VirtRegMap *VRM; // UserTag changes whenever virtual registers have been modified. - unsigned UserTag; + unsigned UserTag = 0; // The matrix is represented as a LiveIntervalUnion per register unit. LiveIntervalUnion::Allocator LIUAlloc; @@ -51,16 +54,18 @@ class LiveRegMatrix : public MachineFunctionPass { std::unique_ptr<LiveIntervalUnion::Query[]> Queries; // Cached register mask interference info. - unsigned RegMaskTag; - unsigned RegMaskVirtReg; + unsigned RegMaskTag = 0; + unsigned RegMaskVirtReg = 0; BitVector RegMaskUsable; // MachineFunctionPass boilerplate. - void getAnalysisUsage(AnalysisUsage&) const override; - bool runOnMachineFunction(MachineFunction&) override; + void getAnalysisUsage(AnalysisUsage &) const override; + bool runOnMachineFunction(MachineFunction &) override; void releaseMemory() override; + public: static char ID; + LiveRegMatrix(); //===--------------------------------------------------------------------===// @@ -136,7 +141,7 @@ public: /// Use MCRegUnitIterator to enumerate all regunits in the desired PhysReg. /// This returns a reference to an internal Query data structure that is only /// valid until the next query() call. - LiveIntervalUnion::Query &query(LiveInterval &VirtReg, unsigned RegUnit); + LiveIntervalUnion::Query &query(const LiveRange &LR, unsigned RegUnit); /// Directly access the live interval unions per regunit. /// This returns an array indexed by the regunit number. |