[clang] [CIR][NFCI] Update RValue class to reflect changes in classic CodeGen (PR #142779)
Andy Kaylor via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 16 09:10:53 PDT 2025
================
@@ -34,28 +32,85 @@ namespace clang::CIRGen {
class RValue {
enum Flavor { Scalar, Complex, Aggregate };
- // Stores first value and flavor.
- llvm::PointerIntPair<mlir::Value, 2, Flavor> v1;
- // Stores second value and volatility.
- llvm::PointerIntPair<llvm::PointerUnion<mlir::Value, int *>, 1, bool> v2;
- // Stores element type for aggregate values.
- mlir::Type elementType;
+ union {
+ // Stores first and second value.
+ struct {
+ mlir::Value first;
+ mlir::Value second;
+ } vals;
----------------
andykaylor wrote:
@AmrDeveloper is working on upstreaming complex support. I think he'll need to handle them as a single value.
https://github.com/llvm/llvm-project/pull/142779
More information about the cfe-commits
mailing list