summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86InstrInfo.h
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2017-02-16 00:04:05 +0000
committerHans Wennborg <hans@hanshq.net>2017-02-16 00:04:05 +0000
commita468601e0eadd6b4cc5d56e5aa729320a296fa46 (patch)
tree65eb408e24d23a40aa0865d36f7cd0b3fdcff5c5 /llvm/lib/Target/X86/X86InstrInfo.h
parentd77a6730b181d6eea672c30e3a736c1281a9a3f0 (diff)
downloadbcm5719-llvm-a468601e0eadd6b4cc5d56e5aa729320a296fa46.tar.gz
bcm5719-llvm-a468601e0eadd6b4cc5d56e5aa729320a296fa46.zip
[X86] Re-enable conditional tail calls and fix PR31257.
This reverts r294348, which removed support for conditional tail calls due to the PR above. It fixes the PR by marking live registers as implicitly used and defined by the now predicated tailcall. This is similar to how IfConversion predicates instructions. Differential Revision: https://reviews.llvm.org/D29856 llvm-svn: 295262
Diffstat (limited to 'llvm/lib/Target/X86/X86InstrInfo.h')
-rw-r--r--llvm/lib/Target/X86/X86InstrInfo.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86InstrInfo.h b/llvm/lib/Target/X86/X86InstrInfo.h
index 0d4bc5d0fb6..c2644a35e48 100644
--- a/llvm/lib/Target/X86/X86InstrInfo.h
+++ b/llvm/lib/Target/X86/X86InstrInfo.h
@@ -316,6 +316,13 @@ public:
// Branch analysis.
bool isUnpredicatedTerminator(const MachineInstr &MI) const override;
+ bool isUnconditionalTailCall(const MachineInstr &MI) const override;
+ bool canMakeTailCallConditional(SmallVectorImpl<MachineOperand> &Cond,
+ const MachineInstr &TailCall) const override;
+ void replaceBranchWithTailCall(MachineBasicBlock &MBB,
+ SmallVectorImpl<MachineOperand> &Cond,
+ const MachineInstr &TailCall) const override;
+
bool analyzeBranch(MachineBasicBlock &MBB, MachineBasicBlock *&TBB,
MachineBasicBlock *&FBB,
SmallVectorImpl<MachineOperand> &Cond,
OpenPOWER on IntegriCloud