Skip to content
This repository has been archived by the owner on Jun 1, 2020. It is now read-only.

use llir/llvm@v0.3.0-pre2 for code generation #113

Closed
wants to merge 2 commits into from

Conversation

mewmew
Copy link

@mewmew mewmew commented Nov 25, 2018

As an experiment, use the latest version of llir/llvm for code generation.

codegen test case output:

u@x1 ~/D/l/e/codegen> go test -v
=== RUN   TestBinaryFunction
define i32 @main() {
; <label>:0
	%1 = call i32 @add(i32 10, i32 10)
	ret i32 %1
}

define i32 @add(i32 %x, i32 %y) {
; <label>:0
	%1 = add i32 10, 10
	ret i32 %1
}
--- PASS: TestBinaryFunction (0.00s)
PASS
ok  	github.com/elz-lang/elz/codegen	0.001s

Updates #5.

P.S. the test case was also updated to include a ret instruction for the @main function.

@codecov-io
Copy link

codecov-io commented Nov 25, 2018

Codecov Report

Merging #113 into master will decrease coverage by 0.88%.
The diff coverage is 52.63%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #113      +/-   ##
==========================================
- Coverage   73.46%   72.58%   -0.89%     
==========================================
  Files           5        5              
  Lines         196      197       +1     
==========================================
- Hits          144      143       -1     
- Misses         52       53       +1     
- Partials        0        1       +1
Impacted Files Coverage Δ
codegen/codegen.go 61.29% <52.63%> (-1.76%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2899fbb...067aafd. Read the comment docs.

@dannypsnl dannypsnl self-requested a review November 27, 2018 18:53
@dannypsnl
Copy link
Owner

Thanks for your PR, I would need to take some time to compare c-binding & llir, basically, I think v0.3 is good for me, and work with c-binding is painful, have a nice day!

@mewmew
Copy link
Author

mewmew commented Nov 27, 2018

Thanks for your PR, I would need to take some time to compare c-binding & llir, basically, I think v0.3 is good for me, and work with c-binding is painful, have a nice day!

Of course!

Let me know if you reach any stumbling blocks and we could try to fix them together. Have a great day :)

@dannypsnl
Copy link
Owner

@mewmew Can you help me change the target branch to llir so I can merge it and compare with master branch? (And I can fix the conflict at llir branch) Thanks

@mewmew
Copy link
Author

mewmew commented Nov 28, 2018

@mewmew Can you help me change the target branch to llir so I can merge it and compare with master branch? (And I can fix the conflict at llir branch) Thanks

Of course!

@mewmew
Copy link
Author

mewmew commented Nov 28, 2018

Closed in favour of #115

@mewmew mewmew closed this Nov 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants