2 type ArchNameStr = string; // uncertain of format
3 type BCInstrStr = string; // uncertain of format
4 type BinaryStr = string; // uncertain of format, may be arch-dependent
5 type BlockId = number; // unsigned int
6 type CallDestStr = string; // uncertain of format
7 type CodeStr = string; // uncertain of format
8 type CodeLen = number; // uint32_t
9 type ConfigFileStr = string; // maybe empty, should I make this null if empty?
10 type CounterName = string; // uncertain of format
11 type DisasmString = string; // uncertain of format
12 type EventCount = number; // uint64_t
13 type ExtraString = string; // uncertain of format
14 type FileName = string; // uncertain of format
15 type FuncId = number; // uint32_t
16 type FuncName = string; // uncertain of format
17 type FuncString = string; // uncertain of format
18 type GuardString = string; // uncertain of format
19 type InstrId = number; // uint32_t
20 type InstrLen = number // uint32_t
21 type LineNum = number; // int
22 type Offset = number; // int32_t
23 type Opcode = string; // Some sort of enum
24 type OptIndex = number; // int
25 type ProfCount = number; // uint64_t
26 type ProfileString = string; // uncertain of format
27 type RepoSchemaStr = string; // uncertain of format
28 type SHA1 = string; // SHA1.toString()
29 type SSATmpId = number; // uint32_t
30 type TCA = string; // unsigned char*, casted to void* for sformat
31 type TransId = number; // int32_t
32 type TypeString = string; // uncertain of format
33 type UnitFuncStr = string; // maybe fix? see TODO in tc-print.cpp
36 configFile: ConfigFileStr;
37 repoSchema: RepoSchemaStr;
38 translations: [Translation | null];
44 archName: ArchNameStr;
45 perfEvents: EventCounts;
47 main: TCARegionInfo | null;
48 cold: TCARegionInfo | null;
49 frozen: TCARegionInfo | null;
52 ir_annotation: PrintIR_Unit | string;
72 resumeMode: ResumeMode;
75 bcStartOffset: Offset;
76 guards: [GuardString];
101 unit: UnitFuncStr | null;
113 string; // Technically there can be user-defined events too
115 type EventCounts = {[event in EventType]: EventCount;}
117 type TCARegionInfo = {
119 ranges: [TCARangeInfo];
130 type TCARangeInfo = {
135 instrStr: BCInstrStr | null;
136 lineNum: LineNum | null;
137 disasm: [TCADisasmInfo];
147 type TCADisasmInfo = {
149 callDest: CallDestStr;
151 perfEvents: EventCounts;
162 type PrintIR_Unit = {
163 transContext: PrintIR_TransContext;
164 blocks: {[x in string]: PrintIR_Block;};
165 // This is actually a map from BlockId to Block, but with
166 // the BlockIds interpreted as strings for JSON object compatibility
167 inliningDecision: [PrintIR_InliningDecision];
170 type PrintIR_TransContext = {
174 srcKey: PrintIR_SrcKey;
176 sourceFile: FileName;
181 type PrintIR_SrcKey = {
183 unitStr: UnitFuncString;
186 resumeMode: ResumeMode;
190 type ResumeMode = "" | "ra" | "rg";
192 type PrintIR_Block = {
196 profCount: ProfCount;
197 next: BlockId | null;
198 instrs: {[x in string]: PrintIR_Instr;};
199 // This is actually a map from InstrId to Instr, but with
200 // the InstrIds interpreted as strings for JSON object compatibility
210 type PrintIR_Instr = {
211 rawMarker: FuncString | null;
212 phiPseudoInstrs: [PrintIR_PhiPseudoInstrs];
214 typeParam: TypeString | null;
215 guard: GuardString | null;
216 extra: ExtraString | null;
218 taken: BlockId | null;
219 tcRanges: [PrintIR_TCRange];
220 dsts: [PrintIR_SSATmp];
222 profileData: PrintIR_Profile;
223 srcs: [PrintIR_SSATmp] | null; // exactly one of srcs and counterName should
224 counterName: CounterName | null; // be defined
227 type PrintIR_PhiPseudoInstrs = {
228 srcs: [[PrintIR_SSATmp, BlockId]];
232 type PrintIR_SSATmp = {
237 type PrintIR_TCRange = {
244 type PrintIR_Profile = {
247 data: {profileType: ProfileType};
248 // the rest of the keys in "data" will depend on the value of "profileType"
264 type PrintIR_InliningDecision = {
267 callerName: FuncName | null;
268 calleeName: FuncName | null;