Comments (3)
Yep, to clarify, SIZE
was 2 for this example, and that does help clarify why the i64
is used! I will go ahead and translate the memset
and memcpy
instructions.
from diospyros.
Ah, nice work boiling this down to a small example! This is incredibly helpful to look at!
It looks like the optimizations run ahead of Diospyros are already smart enough to convert that for
loops that does initialization into a memset
, huh? That's pretty cool.
To confirm: is SIZE
equal to 2 here? That would explain this:
%1 = alloca i64, align 8
%tmpcast = bitcast i64* %1 to [2 x float]*
That is, LLVM is using a single i64
to store two floats for x
.
Anyway, treating memset
& memcpy
calls like stores seem like exactly the right thing to do!
from diospyros.
The original problem was mostly fixed, but another similar problem relating in the load/store movement pass is being fixed, where loads and stores cannot be moved around memsets.
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
- Mistake in generation of Egg expressions HOT 6
- Add CI for macOS and Ubuntu HOT 2
- Incorrect translation of float to i32 conversion 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.