aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineCheckDebugify.cpp
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2022-06-08 17:29:42 +0200
committerNikita Popov <npopov@redhat.com>2022-06-28 11:09:46 +0200
commit941c8e0ea50bb063689e926e67f81f73c015c94a (patch)
tree7c3388fcde7043d10f4cfa83d893ebd72427b3f3 /llvm/lib/CodeGen/MachineCheckDebugify.cpp
parent180cc74de9cb083730a4f0591535ad5ec629ca55 (diff)
downloadllvm-941c8e0ea50bb063689e926e67f81f73c015c94a.zip
llvm-941c8e0ea50bb063689e926e67f81f73c015c94a.tar.gz
llvm-941c8e0ea50bb063689e926e67f81f73c015c94a.tar.bz2
[Bitcode] Support expanding constant expressions into instructions
This implements an autoupgrade from constant expressions to instructions, which is needed for https://discourse.llvm.org/t/rfc-remove-most-constant-expressions/63179. The basic approach is that constant expressions (CST_CODE_CE_* records) now initially only create a BitcodeConstant value that holds opcode, flags and operands IDs. Then, when the value actually gets used, it can be converted either into a constant expression (if that expression type is still supported) or into a sequence of instructions. As currently all expressions are still supported, -expand-constant-exprs is added for testing purposes, to force expansion. PHI nodes require special handling, because the constant expression needs to be evaluated on the incoming edge. We do this by putting it into a temporary block and then wiring it up appropriately afterwards (for non-critical edges, we could also move the instructions into the predecessor). This also removes the need for the forward referenced constants machinery, as the BitcodeConstants only hold value IDs. At the point where the value is actually materialized, no forward references are needed anymore. Differential Revision: https://reviews.llvm.org/D127729
Diffstat (limited to 'llvm/lib/CodeGen/MachineCheckDebugify.cpp')
0 files changed, 0 insertions, 0 deletions