Skip to content

Commit 3c8da04

Browse files
DianaChenpaigeale
authored andcommitted
Internal feature
Change-Id: I05b8699b7d4e069b0cd264ff6c0c0ac4edaca02f
1 parent 66de115 commit 3c8da04

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

visa/iga/IGALibrary/Frontend/KernelParser.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -760,8 +760,8 @@ bool GenParser::TryParseInstOptOrDepInfo(InstOptSet &instOpts)
760760
bool GenParser::tryParseInstOptDepInfoToken(InstOptSet &instOpts)
761761
{
762762
auto loc = NextLoc();
763-
InstOpt newOpt = InstOpt::ACCWREN;
764763
if (LookingAt(IDENT)) {
764+
InstOpt newOpt = InstOpt::ACCWREN;
765765
// classic instruction option that affects instruction dependency
766766
// scheduling etc...
767767
if (ConsumeIdentEq("NoDDChk")) {
@@ -2975,7 +2975,9 @@ Kernel *iga::ParseGenKernel(
29752975
const ParseOpts &popts)
29762976
{
29772977
Kernel *k = new Kernel(m);
2978+
29782979
InstBuilder h(k, e);
2980+
29792981
KernelParser p(m, h, inp, e, popts);
29802982
try {
29812983
p.ParseListing();

visa/iga/IGALibrary/IR/InstBuilder.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ class InstBuilder {
166166

167167

168168

169+
169170
void clearInstState() {
170171
m_predication.function = PredCtrl::NONE;
171172
m_predication.inverse = false;
@@ -263,6 +264,7 @@ class InstBuilder {
263264
} // else: targets end of program exactly
264265
}
265266

267+
266268
public:
267269
InstBuilder(Kernel *kernel, ErrorHandler &e)
268270
: m_model(kernel->getModel())
@@ -274,6 +276,7 @@ class InstBuilder {
274276

275277
ErrorHandler &errorHandler() {return m_errorHandler;}
276278

279+
277280
// Called at the beginning of the program
278281
void ProgramStart() {
279282
m_pc = 0;

visa/iga/IGALibrary/api/igaEncoderWrapper.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,12 @@ iga_status_t KernelEncoder::encode()
88
{
99

1010
ErrorHandler errHandler;
11-
Encoder enc(kernel->getModel(),
12-
errHandler, EncoderOpts(autoCompact, true, nocompactFirstEightInst));
11+
Encoder enc(kernel->getModel(), errHandler,
12+
EncoderOpts(autoCompact,
13+
true,
14+
nocompactFirstEightInst,
15+
false
16+
));
1317
enc.encodeKernel(
1418
*kernel,
1519
kernel->getMemManager(),
@@ -73,4 +77,4 @@ bool KernelEncoder::patchImmValue(const Model& model, unsigned char* binary, Typ
7377
return false;
7478

7579
return true;
76-
}
80+
}

visa/iga/IGALibrary/api/igaEncoderWrapper.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,5 @@ class KernelEncoder
3333
// This function is used by visa to patch the add or mov instructions' imm field for the indirect call
3434
// FIXME: Move this api to somewhere else that's more apporopriate
3535
static bool patchImmValue(const iga::Model& model, unsigned char* binary, iga::Type type, const iga::ImmVal &val);
36+
3637
};

0 commit comments

Comments
 (0)