mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
revert r166264 because the LTO build is still failing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166340 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -19,8 +19,8 @@
|
||||
#include "llvm/LLVMContext.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include "llvm/DataLayout.h"
|
||||
#include "llvm/Target/TargetLowering.h"
|
||||
#include "llvm/ADT/STLExtras.h"
|
||||
#include "llvm/TargetTransformInfo.h"
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
@@ -1599,15 +1599,15 @@ static bool width_descending(Value *lhs, Value *rhs) {
|
||||
/// This does not depend on any SCEVExpander state but should be used in
|
||||
/// the same context that SCEVExpander is used.
|
||||
unsigned SCEVExpander::replaceCongruentIVs(Loop *L, const DominatorTree *DT,
|
||||
SmallVectorImpl<WeakVH> &DeadInsts,
|
||||
const ScalarTargetTransformInfo *STTI) {
|
||||
SmallVectorImpl<WeakVH> &DeadInsts,
|
||||
const TargetLowering *TLI) {
|
||||
// Find integer phis in order of increasing width.
|
||||
SmallVector<PHINode*, 8> Phis;
|
||||
for (BasicBlock::iterator I = L->getHeader()->begin();
|
||||
PHINode *Phi = dyn_cast<PHINode>(I); ++I) {
|
||||
Phis.push_back(Phi);
|
||||
}
|
||||
if (STTI)
|
||||
if (TLI)
|
||||
std::sort(Phis.begin(), Phis.end(), width_descending);
|
||||
|
||||
unsigned NumElim = 0;
|
||||
@@ -1635,8 +1635,8 @@ unsigned SCEVExpander::replaceCongruentIVs(Loop *L, const DominatorTree *DT,
|
||||
PHINode *&OrigPhiRef = ExprToIVMap[SE.getSCEV(Phi)];
|
||||
if (!OrigPhiRef) {
|
||||
OrigPhiRef = Phi;
|
||||
if (Phi->getType()->isIntegerTy() && STTI &&
|
||||
STTI->isTruncateFree(Phi->getType(), Phis.back()->getType())) {
|
||||
if (Phi->getType()->isIntegerTy() && TLI
|
||||
&& TLI->isTruncateFree(Phi->getType(), Phis.back()->getType())) {
|
||||
// This phi can be freely truncated to the narrowest phi type. Map the
|
||||
// truncated expression to it so it will be reused for narrow types.
|
||||
const SCEV *TruncExpr =
|
||||
|
Reference in New Issue
Block a user