diff options
author | Chris Lattner <sabre@nondot.org> | 2009-03-22 00:32:22 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-03-22 00:32:22 +0000 |
commit | 3403084886b3d0fc23eee2b5708f0ac0329423e0 (patch) | |
tree | 5365adb28ee4395cb60d7e56c4f23d2bd0a4ffb1 /lib/CodeGen/CGCall.cpp | |
parent | f1466848dce9c4c75d96a6cabdc8db560e26aac8 (diff) |
don't set the name of a call instruction to "call" in release-asserts
build. This shaves another 3% off.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67460 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCall.cpp')
-rw-r--r-- | lib/CodeGen/CGCall.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp index fd33b50e79..d7f52c6295 100644 --- a/lib/CodeGen/CGCall.cpp +++ b/lib/CodeGen/CGCall.cpp @@ -1815,29 +1815,29 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, } llvm::Instruction *CI = CS.getInstruction(); - if (CI->getType() != llvm::Type::VoidTy) + if (Builder.isNamePreserving() && CI->getType() != llvm::Type::VoidTy) CI->setName("call"); switch (RetAI.getKind()) { case ABIArgInfo::Indirect: if (RetTy->isAnyComplexType()) return RValue::getComplex(LoadComplexFromAddr(Args[0], false)); - else if (CodeGenFunction::hasAggregateLLVMType(RetTy)) + if (CodeGenFunction::hasAggregateLLVMType(RetTy)) return RValue::getAggregate(Args[0]); - else - return RValue::get(EmitLoadOfScalar(Args[0], false, RetTy)); + return RValue::get(EmitLoadOfScalar(Args[0], false, RetTy)); case ABIArgInfo::Direct: if (RetTy->isAnyComplexType()) { llvm::Value *Real = Builder.CreateExtractValue(CI, 0); llvm::Value *Imag = Builder.CreateExtractValue(CI, 1); return RValue::getComplex(std::make_pair(Real, Imag)); - } else if (CodeGenFunction::hasAggregateLLVMType(RetTy)) { + } + if (CodeGenFunction::hasAggregateLLVMType(RetTy)) { llvm::Value *V = CreateTempAlloca(ConvertTypeForMem(RetTy), "agg.tmp"); Builder.CreateStore(CI, V); return RValue::getAggregate(V); - } else - return RValue::get(CI); + } + return RValue::get(CI); case ABIArgInfo::Ignore: // If we are ignoring an argument that had a result, make sure to @@ -1850,10 +1850,9 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, CreateCoercedStore(CI, V, *this); if (RetTy->isAnyComplexType()) return RValue::getComplex(LoadComplexFromAddr(V, false)); - else if (CodeGenFunction::hasAggregateLLVMType(RetTy)) + if (CodeGenFunction::hasAggregateLLVMType(RetTy)) return RValue::getAggregate(V); - else - return RValue::get(EmitLoadOfScalar(V, false, RetTy)); + return RValue::get(EmitLoadOfScalar(V, false, RetTy)); } case ABIArgInfo::Expand: |