This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcc4.7.2: try/finally, CLOBBER


On Thu, May 30, 2013 at 3:31 PM, Ian Lance Taylor <iant@google.com> wrote:
> On Thu, May 30, 2013 at 2:07 AM, Vini Kanvar <vini@cse.iitb.ac.in> wrote:
>>
>> gcc-4.7.2 adds exception handling constructs (try/finally block) for
>> pointer and array variables. These variables are CLOBBERed in the
>> finally block.
>
> I'm not sure what you mean by this.  An example might help.

I think he means assignments like:

a = CLOBBER;

>
>> What is the meaning and use of CLOBBER? In which cases is it required?
>> What will happen if gcc does not CLOBBER these variables (e.g.
>> gcc-4.6.2 does not add try/finally and CLOBBER in the gimple code. How
>> does gcc-4.6.2 deal with such variables?).
>
> In RTL CLOBBER simply means that the value is unimportant and
> meaningless.  If a CLOBBER is omitted it means that GCC will 1)
> preserve the value in the register; 2) assume that the value in the
> register has been preserved.

In GCC 4.7.2 CLOBBER on the tree level means the variable has gone out
of scope.  This is for expanding to RTL so some variables can share
the same stack location.

It is also used by the tree level optimizations to know that after the
CLOBBER statement the variable is no longer a live.  This is just like
the idea of RTL clobber but for tree decls instead.

Thanks,
Andrew


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]