mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 22:24:07 +00:00
move tier out of an anonymous namespace, it doesn't make sense
to for it to be an an anon namespace and be in a header. Eliminate some extraenous uses of tie. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135669 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1389,24 +1389,23 @@ void IndVarSimplify::SimplifyIVUsersNoRewrite(Loop *L, SCEVExpander &Rewriter) {
|
||||
pushIVUsers(CurrIV, Simplified, SimpleIVUsers);
|
||||
|
||||
while (!SimpleIVUsers.empty()) {
|
||||
Instruction *UseInst, *Operand;
|
||||
tie(UseInst, Operand) = SimpleIVUsers.pop_back_val();
|
||||
std::pair<Instruction*, Instruction*> Use =SimpleIVUsers.pop_back_val();
|
||||
// Bypass back edges to avoid extra work.
|
||||
if (UseInst == CurrIV) continue;
|
||||
if (Use.first == CurrIV) continue;
|
||||
|
||||
if (EliminateIVUser(UseInst, Operand)) {
|
||||
pushIVUsers(Operand, Simplified, SimpleIVUsers);
|
||||
if (EliminateIVUser(Use.first, Use.second)) {
|
||||
pushIVUsers(Use.second, Simplified, SimpleIVUsers);
|
||||
continue;
|
||||
}
|
||||
if (CastInst *Cast = dyn_cast<CastInst>(UseInst)) {
|
||||
if (CastInst *Cast = dyn_cast<CastInst>(Use.first)) {
|
||||
bool IsSigned = Cast->getOpcode() == Instruction::SExt;
|
||||
if (IsSigned || Cast->getOpcode() == Instruction::ZExt) {
|
||||
CollectExtend(Cast, IsSigned, WI, SE, TD);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (isSimpleIVUser(UseInst, L, SE)) {
|
||||
pushIVUsers(UseInst, Simplified, SimpleIVUsers);
|
||||
if (isSimpleIVUser(Use.first, L, SE)) {
|
||||
pushIVUsers(Use.first, Simplified, SimpleIVUsers);
|
||||
}
|
||||
}
|
||||
if (WI.WidestNativeType) {
|
||||
@ -1437,12 +1436,11 @@ void IndVarSimplify::SimplifyCongruentIVs(Loop *L) {
|
||||
continue;
|
||||
|
||||
const SCEV *S = SE->getSCEV(Phi);
|
||||
DenseMap<const SCEV *, PHINode *>::const_iterator Pos;
|
||||
bool Inserted;
|
||||
tie(Pos, Inserted) = ExprToIVMap.insert(std::make_pair(S, Phi));
|
||||
if (Inserted)
|
||||
std::pair<DenseMap<const SCEV *, PHINode *>::const_iterator, bool> Tmp =
|
||||
ExprToIVMap.insert(std::make_pair(S, Phi));
|
||||
if (Tmp.second)
|
||||
continue;
|
||||
PHINode *OrigPhi = Pos->second;
|
||||
PHINode *OrigPhi = Tmp.first->second;
|
||||
|
||||
// If one phi derives from the other via GEPs, types may differ.
|
||||
if (OrigPhi->getType() != Phi->getType())
|
||||
|
Reference in New Issue
Block a user