Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: metalift/metalift
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: LysanderT/metalift
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Able to merge. These branches can be automatically merged.
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Jun 5, 2024

  1. fix small bugs on website

    LysanderT committed Jun 5, 2024
    Copy the full SHA
    18c4012 View commit details
Showing with 2 additions and 2 deletions.
  1. +1 −1 website/docs/tutorial/simple-transpiler.md
  2. +1 −1 website/docs/tutorial/transpiler-for-hardware.md
2 changes: 1 addition & 1 deletion website/docs/tutorial/simple-transpiler.md
Original file line number Diff line number Diff line change
@@ -98,7 +98,7 @@ int test(int base, int arg1, int base2, int arg2) {
}
```
We do this using the [script provided by Metalift](https://github.com/metalift/metalift/blob/main/tests/compile-add-blocks). The script generates both the LLVM bitcode (.ll) file, along with a file containing loop information (.loops, which is empty since our input code does not contain any loops).
We do this using the [script provided by Metalift](https://github.com/starptr/metalift/blob/oscar/main/tests/compile-add-blocks). The script generates both the LLVM bitcode (.ll) file, along with a file containing loop information (.loops, which is empty since our input code does not contain any loops).
We pass these file names to Metalift's `analyze` function, which returns a number of results. The most important is the last one, which contains [information about the code to be transpiled](https://github.com/metalift/metalift/blob/main/metalift/analysis.py#L185). The code info is then used to generate our grammar as described above.
2 changes: 1 addition & 1 deletion website/docs/tutorial/transpiler-for-hardware.md
Original file line number Diff line number Diff line change
@@ -137,7 +137,7 @@ The ```CodeInfo``` object consists of all the variables that are modified in the


## Transpiler flow
Once the target operators semantics and the search space description is defined, we can build the transpiler now. First, we need to compiler the source code to LLVM bytecode using the [script provided by Metalift].(https://github.com/starptr/metalift/blob/oscar/main/tests/compile-add-blocks). The script generates both the LLVM bitcode (.ll) file by calling the Clang compiler, along with a file containing loop information.
Once the target operators semantics and the search space description is defined, we can build the transpiler now. First, we need to compiler the source code to LLVM bytecode using the [script provided by Metalift](https://github.com/starptr/metalift/blob/oscar/main/tests/compile-add-blocks). The script generates both the LLVM bitcode (.ll) file by calling the Clang compiler, along with a file containing loop information.

<!--phmdoctest-mark.skip-->
```python