MCPcopy Create free account
hub / github.com/Inori/GPCS4 / dump

Method dump

GPCS4/Graphics/Gcn/ControlFlowGraph/GcnTokenList.cpp:88–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86 }
87
88 std::string GcnToken::dump() const
89 {
90 auto conditionName = [](const GcnTokenCondition& condition)
91 {
92 std::string name;
93 switch (condition.op)
94 {
95 case GcnConditionOp::EqBool: name = "EqBool"; break;
96 case GcnConditionOp::NeBool: name = "NeBool"; break;
97 case GcnConditionOp::EqU32: name = "EqU32"; break;
98 case GcnConditionOp::NeU32: name = "NeU32"; break;
99 case GcnConditionOp::GeU32: name = "GeU32"; break;
100 case GcnConditionOp::GtU32: name = "GtU32"; break;
101 case GcnConditionOp::LeU32: name = "LeU32"; break;
102 case GcnConditionOp::LtU32: name = "LtU32"; break;
103 case GcnConditionOp::Scc0: name = "Scc0"; break;
104 case GcnConditionOp::Scc1: name = "Scc1"; break;
105 case GcnConditionOp::Vccz: name = "Vccz"; break;
106 case GcnConditionOp::Vccnz: name = "Vccnz"; break;
107 case GcnConditionOp::Execz: name = "Execz"; break;
108 case GcnConditionOp::Execnz: name = "Execnz"; break;
109 case GcnConditionOp::Divergence: name = "Divergence"; break;
110 }
111 return name;
112 };
113
114 auto endTail = [](GcnToken* match)
115 {
116 std::string tail;
117 switch (match->m_kind)
118 {
119 case GcnTokenKind::Block:
120 tail = "BLOCK";
121 break;
122 case GcnTokenKind::If:
123 case GcnTokenKind::IfNot:
124 case GcnTokenKind::Else:
125 tail = "IF";
126 break;
127 case GcnTokenKind::Loop:
128 tail = "LOOP";
129 break;
130 default:
131 tail = "";
132 break;
133 }
134 return tail;
135 };
136
137 auto vertexName = [](size_t vtxId)
138 {
139 return vtxId == GcnControlFlowGraph::null_vertex()
140 ? "null"
141 : fmt::format("{}", vtxId);
142 };
143
144 std::stringstream ss;
145 ss << fmt::format("{}", (void*)this) << " ";

Callers 1

verifyMethod · 0.45

Calls 3

kindMethod · 0.80
formatFunction · 0.50
strMethod · 0.45

Tested by

no test coverage detected