This is the mail archive of the gcc-patches@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: [PATCH] Cleanup of IPA-CP alignment lattices


Jan Hubicka <hubicka@ucw.cz> writes:

>> Hi,
>> 
>> I have already proposed this patch many months ago but it got
>> forgotten, for a number of reasons.  It does not change functionality,
>> it only cleans up the alignment lattices, which are currently a bit
>> clumsy.
>> 
>> I have refreshed the patch and made sure it still bootstraps and tests
>> fine on an x86_64-linux.  OK for trunk?
>> 
>> Thanks,
>> 
>> Martin
>> 
>> 
>> 2015-02-25  Martin Jambor  <mjambor@suse.cz>
>> 	    Jan Hubicka  <hubicka@ucw.cz>
>> 
>> 	* ipa-cp.c (ipcp_alignment_lattice): New type.
>> 	(ipcp_param_lattices): Use the above to represent alignment.
>> 	(ipcp_alignment_lattice::print): New function.
>> 	(print_all_lattices): Use it to print alignment information.
>> 	(ipcp_alignment_lattice::top_p): New function.
>> 	(ipcp_alignment_lattice::bottom_p): Likewise.
>> 	(ipcp_alignment_lattice::set_to_bottom): Likewise.
>> 	(ipcp_alignment_lattice::meet_with_1): Likewise.
>> 	(ipcp_alignment_lattice::meet_with): Two new overloaded functions.
>> 	(set_all_contains_variable): Use set_to_bottom of alignment lattice.
>> 	(initialize_node_lattices): Likewise.
>> 	(propagate_alignment_accross_jump_function): Work with the new class
>> 	for alignment lattices.
>> 	(propagate_constants_accross_call): Pass only the alignment lattice to
>> 	propagate_alignment_accross_jump_function.
>> 	(ipcp_store_alignment_results): Work with the new class for alignment
>> 	lattices.
>> 
>> testsuite/
>> 	* gcc.dg/ipa/propalign-4.c: New test.
>> 	* gcc.dg/ipa/propalign-5.c: Likewise.
>
> OK,
> Honza

This patch broke Solaris bootstrap in stage 1 with g++ 4.9:

/vol/gcc/src/hg/trunk/solaris/gcc/ipa-cp.c: In member function 'bool ipcp_alignment_lattice::meet_with_1(unsigned int, unsigned int)':
/vol/gcc/src/hg/trunk/solaris/gcc/ipa-cp.c:855:56: error: call of overloaded 'abs(unsigned int)' is ambiguous
       int diff = abs (misalign - (new_misalign % align));
                                                        ^
/vol/gcc/src/hg/trunk/solaris/gcc/ipa-cp.c:855:56: note: candidates are:
In file included from /usr/include/stdlib.h:12:0,
                 from /vol/gcc-4.9/include/c++/4.9.0/cstdlib:72,
                 from /vol/gcc-4.9/include/c++/4.9.0/bits/stl_algo.h:59,
                 from /vol/gcc-4.9/include/c++/4.9.0/algorithm:62,
                 from /vol/gcc/src/hg/trunk/solaris/gcc/system.h:218,
                 from /vol/gcc/src/hg/trunk/solaris/gcc/ipa-cp.c:104:
/usr/include/iso/stdlib_iso.h:225:16: note: long int std::abs(long int)
  inline long   abs(long _l) { return labs(_l); }
                ^
/usr/include/iso/stdlib_iso.h:180:12: note: int std::abs(int)
 extern int abs(int);
            ^

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


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