aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2012-07-30 20:57:50 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2012-07-30 20:57:50 +0000
commitef6c76c984f821ea866902a7f9e695b16e971468 (patch)
tree84c5842d32a3ab92f56ff1b6982ea46e4f4d0ea6 /lib
parent32ecfb41585d377c25c30aa4260cf007c1b0d5ce (diff)
downloadexternal_llvm-ef6c76c984f821ea866902a7f9e695b16e971468.zip
external_llvm-ef6c76c984f821ea866902a7f9e695b16e971468.tar.gz
external_llvm-ef6c76c984f821ea866902a7f9e695b16e971468.tar.bz2
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
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/EarlyIfConversion.cpp4
-rw-r--r--lib/CodeGen/MachineTraceMetrics.cpp2
-rw-r--r--lib/CodeGen/MachineTraceMetrics.h5
3 files changed, 4 insertions, 7 deletions
diff --git a/lib/CodeGen/EarlyIfConversion.cpp b/lib/CodeGen/EarlyIfConversion.cpp
index f5cf107..e49b9d3 100644
--- a/lib/CodeGen/EarlyIfConversion.cpp
+++ b/lib/CodeGen/EarlyIfConversion.cpp
@@ -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.
diff --git a/lib/CodeGen/MachineTraceMetrics.cpp b/lib/CodeGen/MachineTraceMetrics.cpp
index cf0d9c6..c31e6bd 100644
--- a/lib/CodeGen/MachineTraceMetrics.cpp
+++ b/lib/CodeGen/MachineTraceMetrics.cpp
@@ -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)
diff --git a/lib/CodeGen/MachineTraceMetrics.h b/lib/CodeGen/MachineTraceMetrics.h
index fa4970a..56ea74e 100644
--- a/lib/CodeGen/MachineTraceMetrics.h
+++ b/lib/CodeGen/MachineTraceMetrics.h
@@ -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;