//===- InstCombineCalls.cpp -----------------------------------------------===////// The LLVM Compiler Infrastructure//// This file is distributed under the University of Illinois Open Source// License. See LICENSE.TXT for details.////===----------------------------------------------------------------------===////// This file implements the visitCall and visitInvoke functions.////===----------------------------------------------------------------------===//#include"InstCombine.h"#include"llvm/Support/CallSite.h"#include"llvm/Target/TargetData.h"#include"llvm/Analysis/MemoryBuiltins.h"#include"llvm/Transforms/Utils/BuildLibCalls.h"#include"llvm/Transforms/Utils/Local.h"usingnamespacellvm;/// getPromotedType - Return the specified type promoted as it would be to pass/// though a va_arg area.staticType*getPromotedType(Type*Ty){if(IntegerType*ITy=dyn_cast<IntegerType>(Ty)){if(ITy->getBitWidth()<32)returnType::getInt32Ty(Ty->getContext());}returnTy;}Instruction*InstCombiner::SimplifyMemTransfer(MemIntrinsic*MI){unsignedDstAlign=getKnownAlignment(MI->getArgOperand(0),TD);unsignedSrcAlign=