[all-commits] [llvm/llvm-project] 5548e8: [IR] Remove support for extractvalue constant expr...
Nikita Popov via All-commits
all-commits at lists.llvm.org
Tue Jun 28 01:40:34 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 5548e807b5777fdda167b6795e0e05432a6163f1
https://github.com/llvm/llvm-project/commit/5548e807b5777fdda167b6795e0e05432a6163f1
Author: Nikita Popov <npopov at redhat.com>
Date: 2022-06-28 (Tue, 28 Jun 2022)
Changed paths:
M clang/lib/CodeGen/ItaniumCXXABI.cpp
M llvm/bindings/go/llvm/ir.go
M llvm/bindings/ocaml/llvm/llvm.ml
M llvm/bindings/ocaml/llvm/llvm.mli
M llvm/bindings/ocaml/llvm/llvm_ocaml.c
M llvm/docs/ReleaseNotes.rst
M llvm/include/llvm-c/Core.h
M llvm/include/llvm/Analysis/TargetFolder.h
M llvm/include/llvm/IR/ConstantFolder.h
M llvm/include/llvm/IR/Constants.h
M llvm/lib/Analysis/ConstantFolding.cpp
M llvm/lib/Analysis/InlineCost.cpp
M llvm/lib/AsmParser/LLParser.cpp
M llvm/lib/IR/Constants.cpp
M llvm/lib/IR/ConstantsContext.h
M llvm/lib/IR/Core.cpp
M llvm/lib/Transforms/Coroutines/CoroElide.cpp
M llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
M llvm/lib/Transforms/Utils/Evaluator.cpp
M llvm/test/Assembler/insertextractvalue.ll
A llvm/test/Assembler/unsupported-constexprs.ll
M llvm/test/CodeGen/Generic/pr33094.ll
R llvm/test/CodeGen/X86/nonconst-static-ev.ll
M llvm/test/Transforms/InstCombine/cast.ll
M llvm/test/Transforms/InstCombine/pr28725.ll
M llvm/test/Transforms/InstSimplify/pr28725.ll
Log Message:
-----------
[IR] Remove support for extractvalue constant expression
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 bitcode 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 usually preferable to use getAggregateElement() instead.
The C API function LLVMConstExtractValue() is removed, as the
underlying constant expression no longer exists. Instead,
LLVMBuildExtractValue() should be used (which will constant fold
or create an instruction). Depending on the use-case,
LLVMGetAggregateElement() may also be used instead.
Differential Revision: https://reviews.llvm.org/D125795
More information about the All-commits
mailing list