similar to: [LLVMdev] LLVM grammar for ANTLR

Displaying 20 results from an estimated 3000 matches similar to: "[LLVMdev] LLVM grammar for ANTLR"

2011 Jan 25
1
[LLVMdev] LLVM grammar for ANTLR
Hi Sam, Thanks for your reply. I am implementing my research (http://www.it.usyd.edu.au/~suri/Detecting%20Buffer%20Over.pdf), a translation of LLVM to a simple non-deterministic language to detect buffer overflows. It involves (1) printing a control flow graph of basic blocks of a function (easily done) (2) translating each llvm statement to a corresponding data flow language (needs ASTs to
2011 Jan 24
0
[LLVMdev] LLVM grammar for ANTLR
Hello Surinder, The existing hand-written parser is callable from almost anywhere so the only reason you'd need to have a parser for it would be to extend it. Originally it was written using Flex and Bison but Chris Lattner rewrote it from scratch to catch more errors at the parsing stage. The only feature I've found to be missing from the existing LLVM-AS utility was an include
2011 Jan 31
2
[LLVMdev] Segmentation fault on using get parent of a PHINode
I am getting a segmentation fault as soon as I touch the Basic block *b value defined as :  std::string getPHIAssigns(const PHINode *PH)  { const BasicBlock *b = PH->getParent();    errs() << b->size(); where as getPHIAssigns is being called from               for (BasicBlock::iterator ins=b->begin(), e3=b->end(); ins!=e3; ++ins, ++l) // get instructions                
2011 Jan 31
2
[LLVMdev] llvm::Pass::Pass(llvm::PassKind, intptr_t): Assertion `pid && "pid cannot be 0"' failed.
I have written a new pass, it compiles ok but crashes when i run it with error (llvm::Pass::Pass(llvm::PassKind, intptr_t): Assertion `pid && "pid cannot be 0"' failed.). The pass is : using namespace llvm; namespace { struct Dfl : public FunctionPass { static char ID; Dfl() : FunctionPass(ID) { } virtual bool runOnFunction(Function &F) { bool
2011 Jan 31
2
[LLVMdev] Error : llvm/include/llvm/Pass.h:188: error: incomplete type 'llvm::DominatorTree' used in nested name specifier
I am creating a new pass (function pass) called Dfl from the Hello example and notes on "Writing an LLVM Pass". When I compile the program I get inncomplete type error (llvm/include/llvm/Pass.h:188: error: incomplete type 'llvm::DominatorTree' used in nested name specifier). The code is given below. Surinder struct Dfl : public FunctionPass { raw_ostream *Out; static
2011 Jan 31
0
[LLVMdev] llvm::Pass::Pass(llvm::PassKind, intptr_t): Assertion `pid && "pid cannot be 0"' failed.
llvm/include/llvm/Pass.h:93: llvm::Pass::Pass(llvm::PassKind, intptr_t): Assertion `pid && "pid cannot be 0"' failed. On Mon, Jan 31, 2011 at 3:55 PM, Surinder <surifilms at gmail.com> wrote: > I have written a new pass, it compiles ok but crashes when i run it > with error (llvm::Pass::Pass(llvm::PassKind, intptr_t): Assertion `pid > && "pid
2011 Jan 31
0
[LLVMdev] Error : llvm/include/llvm/Pass.h:188: error: incomplete type 'llvm::DominatorTree' used in nested name specifier
Hi Surinder, Did you remember to #include "llvm/Analysis/Dominators.h"? Best, Douglas On Sun, Jan 30, 2011 at 11:24 PM, Surinder <surifilms at gmail.com> wrote: > I am creating a new pass (function pass) called Dfl from the Hello > example and notes on "Writing an LLVM Pass". When I compile the > program I get inncomplete type error
2009 Jul 11
0
[LLVMdev] ANTLR?
For a LL(1) parser, it might be a little bit difficult to parse complex grammar like C++, but it might work. ANTLR worked great when other codes were written in Java, but it was a little bit painful when using other languages like python. I worked on it two years ago. I guess they might have some improvement now. Haohui On 07/11/2009 02:40 PM, Vikram S. Adve wrote: > We are looking for an
2009 Jul 11
10
[LLVMdev] ANTLR?
We are looking for an open source C++ parser other than g++ if possible. Clang would be great but its C++ support is still some way away and we need something that works or nearly works now. Does anyone have any experience with ANTLR for parsing C++ and for extending their C++ parser? Any other feedback on ANTLR in general would be welcome too. Thanks, --Vikram Associate Professor,
2009 Jul 11
2
[LLVMdev] ANTLR?
That sounds like a problem. Just so I understand, do you mean there isn't the run-time support etc. to write back ends for the C++ language, or that the compiler IR is also somehow insufficient to write a code generator? --Vikram Associate Professor, Computer Science University of Illinois at Urbana-Champaign http://llvm.org/~vadve On Jul 11, 2009, at 3:00 PM, Granville Barnett
2009 Jul 11
0
[LLVMdev] ANTLR?
When you create a parser via ANTLR you specify the output language of the resulting recursive descent parser, at the moment there exists no C++ output template to my knowledge, thus you would have to generate the parser as C code for which a template exists. The runtime support should be there, at least partially but it won't use things like exceptions, nor will it have a very modular design
2009 Jul 11
0
[LLVMdev] ANTLR?
On Jul 11, 2009, at 12:40 PM, Vikram S. Adve wrote: > We are looking for an open source C++ parser other than g++ if > possible. Clang would be great but its C++ support is still some > way away and we need something that works or nearly works now. Does > anyone have any experience with ANTLR for parsing C++ and for > extending their C++ parser? Any other feedback on
2011 Jan 31
3
[LLVMdev] How to convert an iterator to an object pointer
I have a pointer to a basic block and am iterating thru its predecessor blocks. I want to get a pointer to the predecessor block. How do I do it. I am using following code and it given compile time errors. error: cannot convert 'llvm::const_pred_iterator' to 'const llvm::BasicBlock*' in initialization const BasicBlock *b = PH->getParent(); // process all pred block
2011 Jan 31
0
[LLVMdev] How to convert an iterator to an object pointer
Hi Surinder, You'll need to dereference your iterator to get a pointer: const BasicBlock *p = *pr; Cheers, Lang. On Mon, Jan 31, 2011 at 3:04 PM, Surinder <surifilms at gmail.com> wrote: > I have a pointer to a basic block and am iterating thru its > predecessor blocks. I want to get a pointer to the predecessor block. > How do I do it. I am using following code and it
2011 Feb 01
1
[LLVMdev] Breaking critical edges
Is the pass "Break Critical edges" acheives the same as edge-splitting SSA, i.e., a node has either multiple predecessors or multiple successors but not both. A node with multiple predecessors and multiple successors is replaced by two consecutive nodes joined together. The first node has multiple predecessors and second node as its only successor. The second node has first node as
2007 Mar 20
1
[LLVMdev] Google SOC - Idea
On 20 Mar 2007, at 15:45, Jeff Cohen wrote: > Duncan Sands wrote: >>> If that fails, I will build a front-end using ANTLR [http:// >>> antlr.org] a parser generator with which I am familiar and for >>> which a FORTRAN grammar is already available (targeting an >>> obsolete version of ANTLR, but it should not be too difficult to >>> update).
2007 Mar 20
2
[LLVMdev] Google SOC - Idea
Hi Scott, I'm currently porting the Ada gcc front-end to LLVM. This is similar to what you want to do, so here are some comments from the trenches... > I plan on first attempting to implement the FORTRAN front-end by > co-opting the GCC FORTRAN parser. Good plan. However the Fortran front-end that comes with gcc 4.0 is known to be weak (llvm-gcc is based on gcc 4.0). That's
2009 Jul 11
0
[LLVMdev] ANTLR?
Hi, I've not got any experience using ANTLR to parse C++, however, you will find that there only exists a C code generator for ANTLR and NOT a C++ one. Over the years numerous people have requested a C++ code generation template but alas there is still only a C one. Just a heads up. Granville 2009/7/11 Vikram S. Adve <vadve at cs.uiuc.edu> > We are looking for an open source C++
2007 Mar 20
0
[LLVMdev] Google SOC - Idea
Duncan Sands wrote: >> If that fails, I will build a >> front-end using ANTLR [http://antlr.org] a parser generator with which >> I am familiar and for which a FORTRAN grammar is already available >> (targeting an obsolete version of ANTLR, but it should not be too >> difficult to update). >> > > Bad plan. I doubt you can build a serious fortran
2013 Aug 14
2
[LLVMdev] gerate LLVM IR from an AST output from ANTLR
Hi, I am a complete newbie to LLVM. I have an ANTLR parser, that outputs an AST. I want to comvert this AST to a LLVM IR, Can someone point me some relevant documentation/examples/ etc. on how to go about doing this? TIA. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130814/919cb805/attachment.html>