[llvm] 0671a4c - RegAllocFast: Avoid unused method warning in release builds
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 10 12:24:02 PDT 2020
Author: Matt Arsenault
Date: 2020-06-10T15:23:56-04:00
New Revision: 0671a4c5087d40450603d9d26cf239f1a8b1367e
URL: https://github.com/llvm/llvm-project/commit/0671a4c5087d40450603d9d26cf239f1a8b1367e
DIFF: https://github.com/llvm/llvm-project/commit/0671a4c5087d40450603d9d26cf239f1a8b1367e.diff
LOG: RegAllocFast: Avoid unused method warning in release builds
Added:
Modified:
llvm/lib/CodeGen/RegAllocFast.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/RegAllocFast.cpp b/llvm/lib/CodeGen/RegAllocFast.cpp
index 157b32b8c749..df7981a2928c 100644
--- a/llvm/lib/CodeGen/RegAllocFast.cpp
+++ b/llvm/lib/CodeGen/RegAllocFast.cpp
@@ -184,7 +184,10 @@ namespace {
bool isLastUseOfLocalReg(const MachineOperand &MO) const;
void addKillFlag(const LiveReg &LRI);
+#ifndef NDEBUG
bool verifyRegStateMapping(const LiveReg &LR) const;
+#endif
+
void killVirtReg(LiveReg &LR);
void killVirtReg(Register VirtReg);
void spillVirtReg(MachineBasicBlock::iterator MI, LiveReg &LR);
@@ -381,6 +384,7 @@ void RegAllocFast::addKillFlag(const LiveReg &LR) {
}
}
+#ifndef NDEBUG
bool RegAllocFast::verifyRegStateMapping(const LiveReg &LR) const {
for (MCRegUnitIterator UI(LR.PhysReg, TRI); UI.isValid(); ++UI) {
if (RegUnitStates[*UI] != LR.VirtReg)
@@ -389,6 +393,7 @@ bool RegAllocFast::verifyRegStateMapping(const LiveReg &LR) const {
return true;
}
+#endif
/// Mark virtreg as no longer available.
void RegAllocFast::killVirtReg(LiveReg &LR) {
More information about the llvm-commits
mailing list