Lines Matching defs:ChainIndex
299 /// \p ChainIndex The index to UserChain. ChainIndex is initially
302 Value *distributeExtsAndCloneChain(unsigned ChainIndex);
305 Value *removeConstOffset(unsigned ChainIndex);
694 ConstantOffsetExtractor::distributeExtsAndCloneChain(unsigned ChainIndex) {
695 User *U = UserChain[ChainIndex];
696 if (ChainIndex == 0) {
699 return UserChain[ChainIndex] = cast<ConstantInt>(applyExts(U));
707 UserChain[ChainIndex] = nullptr;
708 return distributeExtsAndCloneChain(ChainIndex - 1);
713 // OpNo = which operand of BO is UserChain[ChainIndex - 1]
714 unsigned OpNo = (BO->getOperand(0) == UserChain[ChainIndex - 1] ? 0 : 1);
716 Value *NextInChain = distributeExtsAndCloneChain(ChainIndex - 1);
726 return UserChain[ChainIndex] = NewBO;
729 Value *ConstantOffsetExtractor::removeConstOffset(unsigned ChainIndex) {
730 if (ChainIndex == 0) {
731 assert(isa<ConstantInt>(UserChain[ChainIndex]));
732 return ConstantInt::getNullValue(UserChain[ChainIndex]->getType());
735 BinaryOperator *BO = cast<BinaryOperator>(UserChain[ChainIndex]);
741 unsigned OpNo = (BO->getOperand(0) == UserChain[ChainIndex - 1] ? 0 : 1);
742 assert(BO->getOperand(OpNo) == UserChain[ChainIndex - 1]);
743 Value *NextInChain = removeConstOffset(ChainIndex - 1);