mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Add MachineTraceMetrics::verify().
This function verifies the consistency of cached data in the MachineTraceMetrics analysis. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160976 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -61,6 +61,7 @@ class MachineLoop;
|
||||
class raw_ostream;
|
||||
|
||||
class MachineTraceMetrics : public MachineFunctionPass {
|
||||
const MachineFunction *MF;
|
||||
const TargetInstrInfo *TII;
|
||||
const TargetRegisterInfo *TRI;
|
||||
const MachineRegisterInfo *MRI;
|
||||
@@ -178,7 +179,7 @@ public:
|
||||
virtual const MachineBasicBlock *pickTracePred(const MachineBasicBlock*) =0;
|
||||
virtual const MachineBasicBlock *pickTraceSucc(const MachineBasicBlock*) =0;
|
||||
explicit Ensemble(MachineTraceMetrics*);
|
||||
MachineLoop *getLoopFor(const MachineBasicBlock*);
|
||||
const MachineLoop *getLoopFor(const MachineBasicBlock*) const;
|
||||
const TraceBlockInfo *getDepthResources(const MachineBasicBlock*) const;
|
||||
const TraceBlockInfo *getHeightResources(const MachineBasicBlock*) const;
|
||||
|
||||
@@ -187,6 +188,7 @@ public:
|
||||
virtual const char *getName() const =0;
|
||||
void print(raw_ostream&) const;
|
||||
void invalidate(const MachineBasicBlock *MBB);
|
||||
void verify() const;
|
||||
|
||||
/// Get the trace that passes through MBB.
|
||||
/// The trace is computed on demand.
|
||||
@@ -210,6 +212,10 @@ public:
|
||||
/// is erased, or the CFG is otherwise changed.
|
||||
void invalidate(const MachineBasicBlock *MBB);
|
||||
|
||||
/// Verify the internal consistency of cached data.
|
||||
/// This does nothing in NDEBUG builds.
|
||||
void verify() const;
|
||||
|
||||
private:
|
||||
// One entry per basic block, indexed by block number.
|
||||
SmallVector<FixedBlockInfo, 4> BlockInfo;
|
||||
|
Reference in New Issue
Block a user