1//===- ScalarEvolutionExpander.cpp - Scalar Evolution Analysis --*- C++ -*-===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// --- 1762 unchanged lines hidden (view full) --- 1771 && TruncExpr == SE.getSCEV(IsomorphicInc) 1772 && ((isa<PHINode>(OrigInc) && isa<PHINode>(IsomorphicInc)) 1773 || hoistIVInc(OrigInc, IsomorphicInc))) { 1774 DEBUG_WITH_TYPE(DebugType, dbgs() 1775 << "INDVARS: Eliminated congruent iv.inc: " 1776 << *IsomorphicInc << '\n'); 1777 Value *NewInc = OrigInc; 1778 if (OrigInc->getType() != IsomorphicInc->getType()) { |
1779 Instruction *IP = nullptr; 1780 if (PHINode *PN = dyn_cast<PHINode>(OrigInc)) 1781 IP = PN->getParent()->getFirstInsertionPt(); 1782 else 1783 IP = OrigInc->getNextNode(); 1784 |
1785 IRBuilder<> Builder(IP); 1786 Builder.SetCurrentDebugLocation(IsomorphicInc->getDebugLoc()); 1787 NewInc = Builder. 1788 CreateTruncOrBitCast(OrigInc, IsomorphicInc->getType(), IVName); 1789 } 1790 IsomorphicInc->replaceAllUsesWith(NewInc); 1791 DeadInsts.push_back(IsomorphicInc); 1792 } --- 71 unchanged lines hidden --- |