Skip to content

Commit fe8090e

Browse files
committed
[Autobackout][FuncReg]Revert of change: 7d42c37
Structurizer requires that the last BB is a return BB. Make sure this condition is met before invoking the structurizer. It not ( should not happen), non-structurized code (goto/join) will be generated instead. HSD/Radar: n/a Change-Id: Iffae3b5d18b50c189df2dd32dcc4d820176f141d
1 parent ed67cad commit fe8090e

File tree

3 files changed

+1
-18
lines changed

3 files changed

+1
-18
lines changed

visa/FlowGraph.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -893,9 +893,7 @@ void FlowGraph::constructFlowGraph(INST_LIST& instlist)
893893
setPhysicalPredSucc();
894894
if (hasGoto)
895895
{
896-
// If the last BB isn't a return block, do not invoke structurizer.
897-
if (builder->getOption(vISA_EnableStructurizer) &&
898-
isLastBBReturnOrExit())
896+
if (builder->getOption(vISA_EnableStructurizer))
899897
{
900898
if (builder->getOption(vISA_DumpDotAll))
901899
{

visa/FlowGraph.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,20 +1094,6 @@ class FlowGraph
10941094
}
10951095
}
10961096

1097-
bool isLastBBReturnOrExit() const
1098-
{
1099-
G4_BB* lastBB = back();
1100-
if (lastBB->size() > 0)
1101-
{
1102-
G4_INST* I = lastBB->back();
1103-
if (I->isReturn() || I->isFReturn() || I->isExit())
1104-
{
1105-
return true;
1106-
}
1107-
}
1108-
return false;
1109-
}
1110-
11111097
private:
11121098
//
11131099
// Flow group traversal routines

visa/Gen4_IR.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,6 @@ class G4_INST
632632
bool isFCall() const { return op == G4_pseudo_fcall; }
633633
bool isReturn() const { return op == G4_return; }
634634
bool isFReturn() const { return (op == G4_pseudo_fret); }
635-
bool isExit() const { return (op == G4_pseudo_exit); }
636635
bool isMath() const { return op == G4_math; }
637636
bool isIntrinsic() const { return op == G4_intrinsic; }
638637
bool isSend() const { return op == G4_send || op == G4_sendc || op == G4_sends || op == G4_sendsc; }

0 commit comments

Comments
 (0)