Re: Unexpected optimizer behavior

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Frank Neuhaus wrote:
> On Fri, Jun 26, 2009 at 11:33 PM, Andrew Haley<aph@xxxxxxxxxx> wrote:
>> Frank Neuhaus wrote:
>>> On Fri, Jun 26, 2009 at 8:36 PM, Andrew Haley<aph@xxxxxxxxxx> wrote:
>>>
>>>> If gcc inlines Image::resize, it knows that pixels does not escape, and whatever
>>>> is in pixels cannot have any effect elsewhere.
>>>>
>>> I still don't precisely understand the reason for this behavior.
>> Well, I did tell you.  :-)
> 
> Well kind of. You said: "If gcc inlines Image::resize, it knows that
> pixels does not escape, and whatever
> is in pixels cannot have any effect elsewhere."
> 
> I would just like to know how the behavior prevents those 'bad' things
> from happening i.e.:
> How does not caching the pixels pointer in a local variable in front
> of the loop prevent pixels from "escaping"? (What does that mean by
> the way if a pixel "escapes"?)

Ahh, okay.  This is crucial: see http://en.wikipedia.org/wiki/Escape_analysis
Read that first, then my comment should make more sense.

Andrew.

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux