mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-02 22:04:55 +00:00
Hook into PassManager's analysis verification.
By overriding Pass::verifyAnalysis(), the pass contents will be verified by the pass manager. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160994 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
32ecfb4158
commit
ef6c76c984
@ -586,13 +586,13 @@ void EarlyIfConverter::updateLoops(ArrayRef<MachineBasicBlock*> Removed) {
|
||||
|
||||
/// Invalidate MachineTraceMetrics before if-conversion.
|
||||
void EarlyIfConverter::invalidateTraces() {
|
||||
Traces->verify();
|
||||
Traces->verifyAnalysis();
|
||||
Traces->invalidate(IfConv.Head);
|
||||
Traces->invalidate(IfConv.Tail);
|
||||
Traces->invalidate(IfConv.TBB);
|
||||
Traces->invalidate(IfConv.FBB);
|
||||
DEBUG(if (MinInstr) MinInstr->print(dbgs()));
|
||||
Traces->verify();
|
||||
Traces->verifyAnalysis();
|
||||
}
|
||||
|
||||
/// Apply cost model and heuristics to the if-conversion in IfConv.
|
||||
|
@ -284,7 +284,7 @@ void MachineTraceMetrics::invalidate(const MachineBasicBlock *MBB) {
|
||||
Ensembles[i]->invalidate(MBB);
|
||||
}
|
||||
|
||||
void MachineTraceMetrics::verify() const {
|
||||
void MachineTraceMetrics::verifyAnalysis() const {
|
||||
#ifndef NDEBUG
|
||||
assert(BlockInfo.size() == MF->getNumBlockIDs() && "Outdated BlockInfo size");
|
||||
for (unsigned i = 0; i != TS_NumStrategies; ++i)
|
||||
|
@ -75,6 +75,7 @@ public:
|
||||
void getAnalysisUsage(AnalysisUsage&) const;
|
||||
bool runOnMachineFunction(MachineFunction&);
|
||||
void releaseMemory();
|
||||
void verifyAnalysis() const;
|
||||
|
||||
friend class Ensemble;
|
||||
friend class Trace;
|
||||
@ -212,10 +213,6 @@ 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;
|
||||
|
Loading…
Reference in New Issue
Block a user