================
@@ -2769,6 +2769,23 @@ namespace {
 
 } // end anonymous namespace
 
+StringRef AsmPrinter::getConstantSectionSuffix(const Constant *C) const {
----------------
snehasish wrote:

Consider refactoring a bit to reduce nesting --

```
if(!TM.Options.EnableStaticDataPartitioning || C == nullptr || SDPI == nullptr 
|| PSI == nullptr) return "";
auto Count = SDPI->getConstantProfileCount(C);
if(!Count.has_value()) return "";

if (PSI->isHotCount(*Count)) {
 return "hot";
} else if (PSI->isColdCount(*Count) && !SDPI->hasUnknownCount(C)) {
  return "unlikely";
}
return "";
```

https://github.com/llvm/llvm-project/pull/129781
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to