arc: add exceptions for PR92860.

Message ID e469dba5-c47f-4602-5b2e-02a3a9940e8e@suse.cz
State New
Headers show
Series
  • arc: add exceptions for PR92860.
Related show

Commit Message

Martin Liška June 24, 2020, 7:43 a.m.
Hey.

The patch is about addition of some exceptions for arc target that
address:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92860#c26

It's again another example where optimization options influence target
options.

Ready for master?
Martin

gcc/ChangeLog:

	PR tree-optimization/92860
	* optc-save-gen.awk: Add exceptions for arc target.
---
  gcc/optc-save-gen.awk | 4 ++++
  1 file changed, 4 insertions(+)

-- 
2.27.0

Comments

Ian Lance Taylor via Gcc-patches June 26, 2020, 10:59 p.m. | #1
On Wed, 2020-06-24 at 09:43 +0200, Martin Liška wrote:
> Hey.

> 

> The patch is about addition of some exceptions for arc target that

> address:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92860#c26

> 

> It's again another example where optimization options influence target

> options.

> 

> Ready for master?

> Martin

> 

> gcc/ChangeLog:

> 

> 	PR tree-optimization/92860

> 	* optc-save-gen.awk: Add exceptions for arc target.

It doens't look like you're explicitly handling the OPT_mmillicode case.  Was
that intentional?  Regardless, this patch is OK as-is or with the millicode stuff
added.

jeff
>
Martin Liška June 29, 2020, 8:54 a.m. | #2
On 6/27/20 12:59 AM, Jeff Law wrote:
> On Wed, 2020-06-24 at 09:43 +0200, Martin Liška wrote:

>> Hey.

>>

>> The patch is about addition of some exceptions for arc target that

>> address:

>> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92860#c26

>>

>> It's again another example where optimization options influence target

>> options.

>>

>> Ready for master?

>> Martin

>>

>> gcc/ChangeLog:

>>

>> 	PR tree-optimization/92860

>> 	* optc-save-gen.awk: Add exceptions for arc target.

> It doens't look like you're explicitly handling the OPT_mmillicode case.  Was

> that intentional?  Regardless, this patch is OK as-is or with the millicode stuff

> added.


Yes, it's a target mask and this one are not checked:

#define MASK_MILLICODE_THUNK_SET (1U << 12)

I'm going to install the patch as is.
Martin

> 

> jeff

>>

>

Patch

diff --git a/gcc/optc-save-gen.awk b/gcc/optc-save-gen.awk
index 760bf26721a..ff173fee404 100644
--- a/gcc/optc-save-gen.awk
+++ b/gcc/optc-save-gen.awk
@@ -960,6 +960,10 @@  checked_options["flag_merge_constants"]++
  checked_options["param_max_fields_for_field_sensitive"]++
  checked_options["flag_omit_frame_pointer"]++
  checked_options["unroll_only_small_loops"]++
+# arc exceptions
+checked_options["TARGET_ALIGN_CALL"]++
+checked_options["TARGET_CASE_VECTOR_PC_RELATIVE"]++
+checked_options["arc_size_opt_level"]++
  
  for (i = 0; i < n_opts; i++) {
  	name = var_name(flags[i]);