Lines Matching refs:Instruction
25 #include "llvm/IR/Instruction.h"
71 using ChainOfDependences = SmallVector<Instruction *, 4>;
100 void push_back(Instruction *I) {
108 Instruction *front() const {
112 Instruction *back() const {
116 Instruction *&operator[](const int index) {
136 Instruction *Inst2Replace = nullptr;
141 Instruction *BackedgeInst = nullptr;
142 std::map<Instruction *, DepChain *> DepChains;
159 OS << "Instruction to Replace: " << *(RU.Inst2Replace) << "\n";
160 OS << "Backedge Instruction: " << *(RU.BackedgeInst) << "\n";
195 std::set<Instruction *> ReplacedInsts;
202 void findDepChainFromPHI(Instruction *I, DepChain &D);
205 DepChain *getDepChainBtwn(Instruction *I1, Instruction *I2, int Iters);
206 bool isEquivalentOperation(Instruction *I1, Instruction *I2);
207 bool canReplace(Instruction *I);
323 bool HexagonVectorLoopCarriedReuse::isEquivalentOperation(Instruction *I1,
324 Instruction *I2) {
355 bool HexagonVectorLoopCarriedReuse::canReplace(Instruction *I) {
382 Instruction *BEInst = D->back();
388 SmallVector<Instruction *, 4> PNUsers;
390 Instruction *User = cast<Instruction>(U.getUser());
410 // For each interesting use I of PN, find an Instruction BEUser that
413 // first such Instruction BEUser. This is because once BEUser is
416 for (Instruction *I : PNUsers) {
418 Instruction *BEUser = cast<Instruction>(U.getUser());
436 std::map<Instruction *, DepChain *> DepChains;
442 Instruction *OpInst = dyn_cast<Instruction>(Op);
446 Instruction *BEOpInst = dyn_cast<Instruction>(BEOp);
476 Instruction *OpInst = dyn_cast<Instruction>(Op);
486 Instruction *BEOpInst = dyn_cast<Instruction>(BEOp);
522 Instruction *Inst2Replace = ReuseCandidate.Inst2Replace;
523 Instruction *BEInst = ReuseCandidate.BackedgeInst;
525 std::map<Instruction *, DepChain *> &DepChains = ReuseCandidate.DepChains;
531 SmallVector<Instruction *, 4> InstsInPreheader;
533 Instruction *InstInPreheader = Inst2Replace->clone();
536 Instruction *I = dyn_cast<Instruction>(Inst2Replace->getOperand(j));
559 Instruction *InstInPreheader = InstsInPreheader[i];
601 void HexagonVectorLoopCarriedReuse::findDepChainFromPHI(Instruction *I,
621 Instruction *BEInst = dyn_cast<Instruction>(BEVal);
628 if(!PreHdrVal || !isa<Instruction>(PreHdrVal)) {
637 DepChain *HexagonVectorLoopCarriedReuse::getDepChainBtwn(Instruction *I1,
638 Instruction *I2,