Skip to content
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

[MIR] Should translator use LLVM builder more directly? #31003

Closed
nagisa opened this issue Jan 18, 2016 · 3 comments
Closed

[MIR] Should translator use LLVM builder more directly? #31003

nagisa opened this issue Jan 18, 2016 · 3 comments
Labels
A-MIR Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html

Comments

@nagisa
Copy link
Member

nagisa commented Jan 18, 2016

Currently we use various build::* functions in order to build up the function, but many of the checks done by the build::* functions are not necessary for us.

Namely, those functions are concerned with checking for termination and unreachability. Both of these concerns are not relevant to MIR – we have well specified terminator system and unreachable blocks are removed before MIR gets to the trans.

Suggestion is to refactor the MIR translator to use the trans::builder::Builder directly.

@nagisa nagisa added the A-MIR Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html label Jan 18, 2016
@Thiez
Copy link
Contributor

Thiez commented Jan 20, 2016

Would this change result in noticeable performance gains when compiling without optimizations?

@dotdash
Copy link
Contributor

dotdash commented Jan 20, 2016

I'd not expect that. It would just avoid some unnecessary, but probably
very cheap, checks during trans, and stop "repositioning" the builder at
its current position over and over again. Probably a tiny gain in the trans
phase, but nothing spectacular. I'd support the change nevertheless,
because it feels cleaner.

2016-01-20 19:27 GMT+01:00 Thiez notifications@github.com:

Would this change result in noticeable performance gains when compiling
without optimizations?


Reply to this email directly or view it on GitHub
#31003 (comment).

@pczarn
Copy link
Contributor

pczarn commented Jan 27, 2016

I'd like to start this tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-MIR Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html
Projects
None yet
Development

No branches or pull requests

4 participants