[llvm] InstProfiling: Give names to profc_bias and profc_addr. NFC. (PR #95587)
Ellis Hoag via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 17 09:45:02 PDT 2024
================
@@ -926,10 +926,10 @@ Value *InstrLowerer::getCounterAddress(InstrProfCntrInstBase *I) {
if (TT.supportsCOMDAT())
Bias->setComdat(M.getOrInsertComdat(Bias->getName()));
}
- BiasLI = EntryBuilder.CreateLoad(Int64Ty, Bias);
+ BiasLI = EntryBuilder.CreateLoad(Int64Ty, Bias, "profc_bias");
}
auto *Add = Builder.CreateAdd(Builder.CreatePtrToInt(Addr, Int64Ty), BiasLI);
- return Builder.CreateIntToPtr(Add, Addr->getType());
+ return Builder.CreateIntToPtr(Add, Addr->getType(), "profc_addr");
----------------
ellishg wrote:
If you decide to leave out `profc_addr`, we might also want to leave out `pgocount` since the scope is small and the instructions are fairly simple. I can understand wanting `profc_bias` since those instructions are less obvious.
I just realized there are a few words on this naming in the programmer's manual. It doesn't have guidance on when and how to name these variables, which is unfortunate.
https://llvm.org/docs/ProgrammersManual.html#creating-and-inserting-new-instructions
https://github.com/llvm/llvm-project/pull/95587
More information about the llvm-commits
mailing list