-
Notifications
You must be signed in to change notification settings - Fork 237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding nilakantha pi approximation benchmark #284
Open
jdroob
wants to merge
16
commits into
sampsyo:main
Choose a base branch
from
jdroob:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+19,811
−1
Open
Changes from 6 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
0f9390f
Add nilkantha benchmark files
jdroob 4a5b0cc
Update bench.md
jdroob fe3a7ac
Update and rename nilkantha.bril to nilakantha.bril
jdroob f4b4b3d
Update and rename nilkantha.out to nilakantha.out
jdroob 2afdacd
Update nilakantha.out
jdroob 39b5ad9
Rename nilkantha.prof to nilakantha.prof
jdroob 276adba
Merge branch 'sampsyo:main' into main
jdroob be33395
implemented partial ref-counting
AliceSzzze b0380b1
added comments
AliceSzzze 7206f7d
experiment recursive decrement
92dde34
Initial test of bug fix passes. Further testing required
jdroob 9c60f16
Added hack to get recursion to work - adj2csr.bril is working now
jdroob 1789dd3
turnt
0c41967
Bug fix
jdroob 19b4311
Merge branch 'main' of github.com:JohnDRubio/bril
jdroob 9aa5021
Placing original interpreter in main branch
jdroob File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
@main { | ||
v37: float = const 3; | ||
PI: float = id v37; | ||
v38: float = const 2; | ||
n: float = id v38; | ||
v39: float = const 1; | ||
sign: float = id v39; | ||
v40: float = id PI; | ||
v41: float = id n; | ||
v42: float = id sign; | ||
call @calculatePI v40 v41 v42; | ||
v43: int = const 0; | ||
} | ||
@calculatePI(PI: float, n: float, sign: float) { | ||
v1: float = const 0; | ||
i: float = id v1; | ||
.for.cond.0: | ||
v2: float = id i; | ||
v3: float = const 1000000; | ||
v4: bool = fle v2 v3; | ||
br v4 .for.body.0 .for.end.0; | ||
.for.body.0: | ||
v5: float = id n; | ||
v6: float = const 1; | ||
v7: float = fadd v5 v6; | ||
nPlusOne: float = id v7; | ||
v8: float = id n; | ||
v9: float = const 2; | ||
v10: float = fadd v8 v9; | ||
nPlusTwo: float = id v10; | ||
v11: float = id nPlusOne; | ||
v12: float = id nPlusTwo; | ||
v13: float = fmul v11 v12; | ||
nPlusOne_Times_nPlusTwo: float = id v13; | ||
v14: float = id n; | ||
v15: float = id nPlusOne_Times_nPlusTwo; | ||
v16: float = fmul v14 v15; | ||
denom: float = id v16; | ||
v17: float = const 4; | ||
v18: float = id denom; | ||
v19: float = fdiv v17 v18; | ||
frac: float = id v19; | ||
v20: float = id sign; | ||
v21: float = id frac; | ||
v22: float = fmul v20 v21; | ||
rhs: float = id v22; | ||
v23: float = id PI; | ||
v24: float = id rhs; | ||
v25: float = fadd v23 v24; | ||
PI: float = id v25; | ||
v26: float = const 0; | ||
v27: float = id sign; | ||
v28: float = fsub v26 v27; | ||
sign: float = id v28; | ||
v29: float = id n; | ||
v30: float = const 2; | ||
v31: float = fadd v29 v30; | ||
n: float = id v31; | ||
v32: float = id i; | ||
v33: float = const 1; | ||
v34: float = fadd v32 v33; | ||
i: float = id v34; | ||
jmp .for.cond.0; | ||
.for.end.0: | ||
v35: float = id PI; | ||
print v35; | ||
v36: int = const 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
cfg for main: {'label_0': []} | ||
|
||
|
||
|
||
|
||
cfg for calculatePI: {'label_0': ['for.cond.0'], 'for.cond.0': ['for.body.0', 'for.end.0'], 'for.body.0': ['for.cond.0'], 'for.end.0': []} | ||
|
||
|
||
Block label_0 falls through to ['for.cond.0'] | ||
Block for.cond.0 branches to ['for.body.0', 'for.end.0'] | ||
Block for.body.0 jumps to ['for.cond.0'] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
3.14159265358978690 | ||
total_dyn_inst: 45000065 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this may be the wrong output—it looks like the output for your block extractor/CFG builder. Maybe try
turnt --save nilakantha.bril
once again?