[PATCH] D128719: [IR] Remove support for insertvalue constant expression

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 28 03:34:26 PDT 2022


nikic created this revision.
nikic added reviewers: nhaehnle, reames.
Herald added a reviewer: deadalnix.
Herald added subscribers: jsji, mattd, gchakrabarti, asavonic, ChuanqiXu, pengfei, haicheng, hiraditya.
Herald added a project: All.
nikic requested review of this revision.
Herald added subscribers: llvm-commits, jholewinski.
Herald added a project: LLVM.

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 <https://reviews.llvm.org/D125795>.

`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.


https://reviews.llvm.org/D128719

Files:
  clang/lib/CodeGen/ItaniumCXXABI.cpp
  llvm/bindings/go/llvm/ir.go
  llvm/bindings/ocaml/llvm/llvm.ml
  llvm/bindings/ocaml/llvm/llvm.mli
  llvm/bindings/ocaml/llvm/llvm_ocaml.c
  llvm/docs/ReleaseNotes.rst
  llvm/include/llvm-c/Core.h
  llvm/include/llvm/Analysis/TargetFolder.h
  llvm/include/llvm/IR/ConstantFolder.h
  llvm/include/llvm/IR/Constants.h
  llvm/lib/Analysis/ConstantFolding.cpp
  llvm/lib/Analysis/InlineCost.cpp
  llvm/lib/Analysis/Lint.cpp
  llvm/lib/AsmParser/LLParser.cpp
  llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
  llvm/lib/IR/AsmWriter.cpp
  llvm/lib/IR/Constants.cpp
  llvm/lib/IR/ConstantsContext.h
  llvm/lib/IR/Core.cpp
  llvm/lib/Target/NVPTX/NVPTXGenericToNVVM.cpp
  llvm/lib/Transforms/Utils/Evaluator.cpp
  llvm/test/Assembler/insertextractvalue.ll
  llvm/test/Assembler/insertvalue-invalid-type-1.ll
  llvm/test/Assembler/unsupported-constexprs.ll
  llvm/test/CodeGen/X86/nonconst-static-iv.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128719.440556.patch
Type: text/x-patch
Size: 30570 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220628/80a8c676/attachment.bin>


More information about the llvm-commits mailing list