[PATCH] D136043: [CodeGen] Replace CCValAssign::Loc with a discriminated union (NFCI)
Sergei Barannikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 16 11:22:20 PDT 2022
barannikov88 added inline comments.
================
Comment at: llvm/include/llvm/CodeGen/CallingConvLower.h:91
- static CCValAssign getReg(unsigned ValNo, MVT ValVT,
- unsigned RegNo, MVT LocVT,
- LocInfo HTP) {
- CCValAssign Ret;
- Ret.ValNo = ValNo;
- Ret.Loc = RegNo;
- Ret.isMem = false;
- Ret.isCustom = false;
- Ret.HTP = HTP;
- Ret.ValVT = ValVT;
- Ret.LocVT = LocVT;
+ CCValAssign(LocKind Kind, LocInfo HTP, unsigned ValNo, MVT ValVT, MVT LocVT,
+ bool IsCustom)
----------------
This constructor was added because the default constructor used in `get*` methods has become implicitly-deleted (due to non-trivial constructor of Register in the union). This also reduces code duplication a bit.
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