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]

[PATCH] For -fno-builtin disable pattern recognition if not enabled explicitly in lto.


Hi all:
The purpose for this patch is prevent `-flto -O3 -fno-builtin`  gen
builtin function,
so checking -fno-builit, and then disable
-ftree-loop-distribute-patterns if if -fno-builit enabled, the prev
discuss in [1], and this patch dependence on [2].

[1] https://gcc.gnu.org/ml/gcc-patches/2014-08/msg02483.html
[2] https://gcc.gnu.org/ml/gcc-patches/2014-08/msg02555.html
From 80922e53ff41b1c08322a0d0ae5b6d947cb39353 Mon Sep 17 00:00:00 2001
From: Kito Cheng <kito.cheng@gmail.com>
Date: Thu, 28 Aug 2014 18:06:48 +0800
Subject: [PATCH 2/2] For -fno-builtin disable pattern recognition if not
 enabled explicitly. 2014-09-28  Kito Cheng  <kito@0xlab.org>

	lto/
	* lto-lang.c (lto_post_options): For -fno-builtin disable
	pattern recognition if not enabled explicitly.
---
 gcc/lto/lto-lang.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/gcc/lto/lto-lang.c b/gcc/lto/lto-lang.c
index 9e8524a..ae022cc 100644
--- a/gcc/lto/lto-lang.c
+++ b/gcc/lto/lto-lang.c
@@ -794,6 +794,11 @@ lto_post_options (const char **pfilename ATTRIBUTE_UNUSED)
      support.  */
   flag_excess_precision_cmdline = EXCESS_PRECISION_FAST;
 
+  /* If -fno-builtin then disable pattern recognition.  */
+  if (!global_options_set.x_flag_tree_loop_distribute_patterns
+      && flag_no_builtin)
+    flag_tree_loop_distribute_patterns = 0;
+
   /* Initialize the compiler back end.  */
   return false;
 }
-- 
1.9.3


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