This is an archive of the discontinued LLVM Phabricator instance.

[SimplifyCfg] Don't sink loads/stores to geps of allocas
Needs ReviewPublic

Authored by arielb1 on Sep 13 2017, 12:30 PM.

Details

Summary

This makes to workaround to PR30188 be more robust to code that uses structs.

In practice, this improves an optimization case in rustc and reduces in-the-wild Rust code size by 0.1%.

Diff Detail

Event Timeline

arielb1 created this revision.Sep 13 2017, 12:30 PM

Yes, I know the "right" thing to do might be to make SROA smarter, but de-messing selects in this context is pretty hard.

We want this improvement. What is it waiting for?

mcrosier edited reviewers, added: chandlerc; removed: jmolloy.Sep 20 2017, 7:07 AM
mcrosier added a subscriber: mcrosier.

+Chandler (SROA owner)
-James (not active AFAICT)

Ping Chandler - what is this waiting for?

The test is broken, repaired: https://clang.godbolt.org/z/W3zcxP

Unclear if the underlying issue from PR30188 is still there: https://clang.godbolt.org/z/x37hrf

The current implementation already uses stripPointerCasts(), so probably this is no longer relevant. @xbolva00 any particular reason for the ping?

Since you work with rust-lang, maybe you are interested in this patch. (Patch mentions improvements for rust code).

If not relevant anymore, the patch should be abandoned/closed.

nikic resigned from this revision.Nov 12 2020, 9:41 AM
jdoerfert resigned from this revision.Nov 16 2020, 12:10 PM
nagisa removed a subscriber: nagisa.Dec 31 2020, 4:46 PM