From 13c42412d29aa76ec9f8d70aaf8afe83d87e6169 Mon Sep 17 00:00:00 2001 From: Matt Pharr Date: Mon, 19 Mar 2012 11:28:16 -0700 Subject: [PATCH] Issue perf. warning if SOA width narrower than gang size is used. --- decl.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/decl.cpp b/decl.cpp index 44867b4e..c95c1a4a 100644 --- a/decl.cpp +++ b/decl.cpp @@ -171,6 +171,11 @@ DeclSpecs::GetBaseType(SourcePos pos) const { } else 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;