Skip to content

Commit 8ef7add

Browse files
pratikasharigcbot
authored andcommitted
Run verification code only when _DEBUG macro is set.
Run verification code only when _DEBUG macro is set.
1 parent 83847ea commit 8ef7add

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

visa/RegAlloc.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1502,6 +1502,19 @@ void LivenessAnalysis::hierarchicalIPA(const SparseBitSet& kernelInput, const Sp
15021502
std::unordered_map<FuncInfo*, SparseBitSet> args;
15031503
std::unordered_map<FuncInfo*, SparseBitSet> retVal;
15041504

1505+
#ifdef _DEBUG
1506+
auto verifyFuncTable = [&]()
1507+
{
1508+
auto accountedBBs = 0;
1509+
for (auto& sub : fg.sortedFuncTable)
1510+
{
1511+
accountedBBs += sub->getBBList().size();
1512+
}
1513+
MUST_BE_TRUE(fg.getBBList().size() == accountedBBs, "unaccounted bbs");
1514+
};
1515+
verifyFuncTable();
1516+
#endif
1517+
15051518
auto initKernelLiveOut = [this, &kernelOutput]()
15061519
{
15071520
for (auto&& bb : fg.kernelInfo->getBBList())

0 commit comments

Comments
 (0)