[Hexagon] Treat non-returning indirect calls as scheduling boundaries
authorKrzysztof Parzyszek <kparzysz@codeaurora.org>
Fri, 12 Aug 2016 11:01:10 +0000 (11:01 +0000)
committerKrzysztof Parzyszek <kparzysz@codeaurora.org>
Fri, 12 Aug 2016 11:01:10 +0000 (11:01 +0000)
llvm-svn: 278498

llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp

index ec3a30f..3cad6a6 100644 (file)
@@ -1447,6 +1447,9 @@ bool HexagonInstrInfo::isSchedulingBoundary(const MachineInstr &MI,
 
   // Throwing call is a boundary.
   if (MI.isCall()) {
+    // Don't mess around with no return calls.
+    if (doesNotReturn(MI))
+      return true;
     // If any of the block's successors is a landing pad, this could be a
     // throwing call.
     for (auto I : MBB->successors())
@@ -1454,10 +1457,6 @@ bool HexagonInstrInfo::isSchedulingBoundary(const MachineInstr &MI,
         return true;
   }
 
-  // Don't mess around with no return calls.
-  if (MI.getOpcode() == Hexagon::CALLv3nr)
-    return true;
-
   // Terminators and labels can't be scheduled around.
   if (MI.getDesc().isTerminator() || MI.isPosition())
     return true;