I made a small change to my target and them tried to recompile it. The following error showed up: error: Pattern doesn't match mayLoad = 0 A little bit of searched revealed that it came from here: https://github.com/llvm-mirror/llvm/blob/master/utils/TableGen/CodeGenDAGPatterns.cpp#L2861 Unfortunately I can't understand what it means. Can someone help me out? -- Rail Shafigulin Software Engineer Esencia Technologies -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160105/6339920c/attachment.html>
Krzysztof Parzyszek via llvm-dev
2016-Jan-06 14:45 UTC
[llvm-dev] Pattern doesn't match error
This happens when the mayLoad field inferred from the instruction pattern is different from the mayLoad field that is explicitly set in the instruction definition. TableGen will try to infer certain properties from the pattern used to match an instruction. If, at the same time, the property is specified explicitly, it must match what TableGen inferred. If there is a conflict between the two, this kind of an error shows up. Not sure if this helps. -Krzysztof On 1/5/2016 7:59 PM, Rail Shafigulin via llvm-dev wrote:> I made a small change to my target and them tried to recompile it. The > following error showed up: > > error: Pattern doesn't match mayLoad = 0 > > A little bit of searched revealed that it came from here: > https://github.com/llvm-mirror/llvm/blob/master/utils/TableGen/CodeGenDAGPatterns.cpp#L2861 > > Unfortunately I can't understand what it means. Can someone help me out? > > -- > Rail Shafigulin > Software Engineer > Esencia Technologies > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
On Wed, Jan 6, 2016 at 6:45 AM, Krzysztof Parzyszek via llvm-dev < llvm-dev at lists.llvm.org> wrote:> This happens when the mayLoad field inferred from the instruction pattern > is different from the mayLoad field that is explicitly set in the > instruction definition. > > TableGen will try to infer certain properties from the pattern used to > match an instruction. If, at the same time, the property is specified > explicitly, it must match what TableGen inferred. If there is a conflict > between the two, this kind of an error shows up. > > Not sure if this helps. > > -KrzysztofI'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. Thanks, -- Rail Shafigulin Software Engineer Esencia Technologies -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160106/0f019edd/attachment.html>