diff mbox

Respect --param ipa-max-agg-items=0

Message ID 20160511154610.GG5580@virgil.suse.cz
State New
Headers show

Commit Message

Martin Jambor May 11, 2016, 3:46 p.m. UTC
Hi,

when analyzing PR 70646, I found out that --param ipa-max-agg-items=0
does not prevent creation of aggregate jump functions because it is
checked only after the first such jump function is created.  The
following patch fixes that by checking the parameter before starting
the whole analysis.

Bootstrapped and lto-bootstrapped on x86_64-linux.  OK for trunk?  OK
for all active release branches?

Thanks,

Martin


2016-04-18  Martin Jambor  <mjambor@suse.cz>

	PR ipa/70646
	* ipa-prop.c (determine_locally_known_aggregate_parts): Bail out early
	if parameter PARAM_IPA_MAX_AGG_ITEMS is zero.
---
 gcc/ipa-prop.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Jeff Law May 16, 2016, 6:55 p.m. UTC | #1
On 05/11/2016 09:46 AM, Martin Jambor wrote:
> Hi,
>
> when analyzing PR 70646, I found out that --param ipa-max-agg-items=0
> does not prevent creation of aggregate jump functions because it is
> checked only after the first such jump function is created.  The
> following patch fixes that by checking the parameter before starting
> the whole analysis.
>
> Bootstrapped and lto-bootstrapped on x86_64-linux.  OK for trunk?  OK
> for all active release branches?
Yes and yes.



jeff
diff mbox

Patch

diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c
index 65482ba..f02ec47 100644
--- a/gcc/ipa-prop.c
+++ b/gcc/ipa-prop.c
@@ -1414,6 +1414,9 @@  determine_locally_known_aggregate_parts (gcall *call, tree arg,
   bool check_ref, by_ref;
   ao_ref r;
 
+  if (PARAM_VALUE (PARAM_IPA_MAX_AGG_ITEMS) == 0)
+    return;
+
   /* The function operates in three stages.  First, we prepare check_ref, r,
      arg_base and arg_offset based on what is actually passed as an actual
      argument.  */