search for: printbasicblock

Displaying 9 results from an estimated 9 matches for "printbasicblock".

2013 May 14
0
[LLVMdev] Implicit basic block labels?
...s: > > /* temporary 1 */ = tail call i32 @bar(i32 %a) > > (assuming LLVM syntax would have stream-type comments besides line-type > ";"). > > Printing a comment there is pretty useless. It's probably historical. It should be pretty easy to change AssemblyWriter::printBasicBlock in lib/IR/AsmWriter.cpp to print out a "unnamed" name for the BB, but the hard part will be to ensure that the new policy will properly round-trip (i.e., can be parsed back; even in the presence of user-defined names). Also, we like to keep the textual IR as compatible as possible, so the...
2013 May 13
2
[LLVMdev] Implicit basic block labels?
Hello, I only recently started to look at LLVM assembly generated by Clang, and one of the first thing I saw was like: define i32 @foo(i32 %a, i32 %b) nounwind { %1 = tail call i32 @bar(i32 %a) nounwind %2 = icmp eq i32 %1, 0 br i1 %2, label %5, label %3 ; <label>:3 ; preds = %0 %4 = add nsw i32 %b, %a br label %7 I wondered what ";
2013 Nov 27
0
[LLVMdev] Bug in Language Reference? %0 versus %1 as starting index.
...hinking deeply/finding a way to convince yourself and others that this change doesn't break previous .ll files. It's just about thinking and coming up with a new syntax that fits well and that won't break existing .ll files. The key places for making this round-trip are AssemblyWriter::printBasicBlock in lib/IR/AsmWriter.cpp and LLParser::ParseBasicBlock in lib/AsmParser/LLParser.cpp. The parsing side is likely to be entirely in lib/AsmParser/LLLexer.cpp where you need to find a way to get a new token "LocalLabelID" returned for the new syntax. To reiterate, the goal of such a change...
2013 Nov 27
2
[LLVMdev] Bug in Language Reference? %0 versus %1 as starting index.
...way to convince yourself and others that this change > doesn't break previous .ll files. > > It's just about thinking and coming up with a new syntax that fits well > and that won't break existing .ll files. The key places for making this > round-trip are AssemblyWriter::printBasicBlock in lib/IR/AsmWriter.cpp > and LLParser::ParseBasicBlock in lib/AsmParser/LLParser.cpp. The parsing > side is likely to be entirely in lib/AsmParser/LLLexer.cpp where you need > to find a way to get a new token "LocalLabelID" returned for the new syntax. > > To reiterate, th...
2013 Nov 01
2
[LLVMdev] labels commented out
I happened to try building LLVM without assertions today, and it changed the form of the LLVM IR that gets generated. Typically, I do something like clang -O -emit-llvm -S Test.c For source like typedef struct node { struct node *left; struct node *right; int key; } Tree; int sum(Tree *p) { int s = 0; if (p) { s += sum(p->left); s += sum(p->right); s +=
2013 Nov 27
4
[LLVMdev] Bug in Language Reference? %0 versus %1 as starting index.
The language reference states that local temporaries begin with index 0, but if I try that on my not-entirely-up-to-date v3.4 llc (it is like a week old), I get an error "instruction expected to be numbered '%1'". Also, quite a few examples in the LR uses %0 as a local identifier. Should I fix those or is it a problem in llc? -- Mikael -------------- next part --------------
2013 Nov 27
0
[LLVMdev] Bug in Language Reference? %0 versus %1 as starting index.
...rself and others that this change >> doesn't break previous .ll files. >> >> It's just about thinking and coming up with a new syntax that fits well >> and that won't break existing .ll files. The key places for making this >> round-trip are AssemblyWriter::printBasicBlock in lib/IR/AsmWriter.cpp >> and LLParser::ParseBasicBlock in lib/AsmParser/LLParser.cpp. The parsing >> side is likely to be entirely in lib/AsmParser/LLLexer.cpp where you need >> to find a way to get a new token "LocalLabelID" returned for the new syntax. >> >&...
2013 Nov 27
2
[LLVMdev] Bug in Language Reference? %0 versus %1 as starting index.
...t this change >>> doesn't break previous .ll files. >>> >>> It's just about thinking and coming up with a new syntax that fits well >>> and that won't break existing .ll files. The key places for making this >>> round-trip are AssemblyWriter::printBasicBlock in lib/IR/AsmWriter.cpp >>> and LLParser::ParseBasicBlock in lib/AsmParser/LLParser.cpp. The parsing >>> side is likely to be entirely in lib/AsmParser/LLLexer.cpp where you need >>> to find a way to get a new token "LocalLabelID" returned for the new syntax. &g...
2013 Nov 27
0
[LLVMdev] Bug in Language Reference? %0 versus %1 as starting index.
...t;>> doesn't break previous .ll files. >>>> >>>> It's just about thinking and coming up with a new syntax that fits well >>>> and that won't break existing .ll files. The key places for making this >>>> round-trip are AssemblyWriter::printBasicBlock in lib/IR/AsmWriter.cpp >>>> and LLParser::ParseBasicBlock in lib/AsmParser/LLParser.cpp. The parsing >>>> side is likely to be entirely in lib/AsmParser/LLLexer.cpp where you need >>>> to find a way to get a new token "LocalLabelID" returned for the ne...