InsertValue and ExtractValue constant expressions are always

folded. Remove code that handled the case where they aren't
folded, and remove bitcode reader/writer support for them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53887 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman
2008-07-21 23:30:30 +00:00
parent 6e7775f732
commit e089160d10
4 changed files with 7 additions and 104 deletions

View File

@ -611,26 +611,6 @@ static void WriteConstants(unsigned FirstVal, unsigned LastVal,
Record.push_back(VE.getValueID(C->getOperand(i)));
}
break;
case Instruction::ExtractValue: {
Code = bitc::CST_CODE_CE_EXTRACTVAL;
Record.push_back(VE.getTypeID(C->getOperand(0)->getType()));
Record.push_back(VE.getValueID(C->getOperand(0)));
const SmallVector<unsigned, 4> &Indices = CE->getIndices();
for (unsigned i = 0, e = Indices.size(); i != e; ++i)
Record.push_back(Indices[i]);
break;
}
case Instruction::InsertValue: {
Code = bitc::CST_CODE_CE_INSERTVAL;
Record.push_back(VE.getTypeID(C->getOperand(0)->getType()));
Record.push_back(VE.getValueID(C->getOperand(0)));
Record.push_back(VE.getTypeID(C->getOperand(1)->getType()));
Record.push_back(VE.getValueID(C->getOperand(1)));
const SmallVector<unsigned, 4> &Indices = CE->getIndices();
for (unsigned i = 0, e = Indices.size(); i != e; ++i)
Record.push_back(Indices[i]);
break;
}
case Instruction::Select:
Code = bitc::CST_CODE_CE_SELECT;
Record.push_back(VE.getValueID(C->getOperand(0)));