search for: annotationwriter

Displaying 4 results from an estimated 4 matches for "annotationwriter".

2012 Feb 28
0
[LLVMdev] Getting corresponding c-instruction line number along with ir-instruction in a function's CFG
...ograms where i have a mapping from IR instruction in CFG to their respective c instruction. After surfing a in source of llvm i did the following change in printInstruction() function in llvm/lib/VMCore/AsmWriter.cpp file. .....void AssemblyWriter::printInstruction(const Instruction &I) { if (AnnotationWriter) AnnotationWriter->emitInstructionAnnot(&I, Out); // Print out indentation for an instruction. Out << " "; if (MDNode *N = I.getMetadata("dbg")) { // Code DILocation Loc(N); // inserted unsigned Line = Loc.getLin...
2011 Jan 25
1
[LLVMdev] LLVM grammar for ANTLR
...like solver) (6) finding a Prolog solution as proof of or absence of buffer overflows I have implemented Step (1) & (2) above by writing a transform pass. Remaining steps (3) to (6) have been written in Haskell. Step (2), translation from llvm to dfl language has been done by implementing an AnnotationWriter and it emits dfl format of each llvm statement. This is rather crude and causes crashes between llvm/haskell interface. I am considering to dump llvm as it is into Haskell program and then use a parser tool to do llvm statement translation to dfl. The translation is a set of simple rewrite tools...
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 24
3
[LLVMdev] LLVM grammar for ANTLR
Has anyone written a grammar for LLVM for ANTLR. I mean an ANTLR grammar that parses LLVM instructions. Is an LLVM grammar available for any other parsing tool? Surinder