Hello; I was planning to add a new instruction to the LLVM IR (and later to MIPS backend) for TLS(Thread level speculation) support. For this I tried to follow the steps described in http://llvm.org/docs/ExtendingLLVM dot html#instruction. But I could not find any llvm/lib/AsmParser/Lexer.l and llvm/lib/AsmParser/llvmAsmParser.y file in both the svn repository and the source code downloaded from the website. Could you tell me what are the files that need to be modified to add a new token to parse my instruction from assembly text file (STEP 4) and add the grammar on how my instruction can be read and what it will construct as a result (STEP 5). Thanks; -- Arnamoy Bhattacharyya Athabasca Hall 143 Department of Computing Science - University of Alberta Edmonton, Alberta, Canada, T6G 2E8 780-680-7073 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120518/29f7d3ec/attachment.html>
Side note: TLS = Thread Local Storage. You'll need a different acronym in the LLVM context to avoid really confusing people. -Jim On May 18, 2012, at 10:52 AM, Arnamoy Bhattacharyya wrote:> Hello; > > I was planning to add a new instruction to the LLVM IR (and later to MIPS backend) for TLS(Thread level speculation) support. For this I tried to follow the steps described in http://llvm.org/docs/ExtendingLLVM dot html#instruction. > > But I could not find any llvm/lib/AsmParser/Lexer.l and llvm/lib/AsmParser/llvmAsmParser.y file in both the svn repository and the source code downloaded from the website. Could you tell me what are the files that need to be modified to add a new token to parse my instruction from assembly text file (STEP 4) and add the grammar on how my instruction can be read and what it will construct as a result (STEP 5). > > Thanks; > > -- > Arnamoy Bhattacharyya > Athabasca Hall 143 > Department of Computing Science - University of Alberta > Edmonton, Alberta, Canada, T6G 2E8 > 780-680-7073 > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120518/9683e659/attachment.html>
Arnamoy, Can you explain the semantics of this instruction? I also have hardware that supports speculative execution, and we might be able to collaborate [this may apply to others as well]? -Hal On Fri, 18 May 2012 11:52:01 -0600 Arnamoy Bhattacharyya <arnamoy at ualberta.ca> wrote:> Hello; > > I was planning to add a new instruction to the LLVM IR (and later to > MIPS backend) for TLS(Thread level speculation) support. For this I > tried to follow the steps described in > http://llvm.org/docs/ExtendingLLVM dot html#instruction. > > But I could not find any llvm/lib/AsmParser/Lexer.l > and llvm/lib/AsmParser/llvmAsmParser.y file in both the svn > repository and the source code downloaded from the website. Could > you tell me what are the files that need to be modified to add a new > token to parse my instruction from assembly text file (STEP 4) and > add the grammar on how my instruction can be read and what it will > construct as a result (STEP 5). > > Thanks; >-- Hal Finkel Postdoctoral Appointee Leadership Computing Facility Argonne National Laboratory
On Fri, May 18, 2012 at 10:52 AM, Arnamoy Bhattacharyya <arnamoy at ualberta.ca> wrote:> Hello; > > I was planning to add a new instruction to the LLVM IR (and later to MIPS > backend) for TLS(Thread level speculation) support. For this I tried to > follow the steps described in http://llvm.org/docs/ExtendingLLVM dot > html#instruction. > > But I could not find any llvm/lib/AsmParser/Lexer.l > and llvm/lib/AsmParser/llvmAsmParser.y file in both the svn repository and > the source code downloaded from the website. Could you tell me what are the > files that need to be modified to add a new token to parse my instruction > from assembly text file (STEP 4) and add the grammar on how my instruction > can be read and what it will construct as a result (STEP 5).The relevant code is still in lib/AsmParser/; it's just that we've swtiched from a generated lexer/parser to a hand-written one. If you want examples, try looking in the revision history for my atomics work. -Eli
Apparently Analagous Threads
- [LLVMdev] Error While Inserting New Instruction to LLVM IR
- [LLVMdev] "symbol lookup error" while running a Simple Loop Pass
- [LLVMdev] "symbol lookup error" while running a Simple Loop Pass
- [LLVMdev] "symbol lookup error" while running a Simple Loop Pass
- [LLVMdev] Identifying the instructions that uses a pointer used as a function argument