[PATCH] D136043: [CodeGen] Replace CCValAssign::Loc with a discriminated union (NFCI)
Sergei Barannikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Dec 17 13:02:01 PST 2022
barannikov88 added a comment.
In D136043#4003380 <https://reviews.llvm.org/D136043#4003380>, @tschuett wrote:
> I am unsure about the value of `LockKind`.
Could you elaborate?
================
Comment at: llvm/include/llvm/CodeGen/CallingConvLower.h:130
+ bool isMemLoc() const { return getLocKind() == LK_Memory; }
+ bool isPendingLoc() const { return getLocKind() == LK_Pending; }
----------------
tschuett wrote:
> Here you could also use `std::holds_variant<unsigned>(Data)`.
Yes, thanks.
I'd keep it with symbolic constant: it protects from bugs if the storage type changes and is arguably more readable.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136043/new/
https://reviews.llvm.org/D136043
More information about the llvm-commits
mailing list