mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207143 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1469,7 +1469,8 @@ static void WriteInstruction(const Instruction &I, unsigned InstID,
|
||||
Code = bitc::FUNC_CODE_INST_CALL;
|
||||
|
||||
Vals.push_back(VE.getAttributeID(CI.getAttributes()));
|
||||
Vals.push_back((CI.getCallingConv() << 1) | unsigned(CI.isTailCall()));
|
||||
Vals.push_back((CI.getCallingConv() << 1) | unsigned(CI.isTailCall()) |
|
||||
unsigned(CI.isMustTailCall()) << 14);
|
||||
PushValueAndType(CI.getCalledValue(), InstID, Vals, VE); // Callee
|
||||
|
||||
// Emit value #'s for the fixed parameters.
|
||||
|
Reference in New Issue
Block a user