[llvm-commits] CVS: llvm/lib/Transforms/ExprTypeConvert.cpp LevelRaise.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sat May 14 05:28:49 PDT 2005
Changes in directory llvm/lib/Transforms:
ExprTypeConvert.cpp updated: 1.105 -> 1.106
LevelRaise.cpp updated: 1.106 -> 1.107
---
Log message:
Preserve calling conv when hacking on calls
---
Diffs of the changes: (+6 -0)
ExprTypeConvert.cpp | 4 ++++
LevelRaise.cpp | 2 ++
2 files changed, 6 insertions(+)
Index: llvm/lib/Transforms/ExprTypeConvert.cpp
diff -u llvm/lib/Transforms/ExprTypeConvert.cpp:1.105 llvm/lib/Transforms/ExprTypeConvert.cpp:1.106
--- llvm/lib/Transforms/ExprTypeConvert.cpp:1.105 Fri May 6 01:46:58 2005
+++ llvm/lib/Transforms/ExprTypeConvert.cpp Sat May 14 07:28:32 2005
@@ -525,6 +525,7 @@
Name);
if (cast<CallInst>(I)->isTailCall())
cast<CallInst>(Res)->setTailCall();
+ cast<CallInst>(Res)->setCallingConv(cast<CallInst>(I)->getCallingConv());
VMC.ExprMap[I] = Res;
Res->setOperand(0, ConvertExpressionToType(I->getOperand(0),NewPTy,VMC,TD));
break;
@@ -1218,6 +1219,9 @@
}
Res = new CallInst(Meth, Params, Name);
+ if (cast<CallInst>(I)->isTailCall())
+ cast<CallInst>(Res)->setTailCall();
+ cast<CallInst>(Res)->setCallingConv(cast<CallInst>(I)->getCallingConv());
break;
}
default:
Index: llvm/lib/Transforms/LevelRaise.cpp
diff -u llvm/lib/Transforms/LevelRaise.cpp:1.106 llvm/lib/Transforms/LevelRaise.cpp:1.107
--- llvm/lib/Transforms/LevelRaise.cpp:1.106 Thu Apr 21 18:45:55 2005
+++ llvm/lib/Transforms/LevelRaise.cpp Sat May 14 07:28:32 2005
@@ -538,6 +538,8 @@
// Create a new call instruction...
CallInst *NewCall = new CallInst(NewCast,
std::vector<Value*>(CI->op_begin()+1, CI->op_end()));
+ if (CI->isTailCall()) NewCall->setTailCall();
+ NewCall->setCallingConv(CI->getCallingConv());
++BI;
ReplaceInstWithInst(CI, NewCall);
More information about the llvm-commits
mailing list