]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
sched-deps.c (sched_analyze_2): Also force pending loads from memory.
authorUros Bizjak <ubizjak@gmail.com>
Fri, 20 May 2016 15:42:18 +0000 (17:42 +0200)
committerUros Bizjak <uros@gcc.gnu.org>
Fri, 20 May 2016 15:42:18 +0000 (17:42 +0200)
* sched-deps.c (sched_analyze_2) <case TRAP_IF>: Also
force pending loads from memory.

From-SVN: r236518

gcc/ChangeLog
gcc/sched-deps.c

index 202f3269cf1bb13bddd988ea11dc4e4d2af36367..739e638374aa178726df5285eaad9bed6e2d743e 100644 (file)
@@ -1,3 +1,8 @@
+2016-05-20  Uros Bizjak  <ubizjak@gmail.com>
+
+       * sched-deps.c (sched_analyze_2) <case TRAP_IF>: Also
+       force pending loads from memory.
+
 2016-05-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
 
        Backport from mainline
index dc87187459e4ec9109937fa6b32fdfae64d220a7..1c7f0fbf0fbeac54fbd087cf90c47177301c0eea 100644 (file)
@@ -2714,9 +2714,12 @@ sched_analyze_2 (struct deps_desc *deps, rtx x, rtx insn)
        return;
       }
 
-    /* Force pending stores to memory in case a trap handler needs them.  */
+    /* Force pending stores to memory in case a trap handler needs them.
+       Also force pending loads from memory; loads and stores can segfault
+       and the signal handler won't be triggered if the trap insn was moved
+       above load or store insn.  */
     case TRAP_IF:
-      flush_pending_lists (deps, insn, true, false);
+      flush_pending_lists (deps, insn, true, true);
       break;
 
     case PREFETCH: