search for: r174131

Displaying 4 results from an estimated 4 matches for "r174131".

Did you mean: 174131
2015 Sep 25
2
Comparing stack addresses and function args (Was: [llvm] r174131 - Add a comment explaining an unavailable optimization)
On 09/24/2015 06:04 PM, Hans Wennborg wrote: > I tried your patch on a Clang build to see if it would fire. It > reduced the size of a bootstrap with 8500 bytes. Not huge, but it > seems like a nice improvement. And maybe it could be made more > powerful: not just checking if the address is a param or alloca, but > an address based on such values. Yeah, I realized after posting that
2015 Sep 24
2
Comparing stack addresses and function args (Was: [llvm] r174131 - Add a comment explaining an unavailable optimization)
On Thu, Sep 24, 2015 at 12:06 PM, Aaron Ballman <aaron at aaronballman.com> wrote: > On Thu, Sep 24, 2015 at 2:42 PM, Hans Wennborg <hans at chromium.org> wrote: >> I was wondering why LLVM cannot optimize this code (which GCC does optimize): >> >> int f(int *p) { int x; return p == &x; } >> >> it would seem that this must always return 0. (This
2015 Sep 24
3
Comparing stack addresses and function args (Was: [llvm] r174131 - Add a comment explaining an unavailable optimization)
Apologies if this has come up before. I couldn't find any previous discussion, but I did find this commit. I was wondering why LLVM cannot optimize this code (which GCC does optimize): int f(int *p) { int x; return p == &x; } it would seem that this must always return 0. (This occurs as a self-assignment check in the code I was looking at; I was hoping we could fold that check away.)
2015 Sep 24
3
Comparing stack addresses and function args (Was: [llvm] r174131 - Add a comment explaining an unavailable optimization)
I threw together a patch which implements this (attached.) If we decide that this is actually a legal transform, I'm happy to post this for review. In addition to the version proposed here, I also implemented a case where a trivially escaped alloca's address is not equal to any other value. I believe both are valid, but we should confirm. Philip On 09/24/2015 02:34 PM, Aaron