[cfe-dev] How to lower a 'Store' node using the list<dag> pattern.
Alex L via cfe-dev
cfe-dev at lists.llvm.org
Mon Jul 24 03:29:39 PDT 2017
Hi Dominique,
This is generally a frontend-specific list. You should email to the
llvm-dev (llvm-dev at lists.llvm.org) list if you have questions about
SelectionDAG.
Alex
On 24 July 2017 at 11:16, Dominique Torette via cfe-dev <
cfe-dev at lists.llvm.org> wrote:
> Hi,
>
>
>
> I’m trying to complete the lowering for a new microcontroller. I’m using
> LLVM 3.8.
>
> For now this lowering crashes on ‘Store’ node, which is actually not yet
> defined.
>
>
>
> I’ve tried to map the ISel ‘Store’ node to architecture specific
> instructions.
>
> I’ve define the following semantic to my architecture specific
> instructions:
>
>
>
> def MOVSUTO_SU_rr : CLPSUInst_rr<0b1000001100,
>
> (ins
> SURegisterOperand:$RegA),
>
> (outs
> SURegisterOperand:$RegB),
>
> [],
>
>
> "movsuto_su\t$RegA,$RegB","RR",
>
> [(store (i16
> SURegisterOperand:$RegA), i16:$RegB)], NoItinerary>
>
> {
>
> bits<9> RegA;
>
> bits<9> RegB;
>
>
>
> let Inst{19-11} = RegA;
>
> let Inst{8-0} = RegB;
>
> }
>
>
>
> SURegisterOperand are 16 bits operands.
>
> During the generation of ISelection matchers tables, I got the following
> assertion.
>
> This assertion start to occur when the pattern is introduced on the
> MOVSUTO_SU_rr.
>
>
>
> How to avoid such assertion? What is a concrete type? According to the
> definition of SURegisterOperand, these are 16 bits signed integer.
>
>
>
> [ 33%] Building CLPGenDAGISel.inc...
>
> llvm-tblgen: /home/dte/Projects/CLP/clp-llvm/trunk/llvm-project/llvm/
> utils/TableGen/CodeGenDAGPatterns.h:74: llvm::MVT::SimpleValueType
> llvm::EEVT::TypeSet::getConcrete() const: Assertion `isConcrete() &&
> "Type isn't concrete yet"' failed.
>
> #0 0x0000000000633741 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
> /home/dte/Projects/CLP/clp-llvm/trunk/llvm-project/llvm/
> lib/Support/Unix/Signals.inc:322:0
>
> #1 0x0000000000633abd PrintStackTraceSignalHandler(void*)
> /home/dte/Projects/CLP/clp-llvm/trunk/llvm-project/llvm/
> lib/Support/Unix/Signals.inc:380:0
>
> #2 0x0000000000632242 llvm::sys::RunSignalHandlers()
> /home/dte/Projects/CLP/clp-llvm/trunk/llvm-project/llvm/
> lib/Support/Signals.cpp:44:0
>
> #3 0x0000000000633259 SignalHandler(int) /home/dte/Projects/CLP/clp-
> llvm/trunk/llvm-project/llvm/lib/Support/Unix/Signals.inc:210:0
>
> #4 0x00000031fec0f790 __restore_rt (/lib64/libpthread.so.0+0x31fec0f790)
>
> #5 0x00000031fe832625 __GI_raise (/lib64/libc.so.6+0x31fe832625)
>
> #6 0x00000031fe833e05 __GI_abort (/lib64/libc.so.6+0x31fe833e05)
>
> #7 0x00000031fe82b74e __assert_fail_base (/lib64/libc.so.6+0x31fe82b74e)
>
> #8 0x00000031fe82b810 __GI___assert_perror_fail (/lib64/libc.so.6+
> 0x31fe82b810)
>
> #9 0x000000000047b8fe llvm::EEVT::TypeSet::getConcrete() const
> /home/dte/Projects/CLP/clp-llvm/trunk/llvm-project/llvm/utils/TableGen/
> CodeGenDAGPatterns.h:75:0
>
> #10 0x000000000047be57 llvm::TreePatternNode::getType(unsigned int) const
> /home/dte/Projects/CLP/clp-llvm/trunk/llvm-project/llvm/utils/TableGen/
> CodeGenDAGPatterns.h:371:0
>
> #11 0x0000000000523c1d (anonymous namespace)::MatcherGen::
> EmitResultInstructionAsOperand(llvm::TreePatternNode const*,
> llvm::SmallVectorImpl<unsigned int>&) /home/dte/Projects/CLP/clp-
> llvm/trunk/llvm-project/llvm/utils/TableGen/DAGISelMatcherGen.cpp:844:0
>
> #12 0x0000000000524608 (anonymous namespace)::MatcherGen::
> EmitResultOperand(llvm::TreePatternNode const*,
> llvm::SmallVectorImpl<unsigned int>&) /home/dte/Projects/CLP/clp-
> llvm/trunk/llvm-project/llvm/utils/TableGen/DAGISelMatcherGen.cpp:942:0
>
> #13 0x0000000000524768 (anonymous namespace)::MatcherGen::EmitResultCode()
> /home/dte/Projects/CLP/clp-llvm/trunk/llvm-project/llvm/utils/TableGen/
> DAGISelMatcherGen.cpp:966:0
>
> #14 0x0000000000524b26 llvm::ConvertPatternToMatcher(llvm::PatternToMatch
> const&, unsigned int, llvm::CodeGenDAGPatterns const&)
> /home/dte/Projects/CLP/clp-llvm/trunk/llvm-project/llvm/utils/TableGen/
> DAGISelMatcherGen.cpp:1021:0
>
> #15 0x0000000000510f36 (anonymous namespace)::DAGISelEmitter::run(llvm::raw_ostream&)
> /home/dte/Projects/CLP/clp-llvm/trunk/llvm-project/llvm/
> utils/TableGen/DAGISelEmitter.cpp:153:0
>
> #16 0x0000000000511089 llvm::EmitDAGISel(llvm::RecordKeeper&,
> llvm::raw_ostream&) /home/dte/Projects/CLP/clp-
> llvm/trunk/llvm-project/llvm/utils/TableGen/DAGISelEmitter.cpp:171:0
>
> #17 0x00000000005c74fd (anonymous namespace)::LLVMTableGenMain(llvm::raw_ostream&,
> llvm::RecordKeeper&) /home/dte/Projects/CLP/clp-
> llvm/trunk/llvm-project/llvm/utils/TableGen/TableGen.cpp:129:0
>
> #18 0x000000000065016c llvm::TableGenMain(char*, bool
> (*)(llvm::raw_ostream&, llvm::RecordKeeper&)) /home/dte/Projects/CLP/clp-
> llvm/trunk/llvm-project/llvm/lib/TableGen/Main.cpp:109:0
>
> #19 0x00000000005c79d5 main /home/dte/Projects/CLP/clp-
> llvm/trunk/llvm-project/llvm/utils/TableGen/TableGen.cpp:188:0
>
> #20 0x00000031fe81ed5d __libc_start_main (/lib64/libc.so.6+0x31fe81ed5d)
>
> #21 0x0000000000404fb9 _start (/home/dte/Projects/CLP/build_
> dir/bin/llvm-tblgen+0x404fb9)
>
> Stack dump:
>
> 0. Program arguments: ../../../bin/llvm-tblgen -gen-dag-isel -I
> /home/dte/Projects/CLP/clp-llvm/trunk/llvm-project/llvm/lib/Target/CLP -I
> /home/dte/Projects/CLP/clp-llvm/trunk/llvm-project/llvm/lib/Target -I
> /home/dte/Projects/CLP/clp-llvm/trunk/llvm-project/llvm/include
> /home/dte/Projects/CLP/clp-llvm/trunk/llvm-project/llvm/lib/Target/CLP/CLP.td
> -o /home/dte/Projects/CLP/build_dir/lib/Target/CLP/CLPGenDAGISel.inc.tmp
>
> /bin/sh: line 1: 82456 Aborted (core dumped)
> ../../../bin/llvm-tblgen -gen-dag-isel -I /home/dte/Projects/CLP/clp-
> llvm/trunk/llvm-project/llvm/lib/Target/CLP -I /home/dte/Projects/CLP/clp-
> llvm/trunk/llvm-project/llvm/lib/Target -I /home/dte/Projects/CLP/clp-
> llvm/trunk/llvm-project/llvm/include /home/dte/Projects/CLP/clp-
> llvm/trunk/llvm-project/llvm/lib/Target/CLP/CLP.td -o
> /home/dte/Projects/CLP/build_dir/lib/Target/CLP/CLPGenDAGISel.inc.tmp
>
> gmake[2]: *** [lib/Target/CLP/CLPGenDAGISel.inc.tmp] Error 134
>
> gmake[1]: *** [lib/Target/CLP/CMakeFiles/CLPCommonTableGen.dir/all] Error
> 2
>
> gmake: *** [all] Error 2
>
>
>
>
>
>
>
> [image:
> http://www.spacebel.be/wp-content/uploads/2011/06/image-sign-sbp.jpg]
>
> *Dominique Torette*
> System Architect
> Rue des Chasseurs Ardennais - Liège Science Park - B-4031 Angleur
> Tel: +32 (0) 4 361 81 11 <+32%204%20361%2081%2011> - Fax: +32 (0) 4 361
> 81 20 <+32%204%20361%2081%2020>
> www.spacebel.be
>
>
>
> ------------------------------------------------------------
> ------------------
>
> E-MAIL DISCLAIMER
>
> The present message may contain confidential and/or legally privileged
> information. If you are not the intended addressee and in case of a
> transmission error, please notify the sender immediately and destroy this
> E-mail. Disclosure, reproduction or distribution of this document and its
> possible attachments is strictly forbidden.
>
> SPACEBEL denies all liability for incomplete, improper, inaccurate,
> intercepted, (partly) destroyed, lost and/or belated transmission of the
> current information given that unencrypted electronic transmission cannot
> currently be guaranteed to be secure or error free.
> Upon request or in conformity with formal, contractual agreements, an
> originally signed hard copy will be sent to you to confirm the information
> contained in this E-mail.
>
> SPACEBEL denies all liability where E-mail is used for private use.
>
> SPACEBEL cannot be held responsible for possible viruses that might
> corrupt this message and/or your computer system.
> ------------------------------------------------------------
> -------------------
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170724/5eb0a806/attachment.html>
More information about the cfe-dev
mailing list