Skip to content

Commit 03b23b4

Browse files
DianaChensys_zuul
authored andcommitted
Add iga option sbid-count
Change-Id: I13a774be7969f20646a321648136cbf16364c2a1
1 parent aefce6d commit 03b23b4

File tree

6 files changed

+38
-15
lines changed

6 files changed

+38
-15
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
const char* gedVersion = "VERSION=dev (0b03ac5)";
1+
const char* gedVersion = "VERSION=dev (06beac5)";
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
const char* gedVersion = "VERSION=dev (0b03ac5)";
1+
const char* gedVersion = "VERSION=dev (06beac5)";

visa/iga/IGAExe/assemble.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ bool assemble(
6868
setOptBit(aopts.syntax_opts,
6969
IGA_SYNTAX_OPT_EXTENSIONS,
7070
opts.syntaxExts);
71+
aopts.sbid_count = opts.sbid_count;
7172

7273
try {
7374
auto r = ctx.assembleFromString(inpText, aopts);

visa/iga/IGAExe/iga_main.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,18 @@ extern "C" int iga_main(int argc, const char **argv)
420420
"Send instructions are emitted as load/store instructions",
421421
opts::OptAttrs::ALLOW_UNSET,
422422
baseOpts.printLdSt);
423+
xGrp.defineOpt(
424+
"sbid-count",
425+
"sbid-count",
426+
"=VALUE",
427+
"number of sbid being used on auto dependency set",
428+
"",
429+
opts::OptAttrs::ALLOW_UNSET,
430+
[] (const char *cinp, const opts::ErrorHandler, Opts &baseOpts) {
431+
std::string str = cinp;
432+
baseOpts.sbid_count = std::stoi(str);
433+
}
434+
);
423435
xGrp.defineFlag(
424436
"warn-on-compact-fail",
425437
nullptr,

visa/iga/IGAExe/iga_main.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ struct Opts {
6767
bool legacyDirectives = false; // -Xlegacy-directives
6868
bool errorOnCompactFail = true; // -Xwarn-on-compact-fail
6969
bool autosetDepInfo = false; // -Xauto-deps
70+
uint32_t sbid_count = 16; // -Xsbid-count
7071
bool syntaxExts = false; // -Xsyntax-exts
7172
bool useNativeEncoder = false; // -Xnative
7273

visa/iga/IGALibrary/IR/RegDeps.cpp

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,26 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
3333

3434
using namespace iga;
3535

36+
static DEP_CLASS getClassFromPipeType(DEP_PIPE type, const OpSpec& opspec)
37+
{
38+
if (opspec.groupOp == Op::SYNC || opspec.op == Op::ILLEGAL)
39+
return DEP_CLASS::OTHER;
40+
41+
switch(type) {
42+
case DEP_PIPE::NONE:
43+
case DEP_PIPE::SHORT:
44+
case DEP_PIPE::LONG:
45+
case DEP_PIPE::CONTROL_FLOW:
46+
return DEP_CLASS::IN_ORDER;
47+
48+
case DEP_PIPE::SEND:
49+
case DEP_PIPE::MATH:
50+
return DEP_CLASS::OUT_OF_ORDER;
51+
52+
}
53+
return DEP_CLASS::NONE;
54+
}
55+
3656
static void setDEPPipeClass_SingleDistPipe(DepSet &dep, const Instruction &inst)
3757
{
3858
auto opsec = inst.getOpSpec();
@@ -73,19 +93,8 @@ static void setDEPPipeClass_SingleDistPipe(DepSet &dep, const Instruction &inst)
7393
}
7494
}
7595
}
76-
if (opsec.isVariableLatency())
77-
{
78-
dep.setDepClass(DEP_CLASS::OUT_OF_ORDER);
79-
}
80-
else if (opsec.groupOp == Op::SYNC ||
81-
opsec.op == Op::ILLEGAL)
82-
{
83-
dep.setDepClass(DEP_CLASS::OTHER);
84-
}
85-
else
86-
{
87-
dep.setDepClass(DEP_CLASS::IN_ORDER);
88-
}
96+
97+
dep.setDepClass(getClassFromPipeType(dep.getDepPipe(), opsec));
8998
}
9099

91100

0 commit comments

Comments
 (0)