每个线程,都有其作用域,决定它能看到的变量的范围
module test;
......
endmodule
module test1;
......
endmoule
编译之后:
S_0x55d2c31c4a30 .scope module, "test" "test" 2 2; //作用域的定义,2代表在代码line2,是module类型,名字是test
S_0x55d2c31fb6b0 .scope module, "test1" "test1" 2 14; //test1 module的定义
.scope S_0x555841e24a30; //每个线程前面都有标记其作用域
T_0 ;
%pushi/vec4 15, 0, 8;
%store/vec4 v0x555841e23b80_0, 0, 8;
%end;
.thread T_0;