Issue perf. warning if SOA width narrower than gang size is used.

This commit is contained in:
Matt Pharr
2012-03-19 11:28:16 -07:00
parent 75507d8b35
commit 13c42412d2

View File

@@ -171,6 +171,11 @@ DeclSpecs::GetBaseType(SourcePos pos) const {
} }
else else
retType = st->GetAsSOAType(soaWidth); retType = st->GetAsSOAType(soaWidth);
if (soaWidth < g->target.vectorWidth)
PerformanceWarning(pos, "soa<%d> width smaller than gang size %d "
"currently leads to inefficient code to access "
"soa types.", soaWidth, g->target.vectorWidth);
} }
return retType; return retType;