summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp
diff options
context:
space:
mode:
authorKrzysztof Parzyszek <kparzysz@codeaurora.org>2017-05-05 22:13:57 +0000
committerKrzysztof Parzyszek <kparzysz@codeaurora.org>2017-05-05 22:13:57 +0000
commitee93e009c8721eefebc85fcd763fd10343714977 (patch)
tree0b7e9d984ef90e4043f07bc02a20f2db6ca54335 /llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp
parente260332838c4f70bf03fd7a47662331d1a64920f (diff)
downloadbcm5719-llvm-ee93e009c8721eefebc85fcd763fd10343714977.tar.gz
bcm5719-llvm-ee93e009c8721eefebc85fcd763fd10343714977.zip
[Hexagon] Disable predicated calls by default
llvm-svn: 302307
Diffstat (limited to 'llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp')
-rw-r--r--llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp b/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp
index 0971300c962..03794511414 100644
--- a/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp
@@ -1467,7 +1467,15 @@ bool HexagonInstrInfo::DefinesPredicate(
}
bool HexagonInstrInfo::isPredicable(const MachineInstr &MI) const {
- return MI.getDesc().isPredicable();
+ if (!MI.getDesc().isPredicable())
+ return false;
+
+ if (MI.isCall() || isTailCall(MI)) {
+ const MachineFunction &MF = *MI.getParent()->getParent();
+ if (!MF.getSubtarget<HexagonSubtarget>().usePredicatedCalls())
+ return false;
+ }
+ return true;
}
bool HexagonInstrInfo::isSchedulingBoundary(const MachineInstr &MI,
OpenPOWER on IntegriCloud