summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-07 17:05:18 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-07 17:05:18 +0000
commita3eb5a985eee9462dc1f135ca82e580d8a575e84 (patch)
tree770f9cee195abca294604d749c64b58f1be278a8
parentc743daa50b26142bb9de043eaa0b7f35a3df66c8 (diff)
downloadgcc-a3eb5a985eee9462dc1f135ca82e580d8a575e84.tar.gz
* doc/invoke.texi (-fisolate-erroneous-paths): Document.
* gimple-ssa-isolate-paths.c (gate_isolate_erroneous_paths): No longer check if we have __builtin_trap, assume it's available. java/ * builtins.c (initialize_builtins): Provide __builtin_trap. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204533 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/doc/invoke.texi7
-rw-r--r--gcc/gimple-ssa-isolate-paths.c3
-rw-r--r--gcc/java/ChangeLog4
-rw-r--r--gcc/java/builtins.c4
5 files changed, 23 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 34601b6bb47..43ae4ea3b22 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2013-11-07 Jeff Law <law@redhat.com>
+
+ * doc/invoke.texi (-fisolate-erroneous-paths): Document.
+
+ * gimple-ssa-isolate-paths.c (gate_isolate_erroneous_paths):
+ No longer check if we have __builtin_trap, assume it's
+ available.
+
2013-11-07 Thomas Schwinge <thomas@codesourcery.com>
* doc/sourcebuild.texi (Top Level) <lto-plugin>: GNU ld can use
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index f3c3b89e490..25e3eb59e6f 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -377,6 +377,7 @@ Objective-C and Objective-C++ Dialects}.
-fira-region=@var{region} -fira-hoist-pressure @gol
-fira-loop-pressure -fno-ira-share-save-slots @gol
-fno-ira-share-spill-slots -fira-verbose=@var{n} @gol
+-fisolate-erroneous-paths
-fivopts -fkeep-inline-functions -fkeep-static-consts -flive-range-shrinkage @gol
-floop-block -floop-interchange -floop-strip-mine -floop-nest-optimize @gol
-floop-parallelize-all -flto -flto-compression-level @gol
@@ -6742,6 +6743,7 @@ also turns on the following optimization flags:
-finline-small-functions @gol
-findirect-inlining @gol
-fipa-sra @gol
+-fisolate-erroneous-paths @gol
-foptimize-sibling-calls @gol
-fpartial-inlining @gol
-fpeephole2 @gol
@@ -7635,6 +7637,11 @@ it may significantly increase code size
(see @option{--param ipcp-unit-growth=@var{value}}).
This flag is enabled by default at @option{-O3}.
+@item -fisolate-erroneous-paths
+Detect paths which trigger erroneous or undefined behaviour. Isolate those
+paths from the main control flow and turn the statement with erroneous or
+undefined behaviour into a trap.
+
@item -ftree-sink
@opindex ftree-sink
Perform forward store motion on trees. This flag is
diff --git a/gcc/gimple-ssa-isolate-paths.c b/gcc/gimple-ssa-isolate-paths.c
index 4868867308f..983ed4d7602 100644
--- a/gcc/gimple-ssa-isolate-paths.c
+++ b/gcc/gimple-ssa-isolate-paths.c
@@ -283,8 +283,7 @@ gate_isolate_erroneous_paths (void)
{
/* If we do not have a suitable builtin function for the trap statement,
then do not perform the optimization. */
- return (flag_isolate_erroneous_paths != 0
- && builtin_decl_explicit (BUILT_IN_TRAP) != NULL);
+ return (flag_isolate_erroneous_paths != 0);
}
namespace {
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index d6a75fe1981..4cb9e461a40 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,7 @@
+2013-11-07 Jeff Law <law@redhat.com>
+
+ * builtins.c (initialize_builtins): Provide __builtin_trap.
+
2013-10-29 David Malcolm <dmalcolm@redhat.com>
Patch autogenerated by refactor_symtab.py from
diff --git a/gcc/java/builtins.c b/gcc/java/builtins.c
index f971a6fb25e..c05543782ae 100644
--- a/gcc/java/builtins.c
+++ b/gcc/java/builtins.c
@@ -579,7 +579,9 @@ initialize_builtins (void)
define_builtin (BUILT_IN_RETURN_ADDRESS, "__builtin_return_address",
build_function_type_list (ptr_type_node, int_type_node, NULL_TREE),
"__builtin_return_address", ECF_NOTHROW | ECF_LEAF);
-
+ define_builtin (BUILT_IN_TRAP, "__builtin_trap",
+ build_function_type_list (void_type_node, NULL_TREE),
+ "__builtin_trap", ECF_NOTHROW | ECF_LEAF | ECF_NORETURN);
build_common_builtin_nodes ();
}