The blog post doesn't mention integer overflows. If integers wrap around on overflow, min(INT_MIN - 1, 0 - 1) = -1 but min(INT_MIN, 0) - 1 = INT_MAX. However, in PHP the values are converted to floats, which should…
None, it's a hardware problem.
Since there is also a programming language called C2, I took a look at the wrong compiler. Can you provide a link to the source code?
You can stay in SSA form even after register allocation. In libFirm the assigned registers are just attributes of the values in the SSA representation. There was some additional discussion regarding this in [1]. GCC…
SSA is standard for the middle end but not for the backend. According to my knowledge there are only two compilers with an SSA-based backend: libFirm (www.libfirm.org) and the Go compiler.
Does anyone know an open source tool for monoalphabetic (or polyalphabetic) substitution that can handle arbitrary dictionaries?
Compile time is an issue of C++ but not of C.
[citation needed]
I'm sure, you can also self-compile the tip. Would be really interesting if this was done for benchmarks.
> So it's not impossible, but libfirm avoids it or performs the necessary phi insertion in various places to avoid creating invalid SSA for the representation it has. It's impossible to have one edge pointing to…
> There are theoretical benefits, but in practice, LLVM does pretty well with it's current scheme. I think having a decoupled spilling phase is nice feature of the SSA-based scheme. However, I don't say that LLVM (or…
> At some point it lowers out of SSA, but you have to do that at some point anyway. libfirm never goes out of SSA (since it uses a graph-based representation it's simply impossible: the data dependency edges need one…
Yes, in the middle end, but they don't have an SSA-based back end (for example SSA-based register allocation).
After libfirm [1], the Go compiler now seems to be the second mature compiler with an SSA-based backend. I hope more compilers will follow. I missed some references to corresponding papers in the source code. For…
As stated in [1] they use a variant of "Simple and Efficient Construction of Static Single Assignment Form" [2], which does not require a dominator tree (or a liveness analysis). [1]…
libfirm (http://pp.ipd.kit.edu/firm/) uses SSA-based register allocation (http://d-nb.info/986273813/34), which allows a decoupled spilling phase. Moreover, the register assignment becomes polynomial, while register…
You are right, this should be static single assignment.
There are a lot of compiler optimizations that uses global analyses/optimizations that are not covered by optimizing a sequence of assembly instructions. Thus, I doubt that CompCert + STOKE would reach the code quality…
That's because a) the initial STOKE paper (2013) is older than Souper (initial commit 2014) and b) there is no Souper paper so far
Documentation->LLVM: http://pp.ipd.kit.edu/firm/LLVM ;-)
That sounds like an (e-)SSA-based optimization but not like an SSA backend.
Does anyone know the current state of the SSA backend mentioned in https://news.ycombinator.com/item?id=9099744 ?
Jump threading can also enables additional optimizations. For instance, if you apply jump threading to int eight(int a) { int b; if (a) { b = 1; } else { b = a; } b += 3; if (a) { return b + b; } else { return b + 5; }…
I do not have an example for Souper, but the Optgen tool uses similar techniques and the paper provides a list of missing optimizations for LLVM, GCC and ICC:…
The permutation problem is not related to IR superoptimization itself. The goal of an optimization pass is to improve the performance of an average, and that's exactly what the IR superoptimization does.
The blog post doesn't mention integer overflows. If integers wrap around on overflow, min(INT_MIN - 1, 0 - 1) = -1 but min(INT_MIN, 0) - 1 = INT_MAX. However, in PHP the values are converted to floats, which should…
None, it's a hardware problem.
Since there is also a programming language called C2, I took a look at the wrong compiler. Can you provide a link to the source code?
You can stay in SSA form even after register allocation. In libFirm the assigned registers are just attributes of the values in the SSA representation. There was some additional discussion regarding this in [1]. GCC…
SSA is standard for the middle end but not for the backend. According to my knowledge there are only two compilers with an SSA-based backend: libFirm (www.libfirm.org) and the Go compiler.
Does anyone know an open source tool for monoalphabetic (or polyalphabetic) substitution that can handle arbitrary dictionaries?
Compile time is an issue of C++ but not of C.
[citation needed]
I'm sure, you can also self-compile the tip. Would be really interesting if this was done for benchmarks.
> So it's not impossible, but libfirm avoids it or performs the necessary phi insertion in various places to avoid creating invalid SSA for the representation it has. It's impossible to have one edge pointing to…
> There are theoretical benefits, but in practice, LLVM does pretty well with it's current scheme. I think having a decoupled spilling phase is nice feature of the SSA-based scheme. However, I don't say that LLVM (or…
> At some point it lowers out of SSA, but you have to do that at some point anyway. libfirm never goes out of SSA (since it uses a graph-based representation it's simply impossible: the data dependency edges need one…
Yes, in the middle end, but they don't have an SSA-based back end (for example SSA-based register allocation).
After libfirm [1], the Go compiler now seems to be the second mature compiler with an SSA-based backend. I hope more compilers will follow. I missed some references to corresponding papers in the source code. For…
As stated in [1] they use a variant of "Simple and Efficient Construction of Static Single Assignment Form" [2], which does not require a dominator tree (or a liveness analysis). [1]…
libfirm (http://pp.ipd.kit.edu/firm/) uses SSA-based register allocation (http://d-nb.info/986273813/34), which allows a decoupled spilling phase. Moreover, the register assignment becomes polynomial, while register…
You are right, this should be static single assignment.
There are a lot of compiler optimizations that uses global analyses/optimizations that are not covered by optimizing a sequence of assembly instructions. Thus, I doubt that CompCert + STOKE would reach the code quality…
That's because a) the initial STOKE paper (2013) is older than Souper (initial commit 2014) and b) there is no Souper paper so far
Documentation->LLVM: http://pp.ipd.kit.edu/firm/LLVM ;-)
That sounds like an (e-)SSA-based optimization but not like an SSA backend.
Does anyone know the current state of the SSA backend mentioned in https://news.ycombinator.com/item?id=9099744 ?
Jump threading can also enables additional optimizations. For instance, if you apply jump threading to int eight(int a) { int b; if (a) { b = 1; } else { b = a; } b += 3; if (a) { return b + b; } else { return b + 5; }…
I do not have an example for Souper, but the Optgen tool uses similar techniques and the paper provides a list of missing optimizations for LLVM, GCC and ICC:…
The permutation problem is not related to IR superoptimization itself. The goal of an optimization pass is to improve the performance of an average, and that's exactly what the IR superoptimization does.