Comments (6)
Interesting… maybe I'm just being slow, but I guess I expected that these would be legible as S-expressions instead of this flat symbol list. (Put differently, I'm not exactly sure how to read this RecExpr
dump as an expression.)
Is there a chance that this is the output of just formatting a RecExpr
directly (i.e., .to_string()
), but calling the pretty()
method on RecExpr
would yield a more legible S-expression?
from diospyros.
I should have started off by printing the S-expressions, and I realized that the mistake arises in how I convert the LLVM IR to Egg expressions, so I have changed the title of the issue to be less misleading.
The new S-expression input is:
(VecMAC (Vec no-temp-name4 (Get no-array-name4 1,) 0 0) (Vec 1 no-temp-name5 (Get no-array-name5 1,) 1) (Vec no-temp-name4 (Get no-array-name3 1,) (Get no-array-name6 3,) 0))
and the new S-expression output is
(VecMAC (Vec (Get no-array-name7 1,) (Get no-array-name9 2,) 0 0) (Vec 1 (Get no-array-name8 2,) (Get no-array-name10 3,) 1) (Vec no-array-name7 no-temp-name6 (Get no-array-name11 2,) 0))
The corrected reason for the problem is that no-array-7 appears by itself as a node in the input S-expression.
from diospyros.
Huh, interesting… this might be dumb, but should I be surprised that the symbol no-array-name7
only appears in the output? It seems weird that egg optimization would "invent" a new array instead of just rearranging accesses to existing arrays…
from diospyros.
This is completely my mistake; I made a copy and paste error, because the correct initial input should be:
(Vec (+ (Get no-array-name7 1,) no-array-name7) (+ (Get no-array-name9 2,) (* (Get no-array-name8 2,) no-temp-name6)) (* (Get no-array-name10 3,) (Get no-array-name11 2,)) 0)
from diospyros.
Got it. I'm still not 100% clear on why the conclusion is that the LLVM->egg translation is wrong... (or did I misunderstand)? Can you point to the subexpression that was generated incorrectly?
from diospyros.
Now resolved.
from diospyros.
Related Issues (20)
- cdios: support for sqrt HOT 1
- Enable support for data-dependent if-else HOT 1
- Ternary operator support HOT 1
- Support for exponentiation in cdios HOT 2
- Support early returns/break/continue in cdios HOT 3
- Kernels fails with contract violation (support scalar outputs) HOT 4
- cdios: support local static array initialization HOT 2
- cdios should build fresh racket executable if it doesn't exist
- Cdios error messages for unhandled C constructs should be lifted to surface syntax HOT 1
- CDIOS: Compiling C->Racket failed HOT 3
- Cdios: update import for c-utils library
- QR decomposition in cdios HOT 5
- Flag to run translation validation from cdios
- Translation of LLVM IR to Egg expressions HOT 2
- Add CI for macOS and Ubuntu HOT 2
- Incorrect translation of float to i32 conversion HOT 3
- Local array creation HOT 3
- Flaky Behavior on Inline-Float.c HOT 1
- Issue with Logical XOR in C Program HOT 2
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 diospyros.