https://github.com/xhacker/long-stream-pass
https://github.com/xhacker/long-stream-pass
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/xhacker/long-stream-pass
- Owner: xhacker
- Created: 2016-03-03T19:52:55.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-03-03T23:51:41.000Z (over 10 years ago)
- Last Synced: 2025-01-29T08:24:28.462Z (over 1 year ago)
- Language: LLVM
- Size: 5.86 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This is a very simple LLVM pass. It replaces the `add` between two `i128`s with a call to `add128`. We can then link it with `add128-def.s`, which contains a `add128` function using long stream addition.
Based on [https://github.com/sampsyo/llvm-pass-skeleton](https://github.com/sampsyo/llvm-pass-skeleton).
# How to Run?
```
pushd build
cmake ..
make
popd
# Run the original version
llc add128.ll
clang -o add128 add128.s
./add128
# Run the long stream addition version
opt -load build/longstream/libLongstreamPass.so -longstream -S < add128.ll > add128-opt.ll
llc add128-def.ll
llc add128-opt.ll
clang -o add128-opt add128-opt.s add128-def.s
./add128-opt
```