Handle operand temps for function calls#32738
Merged
bors merged 3 commits intorust-lang:masterfrom Apr 8, 2016
Merged
Conversation
This allows temporary destinations for function calls to have their allocas omitted.
Contributor
|
r? @arielb1 (rust_highfive has picked a reviewer for you, use r? to override) |
| if let Some(tcx) = opt_tcx { | ||
| let data = tcx.region_maps.code_extents.borrow()[self.0 as usize]; | ||
| write!(f, "/{:?}", data)?; | ||
| if let Some(data) = tcx.region_maps.code_extents.borrow().get(self.0 as usize) { |
Contributor
There was a problem hiding this comment.
who is creating invalid regions?
Contributor
Author
There was a problem hiding this comment.
Not sure, I think it might be a cross-crate thing as the out-of-bounds index was much larger the size of the map and appeared while compiling a function from another crate.
It's quite a large amount of code, and moving it into a method allowed for some refactoring to make the logic a little easier to understand
Contributor
|
@bors r+ |
Collaborator
|
📌 Commit 73790f0 has been approved by |
Contributor
|
It would be nice if you were to refactor the early-intrinsic logic to its own method too. |
Contributor
Author
|
@arielb1 I plan on tackling intrinsics soon anyway, so that logic will probably be disappearing. |
Manishearth
added a commit
to Manishearth/rust
that referenced
this pull request
Apr 7, 2016
Handle operand temps for function calls Previously, all non-void function returns required an on-stack location for the value to be stored to. This code improves translation of function calls so this is no longer necessary.
Contributor
Author
|
@bors r- This has a some bugs I need to fix up. |
Some types weren't being properly monomorphised, and didn't have their regions properly erased. This is now fixed. Also fixes an issue where a temp was initialized in two separate branches, but wasn't given an alloca.
Contributor
Author
|
@bors r=arielb1 |
Collaborator
|
📌 Commit cb1bec9 has been approved by |
Manishearth
added a commit
to Manishearth/rust
that referenced
this pull request
Apr 8, 2016
Previously, all non-void function returns required an on-stack location for the value to be stored to. This code improves translation of function calls so this is no longer necessary.
Collaborator
bors
added a commit
that referenced
this pull request
Apr 8, 2016
Handle operand temps for function calls Previously, all non-void function returns required an on-stack location for the value to be stored to. This code improves translation of function calls so this is no longer necessary.
Collaborator
This was referenced Apr 8, 2016
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Previously, all non-void function returns required an on-stack location for the value to be stored to. This code improves translation of function calls so this is no longer necessary.