================
@@ -148,17 +184,9 @@ bool
StaticDataSplitter::partitionStaticDataWithProfiles(MachineFunction &MF) {
if (MJTI->updateJumpTableEntryHotness(JTI, Hotness))
++NumChangedJumpTables;
- } else {
- // Find global variables with local linkage.
- const GlobalVariable *GV =
- getLocalLinkageGlobalVariable(Op.getGlobal());
- // Skip 'special' global variables conservatively because they are
- // often handled specially, and skip those not in static data
- // sections.
- if (!GV || GV->getName().starts_with("llvm.") ||
- !inStaticDataSection(GV, TM))
- continue;
- SDPI->addConstantProfileCount(GV, Count);
+ } else if (const Constant *C =
+ getConstant(Op, MF.getTarget(), MF.getConstantPool())) {
+ SDPI->addConstantProfileCount(C, Count);
----------------
williamweixiao wrote:
yes, we don't need to update "NumChangedJumpTables" here. but why do we need to
return "true" or "false" for this function?
https://github.com/llvm/llvm-project/pull/129781
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits