Commit c8710b5c by Martin Jambor Committed by Martin Jambor

IPA-CP Alignment lattice cleanup

2015-10-05  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.


Co-Authored-By: Jan Hubicka <hubicka@ucw.cz>

From-SVN: r228491
parent 85339618
2015-10-05 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.
2015-10-05 Marek Polacek <polacek@redhat.com> 2015-10-05 Marek Polacek <polacek@redhat.com>
PR tree-optimization/67821 PR tree-optimization/67821
2015-10-05 Martin Jambor <mjambor@suse.cz>
Jan Hubicka <hubicka@ucw.cz>
* gcc.dg/ipa/propalign-4.c: New test.
* gcc.dg/ipa/propalign-5.c: Likewise.
2015-10-05 Marek Polacek <polacek@redhat.com> 2015-10-05 Marek Polacek <polacek@redhat.com>
PR tree-optimization/67821 PR tree-optimization/67821
......
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-ipa-cp" } */
int n;
static void
__attribute__ ((noinline))
test(void *a)
{
__builtin_memset (a,0,n);
}
static __attribute__ ((aligned(16))) int aa[10];
int
main()
{
test (&aa[1]);
test (&aa[3]);
return 0;
}
/* { dg-final { scan-ipa-dump "Alignment 8, misalignment 4" "cp" } } */
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-ipa-cp" } */
int n;
static void
__attribute__ ((noinline))
test(void *a)
{
__builtin_memset (a,0,n);
}
int
main()
{
int aa;
short bb;
test (&aa);
test (&bb);
return 0;
}
/* { dg-final { scan-ipa-dump "Alignment 2" "cp" } } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment