Comments (1)
Sections w.r.t. LLVM IR level will be removed from the main README, e.g.,
1.1.3 LLVM compiler pass - Analysis and instrumentation
The analysis pass finds all heap, stack and global allocations. An allocation data-flow filter discards all stack and
global allocations if they are not passed to a target API (default MPI
calls). Subsequently, type layouts for
user-defined types (e.g., struct
) of these allocations are serialized to a file and a so-called type-id
number is
created for each such unique type.
The instrumentation pass adds the instrumentation callbacks to our runtime, passing 1) the memory pointer, 2) the
corresponding type-id and 3) the number of allocated elements (extent).
Example instrumentation in LLVM intermediate representation (IR)
-
C and corresponding LLVM IR code: A simple heap allocation with malloc of a
double
-array. It contains all
information needed for TypeART:double* pointer = (double*) malloc(n * sizeof(double));
; Assume: %size == n * sizeof(double) %pointer = call i8* @malloc(i64 %size) %pointer_double = bitcast i8* %pointer to double*
-
Corresponding TypeART instrumentation:
; Assume: %size == n * sizeof(double) ; Heap allocation -- %pointer holds the returned pointer value: %pointer = call i8* @malloc(i64 %size) ; TypeART instrumentation -- compute the number of double-elements: %extent = udiv i64 %size, 8 ; TypeART runtime callback (pointer, type-id, length) -- 6 is the type-id for double: call void @__typeart_alloc(i8* %pointer, i32 6, i64 %extent) ; Original bitcast: %pointer_double = bitcast i8* %pointer to double*
from typeart.
Related Issues (20)
- GlobalValue filtering based on linkage rework
- LLVM coverage fails for the filter library target
- Compiler wrapper single TU
- Stack instrumentation errorneous HOT 2
- CMake - Runtime misnamed MPI logger flag
- Opague Pointers
- run.sh fails to link when using <random>
- CMake - compile standard of C test objects wrong
- Segfault when (thread) CounterStats is called with empty vector
- Install scripts (run/apply)
- 🔬 Tracking issue for array cookie support
- 🔬 Tracking issue for MPI type checking
- Tracking issue for compiler wrapper
- Library/Executable file naming scheme
- Runtime exits without types.yaml even if not needed
- Logger may interleave lines in multi-threaded context
- CI condition for installing LLVM libc++ wrong
- Script template "typeart-tmpl.sh.in" readonly var assigned twice
- CI succeeds when tests are unsupported in all configs
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 typeart.