Questions tagged [intermediate-representation]
The intermediate-representation tag has no summary.
11 questions
3
votes
1
answer
226
views
What are the pros and cons of dominator Phis vs predecessor Phis?
Phi nodes join data flow based on incoming control flow edges.
Determination of incoming control flow can be encoded either by directly listing predecessors or by listing blocks dominating ...
6
votes
1
answer
244
views
Why doesn't lazy basic block versioning use type sets?
In Simple and Effective Type Check Removal
through Lazy Basic Block Versioning, which introduces Lazy Basic Block Versioning (LBBV), they have runtime type checks expand into two thunks for the cases ...
4
votes
2
answers
312
views
Exception Handling within SSA/Basic Block Arguments form
I've been looking into using SSA with basic block arguments for an IR.
However, I have not found a good explanation of how exceptions should be modeled.
This is complicated further because for ...
0
votes
0
answers
136
views
How to serialize IR with cross references?
When I type check, I generate IR and serialize them to avoid retypechecking of libraries, which is usually unchanged after the first compilation. However, I store these variable references using ...
11
votes
1
answer
3k
views
What are the tradeoffs between using sea of nodes, CFG of basic blocks, and egraphs for compiler optimizations?
I've heard of "sea of nodes" intermediate representations mostly in the context of just-in-time compilation (JVM, V8, Graal) whereas intermediate representations such as LLVM IR are used in ...
10
votes
3
answers
2k
views
Can you, should you, go straight from AST to SSA?
I'm beginning to read Appel's book Modern Compiler Implementation in C. The book is about 25 years old, so maybe it's not so "modern" anymore, I don't know. I'm skimming the book and it ...
13
votes
2
answers
1k
views
What are the disadvantages of using CPS form?
Motivation
CPS(Continuation-Passing Style), SSA(Static Single Assignment), ANF(A-Normal Form) are three common forms of IR(Intermediate Representation).
I find it very convenient to describe and ...
20
votes
1
answer
1k
views
What is the relationship between STG and RVSDG?
GHC is an optimizing Haskell compiler. Since Haskell is lazy and mutation is rare, control flow and data flow are often very closely aligned. Therefore, it is often most useful to think about ...
10
votes
3
answers
1k
views
What are the disadvantages of using SSA form?
SSA form is common intermediate representation used in compilers where all variables are assigned to exactly once. It greatly helps with a myriad of optimizations, such as constant folding, dead code ...
12
votes
2
answers
895
views
What are the pros and cons of transpiling to a high-level language vs compiling to VM bytecode or LLVM IR
From Wikipedia:
A source-to-source translator, source-to-source compiler (S2S
compiler), transcompiler, or transpiler is a type of
translator that takes the source code of a program written in a
...
10
votes
1
answer
490
views
Is Cmm suitable for use in compilers besides GHC?
Cmm is a fork of C-- used by GHC for codegen. I was previously thinking of using LLVM but Cmm seems to be a nicer, easier way to go.