Skip to content

Commit 0671a4c

Browse files
committed
RegAllocFast: Avoid unused method warning in release builds
1 parent 2f6bb2a commit 0671a4c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

llvm/lib/CodeGen/RegAllocFast.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,10 @@ namespace {
184184
bool isLastUseOfLocalReg(const MachineOperand &MO) const;
185185

186186
void addKillFlag(const LiveReg &LRI);
187+
#ifndef NDEBUG
187188
bool verifyRegStateMapping(const LiveReg &LR) const;
189+
#endif
190+
188191
void killVirtReg(LiveReg &LR);
189192
void killVirtReg(Register VirtReg);
190193
void spillVirtReg(MachineBasicBlock::iterator MI, LiveReg &LR);
@@ -381,6 +384,7 @@ void RegAllocFast::addKillFlag(const LiveReg &LR) {
381384
}
382385
}
383386

387+
#ifndef NDEBUG
384388
bool RegAllocFast::verifyRegStateMapping(const LiveReg &LR) const {
385389
for (MCRegUnitIterator UI(LR.PhysReg, TRI); UI.isValid(); ++UI) {
386390
if (RegUnitStates[*UI] != LR.VirtReg)
@@ -389,6 +393,7 @@ bool RegAllocFast::verifyRegStateMapping(const LiveReg &LR) const {
389393

390394
return true;
391395
}
396+
#endif
392397

393398
/// Mark virtreg as no longer available.
394399
void RegAllocFast::killVirtReg(LiveReg &LR) {

0 commit comments

Comments
 (0)