diff options
| author | Nikita Popov <npopov@redhat.com> | 2022-06-28 11:25:54 +0200 |
|---|---|---|
| committer | Nikita Popov <npopov@redhat.com> | 2022-07-04 09:27:22 +0200 |
| commit | 7283f48a05de46fe8721ee6c29b1b6427e7d1a33 (patch) | |
| tree | dfbc5f67695199cffdfdda80e4f088f1025c1fbf /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | |
| parent | 1063dfc0285362918aa6bce482a532cb911f64fb (diff) | |
[IR] Remove support for insertvalue constant expression
This removes the insertvalue constant expression, as part of
https://discourse.llvm.org/t/rfc-remove-most-constant-expressions/63179.
This is very similar to the extractvalue removal from D125795.
insertvalue is also not supported in bitcode, so no auto-ugprade
is necessary.
ConstantExpr::getInsertValue() can be replaced with
IRBuilder::CreateInsertValue() or ConstantFoldInsertValueInstruction(),
depending on whether a constant result is required (with the latter
being fallible).
The ConstantExpr::hasIndices() and ConstantExpr::getIndices()
methods also go away here, because there are no longer any constant
expressions with indices.
Differential Revision: https://reviews.llvm.org/D128719
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
| -rw-r--r-- | llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp index 941ed808bab1..fa798a4b341e 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -2674,9 +2674,6 @@ void ModuleBitcodeWriter::writeConstants(unsigned FirstVal, unsigned LastVal, Record.push_back(VE.getValueID(C->getOperand(1))); Record.push_back(CE->getPredicate()); break; - case Instruction::InsertValue: - report_fatal_error("insertvalue constexprs not supported"); - break; } } else if (const BlockAddress *BA = dyn_cast<BlockAddress>(C)) { Code = bitc::CST_CODE_BLOCKADDRESS; |
