search for: oneof

Displaying 7 results from an estimated 7 matches for "oneof".

2018 Nov 27
3
[RFC] Tablegen-erated GlobalISel Combine Rules
...should be a fairly simple change and there's no tblgen-internal reason to not allow dots in the names. Existing backends would have to check for it though which could be a tblgen performance issue. Macros Aside from changing to the DAG style, the main change here is that the children of 'oneof' all have 'match' at the top-level. This is for the same reason 'match' was kept on the simple example: the relaxed type checking on 'dag' compared to 'list<X>' allows us to freely mix DAG-style matches and predicates. def ANYLOAD : GIMacro<(defs def...
2018 Nov 30
2
[RFC] Tablegen-erated GlobalISel Combine Rules
...uld return a MachineOperand& or an unsigned (register number) and use that value. ${matchinfo.B) is the $B argument from the outs list of the predicate referred to by $matchinfo. >> _Macros_ >> Aside from changing to the DAG style, the main change here is that the children of 'oneof' all have 'match' at the top-level. This is for the same reason 'match' was kept on the simple example: the relaxed type checking on 'dag' compared to 'list<X>' allows us to freely mix DAG-style matches and predicates. >> def ANYLOAD : GIMacro<...
2018 Nov 09
5
[RFC] Tablegen-erated GlobalISel Combine Rules
...mon subpatterns. I've yet to look into how this would be practically implemented and this section is a bit vague as a result but here's the current thinking on how it should look and behave: def ANYLOAD : GIMacro<(defs def:$R, use:$S, uint64_t:$IDX), (match (oneof [{MIR %R = G_LOAD %S}], [{MIR %R = G_SEXTLOAD %S}], [{MIR %R = G_ZEXTLOAD %S}]):$IDX>; def extending_loads : GICombineRule< (defs root:$root, reg:$A, extending_load_matchdata:$matchinfo, ANYLOAD:$ANYLOAD...
2018 Nov 27
2
[RFC] Tablegen-erated GlobalISel Combine Rules
...${matchinfo.B}); }], reg:$D, extending_load_matchdata:$matchinfo)>; // I haven't included any rules for omitting defs from GIMacro but I can look into this if we want. def ANYLOAD : GIMacro<(defs def:$R, use:$S, uint64_t:$IDX), (match (oneof (match (G_LOAD $R, $S)), (match (G_SEXTLOAD $R, $S)), (match (G_ZEXTLOAD $R, $S))):$IDX>; // $ANYLOAD is needed to import the macro and name its instance def extending_loads : GICombineRule< (defs re...
2018 Nov 30
2
[RFC] Tablegen-erated GlobalISel Combine Rules
...ngLoads(${D}, ${matchinfo.B}); }], >> reg:$D, extending_load_matchdata:$matchinfo)>; >> // I haven't included any rules for omitting defs from GIMacro but I can look into this if we want. >> def ANYLOAD : GIMacro<(defs def:$R, use:$S, uint64_t:$IDX), >> (match (oneof (match (G_LOAD $R, $S)), >> (match (G_SEXTLOAD $R, $S)), >> (match (G_ZEXTLOAD $R, $S))):$IDX>; >> // $ANYLOAD is needed to import the macro and name its instance >> def extending_loads : GICombineRule< >> (defs reg:$D, reg:$A, extending_load_matchd...
2018 Nov 10
3
[RFC] Tablegen-erated GlobalISel Combine Rules
...'ve yet to look into how this would be practically implemented and this section is a bit vague as a result but here's the current thinking on how it should look and behave: >> def ANYLOAD : GIMacro<(defs def:$R, use:$S, uint64_t:$IDX), >> (match (oneof [{MIR %R = G_LOAD %S}], >> [{MIR %R = G_SEXTLOAD %S}], >> [{MIR %R = G_ZEXTLOAD %S}]):$IDX>; >> def extending_loads : GICombineRule< >> (defs root:$root, reg:$A, extending_load_ma...
2018 Nov 12
3
[RFC] Tablegen-erated GlobalISel Combine Rules
.../ This is probably wishful thinking -- would be okay if we had to >>> // split this into two different rules due to the different types >>> // of $dst >>> def : GICombineRule< >>> (defs root:$dst, operand:$src0, operand:$src1), >>> (oneof (ginst i16:$dst, i16:$src0, i16:$src1), >>> (match (ginst i16:$tmp, i16:$src0, i16:$src1), >>> (G_ZEXT i32:$dst, $tmp))), >>> (inst $dst, $src0, $src1)>; >>> >>> // A third rule for zext to 64 bits would go here...