summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser/LLParser.h
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2014-04-24 20:14:34 +0000
committerReid Kleckner <reid@kleckner.net>2014-04-24 20:14:34 +0000
commit5772b77789728e045ccd8c93d79820632e81c4e6 (patch)
tree6f4029a3081e1f1e6a0f9e9576737c5506e59bd1 /llvm/lib/AsmParser/LLParser.h
parent0fbb1e91e57829d277bbea3ef1402ee7bc871dea (diff)
downloadbcm5719-llvm-5772b77789728e045ccd8c93d79820632e81c4e6.tar.gz
bcm5719-llvm-5772b77789728e045ccd8c93d79820632e81c4e6.zip
Add 'musttail' marker to call instructions
This is similar to the 'tail' marker, except that it guarantees that tail call optimization will occur. It also comes with convervative IR verification rules that ensure that tail call optimization is possible. Reviewers: nicholas Differential Revision: http://llvm-reviews.chandlerc.com/D3240 llvm-svn: 207143
Diffstat (limited to 'llvm/lib/AsmParser/LLParser.h')
-rw-r--r--llvm/lib/AsmParser/LLParser.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/AsmParser/LLParser.h b/llvm/lib/AsmParser/LLParser.h
index f5c8a5a26d1..e2bf46290b3 100644
--- a/llvm/lib/AsmParser/LLParser.h
+++ b/llvm/lib/AsmParser/LLParser.h
@@ -372,6 +372,8 @@ namespace llvm {
bool ParseFunctionBody(Function &Fn);
bool ParseBasicBlock(PerFunctionState &PFS);
+ enum TailCallType { TCT_None, TCT_Tail, TCT_MustTail };
+
// Instruction Parsing. Each instruction parsing routine can return with a
// normal result, an error result, or return having eaten an extra comma.
enum InstResult { InstNormal = 0, InstError = 1, InstExtraComma = 2 };
@@ -398,7 +400,8 @@ namespace llvm {
bool ParseShuffleVector(Instruction *&I, PerFunctionState &PFS);
int ParsePHI(Instruction *&I, PerFunctionState &PFS);
bool ParseLandingPad(Instruction *&I, PerFunctionState &PFS);
- bool ParseCall(Instruction *&I, PerFunctionState &PFS, bool isTail);
+ bool ParseCall(Instruction *&I, PerFunctionState &PFS,
+ CallInst::TailCallKind IsTail);
int ParseAlloc(Instruction *&I, PerFunctionState &PFS);
int ParseLoad(Instruction *&I, PerFunctionState &PFS);
int ParseStore(Instruction *&I, PerFunctionState &PFS);
OpenPOWER on IntegriCloud