mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-17 21:29:20 +00:00
simplify some code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33150 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
79cca507fe
commit
ef60b2c4ed
@ -533,14 +533,8 @@ void IndVarSimplify::runOnLoop(Loop *L) {
|
||||
InsertedSizes.push_back(LargestType->getPrimitiveSizeInBits());
|
||||
for (unsigned i = 0, e = IndVars.size(); i != e; ++i) {
|
||||
unsigned ithSize = IndVars[i].first->getType()->getPrimitiveSizeInBits();
|
||||
bool alreadyInsertedSize = false;
|
||||
for (SmallVector<unsigned,4>::iterator I = InsertedSizes.begin(),
|
||||
E = InsertedSizes.end(); I != E; ++I)
|
||||
if (*I == ithSize) {
|
||||
alreadyInsertedSize = true;
|
||||
break;
|
||||
}
|
||||
if (!alreadyInsertedSize) {
|
||||
if (std::find(InsertedSizes.begin(), InsertedSizes.end(), ithSize)
|
||||
== InsertedSizes.end()) {
|
||||
PHINode *PN = IndVars[i].first;
|
||||
InsertedSizes.push_back(ithSize);
|
||||
Instruction *New = new TruncInst(IndVar, PN->getType(), "indvar",
|
||||
|
Loading…
Reference in New Issue
Block a user