Lines Matching refs:inst
180 LogicalResult processInstruction(llvm::Instruction *inst);
191 llvm::Instruction *inst = nullptr);
249 llvm::Instruction *inst) { in processDebugLoc() argument
250 if (!loc && inst) { in processDebugLoc()
254 inst->printAsOperand(os, /*PrintType=*/false); in processDebugLoc()
773 for (auto inst = target->begin(); isa<llvm::PHINode>(inst); ++inst) { in processBranchArgs() local
774 auto *pn = cast<llvm::PHINode>(&*inst); in processBranchArgs()
783 LogicalResult Importer::processInstruction(llvm::Instruction *inst) { in processInstruction() argument
786 Location loc = processDebugLoc(inst->getDebugLoc(), inst); in processInstruction()
787 assert(!instMap.count(inst) && in processInstruction()
789 switch (inst->getOpcode()) { in processInstruction()
791 return emitError(loc) << "unknown instruction: " << diag(*inst); in processInstruction()
833 OperationState state(loc, lookupOperationNameFromOpcode(inst->getOpcode())); in processInstruction()
835 ops.reserve(inst->getNumOperands()); in processInstruction()
836 for (auto *op : inst->operand_values()) { in processInstruction()
843 if (!inst->getType()->isVoidTy()) { in processInstruction()
844 Type type = processType(inst->getType()); in processInstruction()
850 if (!inst->getType()->isVoidTy()) in processInstruction()
851 instMap[inst] = op->getResult(0); in processInstruction()
855 Value size = processValue(inst->getOperand(0)); in processInstruction()
859 auto *allocaInst = cast<llvm::AllocaInst>(inst); in processInstruction()
860 instMap[inst] = in processInstruction()
861 b.create<AllocaOp>(loc, processType(inst->getType()), in processInstruction()
867 Value lhs = processValue(inst->getOperand(0)); in processInstruction()
868 Value rhs = processValue(inst->getOperand(1)); in processInstruction()
871 instMap[inst] = b.create<ICmpOp>( in processInstruction()
872 loc, getICmpPredicate(cast<llvm::ICmpInst>(inst)->getPredicate()), lhs, in processInstruction()
877 Value lhs = processValue(inst->getOperand(0)); in processInstruction()
878 Value rhs = processValue(inst->getOperand(1)); in processInstruction()
881 instMap[inst] = b.create<FCmpOp>( in processInstruction()
883 getFCmpPredicate(cast<llvm::FCmpInst>(inst)->getPredicate()), lhs, rhs); in processInstruction()
887 auto *brInst = cast<llvm::BranchInst>(inst); in processInstruction()
917 auto *swInst = cast<llvm::SwitchInst>(inst); in processInstruction()
951 Type type = processType(inst->getType()); in processInstruction()
954 instMap[inst] = b.getInsertionBlock()->addArgument( in processInstruction()
955 type, processDebugLoc(inst->getDebugLoc(), inst)); in processInstruction()
959 llvm::CallInst *ci = cast<llvm::CallInst>(inst); in processInstruction()
961 ops.reserve(inst->getNumOperands()); in processInstruction()
971 Type type = processType(inst->getType()); in processInstruction()
987 if (!inst->getType()->isVoidTy()) in processInstruction()
988 instMap[inst] = op->getResult(0); in processInstruction()
1002 instMap[inst] = op->getResult(0); in processInstruction()
1006 llvm::LandingPadInst *lpi = cast<llvm::LandingPadInst>(inst); in processInstruction()
1016 instMap[inst] = b.create<LandingpadOp>(loc, ty, lpi->isCleanup(), ops); in processInstruction()
1020 llvm::InvokeInst *ii = cast<llvm::InvokeInst>(inst); in processInstruction()
1024 tys.push_back(processType(inst->getType())); in processInstruction()
1027 ops.reserve(inst->getNumOperands() + 1); in processInstruction()
1049 instMap[inst] = op->getResult(0); in processInstruction()
1055 llvm::LLVMContext &llvmContext = inst->getContext(); in processInstruction()
1056 llvm::FenceInst *fence = cast<llvm::FenceInst>(inst); in processInstruction()
1071 llvm::GetElementPtrInst *gep = cast<llvm::GetElementPtrInst>(inst); in processInstruction()
1088 Type type = processType(inst->getType()); in processInstruction()
1091 instMap[inst] = b.create<GEPOp>(loc, type, sourceElementType, basePtr, in processInstruction()
1096 auto *ivInst = cast<llvm::InsertValueInst>(inst); in processInstruction()
1109 instMap[inst] = b.create<InsertValueOp>(loc, aggOperand, inserted, indices); in processInstruction()
1113 auto *evInst = cast<llvm::ExtractValueInst>(inst); in processInstruction()
1118 Type type = processType(inst->getType()); in processInstruction()
1127 instMap[inst] = b.create<ExtractValueOp>(loc, type, aggOperand, indices); in processInstruction()
1131 auto *svInst = cast<llvm::ShuffleVectorInst>(inst); in processInstruction()
1141 instMap[inst] = b.create<ShuffleVectorOp>(loc, vec1, vec2, mask); in processInstruction()
1239 for (llvm::Instruction &inst : *bb) { in processBasicBlock()
1240 if (failed(processInstruction(&inst))) in processBasicBlock()