<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
GICombineGroup may be of use:<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
// A group of combine rules that can be added to a GICombiner or another group.
<div>class GICombineGroup<list<GICombine> rules> : GICombine {</div>
<div>  // The rules contained in this group. The rules in a group are flattened into</div>
<div>  // a single list and sorted into whatever order is most efficient. However,</div>
<div>  // they will never be re-ordered such that behaviour differs from the</div>
<div>  // specified order. It is therefore possible to use the order of rules in this</div>
<div>  // list to describe priorities.</div>
<div>  let Rules = rules;</div>
<div>}</div>
<br>
<br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> llvm-dev <llvm-dev-bounces@lists.llvm.org> on behalf of Dominik Montada via llvm-dev <llvm-dev@lists.llvm.org><br>
<b>Sent:</b> Tuesday, December 15, 2020 9:09 AM<br>
<b>To:</b> LLVM Developers' List <llvm-dev@lists.llvm.org><br>
<b>Subject:</b> [llvm-dev] [GlobalISel] Prioritizing long patterns in combiner over short ones</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">External email: Use caution opening links or attachments<br>
<br>
<br>
Hi,<br>
<br>
I'm currently writing target specific combiners with GlobalISel. I have<br>
a case where a sub-node of a larger pattern also matches another,<br>
smaller combiner pattern. Because the combiner runs top-down, the<br>
smaller pattern is matched before the larger pattern has a chance to be<br>
matched. Do I have to teach my larger pattern to handle this case or is<br>
there a better way to do this?<br>
<br>
More importantly, are there any plans to improve this behavior?<br>
<br>
Cheers,<br>
<br>
Dominik<br>
<br>
--<br>
----------------------------------------------------------------------<br>
Dominik Montada                   Email: dominik.montada@hightec-rt.com<br>
HighTec EDV-Systeme GmbH          Phone: +49 681 92613 19<br>
Europaallee 19                    Fax:   +49-681-92613-26<br>
D-66113 Saarbrücken               WWW: <a href="http://www.hightec-rt.com">http://www.hightec-rt.com</a><br>
<br>
Managing Director: Vera Strothmann<br>
Register Court: Saarbrücken, HRB 10445, VAT ID: DE 138344222<br>
<br>
This e-mail may contain confidential and/or privileged information. If<br>
you are not the intended recipient please notify the sender immediately<br>
and destroy this e-mail. Any unauthorised copying, disclosure or<br>
distribution of the material in this e-mail is strictly forbidden.<br>
---<br>
<br>
</div>
</span></font></div>
</body>
</html>