ScalarEvolutionExpander.cpp (280031) | ScalarEvolutionExpander.cpp (283526) |
---|---|
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()) { | 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 = isa<PHINode>(OrigInc) 1780 ? (Instruction*)L->getHeader()->getFirstInsertionPt() 1781 : OrigInc->getNextNode(); | 1779 Instruction *IP = nullptr; 1780 if (PHINode *PN = dyn_cast<PHINode>(OrigInc)) 1781 IP = PN->getParent()->getFirstInsertionPt(); 1782 else 1783 IP = OrigInc->getNextNode(); 1784 |
1782 IRBuilder<> Builder(IP); 1783 Builder.SetCurrentDebugLocation(IsomorphicInc->getDebugLoc()); 1784 NewInc = Builder. 1785 CreateTruncOrBitCast(OrigInc, IsomorphicInc->getType(), IVName); 1786 } 1787 IsomorphicInc->replaceAllUsesWith(NewInc); 1788 DeadInsts.push_back(IsomorphicInc); 1789 } --- 71 unchanged lines hidden --- | 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 --- |