Add 'notail' marker for call instructions.

This marker prevents optimization passes from adding 'tail' or
'musttail' markers to a call. Is is used to prevent tail call
optimization from being performed on the call.

rdar://problem/22667622

Differential Revision: http://reviews.llvm.org/D12923

llvm-svn: 252368
This commit is contained in:
Akira Hatanaka
2015-11-06 23:55:38 +00:00
parent 6e680b2be7
commit 5cfcce12eb
11 changed files with 56 additions and 6 deletions

View File

@@ -2131,7 +2131,8 @@ static void WriteInstruction(const Instruction &I, unsigned InstID,
Vals.push_back(VE.getAttributeID(CI.getAttributes()));
Vals.push_back((CI.getCallingConv() << 1) | unsigned(CI.isTailCall()) |
unsigned(CI.isMustTailCall()) << 14 | 1 << 15);
unsigned(CI.isMustTailCall()) << 14 | 1 << 15 |
unsigned(CI.isNoTailCall()) << 16);
Vals.push_back(VE.getTypeID(FTy));
PushValueAndType(CI.getCalledValue(), InstID, Vals, VE); // Callee