[PATCH] D125795: [IR] Remove support for extractvalue constant expression

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 15 01:45:18 PDT 2022


nikic updated this revision to Diff 437080.
nikic added a comment.

This removes the `extractvalue` constant expression, as part of https://discourse.llvm.org/t/rfc-remove-most-constant-expressions/63179. `extractvalue` is already not supported in bitcode, so we do not need to worry about auto-upgrade.

Uses of `ConstantExpr::getExtractValue()` should be replaced with `IRBuilder::CreateExtractValue()` (if the fact that the result is constant is not important) or `ConstantFoldExtractValueInstruction()` (if it is). Though for this particular case, it is also possible and probably a bit more elegant to use `getAggregateElement()` instead.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D125795/new/

https://reviews.llvm.org/D125795

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/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/AsmParser/LLParser.cpp
  llvm/lib/IR/Constants.cpp
  llvm/lib/IR/ConstantsContext.h
  llvm/lib/IR/Core.cpp
  llvm/lib/Transforms/Coroutines/CoroElide.cpp
  llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
  llvm/lib/Transforms/Utils/Evaluator.cpp
  llvm/test/Assembler/insertextractvalue.ll
  llvm/test/Assembler/unsupported-constexprs.ll
  llvm/test/CodeGen/Generic/pr33094.ll
  llvm/test/CodeGen/X86/nonconst-static-ev.ll
  llvm/test/Transforms/InstCombine/cast.ll
  llvm/test/Transforms/InstCombine/pr28725.ll
  llvm/test/Transforms/InstSimplify/pr28725.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125795.437080.patch
Type: text/x-patch
Size: 24927 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220615/bd5f7b0c/attachment.bin>


More information about the llvm-commits mailing list