aboutsummaryrefslogtreecommitdiffstats
path: root/meta-microblaze/recipes-devtools/gcc/gcc-12/0050-Patch-microblaze-Add-TARGET_OPTION_OPTIMIZATION-and-.patch
blob: 8d99c93d9e5066acd8d0ec0a5c5b4f18183dd954 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
From a64afc59e82703f40d04d4d7126038811a195467 Mon Sep 17 00:00:00 2001
From: Nagaraju <nmekala@xilinx.com>
Date: Wed, 8 May 2019 14:12:03 +0530
Subject: [PATCH 50/53] [Patch, microblaze]: Add TARGET_OPTION_OPTIMIZATION and
 disable fivopts by default

Added TARGET_OPTION_OPTIMIZATIONS and Turn off ivopts by default.

 * gcc/common/config/microblaze/microblaze-common.c
   (microblaze_option_optimization_table): Disable fivopts by default.

Upstream-Status: Pending

Signed-off-by: Nagaraju Mekala <nmekala@xilinx.com>
	       Mahesh Bodapati <mbodapat@xilinx.com>
Conflicts:
	gcc/common/config/microblaze/microblaze-common.c

Conflicts:
	gcc/common/config/microblaze/microblaze-common.c
---
 gcc/common/config/microblaze/microblaze-common.cc | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/gcc/common/config/microblaze/microblaze-common.cc b/gcc/common/config/microblaze/microblaze-common.cc
index 21b35f55b92..137332ded25 100644
--- a/gcc/common/config/microblaze/microblaze-common.cc
+++ b/gcc/common/config/microblaze/microblaze-common.cc
@@ -24,7 +24,20 @@
 #include "common/common-target.h"
 #include "common/common-target-def.h"
 
+/* Implement TARGET_OPTION_OPTIMIZATION_TABLE.  */
+static const struct default_options microblaze_option_optimization_table[] =
+  {
+    /* Turn off ivopts by default. It messes up cse.
+    { OPT_LEVELS_1_PLUS, OPT_fomit_frame_pointer, NULL, 1 }, */
+    { OPT_LEVELS_ALL, OPT_fivopts, NULL, 0 },
+    { OPT_LEVELS_NONE, 0, NULL, 0 }
+  };
+
+
 #undef TARGET_DEFAULT_TARGET_FLAGS
 #define TARGET_DEFAULT_TARGET_FLAGS	TARGET_DEFAULT
 
+#undef TARGET_OPTION_OPTIMIZATION_TABLE
+#define TARGET_OPTION_OPTIMIZATION_TABLE microblaze_option_optimization_table
+
 struct gcc_targetm_common targetm_common = TARGETM_COMMON_INITIALIZER;
-- 
2.37.1 (Apple Git-137.1)