Skip to content

Commit

Permalink
RegAllocFast: Avoid unused method warning in release builds
Browse files Browse the repository at this point in the history
  • Loading branch information
arsenm committed Jun 10, 2020
1 parent 2f6bb2a commit 0671a4c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions llvm/lib/CodeGen/RegAllocFast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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)
Expand All @@ -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) {
Expand Down

0 comments on commit 0671a4c

Please sign in to comment.