[llvm-dev] about implicit in tablegen
林政宗 via llvm-dev
llvm-dev at lists.llvm.org
Tue Aug 11 05:09:30 PDT 2020
Hi,there
I'm not quite clear about the usage of implicit in tablegen. I saw code fragment in X86 like this.
-------------------------------------------------------------------------------------------------------
362def NEG32r : I<0xF7, MRM3r, (outs GR32:$dst), (ins GR32:$src1),
363 "neg{l}\t$dst",
364 [(set GR32:$dst, (ineg GR32:$src1)),
365 (implicit EFLAGS)]>, OpSize32;
---------------------------------------------------------------------------------------------------------
And I have some questions.
How would NEG32r be matched? Is it matched by (set GR32:$dst, (ineg GR32:$src1) or by [(set GR32:$dst, (ineg GR32:$src1)),(implicit EFLAGS)]?
Does "(implicit EFLAGS)" play a role in matching?
What does "(implicit EFLAGS)" mean? Does it mean "implicit define EFLAGS" or "implicit use EFLAGS"?
If it is an implicit define, How would it be used in the matching process?
If it is an implicit use, How would it be defined in the matching process?
I also noticed that there is a "let Defs = [EFLAGS] in" which enclose the NEG32r definition, is it a necessary?
Thanks!
Best Regards,
Jerry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200811/3893518c/attachment.html>
More information about the llvm-dev
mailing list