search for: extending_load_predicate

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

2018 Nov 30
2
[RFC] Tablegen-erated GlobalISel Combine Rules
...t;any> you described above and needed it to conform to the dag type) but I did like that effect when I saw it written down :-). > [snip] >> _Passing arbitrary data from match to apply_ >> The main change in this section that hasn't already been discussed is that the result of extending_load_predicate has been moved to the new 'outs' section of GIMatchPredicate and the code expansion refers to a particular output of the predicate using 'matchinfo.B' similar to a struct member or multi-operand ComplexPatterns. >> def extending_load_matchdata : GIDefMatchData<"Pre...
2018 Nov 27
3
[RFC] Tablegen-erated GlobalISel Combine Rules
...$C)), (apply (create_imm [{ 2 * ${B}->getZExtValue() }], apint_value:$B):$NB, (G_ADD $t1, $A, $A), (G_ADD $D, $t1, $NB))>; Passing arbitrary data from match to apply The main change in this section that hasn't already been discussed is that the result of extending_load_predicate has been moved to the new 'outs' section of GIMatchPredicate and the code expansion refers to a particular output of the predicate using 'matchinfo.B' similar to a struct member or multi-operand ComplexPatterns. def extending_load_matchdata : GIDefMatchData<"PreferredTu...
2018 Nov 27
2
[RFC] Tablegen-erated GlobalISel Combine Rules
...(G_ADD $D, $t1, $NB))>; // $D is needed because we wanted operand instead of reg. We could rewrite the predicate to take a reg though. def extending_loads : GICombineRule< (defs operand:$D, reg:$A, extending_load_matchdata:$matchinfo), (match (G_LOAD $D, $A), (extending_load_predicate operand:$A, extending_load_matchdata:$matchinfo)), (apply (exec [{ Helper.applyCombineExtendingLoads(${D}, ${matchinfo.B}); }], reg:$D, extending_load_matchdata:$matchinfo)>; // I haven't included any rules for omitting defs...
2018 Nov 30
2
[RFC] Tablegen-erated GlobalISel Combine Rules
...$NB))>; >> // $D is needed because we wanted operand instead of reg. We could rewrite the predicate to take a reg though. >> def extending_loads : GICombineRule< >> (defs operand:$D, reg:$A, extending_load_matchdata:$matchinfo), >> (match (G_LOAD $D, $A), >> (extending_load_predicate operand:$A, >> extending_load_matchdata:$matchinfo)), >> (apply (exec [{ Helper.applyCombineExtendingLoads(${D}, ${matchinfo.B}); }], >> reg:$D, extending_load_matchdata:$matchinfo)>; >> // I haven't included any rules for omitting defs from GIMacro but I can look...
2018 Nov 09
5
[RFC] Tablegen-erated GlobalISel Combine Rules
...operations. This rule passes a struct (PreferredTuple) between the current C++ equivalent for the match to the current C++ equivalent to the apply. Converting that into this tablegen syntax, we'd write: def extending_load_matchdata : GIDefMatchData<"PreferredTuple">; def extending_load_predicate : GIMatchPredicate< (ins reg:$A, extending_load_matchdata:$B), bool, [{ return Helper.matchCombineExtendingLoads(${A}, ${matchinfo}); }]>; def extending_loads : GICombineRule< (defs root:$root, reg:$A, extending_load_matchdata:$matchinfo), (match [{MIR %r...
2018 Nov 10
3
[RFC] Tablegen-erated GlobalISel Combine Rules
...ule passes a struct (PreferredTuple) between the current C++ equivalent for the match to the current C++ equivalent to the apply. Converting that into this tablegen syntax, we'd write: >> def extending_load_matchdata : GIDefMatchData<"PreferredTuple">; >> def extending_load_predicate : GIMatchPredicate< >> (ins reg:$A, extending_load_matchdata:$B), bool, [{ >> return Helper.matchCombineExtendingLoads(${A}, ${matchinfo}); > > I assume this was intended to be ${B} instead of ${matchinfo}? Yes, that's right. There's always at least one...
2018 Nov 12
3
[RFC] Tablegen-erated GlobalISel Combine Rules
...unset if the result has a name. >>>> }]>; >>>> def extending_loads : GICombineRule< >>>> (defs root:$root, reg:$A, extending_load_matchdata:$matchinfo), >>>> (match [{MIR %root = G_LOAD %A }], >>>> (extending_load_predicate root:$A, >>>> extending_load_matchdata:$matchinfo)), >>>> (apply (exec [{ Helper.applyCombineExtendingLoads(${root}, ${matchinfo}); }], >>>> reg:$root, extending_load_matchdata:$matchinfo)>; >...