Mahesh Bodapati via llvm-dev
2019-Oct-24 06:20 UTC
[llvm-dev] Encode method for basic block
Hello LLVMDevs.. I added a pattern like below .. def : Pat<(brcond (setcc (i32 GR32:$L), (i32 0), SETEQ), bb:$T), (BEI GR32:$L, brtarget:$T)>; def brtarget : Operand<OtherVT> { let EncoderMethod = "getPCRel"; } Added getPCRel encoder method but it is not been picked by BEI .. could you help me in setting up encoder method.. Thanks, Mahesh B -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20191024/f57e94de/attachment.html>
Hi Mahesh, On Wed, 23 Oct 2019 at 23:20, Mahesh Bodapati via llvm-dev <llvm-dev at lists.llvm.org> wrote:> def : Pat<(brcond (setcc (i32 GR32:$L), (i32 0), SETEQ), bb:$T), > (BEI GR32:$L, brtarget:$T)>; > > def brtarget : Operand<OtherVT> { > let EncoderMethod = "getPCRel"; > }> Added getPCRel encoder method but it is not been picked by BEI .. > could you help me in setting up encoder method..I believe EncoderMethods have to be attached to the (ins) in the instruction's definitions, they're not picked up from individual Pats. Cheers. Tim.