File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -795,11 +795,17 @@ void DumpLLVMIR(IGC::CodeGenContext* pContext, const char* dumpName)
795795 // from the ValueSymTab by overriding the x variable to _x
796796 for (auto & F : module ->getFunctionList ())
797797 for (BasicBlock& BB : F)
798+ {
798799 for (Instruction& I : BB)
799800 if (I.getName ().startswith (" x" ))
800801 I.setName (" _x" );
802+
803+ if (BB.getName ().startswith (" bb" ))
804+ BB.setName (" _bb" );
805+ }
801806 // Now we rewrite the variables using a counter
802807 unsigned int counter = 1 ;
808+ unsigned int bb_counter = 0 ;
803809 for (auto & F : module ->getFunctionList ())
804810 for (BasicBlock& BB : F)
805811 {
@@ -808,11 +814,12 @@ void DumpLLVMIR(IGC::CodeGenContext* pContext, const char* dumpName)
808814 if ((!I.hasName () && !I.getType ()->isVoidTy ()) ||
809815 I.getName ().startswith (" _x" ))
810816 {
811- I.setName (" x" + std::to_string (counter));
812- counter++;
817+ I.setName (" x" + std::to_string (counter++));
813818 }
814819 }
815- counter++;
820+
821+ if (!BB.hasName () || BB.getName ().startswith (" _bb" ))
822+ BB.setName (" bb" + std::to_string (bb_counter++));
816823 }
817824 }
818825
You can’t perform that action at this time.
0 commit comments