diff options
author | Krzysztof Parzyszek <kparzysz@codeaurora.org> | 2018-09-21 17:40:35 +0000 |
---|---|---|
committer | Krzysztof Parzyszek <kparzysz@codeaurora.org> | 2018-09-21 17:40:35 +0000 |
commit | 5805def9c8ee4dbb9cce9f6696dc1c22c4b247b9 (patch) | |
tree | 37370bf6f6a00d26e6bedc81adc834b75dd0d41f /llvm/lib/Target/Hexagon/HexagonConstExtenders.cpp | |
parent | 72c475276e6d72a34c34a5cfe2cea97cd1e3cdf2 (diff) | |
download | bcm5719-llvm-5805def9c8ee4dbb9cce9f6696dc1c22c4b247b9.tar.gz bcm5719-llvm-5805def9c8ee4dbb9cce9f6696dc1c22c4b247b9.zip |
[Hexagon] Avoid functions with exception handling in HexagonConstExtenders
The constant-extender optimization does a form of code motion, which is
complicated in the presence of exception handling.
llvm-svn: 342751
Diffstat (limited to 'llvm/lib/Target/Hexagon/HexagonConstExtenders.cpp')
-rw-r--r-- | llvm/lib/Target/Hexagon/HexagonConstExtenders.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Target/Hexagon/HexagonConstExtenders.cpp b/llvm/lib/Target/Hexagon/HexagonConstExtenders.cpp index efbf6fe9c36..b877ed7d5a9 100644 --- a/llvm/lib/Target/Hexagon/HexagonConstExtenders.cpp +++ b/llvm/lib/Target/Hexagon/HexagonConstExtenders.cpp @@ -1933,6 +1933,11 @@ const MachineOperand &HCE::getStoredValueOp(const MachineInstr &MI) const { bool HCE::runOnMachineFunction(MachineFunction &MF) { if (skipFunction(MF.getFunction())) return false; + if (MF.getFunction().hasPersonalityFn()) { + LLVM_DEBUG(dbgs() << getPassName() << ": skipping " << MF.getName() + << " due to exception handling\n"); + return false; + } LLVM_DEBUG(MF.print(dbgs() << "Before " << getPassName() << '\n', nullptr)); HII = MF.getSubtarget<HexagonSubtarget>().getInstrInfo(); |