[PATCH] D133213: [LLVM][AArch64] Explain that X19 is used as the frame base pointer register
David Spickett via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 5 01:55:51 PDT 2022
DavidSpickett added inline comments.
================
Comment at: llvm/include/llvm/CodeGen/TargetRegisterInfo.h:528
+ /// why the given register is reserved for the given machine function.
+ virtual const char *explainReservedReg(const MachineFunction &MF,
+ MCRegister PhysReg) const {
----------------
tschuett wrote:
> You could use an `Optional<std::string>` instead. It will be seldom used.
Well in some sense char* is optional string as long as that "string" is constant, and for this specific case I didn't need to format a string so std::string wasn't needed.
That said, you're right this is seldom used so pointer plus bool isn't a concern space wise. In addition, if I add further explanations they *will* need to format a new string e.g. when you try to clobber an SME tile.
So I will do this thanks for the suggestion.
================
Comment at: llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp:315
+ (PhysReg == AArch64::X19 || PhysReg == AArch64::W19))
+ return "X16 is used as the frame base pointer register.";
+
----------------
HsiangKai wrote:
> "X16" => "X19"
Doh, yeah I don't know why I keep mistyping it as 16.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133213/new/
https://reviews.llvm.org/D133213
More information about the llvm-commits
mailing list