mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-12 17:32:19 +00:00
* Rewrite loop to be slightly more efficient (arguably)
* Fix a MAJOR thinko that was causing bad links to happen on Spec git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2953 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d124c38993
commit
e306d94782
@ -105,7 +105,7 @@ static Value *RemapOperand(const Value *In, map<const Value*, Value*> &LocalMap,
|
||||
if (const ConstantArray *CPA = dyn_cast<ConstantArray>(CPV)) {
|
||||
const std::vector<Use> &Ops = CPA->getValues();
|
||||
std::vector<Constant*> Operands(Ops.size());
|
||||
for (unsigned i = 0; i < Ops.size(); ++i)
|
||||
for (unsigned i = 0, e = Ops.size(); i != e; ++i)
|
||||
Operands[i] =
|
||||
cast<Constant>(RemapOperand(Ops[i], LocalMap, GlobalMap));
|
||||
Result = ConstantArray::get(cast<ArrayType>(CPA->getType()), Operands);
|
||||
@ -154,7 +154,7 @@ static Value *RemapOperand(const Value *In, map<const Value*, Value*> &LocalMap,
|
||||
}
|
||||
|
||||
// Cache the mapping in our local map structure...
|
||||
LocalMap.insert(std::make_pair(In, const_cast<Constant*>(CPV)));
|
||||
LocalMap.insert(std::make_pair(In, Result));
|
||||
return Result;
|
||||
}
|
||||
|
||||
|
@ -105,7 +105,7 @@ static Value *RemapOperand(const Value *In, map<const Value*, Value*> &LocalMap,
|
||||
if (const ConstantArray *CPA = dyn_cast<ConstantArray>(CPV)) {
|
||||
const std::vector<Use> &Ops = CPA->getValues();
|
||||
std::vector<Constant*> Operands(Ops.size());
|
||||
for (unsigned i = 0; i < Ops.size(); ++i)
|
||||
for (unsigned i = 0, e = Ops.size(); i != e; ++i)
|
||||
Operands[i] =
|
||||
cast<Constant>(RemapOperand(Ops[i], LocalMap, GlobalMap));
|
||||
Result = ConstantArray::get(cast<ArrayType>(CPA->getType()), Operands);
|
||||
@ -154,7 +154,7 @@ static Value *RemapOperand(const Value *In, map<const Value*, Value*> &LocalMap,
|
||||
}
|
||||
|
||||
// Cache the mapping in our local map structure...
|
||||
LocalMap.insert(std::make_pair(In, const_cast<Constant*>(CPV)));
|
||||
LocalMap.insert(std::make_pair(In, Result));
|
||||
return Result;
|
||||
}
|
||||
|
||||
|
@ -105,7 +105,7 @@ static Value *RemapOperand(const Value *In, map<const Value*, Value*> &LocalMap,
|
||||
if (const ConstantArray *CPA = dyn_cast<ConstantArray>(CPV)) {
|
||||
const std::vector<Use> &Ops = CPA->getValues();
|
||||
std::vector<Constant*> Operands(Ops.size());
|
||||
for (unsigned i = 0; i < Ops.size(); ++i)
|
||||
for (unsigned i = 0, e = Ops.size(); i != e; ++i)
|
||||
Operands[i] =
|
||||
cast<Constant>(RemapOperand(Ops[i], LocalMap, GlobalMap));
|
||||
Result = ConstantArray::get(cast<ArrayType>(CPA->getType()), Operands);
|
||||
@ -154,7 +154,7 @@ static Value *RemapOperand(const Value *In, map<const Value*, Value*> &LocalMap,
|
||||
}
|
||||
|
||||
// Cache the mapping in our local map structure...
|
||||
LocalMap.insert(std::make_pair(In, const_cast<Constant*>(CPV)));
|
||||
LocalMap.insert(std::make_pair(In, Result));
|
||||
return Result;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user