All Questions
11 questions
0
votes
1
answer
582
views
Implementing heap-allocated closures in LLVM
I'm writing my own F#-esque language and I'm using LLVM for code generation. I want my language to support continuation passing style and I think I've got TCO figured out but I cannot figure out how ...
-3
votes
1
answer
392
views
What programming languages besides Apple Swift & Objective-C use the Llvm compile-time Automatic Reference Counting exclusively for memory management?
Are there other general purpose programming languages besides Objective-C +ARC and Swift which target the llvm and use static compile time Automatic Reference Counting for memory management?
3
votes
4
answers
3k
views
GCC or Clang to output bytecode for a VM?
Long story short, I wanted to use C as a scripting language and in a portable manner so I created a register-based, JITless VM to accomplish this.
I've formalized the VM's ISA, script file format, ...
1
vote
1
answer
1k
views
Is it feasible to write an IR-to-assembly compiler as opposed to an LLVM backend?
I've made a virtual processor with a simple instruction set and memory model as a learning exercise (and mostly just for fun). I can write programs in its assembly language, assemble them with my ...
18
votes
1
answer
4k
views
Why does LLVM have an assembly-like IR rather than a tree-like IR? Or: why do projects target LLVM IR instead of clang's AST?
Why is LLVM's intermediate representation (LLVM IR) assembly-like rather than tree-like?
Alternatively, why do language implementations target LLVM IR rather than clang's AST?
I'm not trying to ask ...
0
votes
2
answers
322
views
How does the LLVM compiler treat arithmetic operations in parentheses?
When it sees the parentheses, does it have the machine do the operations in the parentheses first, or does it distribute out the parentheses?
Like, if I have the following line of code:
int i = 2 * (...
4
votes
1
answer
2k
views
How do I add link-time optimization capabilities to my LLVM-based compiler?
I am designing and implementing a programming language, and I am using LLVM for native code generation. Among others, performance is a key feature of the language, and as such, I am looking to ...
1
vote
1
answer
360
views
LLVM case: is the success due to the algorithms? [closed]
I'm not sure if this is a subjective question, I hope not but I'm not proficient with LLVM so I'm just wondering: how come it's become so popular and so widespread used in the industry?
Were the ...
3
votes
2
answers
4k
views
Learning YACC nowadays, does it make sense? [closed]
I have a huge project that is using YACC and I would need to fix a bug in it.
I might ask someone else who wrote that to fix it but I'm interested in how compilers work. Does it make sense to learn ...
27
votes
4
answers
13k
views
GCC vs clang/LLVM -- pros and cons of each [closed]
What are the pros and cons of GCC vs clang/LLVM?
9
votes
3
answers
2k
views
Is Clang/LLVM ready for prime time? [closed]
Clang is able to be used instead of gcc? What your experience on that? What disadvantages there are yet?
Performance of compilation is very better than gcc but about performance of code generated ...