avr.c (avr_option_override): Set PARAM_ALLOW_STORE_DATA_RACES to 1.
authorSenthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
Tue, 2 Feb 2016 16:01:45 +0000 (16:01 +0000)
committerDenis Chertykov <denisc@gcc.gnu.org>
Tue, 2 Feb 2016 16:01:45 +0000 (19:01 +0300)
* config/avr/avr.c (avr_option_override): Set
PARAM_ALLOW_STORE_DATA_RACES to 1.

From-SVN: r233078

gcc/ChangeLog
gcc/config/avr/avr.c

index 3b548f56a9d07c4edf4614d1cd3f0b67d80657b9..c2d824e303ee5f73d2459619b8a2f62f4c28cae5 100644 (file)
@@ -1,3 +1,8 @@
+2016-02-02  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>
+
+       * config/avr/avr.c (avr_option_override): Set
+       PARAM_ALLOW_STORE_DATA_RACES to 1.
+
 2016-02-02  Richard Biener  <rguenther@suse.de>
 
        PR tree-optimization/69595
index e5577726c96296069a93df224b16d67dec9ed56c..a7728e3b10cf0a9545da42e56856d4d6d3aaa84a 100644 (file)
@@ -43,6 +43,7 @@
 #include "expr.h"
 #include "langhooks.h"
 #include "cfgrtl.h"
+#include "params.h"
 #include "builtins.h"
 #include "context.h"
 #include "tree-pass.h"
@@ -410,6 +411,15 @@ avr_option_override (void)
   if (avr_strict_X)
     flag_caller_saves = 0;
 
+  /* Allow optimizer to introduce store data races. This used to be the
+     default - it was changed because bigger targets did not see any
+     performance decrease. For the AVR though, disallowing data races
+     introduces additional code in LIM and increases reg pressure.  */
+
+  maybe_set_param_value (PARAM_ALLOW_STORE_DATA_RACES, 1,
+      global_options.x_param_values,
+      global_options_set.x_param_values);
+
   /* Unwind tables currently require a frame pointer for correctness,
      see toplev.c:process_options().  */