Skip to content

Commit e053866

Browse files
fda0igcbot
authored andcommitted
Remove deadcode, init members
Default initialize small std::arrays to zero-values in BuildIR.h. Remove dead code from FlowGraph.cpp.
1 parent 09f2a4b commit e053866

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

visa/BuildIR.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,8 @@ class IR_Builder {
281281
};
282282
static const int MAX_POOL_SIZE =
283283
8; // reg pressure control, for now just do naive first-come first-serve
284-
std::array<ImmVal, MAX_POOL_SIZE> immArray;
285-
std::array<G4_Declare *, MAX_POOL_SIZE> dclArray;
284+
std::array<ImmVal, MAX_POOL_SIZE> immArray = {};
285+
std::array<G4_Declare *, MAX_POOL_SIZE> dclArray = {};
286286
int curSize = 0;
287287
IR_Builder &builder;
288288

visa/FlowGraph.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -582,10 +582,6 @@ void FlowGraph::normalizeFlowGraph() {
582582
for (BB_LIST_ITER it = BBs.begin(); it != BBs.end(); it++) {
583583
G4_BB *bb = *it;
584584

585-
if (bb->getBBType() & G4_BB_INIT_TYPE) {
586-
bb->getFuncInfo();
587-
}
588-
589585
if (bb->isEndWithFCall()) {
590586
G4_BB *retBB = bb->Succs.front();
591587
if (retBB->Preds.size() > 1) {

0 commit comments

Comments
 (0)