[llvm-dev] Pattern doesn't match error

Vivek Sarkar via llvm-dev llvm-dev at lists.llvm.org
Wed Jan 6 13:57:31 PST 2016


I will be out of the office on January 7th and will return on January 19th.  I will not have access to email during this time.  Please contact Karen Lavelle at klavelle at rice.edu or 713-348-2062 if you have any questions or concerns.

Best regards,
Annepha

On Jan 6, 2016, at 3:53 PM, Krzysztof Parzyszek via llvm-dev <llvm-dev at lists.llvm.org> wrote:

> On 1/6/2016 12:52 PM, Rail Shafigulin wrote:
> 
> I'm not sure I understand it. Here is the change that I made for my target
> 
> class InstEscala<dag outs, dag ins, string asmstr, list<dag> pattern>
>   : Instruction {
> ....
> ....
>   let mayLoad = 0;
> ....
> ....
>  }
> 
> All I have done is set mayLoad to 0. Would you mind using your
> explanation in the context of my change? I think once there is a
> specific case it is easier to understand what is the problem.
> 
> If the pattern that you use to define a particular instruction of this class contains an SDNode that has a "may load" property, it will infer that the pattern has a "mayLoad" property.  That property must be the same as the "mayLoad" that is explicitly specified in the instruction definition.
> 
> Look in utils/TableGen/CodeGenDAGPatterns.cpp:
> 
> void AnalyzeNode(const TreePatternNode *N) {
>  [...]
>    // Notice properties of the node.
>    if (N->NodeHasProperty(SDNPMayStore, CDP)) mayStore = true;
>    if (N->NodeHasProperty(SDNPMayLoad, CDP)) mayLoad = true;
>    if (N->NodeHasProperty(SDNPSideEffect, CDP)) hasSideEffects = true;
>    if (N->NodeHasProperty(SDNPVariadic, CDP)) isVariadic = true;
>  [...]
> }
> 
> If your pattern contains a "load", this will directly conflict with the explicit "mayLoad = 0".
> 
> -Krzysztof
> 
> -- 
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 2058 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160106/aa500e45/attachment.bin>


More information about the llvm-dev mailing list