This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: ipa-pure-const tweeks
On Wed, Jun 9, 2010 at 2:43 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Wed, Jun 9, 2010 at 2:43 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
>> On Mon, Jun 7, 2010 at 1:32 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
>>> On Mon, Jun 7, 2010 at 2:23 AM, Jan Hubicka <hubicka@ucw.cz> wrote:
>>>> Hi,
>>>> this patch cleans up logic in handling ECF flags and merging results to be
>>>> hopefully less fragile. Similarly to ipa-reference, it also ?make IPA pass to
>>>> use callgraph and ipa-ref instead of checking indirect calls, loads and stores
>>>> at local analysis time. ?Point of this is that other passes might in mentime
>>>> turn indirect calls into direct or varables readonly.
>>>>
>>>> The patch also imporoves ipa-reference of handling of noreturn functions and adds
>>>> a testcase for more stubble pure/const discovery cases as well as to verify
>>>> that we are able to remove redundant calls to looping pures (at least when
>>>> their return value is used. Funilly enough we keep them around when return value
>>>> is unused, I will fill enhancement request for that).
>>>>
>>>> Bootstrapped/regtested x86_64-linux, will commit it later today.
>>>>
>>>> Honza
>>>>
>>>> ? ? ? ?* cgraph.c (cgraph_edge_cannot_lead_to_return): Also check
>>>> ? ? ? ?if caller is noreturn.
>>>> ? ? ? ?* ipa-reference.c (analyze_function): Use ipa_ref_cannot_lead_to_return
>>>> ? ? ? ?* ipa-ref.h (ipa_ref_cannot_lead_to_return): New function.
>>>> ? ? ? ?* ipa-pure-const.c (check_decl): Add IPA parameter.
>>>> ? ? ? ?(state_from_flags): New function.
>>>> ? ? ? ?(better_state, worse_state): New functions.
>>>> ? ? ? ?(check_call): When in IPA mode, do not care about callees.
>>>> ? ? ? ?(check_load, check_store): Update.
>>>> ? ? ? ?(check_ipa_load, check_ipa_store): New.
>>>> ? ? ? ?(check_stmt): When in IPA mode, use IPA checkers.
>>>> ? ? ? ?(analyze_function): Use state_from_flags.
>>>> ? ? ? ?(propagate): Check indirect edges and references.
>>>>
>>>> ? ? ? ?* gcc.dg/ipa/pure-const-1.c: New testcase.
>>>
>>> This caused:
>>>
>>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44453
>>>
>>
>> This also caused:
>>
>> http://gcc.gnu.org/ml/gcc-cvs/2010-06/msg00036.html
>>
>
> I meant
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44485
>
Wrong information. PR 44485 is caused by
http://gcc.gnu.org/ml/gcc-patches/2010-06/msg00098.html
--
H.J.