diff options
Diffstat (limited to 'lib/Analysis/TargetTransformInfo.cpp')
| -rw-r--r-- | lib/Analysis/TargetTransformInfo.cpp | 25 | 
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/Analysis/TargetTransformInfo.cpp b/lib/Analysis/TargetTransformInfo.cpp index f938a9a52065..94bbc58541a7 100644 --- a/lib/Analysis/TargetTransformInfo.cpp +++ b/lib/Analysis/TargetTransformInfo.cpp @@ -16,6 +16,7 @@  #include "llvm/IR/IntrinsicInst.h"  #include "llvm/IR/Module.h"  #include "llvm/IR/Operator.h" +#include "llvm/Support/CommandLine.h"  #include "llvm/Support/ErrorHandling.h"  #include <utility> @@ -23,6 +24,11 @@ using namespace llvm;  #define DEBUG_TYPE "tti" +static cl::opt<bool> UseWideMemcpyLoopLowering( +    "use-wide-memcpy-loop-lowering", cl::init(false), +    cl::desc("Enables the new wide memcpy loop lowering in Transforms/Utils."), +    cl::Hidden); +  namespace {  /// \brief No-op implementation of the TTI interface using the utility base  /// classes. @@ -482,6 +488,25 @@ Value *TargetTransformInfo::getOrCreateResultFromMemIntrinsic(    return TTIImpl->getOrCreateResultFromMemIntrinsic(Inst, ExpectedType);  } +Type *TargetTransformInfo::getMemcpyLoopLoweringType(LLVMContext &Context, +                                                     Value *Length, +                                                     unsigned SrcAlign, +                                                     unsigned DestAlign) const { +  return TTIImpl->getMemcpyLoopLoweringType(Context, Length, SrcAlign, +                                            DestAlign); +} + +void TargetTransformInfo::getMemcpyLoopResidualLoweringType( +    SmallVectorImpl<Type *> &OpsOut, LLVMContext &Context, +    unsigned RemainingBytes, unsigned SrcAlign, unsigned DestAlign) const { +  TTIImpl->getMemcpyLoopResidualLoweringType(OpsOut, Context, RemainingBytes, +                                             SrcAlign, DestAlign); +} + +bool TargetTransformInfo::useWideIRMemcpyLoopLowering() const { +  return UseWideMemcpyLoopLowering; +} +  bool TargetTransformInfo::areInlineCompatible(const Function *Caller,                                                const Function *Callee) const {    return TTIImpl->areInlineCompatible(Caller, Callee);  | 
