Home
last modified time | relevance | path

Searched refs:CI (Results 1 – 25 of 372) sorted by relevance

12345678910>>...15

/external/clang/lib/Frontend/
DFrontendAction.cpp125 ASTConsumer* FrontendAction::CreateWrappedASTConsumer(CompilerInstance &CI, in CreateWrappedASTConsumer() argument
127 ASTConsumer* Consumer = CreateASTConsumer(CI, InFile); in CreateWrappedASTConsumer()
131 if (CI.getFrontendOpts().AddPluginActions.size() == 0) in CreateWrappedASTConsumer()
138 for (size_t i = 0, e = CI.getFrontendOpts().AddPluginActions.size(); in CreateWrappedASTConsumer()
146 if (it->getName() == CI.getFrontendOpts().AddPluginActions[i]) { in CreateWrappedASTConsumer()
149 if (P->ParseArgs(CI, CI.getFrontendOpts().AddPluginArgs[i])) in CreateWrappedASTConsumer()
150 Consumers.push_back(c->CreateASTConsumer(CI, InFile)); in CreateWrappedASTConsumer()
158 bool FrontendAction::BeginSourceFile(CompilerInstance &CI, in BeginSourceFile() argument
163 setCompilerInstance(&CI); in BeginSourceFile()
165 if (!BeginInvocation(CI)) in BeginSourceFile()
[all …]
DFrontendActions.cpp35 ASTConsumer *InitOnlyAction::CreateASTConsumer(CompilerInstance &CI, in CreateASTConsumer() argument
47 ASTConsumer *ASTPrintAction::CreateASTConsumer(CompilerInstance &CI, in CreateASTConsumer() argument
49 if (raw_ostream *OS = CI.createDefaultOutputFile(false, InFile)) in CreateASTConsumer()
54 ASTConsumer *ASTDumpAction::CreateASTConsumer(CompilerInstance &CI, in CreateASTConsumer() argument
59 ASTConsumer *ASTDumpXMLAction::CreateASTConsumer(CompilerInstance &CI, in CreateASTConsumer() argument
62 if (CI.getFrontendOpts().OutputFile.empty()) in CreateASTConsumer()
65 OS = CI.createDefaultOutputFile(false, InFile); in CreateASTConsumer()
70 ASTConsumer *ASTViewAction::CreateASTConsumer(CompilerInstance &CI, in CreateASTConsumer() argument
75 ASTConsumer *DeclContextPrintAction::CreateASTConsumer(CompilerInstance &CI, in CreateASTConsumer() argument
80 ASTConsumer *GeneratePCHAction::CreateASTConsumer(CompilerInstance &CI, in CreateASTConsumer() argument
[all …]
DASTMerge.cpp19 ASTConsumer *ASTMergeAction::CreateASTConsumer(CompilerInstance &CI, in CreateASTConsumer() argument
21 return AdaptedAction->CreateASTConsumer(CI, InFile); in CreateASTConsumer()
24 bool ASTMergeAction::BeginSourceFileAction(CompilerInstance &CI, in BeginSourceFileAction() argument
30 AdaptedAction->setCompilerInstance(&CI); in BeginSourceFileAction()
31 return AdaptedAction->BeginSourceFileAction(CI, Filename); in BeginSourceFileAction()
35 CompilerInstance &CI = getCompilerInstance(); in ExecuteAction() local
36 CI.getDiagnostics().getClient()->BeginSourceFile( in ExecuteAction()
37 CI.getASTContext().getLangOpts()); in ExecuteAction()
38 CI.getDiagnostics().SetArgToStringFn(&FormatASTNodeDiagnosticArgument, in ExecuteAction()
39 &CI.getASTContext()); in ExecuteAction()
[all …]
/external/llvm/lib/CodeGen/
DIntrinsicLowering.cpp65 static CallInst *ReplaceCallWith(const char *NewFn, CallInst *CI, in ReplaceCallWith() argument
70 Module *M = CI->getParent()->getParent()->getParent(); in ReplaceCallWith()
78 IRBuilder<> Builder(CI->getParent(), CI); in ReplaceCallWith()
81 NewCI->setName(CI->getName()); in ReplaceCallWith()
82 if (!CI->use_empty()) in ReplaceCallWith()
83 CI->replaceAllUsesWith(NewCI); in ReplaceCallWith()
317 static void ReplaceFPIntrinsicWithCall(CallInst *CI, const char *Fname, in ReplaceFPIntrinsicWithCall() argument
320 CallSite CS(CI); in ReplaceFPIntrinsicWithCall()
321 switch (CI->getArgOperand(0)->getType()->getTypeID()) { in ReplaceFPIntrinsicWithCall()
324 ReplaceCallWith(Fname, CI, CS.arg_begin(), CS.arg_end(), in ReplaceFPIntrinsicWithCall()
[all …]
DGCStrategy.cpp243 if (CallInst *CI = dyn_cast<CallInst>(I)) in CouldBecomeSafePoint() local
244 if (Function *F = CI->getCalledFunction()) in CouldBecomeSafePoint()
290 if (IntrinsicInst *CI = dyn_cast<IntrinsicInst>(II++)) { in PerformDefaultLowering() local
291 Function *F = CI->getCalledFunction(); in PerformDefaultLowering()
296 Value *St = new StoreInst(CI->getArgOperand(0), in PerformDefaultLowering()
297 CI->getArgOperand(2), CI); in PerformDefaultLowering()
298 CI->replaceAllUsesWith(St); in PerformDefaultLowering()
299 CI->eraseFromParent(); in PerformDefaultLowering()
305 Value *Ld = new LoadInst(CI->getArgOperand(1), "", CI); in PerformDefaultLowering()
306 Ld->takeName(CI); in PerformDefaultLowering()
[all …]
/external/clang/lib/Rewrite/
DFrontendActions.cpp33 ASTConsumer *HTMLPrintAction::CreateASTConsumer(CompilerInstance &CI, in CreateASTConsumer() argument
35 if (raw_ostream *OS = CI.createDefaultOutputFile(false, InFile)) in CreateASTConsumer()
36 return CreateHTMLPrinter(OS, CI.getPreprocessor()); in CreateASTConsumer()
43 ASTConsumer *FixItAction::CreateASTConsumer(CompilerInstance &CI, in CreateASTConsumer() argument
89 bool FixItAction::BeginSourceFileAction(CompilerInstance &CI, in BeginSourceFileAction() argument
99 Rewriter.reset(new FixItRewriter(CI.getDiagnostics(), CI.getSourceManager(), in BeginSourceFileAction()
100 CI.getLangOpts(), FixItOpts.get())); in BeginSourceFileAction()
109 bool FixItRecompile::BeginInvocation(CompilerInstance &CI) { in BeginInvocation() argument
114 const FrontendOptions &FEOpts = CI.getFrontendOpts(); in BeginInvocation()
116 if (FixAction->BeginSourceFile(CI, FEOpts.Inputs[0])) { in BeginInvocation()
[all …]
/external/llvm/lib/Analysis/
DMemoryBuiltins.cpp33 static bool isMallocCall(const CallInst *CI) { in isMallocCall() argument
34 if (!CI) in isMallocCall()
37 Function *Callee = CI->getCalledFunction(); in isMallocCall()
61 const CallInst *CI = dyn_cast<CallInst>(I); in extractMallocCall() local
62 return (isMallocCall(CI)) ? CI : NULL; in extractMallocCall()
66 CallInst *CI = dyn_cast<CallInst>(I); in extractMallocCall() local
67 return (isMallocCall(CI)) ? CI : NULL; in extractMallocCall()
91 static Value *computeArraySize(const CallInst *CI, const TargetData *TD, in computeArraySize() argument
93 if (!CI) in computeArraySize()
97 Type *T = getMallocAllocatedType(CI); in computeArraySize()
[all …]
/external/llvm/lib/Transforms/Scalar/
DSimplifyLibCalls.cpp63 virtual Value *CallOptimizer(Function *Callee, CallInst *CI, IRBuilder<> &B)
66 Value *OptimizeCall(CallInst *CI, const TargetData *TD, in OptimizeCall() argument
68 Caller = CI->getParent()->getParent(); in OptimizeCall()
71 if (CI->getCalledFunction()) in OptimizeCall()
72 Context = &CI->getCalledFunction()->getContext(); in OptimizeCall()
75 if (CI->getCallingConv() != llvm::CallingConv::C) in OptimizeCall()
78 return CallOptimizer(CI->getCalledFunction(), CI, B); in OptimizeCall()
104 static bool CallHasFloatingPointArgument(const CallInst *CI) { in CallHasFloatingPointArgument() argument
105 for (CallInst::const_op_iterator it = CI->op_begin(), e = CI->op_end(); in CallHasFloatingPointArgument()
135 virtual Value *CallOptimizer(Function *Callee, CallInst *CI, IRBuilder<> &B) { in CallOptimizer()
[all …]
DTailRecursionElimination.cpp92 bool EliminateRecursiveTailCall(CallInst *CI, ReturnInst *Ret,
106 bool CanMoveAboveCall(Instruction *I, CallInst *CI);
107 Value *CanTransformAccumulatorRecursion(Instruction *I, CallInst *CI);
219 if (CallInst *CI = dyn_cast<CallInst>(I)) { in runOnFunction() local
220 CI->setTailCall(); in runOnFunction()
232 bool TailCallElim::CanMoveAboveCall(Instruction *I, CallInst *CI) { in CanMoveAboveCall() argument
240 if (CI->mayHaveSideEffects()) { in CanMoveAboveCall()
245 if (CI->mayWriteToMemory() || in CanMoveAboveCall()
258 if (I->getOperand(i) == CI) in CanMoveAboveCall()
270 static bool isDynamicConstant(Value *V, CallInst *CI, ReturnInst *RI) { in isDynamicConstant() argument
[all …]
DCodeGenPrepare.cpp118 bool OptimizeCallInst(CallInst *CI);
391 static bool OptimizeNoopCopyExpression(CastInst *CI, const TargetLowering &TLI){ in OptimizeNoopCopyExpression() argument
393 EVT SrcVT = TLI.getValueType(CI->getOperand(0)->getType()); in OptimizeNoopCopyExpression()
394 EVT DstVT = TLI.getValueType(CI->getType()); in OptimizeNoopCopyExpression()
407 if (TLI.getTypeAction(CI->getContext(), SrcVT) == in OptimizeNoopCopyExpression()
409 SrcVT = TLI.getTypeToTransformTo(CI->getContext(), SrcVT); in OptimizeNoopCopyExpression()
410 if (TLI.getTypeAction(CI->getContext(), DstVT) == in OptimizeNoopCopyExpression()
412 DstVT = TLI.getTypeToTransformTo(CI->getContext(), DstVT); in OptimizeNoopCopyExpression()
418 BasicBlock *DefBB = CI->getParent(); in OptimizeNoopCopyExpression()
424 for (Value::use_iterator UI = CI->use_begin(), E = CI->use_end(); in OptimizeNoopCopyExpression()
[all …]
/external/llvm/lib/Transforms/InstCombine/
DInstCombineCasts.cpp28 if (ConstantInt *CI = dyn_cast<ConstantInt>(Val)) { in DecomposeSimpleLinearExpr() local
29 Offset = CI->getZExtValue(); in DecomposeSimpleLinearExpr()
79 Instruction *InstCombiner::PromoteCastOfAllocation(BitCastInst &CI, in PromoteCastOfAllocation() argument
84 PointerType *PTy = cast<PointerType>(CI.getType()); in PromoteCastOfAllocation()
148 return ReplaceInstUsesWith(CI, New); in PromoteCastOfAllocation()
229 const CastInst *CI, ///< The first cast instruction in isEliminableCastPair() argument
235 Type *SrcTy = CI->getOperand(0)->getType(); // A from above in isEliminableCastPair()
236 Type *MidTy = CI->getType(); // B from above in isEliminableCastPair()
239 Instruction::CastOps firstOp = Instruction::CastOps(CI->getOpcode()); in isEliminableCastPair()
244 TD ? TD->getIntPtrType(CI->getContext()) : 0); in isEliminableCastPair()
[all …]
DInstCombineCalls.cpp172 Instruction *InstCombiner::visitCallInst(CallInst &CI) { in visitCallInst() argument
173 if (isFreeCall(&CI)) in visitCallInst()
174 return visitFree(CI); in visitCallInst()
175 if (isMalloc(&CI)) in visitCallInst()
176 return visitMalloc(CI); in visitCallInst()
180 if (CI.getParent()->getParent()->doesNotThrow() && in visitCallInst()
181 !CI.doesNotThrow()) { in visitCallInst()
182 CI.setDoesNotThrow(); in visitCallInst()
183 return &CI; in visitCallInst()
186 IntrinsicInst *II = dyn_cast<IntrinsicInst>(&CI); in visitCallInst()
[all …]
/external/llvm/lib/Transforms/Utils/
DBuildLibCalls.cpp49 CallInst *CI = B.CreateCall(StrLen, CastToCStr(Ptr, B), "strlen"); in EmitStrLen() local
51 CI->setCallingConv(F->getCallingConv()); in EmitStrLen()
53 return CI; in EmitStrLen()
69 CallInst *CI = B.CreateCall2(StrChr, CastToCStr(Ptr, B), in EmitStrChr() local
72 CI->setCallingConv(F->getCallingConv()); in EmitStrChr()
73 return CI; in EmitStrChr()
92 CallInst *CI = B.CreateCall3(StrNCmp, CastToCStr(Ptr1, B), in EmitStrNCmp() local
96 CI->setCallingConv(F->getCallingConv()); in EmitStrNCmp()
98 return CI; in EmitStrNCmp()
112 CallInst *CI = B.CreateCall2(StrCpy, CastToCStr(Dst, B), CastToCStr(Src, B), in EmitStrCpy() local
[all …]
DLowerExpectIntrinsic.cpp60 CallInst *CI = dyn_cast<CallInst>(SI->getCondition()); in HandleSwitchExpect() local
61 if (!CI) in HandleSwitchExpect()
64 Function *Fn = CI->getCalledFunction(); in HandleSwitchExpect()
68 Value *ArgValue = CI->getArgOperand(0); in HandleSwitchExpect()
69 ConstantInt *ExpectedValue = dyn_cast<ConstantInt>(CI->getArgOperand(1)); in HandleSwitchExpect()
73 LLVMContext &Context = CI->getContext(); in HandleSwitchExpect()
110 CallInst *CI = dyn_cast<CallInst>(CmpI->getOperand(0)); in HandleIfExpect() local
111 if (!CI) in HandleIfExpect()
114 Function *Fn = CI->getCalledFunction(); in HandleIfExpect()
118 Value *ArgValue = CI->getArgOperand(0); in HandleIfExpect()
[all …]
/external/llvm/lib/VMCore/
DAutoUpgrade.cpp95 void llvm::UpgradeIntrinsicCall(CallInst *CI, Function *NewFn) { in UpgradeIntrinsicCall() argument
96 Function *F = CI->getCalledFunction(); in UpgradeIntrinsicCall()
97 LLVMContext &C = CI->getContext(); in UpgradeIntrinsicCall()
99 Builder.SetInsertPoint(CI->getParent(), CI); in UpgradeIntrinsicCall()
111 Rep = Builder.CreateICmpEQ(CI->getArgOperand(0), CI->getArgOperand(1), in UpgradeIntrinsicCall()
114 Rep = Builder.CreateSExt(Rep, CI->getType(), ""); in UpgradeIntrinsicCall()
117 Rep = Builder.CreateICmpSGT(CI->getArgOperand(0), CI->getArgOperand(1), in UpgradeIntrinsicCall()
120 Rep = Builder.CreateSExt(Rep, CI->getType(), ""); in UpgradeIntrinsicCall()
133 Value *Op0 = CI->getArgOperand(0); in UpgradeIntrinsicCall()
134 unsigned Imm = cast<ConstantInt>(CI->getArgOperand(1))->getZExtValue(); in UpgradeIntrinsicCall()
[all …]
DIRBuilder.cpp57 CallInst *CI = CallInst::Create(Callee, Ops, ""); in createCallHelper() local
58 Builder->GetInsertBlock()->getInstList().insert(Builder->GetInsertPoint(),CI); in createCallHelper()
59 Builder->SetInstDebugLocation(CI); in createCallHelper()
60 return CI; in createCallHelper()
72 CallInst *CI = createCallHelper(TheFn, Ops, this); in CreateMemSet() local
76 CI->setMetadata(LLVMContext::MD_tbaa, TBAATag); in CreateMemSet()
78 return CI; in CreateMemSet()
92 CallInst *CI = createCallHelper(TheFn, Ops, this); in CreateMemCpy() local
96 CI->setMetadata(LLVMContext::MD_tbaa, TBAATag); in CreateMemCpy()
98 return CI; in CreateMemCpy()
[all …]
DInstruction.cpp204 if (const CmpInst *CI = dyn_cast<CmpInst>(this)) in isIdenticalToWhenDefined() local
205 return CI->getPredicate() == cast<CmpInst>(I)->getPredicate(); in isIdenticalToWhenDefined()
206 if (const CallInst *CI = dyn_cast<CallInst>(this)) in isIdenticalToWhenDefined() local
207 return CI->isTailCall() == cast<CallInst>(I)->isTailCall() && in isIdenticalToWhenDefined()
208 CI->getCallingConv() == cast<CallInst>(I)->getCallingConv() && in isIdenticalToWhenDefined()
209 CI->getAttributes() == cast<CallInst>(I)->getAttributes(); in isIdenticalToWhenDefined()
210 if (const InvokeInst *CI = dyn_cast<InvokeInst>(this)) in isIdenticalToWhenDefined() local
211 return CI->getCallingConv() == cast<InvokeInst>(I)->getCallingConv() && in isIdenticalToWhenDefined()
212 CI->getAttributes() == cast<InvokeInst>(I)->getAttributes(); in isIdenticalToWhenDefined()
259 if (const CmpInst *CI = dyn_cast<CmpInst>(this)) in isSameOperationAs() local
[all …]
/external/clang/lib/ARCMigrate/
DARCMTActions.cpp17 bool CheckAction::BeginInvocation(CompilerInstance &CI) { in BeginInvocation() argument
18 if (arcmt::checkForManualIssues(CI.getInvocation(), getCurrentInput(), in BeginInvocation()
19 CI.getDiagnostics().getClient())) in BeginInvocation()
23 CI.getDiagnostics().setIgnoreAllWarnings(true); in BeginInvocation()
30 bool ModifyAction::BeginInvocation(CompilerInstance &CI) { in BeginInvocation() argument
31 return !arcmt::applyTransformations(CI.getInvocation(), getCurrentInput(), in BeginInvocation()
32 CI.getDiagnostics().getClient()); in BeginInvocation()
38 bool MigrateAction::BeginInvocation(CompilerInstance &CI) { in BeginInvocation() argument
39 if (arcmt::migrateWithTemporaryFiles(CI.getInvocation(), in BeginInvocation()
41 CI.getDiagnostics().getClient(), in BeginInvocation()
[all …]
DObjCMT.cpp93 ASTConsumer *ObjCMigrateAction::CreateASTConsumer(CompilerInstance &CI, in CreateASTConsumer() argument
96 WrappedConsumer = WrapperFrontendAction::CreateASTConsumer(CI, InFile); in CreateASTConsumer()
107 bool ObjCMigrateAction::BeginInvocation(CompilerInstance &CI) { in BeginInvocation() argument
108 Remapper.initFromDisk(MigrateDir, CI.getDiagnostics(), in BeginInvocation()
110 CompInst = &CI; in BeginInvocation()
111 CI.getDiagnostics().setIgnoreAllWarnings(true); in BeginInvocation()
112 CI.getPreprocessorOpts().DetailedRecord = true; in BeginInvocation()
113 CI.getPreprocessorOpts().DetailedRecordConditionalDirectives = true; in BeginInvocation()
211 bool MigrateSourceAction::BeginInvocation(CompilerInstance &CI) { in BeginInvocation() argument
212 CI.getPreprocessorOpts().DetailedRecord = true; in BeginInvocation()
[all …]
/external/clang/include/clang/Frontend/
DFrontendActions.h28 virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI,
43 virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI,
49 virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI,
55 virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI,
61 virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI,
67 virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI,
73 virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI,
87 static bool ComputeASTConsumerArguments(CompilerInstance &CI,
98 virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI,
108 virtual bool BeginSourceFileAction(CompilerInstance &CI, StringRef Filename);
[all …]
DFrontendAction.h37 ASTConsumer* CreateWrappedASTConsumer(CompilerInstance &CI,
58 virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI,
67 virtual bool BeginInvocation(CompilerInstance &CI) { return true; } in BeginInvocation() argument
74 virtual bool BeginSourceFileAction(CompilerInstance &CI, in BeginSourceFileAction() argument
188 bool BeginSourceFile(CompilerInstance &CI, const FrontendInputFile &Input);
218 virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI,
228 virtual bool ParseArgs(const CompilerInstance &CI,
238 virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI,
254 virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI,
256 virtual bool BeginInvocation(CompilerInstance &CI);
[all …]
/external/clang/lib/CodeGen/
DCodeGenAction.cpp303 static raw_ostream *GetOutputStream(CompilerInstance &CI, in GetOutputStream() argument
308 return CI.createDefaultOutputFile(false, InFile, "s"); in GetOutputStream()
310 return CI.createDefaultOutputFile(false, InFile, "ll"); in GetOutputStream()
312 return CI.createDefaultOutputFile(true, InFile, "bc"); in GetOutputStream()
317 return CI.createDefaultOutputFile(true, InFile, "o"); in GetOutputStream()
323 ASTConsumer *CodeGenAction::CreateASTConsumer(CompilerInstance &CI, in CreateASTConsumer() argument
326 OwningPtr<raw_ostream> OS(GetOutputStream(CI, InFile, BA)); in CreateASTConsumer()
334 const std::string &LinkBCFile = CI.getCodeGenOpts().LinkBitcodeFile; in CreateASTConsumer()
339 CI.getFileManager().getBufferForFile(LinkBCFile, &ErrorStr); in CreateASTConsumer()
341 CI.getDiagnostics().Report(diag::err_cannot_open_file) in CreateASTConsumer()
[all …]
/external/clang/include/clang/Lex/
DPreprocessorLexer.h98 PPConditionalInfo CI; in pushConditionalLevel() local
99 CI.IfLoc = DirectiveStart; in pushConditionalLevel()
100 CI.WasSkipping = WasSkipping; in pushConditionalLevel()
101 CI.FoundNonSkip = FoundNonSkip; in pushConditionalLevel()
102 CI.FoundElse = FoundElse; in pushConditionalLevel()
103 ConditionalStack.push_back(CI); in pushConditionalLevel()
105 void pushConditionalLevel(const PPConditionalInfo &CI) { in pushConditionalLevel() argument
106 ConditionalStack.push_back(CI); in pushConditionalLevel()
112 bool popConditionalLevel(PPConditionalInfo &CI) { in popConditionalLevel() argument
114 CI = ConditionalStack.back(); in popConditionalLevel()
/external/clang/include/clang/ARCMigrate/
DARCMTActions.h22 virtual bool BeginInvocation(CompilerInstance &CI);
30 virtual bool BeginInvocation(CompilerInstance &CI);
39 virtual bool BeginInvocation(CompilerInstance &CI);
40 virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI,
49 virtual bool BeginInvocation(CompilerInstance &CI);
70 virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI,StringRef InFile);
71 virtual bool BeginInvocation(CompilerInstance &CI);
/external/clang/lib/StaticAnalyzer/Frontend/
DFrontendActions.cpp16 ASTConsumer *AnalysisAction::CreateASTConsumer(CompilerInstance &CI, in CreateASTConsumer() argument
18 return CreateAnalysisConsumer(CI.getPreprocessor(), in CreateASTConsumer()
19 CI.getFrontendOpts().OutputFile, in CreateASTConsumer()
20 CI.getAnalyzerOpts(), in CreateASTConsumer()
21 CI.getFrontendOpts().Plugins); in CreateASTConsumer()

12345678910>>...15