Comments (4)
As far I see, this already broken in the thorin IR:
impala -emit-thorin test.impala -Othorin
module 'test'
main_impala_27(mem mem_28, bool c_29, qs32 a_30, qs32 b_31, fn(mem, qs32) return_32) extern
fn(mem) _53 = @ c_29 select while_body_47, next_50
while_head_44 mem_28, a_30, b_31
while_head_44(mem mem_46, qs32 tmp_55, qs32 b_57)
_53 mem_46
while_body_47(mem mem_49)
while_head_44 mem_49, b_57, tmp_55
next_50(mem mem_52)
qs32 _64 = add tmp_55, b_57
return_32 mem_52, _64
from thorin.
nope. it's a problem of the C output. In Thorin the swap is in the call/args/params.
from thorin.
I see, I'll have a look into this as discussed.
from thorin.
07de4d7 should finally fix this:
int main_impala(bool c_29, int a_30, int b_31) {
int tmp_55;
int ptmp_55;
int b_57;
int pb_57;
ptmp_55 = a_30;
pb_57 = b_31;
goto l44;
l44: ;
tmp_55 = ptmp_55;
b_57 = pb_57;
if (c_29) goto l47; else goto l50;
l47: ;
ptmp_55 = b_57;
pb_57 = tmp_55;
goto l44;
l50: ;
int _64;
_64 = tmp_55 + b_57;
return _64;
}
from thorin.
Related Issues (20)
- util/hash.h > error: ‘id_’ was not declared in this scope HOT 2
- Closure conversion pass misses closures stored to memory
- amdgpu requires private addrspace annotations
- Bare infinite loops may trick scopes analysis HOT 3
- Important: Recent changes break code generation HOT 10
- calling cuda()/nvvm() intrinsics with empty body triggers assertion… HOT 1
- using conditionally chosen function in cuda()/nvvm() triggers assertion HOT 1
- Recursive function calls using multi-threading triggers assertion
- assigning/initializing pointer to member of struct accessed through mutable pointer triggers assertion HOT 1
- CUDA backend emits invalid inline assembly with compile-time constant inputs
- `reserve_shared` does not work as intended in JIT
- JIT: Multiple `compile` of different code crashes thorin HOT 2
- We need to stop relying on lower2cff HOT 4
- Thorin does not build on Windows
- exploding compile times post development branch merge HOT 4
- app node argument has type fn[…] but the callee was expecting closure […] HOT 2
- Assertion failed: cont_scope.has_free_params() HOT 2
- Using `undef` in `match`-else branch triggers a `bottom` def HOT 4
- Naked recursion segfaults the compiler HOT 1
- Issue with compilation when using arrays of functions, while executing `external functions` in the loop assigning the functions (in the array). HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from thorin.