| /freebsd/contrib/llvm-project/llvm/lib/Transforms/InstCombine/ |
| H A D | InstCombineInternal.h | 62 public InstVisitor<InstCombinerImpl, Instruction *> { 91 Instruction *visitFNeg(UnaryOperator &I); 92 Instruction *visitAdd(BinaryOperator &I); 93 Instruction *visitFAdd(BinaryOperator &I); 96 Instruction *visitSub(BinaryOperator &I); 97 Instruction *visitFSub(BinaryOperator &I); 98 Instruction *visitMul(BinaryOperator &I); 99 Instruction *foldPowiReassoc(BinaryOperator &I); 100 Instruction *foldFMulReassoc(BinaryOperator &I); 101 Instruction *visitFMul(BinaryOperator &I); [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Transforms/Vectorize/SandboxVectorizer/ |
| H A D | Legality.cpp | 35 auto *I0 = cast<Instruction>(Bndl[0]); in notVectorizableBasedOnOpcodesAndTypes() 39 return cast<Instruction>(V)->getOpcode() != Opcode; in notVectorizableBasedOnOpcodesAndTypes() 55 FastMathFlags FMF0 = cast<Instruction>(Bndl[0])->getFastMathFlags(); in notVectorizableBasedOnOpcodesAndTypes() 57 return cast<Instruction>(V)->getFastMathFlags() != FMF0; in notVectorizableBasedOnOpcodesAndTypes() 70 return cast<Instruction>(V)->hasNoUnsignedWrap() != NUW0 || in notVectorizableBasedOnOpcodesAndTypes() 71 cast<Instruction>(V)->hasNoSignedWrap() != NSW0; in notVectorizableBasedOnOpcodesAndTypes() 79 case Instruction::Opcode::ZExt: in notVectorizableBasedOnOpcodesAndTypes() 80 case Instruction::Opcode::SExt: in notVectorizableBasedOnOpcodesAndTypes() 81 case Instruction::Opcode::FPToUI: in notVectorizableBasedOnOpcodesAndTypes() 82 case Instruction::Opcode::FPToSI: in notVectorizableBasedOnOpcodesAndTypes() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/IR/ |
| H A D | Instruction.cpp | 32 InsertPosition::InsertPosition(Instruction *InsertBefore) in InsertPosition() 38 Instruction::Instruction(Type *ty, unsigned it, AllocInfo AllocInfo, in Instruction() function in Instruction 49 Instruction::~Instruction() { in ~Instruction() 69 const Module *Instruction::getModule() const { in getModule() 73 const Function *Instruction::getFunction() const { in getFunction() 77 const DataLayout &Instruction::getDataLayout() const { in getDataLayout() 81 void Instruction::removeFromParent() { in removeFromParent() 88 void Instruction::handleMarkerRemoval() { in handleMarkerRemoval() 95 BasicBlock::iterator Instruction::eraseFromParent() { in eraseFromParent() 100 void Instruction::insertBefore(Instruction *InsertPos) { in insertBefore() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/ |
| H A D | SpeculativeExecution.cpp | 213 static InstructionCost ComputeSpeculationCost(const Instruction *I, in ComputeSpeculationCost() 216 case Instruction::GetElementPtr: in ComputeSpeculationCost() 217 case Instruction::Add: in ComputeSpeculationCost() 218 case Instruction::Mul: in ComputeSpeculationCost() 219 case Instruction::And: in ComputeSpeculationCost() 220 case Instruction::Or: in ComputeSpeculationCost() 221 case Instruction::Select: in ComputeSpeculationCost() 222 case Instruction::Shl: in ComputeSpeculationCost() 223 case Instruction::Sub: in ComputeSpeculationCost() 224 case Instruction::LShr: in ComputeSpeculationCost() [all …]
|
| H A D | Float2Int.cpp | 78 static Instruction::BinaryOps mapBinOpcode(unsigned Opcode) { in mapBinOpcode() 81 case Instruction::FAdd: return Instruction::Add; in mapBinOpcode() 82 case Instruction::FSub: return Instruction::Sub; in mapBinOpcode() 83 case Instruction::FMul: return Instruction::Mul; in mapBinOpcode() 96 for (Instruction &I : BB) { in findRoots() 101 case Instruction::FPToUI: in findRoots() 102 case Instruction::FPToSI: in findRoots() 105 case Instruction::FCmp: in findRoots() 116 void Float2IntPass::seen(Instruction *I, ConstantRange R) { in seen() 149 std::deque<Instruction*> Worklist(Roots.begin(), Roots.end()); in walkBackwards() [all …]
|
| H A D | Reassociate.cpp | 82 static void PrintOps(Instruction *I, const SmallVectorImpl<ValueEntry> &Ops) { in PrintOps() 84 dbgs() << Instruction::getOpcodeName(I->getOpcode()) << " " in PrintOps() 127 Instruction *I = dyn_cast<Instruction>(V); in XorOpnd() 130 if (I && (I->getOpcode() == Instruction::Or || in XorOpnd() 131 I->getOpcode() == Instruction::And)) { in XorOpnd() 141 isOr = (I->getOpcode() == Instruction::Or); in XorOpnd() 156 static bool hasFPAssociativeFlags(Instruction *I) { in hasFPAssociativeFlags() 199 for (Instruction &I : *BB) in BuildRankMap() 206 Instruction *I = dyn_cast<Instruction>(V); in getRank() 236 void ReassociatePass::canonicalizeOperands(Instruction *I) { in canonicalizeOperands() [all …]
|
| H A D | GVNSink.cpp | 94 static bool isMemoryInst(const Instruction *I) { in isMemoryInst() 191 assert(cast<Instruction>(V)->getParent() == Blocks[C]); in verifyModelledPHI() 198 ModelledPHI(SmallVectorImpl<Instruction *> &V, in ModelledPHI() 209 ModelledPHI(ArrayRef<Instruction *> Insts, unsigned OpNum, in ModelledPHI() 299 InstructionUseExpr(Instruction *I, ArrayRecycler<Value *> &R, in InstructionUseExpr() 345 InstructionUseExpr *createExpr(Instruction *I) { in createExpr() 384 if (!isa<Instruction>(V)) { in lookupOrAdd() 389 Instruction *I = cast<Instruction>(V); in lookupOrAdd() 395 case Instruction::Load: in lookupOrAdd() 398 case Instruction::Store: in lookupOrAdd() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Transforms/AggressiveInstCombine/ |
| H A D | TruncInstCombine.cpp | 48 static void getRelevantOperands(Instruction *I, SmallVectorImpl<Value *> &Ops) { in getRelevantOperands() 51 case Instruction::Trunc: in getRelevantOperands() 52 case Instruction::ZExt: in getRelevantOperands() 53 case Instruction::SExt: in getRelevantOperands() 57 case Instruction::Add: in getRelevantOperands() 58 case Instruction::Sub: in getRelevantOperands() 59 case Instruction::Mul: in getRelevantOperands() 60 case Instruction::And: in getRelevantOperands() 61 case Instruction::Or: in getRelevantOperands() 62 case Instruction::Xor: in getRelevantOperands() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/ARM/ |
| H A D | MVELaneInterleavingPass.cpp | 109 static bool isProfitableToInterleave(SmallSetVector<Instruction *, 4> &Exts, in isProfitableToInterleave() argument 110 SmallSetVector<Instruction *, 4> &Truncs) { in isProfitableToInterleave() 140 cast<Instruction>(*E->user_begin())->getOpcode() != Instruction::Mul) { in isProfitableToInterleave() 148 static bool tryInterleave(Instruction *Start, in tryInterleave() 149 SmallPtrSetImpl<Instruction *> &Visited) { in tryInterleave() 152 if (!isa<Instruction>(Start->getOperand(0))) in tryInterleave() 156 std::vector<Instruction *> Worklist; in tryInterleave() 158 Worklist.push_back(cast<Instruction>(Start->getOperand(0))); in tryInterleave() 160 SmallSetVector<Instruction *, 4> Truncs; in tryInterleave() 161 SmallSetVector<Instruction *, 4> Reducts; in tryInterleave() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Transforms/Vectorize/SandboxVectorizer/Passes/ |
| H A D | BottomUpVec.cpp | 47 auto *BndlI = cast<Instruction>(BndlV); in getOperand() 71 assert(all_of(Bndl, [](auto *V) { return isa<Instruction>(V); }) && in createVectorInstr() 79 Bndl, cast<Instruction>(Bndl[0])->getParent()); in createVectorInstr() 81 auto Opcode = cast<Instruction>(Bndl[0])->getOpcode(); in createVectorInstr() 83 case Instruction::Opcode::ZExt: in createVectorInstr() 84 case Instruction::Opcode::SExt: in createVectorInstr() 85 case Instruction::Opcode::FPToUI: in createVectorInstr() 86 case Instruction::Opcode::FPToSI: in createVectorInstr() 87 case Instruction::Opcode::FPExt: in createVectorInstr() 88 case Instruction::Opcode::PtrToInt: in createVectorInstr() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/FuzzMutate/ |
| H A D | Operations.cpp | 19 Ops.push_back(binOpDescriptor(1, Instruction::Add)); in describeFuzzerIntOps() 20 Ops.push_back(binOpDescriptor(1, Instruction::Sub)); in describeFuzzerIntOps() 21 Ops.push_back(binOpDescriptor(1, Instruction::Mul)); in describeFuzzerIntOps() 22 Ops.push_back(binOpDescriptor(1, Instruction::SDiv)); in describeFuzzerIntOps() 23 Ops.push_back(binOpDescriptor(1, Instruction::UDiv)); in describeFuzzerIntOps() 24 Ops.push_back(binOpDescriptor(1, Instruction::SRem)); in describeFuzzerIntOps() 25 Ops.push_back(binOpDescriptor(1, Instruction::URem)); in describeFuzzerIntOps() 26 Ops.push_back(binOpDescriptor(1, Instruction::Shl)); in describeFuzzerIntOps() 27 Ops.push_back(binOpDescriptor(1, Instruction::LShr)); in describeFuzzerIntOps() 28 Ops.push_back(binOpDescriptor(1, Instruction::AShr)); in describeFuzzerIntOps() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/SystemZ/ |
| H A D | SystemZTargetTransformInfo.cpp | 41 if (const Instruction *User = dyn_cast<Instruction>(U)) { in isUsedAsMemCpySource() 62 if (const Instruction *User = dyn_cast<Instruction>(U)) { in countNumMemAccesses() 189 Instruction *Inst) const { in getIntImmCostInst() 204 case Instruction::GetElementPtr: in getIntImmCostInst() 211 case Instruction::Store: in getIntImmCostInst() 221 case Instruction::ICmp: in getIntImmCostInst() 231 case Instruction::Add: in getIntImmCostInst() 232 case Instruction::Sub: in getIntImmCostInst() 242 case Instruction::Mul: in getIntImmCostInst() 249 case Instruction::Or: in getIntImmCostInst() [all …]
|
| /freebsd/contrib/llvm-project/llvm/include/llvm/IR/ |
| H A D | Operator.h | 44 if (const Instruction *I = dyn_cast<Instruction>(this)) in getOpcode() 52 if (const Instruction *I = dyn_cast<Instruction>(V)) in getOpcode() 56 return Instruction::UserOp1; in getOpcode() 59 static bool classof(const Instruction *) { return true; } in classof() argument 62 return isa<Instruction>(V) || isa<ConstantExpr>(V); in classof() 87 friend class Instruction; 128 bool isCommutative() const { return Instruction::isCommutative(getOpcode()); } in isCommutative() 130 static bool classof(const Instruction *I) { in classof() 131 return I->getOpcode() == Instruction::Add || in classof() 132 I->getOpcode() == Instruction::Sub || in classof() [all …]
|
| H A D | Instruction.h | 42 template <> struct ilist_alloc_traits<Instruction> { 43 static inline void deleteNode(Instruction *V); 50 using InstListType = SymbolTableList<Instruction, ilist_iterator_bits<true>, 58 InsertPosition(Instruction *InsertBefore); 66 class Instruction : public User, 67 public ilist_node_with_parent<Instruction, BasicBlock, 71 using InstListType = SymbolTableList<Instruction, ilist_iterator_bits<true>, 100 const Instruction *From, 163 LLVM_ABI ~Instruction(); // Use deleteValue() to delete a generic Instruction. 166 Instruction(const Instruction &) = delete; [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/SandboxIR/ |
| H A D | Instruction.cpp | 14 const char *Instruction::getOpcodeName(Opcode Opc) { in getOpcodeName() 26 llvm::Instruction *Instruction::getTopmostLLVMInstruction() const { in getTopmostLLVMInstruction() 27 Instruction *Prev = getPrevNode(); in getTopmostLLVMInstruction() 34 llvm::Instruction *PrevBotI = cast<llvm::Instruction>(Prev->Val); in getTopmostLLVMInstruction() 38 BBIterator Instruction::getIterator() const { in getIterator() 39 auto *I = cast<llvm::Instruction>(Val); in getIterator() 43 Instruction *Instruction::getNextNode() const { in getNextNode() 49 auto *LLVMI = cast<llvm::Instruction>(Val); in getNextNode() 52 auto *NextI = cast_or_null<Instruction>(Ctx.getValue(NextLLVMI)); in getNextNode() 58 Instruction *Instruction::getPrevNode() const { in getPrevNode() [all …]
|
| /freebsd/contrib/llvm-project/llvm/include/llvm/Analysis/ |
| H A D | MustExecute.h | 98 virtual bool isGuaranteedToExecute(const Instruction &Inst, 123 bool isGuaranteedToExecute(const Instruction &Inst, 148 bool isGuaranteedToExecute(const Instruction &Inst, 159 bool doesNotWriteMemoryBefore(const Instruction &I, const Loop *CurLoop) 165 void insertInstructionTo(const Instruction *Inst, const BasicBlock *BB); 170 void removeInstruction(const Instruction *Inst); 277 typedef const Instruction *value_type; 279 typedef const Instruction **pointer; 280 typedef const Instruction *&reference; 330 const Instruction *&operator*() { return CurInst; } [all …]
|
| H A D | IVDescriptors.h | 92 RecurrenceDescriptor(Value *Start, Instruction *Exit, StoreInst *Store, in RecurrenceDescriptor() 93 RecurKind K, FastMathFlags FMF, Instruction *ExactFP, in RecurrenceDescriptor() 95 SmallPtrSetImpl<Instruction *> &CI, in RecurrenceDescriptor() 107 InstDesc(bool IsRecur, Instruction *I, Instruction *ExactFP = nullptr) 111 InstDesc(Instruction *I, RecurKind K, Instruction *ExactFP = nullptr) 119 Instruction *getExactFPMathInst() const { return ExactFPMathInst; } in getExactFPMathInst() 123 Instruction *getPatternInst() const { return PatternLastInst; } in getPatternInst() 130 Instruction *PatternLastInst; 134 Instruction *ExactFPMathInst; 144 isRecurrenceInstr(Loop *L, PHINode *Phi, Instruction *I, RecurKind Kind, [all …]
|
| H A D | InstructionPrecedenceTracking.h | 29 class Instruction; variable 35 DenseMap<const BasicBlock *, const Instruction *> FirstSpecialInsts; 52 LLVM_ABI const Instruction *getFirstSpecialInstruction(const BasicBlock *BB); 60 LLVM_ABI bool isPreceededBySpecialInstruction(const Instruction *Insn); 67 virtual bool isSpecialInstruction(const Instruction *Insn) const = 0; 75 LLVM_ABI void insertInstructionTo(const Instruction *Inst, 80 LLVM_ABI void removeInstruction(const Instruction *Inst); 85 LLVM_ABI void removeUsersOf(const Instruction *Inst); 103 const Instruction *getFirstICFI(const BasicBlock *BB) { in getFirstICFI() 114 bool isDominatedByICFIFromSameBlock(const Instruction *Insn) { in isDominatedByICFIFromSameBlock() [all …]
|
| /freebsd/contrib/llvm-project/llvm/include/llvm/Transforms/Utils/ |
| H A D | InstructionWorklist.h | 26 SmallVector<Instruction *, 256> Worklist; 27 DenseMap<Instruction *, unsigned> WorklistMap; 31 SmallSetVector<Instruction *, 16> Deferred; 44 void add(Instruction *I) { in add() 52 if (Instruction *I = dyn_cast<Instruction>(V)) in addValue() 58 void push(Instruction *I) { in push() 69 if (Instruction *I = dyn_cast<Instruction>(V)) in pushValue() 73 Instruction *popDeferred() { in popDeferred() 85 void remove(Instruction *I) { in remove() 86 DenseMap<Instruction *, unsigned>::iterator It = WorklistMap.find(I); in remove() [all …]
|
| H A D | ScalarEvolutionExpander.h | 54 LLVM_ABI PoisonFlags(const Instruction *I); 55 LLVM_ABI void apply(Instruction *I); 77 DenseMap<std::pair<const SCEV *, Instruction *>, TrackingVH<Value>> 91 DenseMap<PoisoningVH<Instruction>, PoisonFlags> OrigFlags; 111 Instruction *IVIncInsertPos; 193 [this](Instruction *I) { rememberInstruction(I); })) { 225 SmallVector<Instruction *, 32> getAllInsertedInstructions() const { 226 SmallVector<Instruction *, 32> Result; 231 if (auto *Inst = dyn_cast<Instruction>(V)) 238 if (auto *Inst = dyn_cast<Instruction>(V)) [all …]
|
| /freebsd/contrib/llvm-project/llvm/include/llvm/Transforms/InstCombine/ |
| H A D | InstCombiner.h | 244 bool canFreelyInvertAllUsersOf(Instruction *V, Value *IgnoredUser) { in canFreelyInvertAllUsersOf() 250 auto *I = cast<Instruction>(U.getUser()); in canFreelyInvertAllUsersOf() 252 case Instruction::Select: in canFreelyInvertAllUsersOf() 258 case Instruction::Br: in canFreelyInvertAllUsersOf() 261 case Instruction::Xor: // Can invert 'xor' if it's a 'not', by ignoring in canFreelyInvertAllUsersOf() 291 case Instruction::SRem: // X % 1 = 0 in getSafeVectorConstantForBinop() 292 case Instruction::URem: // X %u 1 = 0 in getSafeVectorConstantForBinop() 295 case Instruction::FRem: // X % 1.0 (doesn't simplify, but it is safe) in getSafeVectorConstantForBinop() 304 case Instruction::Shl: // 0 << X = 0 in getSafeVectorConstantForBinop() 305 case Instruction::LShr: // 0 >>u X = 0 in getSafeVectorConstantForBinop() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Transforms/Utils/ |
| H A D | IRNormalizer.cpp | 46 DenseSet<const Instruction *> NamedInstructions; 48 SmallVector<Instruction *, 16> Outputs; 54 void nameInstruction(Instruction *I); 55 void nameAsInitialInstruction(Instruction *I) const; 56 void nameAsRegularInstruction(Instruction *I); 57 void foldInstructionName(Instruction *I) const; 63 void reorderDefinition(Instruction *Definition, 64 std::stack<Instruction *> &TopologicalSort, 65 SmallPtrSet<const Instruction *, 32> &Visited) const; 66 void reorderInstructionOperandsByNames(Instruction *I) const; [all …]
|
| H A D | SimplifyIndVar.cpp | 83 void pushIVUsers(Instruction *Def, 84 SmallPtrSet<Instruction *, 16> &Simplified, 85 SmallVectorImpl<std::pair<Instruction *, Instruction *>> 88 Value *foldIVUser(Instruction *UseInst, Instruction *IVOperand); 90 bool eliminateIdentitySCEV(Instruction *UseInst, Instruction *IVOperand); 91 bool replaceIVUserWithLoopInvariant(Instruction *UseInst); 92 bool replaceFloatIVWithIntegerIV(Instruction *UseInst); 97 bool eliminateIVUser(Instruction *UseInst, Instruction *IVOperand); 98 bool makeIVComparisonInvariant(ICmpInst *ICmp, Instruction *IVOperand); 99 void eliminateIVComparison(ICmpInst *ICmp, Instruction *IVOperand); [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Transforms/Vectorize/ |
| H A D | VPRecipeBuilder.h | 31 PartialReductionChain(Instruction *Reduction, Instruction *ExtendA, in PartialReductionChain() 32 Instruction *ExtendB, Instruction *ExtendUser) in PartialReductionChain() 37 Instruction *Reduction; 39 Instruction *ExtendA; 40 Instruction *ExtendB; 43 Instruction *ExtendUser; 77 DenseMap<Instruction *, VPRecipeBase *> Ingredient2Recipe; 85 DenseMap<const Instruction *, unsigned> ScaledReductionMap; 94 bool shouldWiden(Instruction *I, VFRange &Range) const; 99 VPWidenMemoryRecipe *tryToWidenMemory(Instruction *I, [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/Hexagon/ |
| H A D | HexagonVectorLoopCarriedReuse.cpp | 62 using ChainOfDependences = SmallVector<Instruction *, 4>; 91 void push_back(Instruction *I) { in push_back() 99 Instruction *front() const { in front() 103 Instruction *back() const { in back() 107 Instruction *&operator[](const int index) { in operator []() 127 Instruction *Inst2Replace = nullptr; 132 Instruction *BackedgeInst = nullptr; 133 std::map<Instruction *, DepChain *> DepChains; 183 std::set<Instruction *> ReplacedInsts; 190 void findDepChainFromPHI(Instruction *I, DepChain &D); [all …]
|