Skip to content

Commit 60d49f8

Browse files
iwwusys_zuul
authored andcommitted
Add optimization stats
Change-Id: I9719b937b466fdb9e89c19d8ec2ebbe17f1ef5ef
1 parent fa863ca commit 60d49f8

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

IGC/Compiler/CISACodeGen/CISABuilder.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
3939
#include "common/shaderOverride.hpp"
4040
#include "common/CompilerStatsUtils.hpp"
4141
#include "inc/common/sku_wa.h"
42+
#include <llvm/ADT/Statistic.h>
4243
#include <iStdLib/utility.h>
4344
#include <iostream>
4445
#include <fstream>
@@ -59,6 +60,12 @@ This file defines the CEncoder class which is used to generate CISA instructions
5960
static const unsigned int g_cScratchSpaceMsglimit = (128 * 1024);
6061
using namespace llvm;
6162

63+
#define DEBUG_TYPE "cisa-builder"
64+
65+
STATISTIC(SimdSize8, "Number of shader(s) with SIMD8");
66+
STATISTIC(SimdSize16, "Number of shader(s) with SIMD16");
67+
STATISTIC(SimdSize32, "Number of shader(s) with SIMD32");
68+
6269
namespace IGC
6370
{
6471
inline VISA_Exec_Size visaExecSize(SIMDMode width)
@@ -5032,14 +5039,17 @@ namespace IGC
50325039
if (m_program->m_dispatchSize == SIMDMode::SIMD8)
50335040
{
50345041
MEM_SNAPSHOT(IGC::SMS_AFTER_vISACompile_SIMD8);
5042+
SimdSize8++;
50355043
}
50365044
else if (m_program->m_dispatchSize == SIMDMode::SIMD16)
50375045
{
50385046
MEM_SNAPSHOT(IGC::SMS_AFTER_vISACompile_SIMD16);
5047+
SimdSize16++;
50395048
}
50405049
else if (m_program->m_dispatchSize == SIMDMode::SIMD32)
50415050
{
50425051
MEM_SNAPSHOT(IGC::SMS_AFTER_vISACompile_SIMD32);
5052+
SimdSize32++;
50435053
}
50445054

50455055
if (m_program->m_dispatchSize == SIMDMode::SIMD16)

0 commit comments

Comments
 (0)