Skip to content

Omit the ret slot alloca when it's not needed #8238

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

Closed
pcwalton opened this issue Aug 2, 2013 · 2 comments
Closed

Omit the ret slot alloca when it's not needed #8238

pcwalton opened this issue Aug 2, 2013 · 2 comments
Labels
A-codegen Area: Code generation I-slow Issue: Problems and improvements with respect to performance of generated code.

Comments

@pcwalton
Copy link
Contributor

pcwalton commented Aug 2, 2013

Clang does not always emit an alloca for the ret slot; we likewise shouldn't.

@Aatch
Copy link
Contributor

Aatch commented Aug 3, 2013

@pcwalton could you elaborate? When does clang not do it? (Just trying to make contributor's lives easier)

@dotdash
Copy link
Contributor

dotdash commented Aug 3, 2013

I have implemented what clang does in dotdash@dda1467 but need to clean the thing up.

bors added a commit that referenced this issue Aug 10, 2013
When there is only a single store to the ret slot that dominates the
load that gets the value for the "ret" instruction, we can elide the
ret slot and directly return the operand of the dominating store
instruction. This is the same thing that clang does, except for a
special case that doesn't seem to affect us.

Fixes #8238
@bors bors closed this as completed in 4b74b8d Aug 10, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-codegen Area: Code generation I-slow Issue: Problems and improvements with respect to performance of generated code.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants
@pcwalton @dotdash @Aatch and others