From: Krzysztof Parzyszek Date: Fri, 12 Aug 2016 11:01:10 +0000 (+0000) Subject: [Hexagon] Treat non-returning indirect calls as scheduling boundaries X-Git-Tag: llvmorg-4.0.0-rc1~12608 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ab9127ca3c98391fc83f46842263bc6b3c1323f8;p=platform%2Fupstream%2Fllvm.git [Hexagon] Treat non-returning indirect calls as scheduling boundaries llvm-svn: 278498 --- diff --git a/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp b/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp index ec3a30f..3cad6a6 100644 --- a/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp +++ b/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp @@ -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;