Lines Matching refs:ChainIndex
300 /// \p ChainIndex The index to UserChain. ChainIndex is initially
303 Value *distributeExtsAndCloneChain(unsigned ChainIndex);
306 Value *removeConstOffset(unsigned ChainIndex);
649 ConstantOffsetExtractor::distributeExtsAndCloneChain(unsigned ChainIndex) {
650 User *U = UserChain[ChainIndex];
651 if (ChainIndex == 0) {
654 return UserChain[ChainIndex] = cast<ConstantInt>(applyExts(U));
662 UserChain[ChainIndex] = nullptr;
663 return distributeExtsAndCloneChain(ChainIndex - 1);
668 // OpNo = which operand of BO is UserChain[ChainIndex - 1]
669 unsigned OpNo = (BO->getOperand(0) == UserChain[ChainIndex - 1] ? 0 : 1);
671 Value *NextInChain = distributeExtsAndCloneChain(ChainIndex - 1);
681 return UserChain[ChainIndex] = NewBO;
684 Value *ConstantOffsetExtractor::removeConstOffset(unsigned ChainIndex) {
685 if (ChainIndex == 0) {
686 assert(isa<ConstantInt>(UserChain[ChainIndex]));
687 return ConstantInt::getNullValue(UserChain[ChainIndex]->getType());
690 BinaryOperator *BO = cast<BinaryOperator>(UserChain[ChainIndex]);
696 unsigned OpNo = (BO->getOperand(0) == UserChain[ChainIndex - 1] ? 0 : 1);
697 assert(BO->getOperand(OpNo) == UserChain[ChainIndex - 1]);
698 Value *NextInChain = removeConstOffset(ChainIndex - 1);