aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/CodeGenPrepare.cpp
diff options
context:
space:
mode:
authorMingming Liu <mingmingl@google.com>2025-09-16 12:51:54 -0700
committerGitHub <noreply@github.com>2025-09-16 12:51:54 -0700
commit9277bcd1ab83fbfecfaaa5e15f3821808c5a6e38 (patch)
treeccbf69b474e809fcbb12913a9217b68ea6a5fd2b /llvm/lib/CodeGen/CodeGenPrepare.cpp
parent20d4e5cb8c51dc191e06554dd0d0def84a9edd0a (diff)
downloadllvm-9277bcd1ab83fbfecfaaa5e15f3821808c5a6e38.zip
llvm-9277bcd1ab83fbfecfaaa5e15f3821808c5a6e38.tar.gz
llvm-9277bcd1ab83fbfecfaaa5e15f3821808c5a6e38.tar.bz2
Revert "[NFCI][Globals] In GlobalObjects::setSectionPrefix, do conditional update if existing prefix is not equivalent to the new one. Returns whether prefix changed." (#159159)
Reverts llvm/llvm-project#158460 due to buildbot failures
Diffstat (limited to 'llvm/lib/CodeGen/CodeGenPrepare.cpp')
-rw-r--r--llvm/lib/CodeGen/CodeGenPrepare.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp
index 92d8768..9db4c9e 100644
--- a/llvm/lib/CodeGen/CodeGenPrepare.cpp
+++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp
@@ -583,23 +583,23 @@ bool CodeGenPrepare::_run(Function &F) {
// if requested.
if (BBSectionsGuidedSectionPrefix && BBSectionsProfileReader &&
BBSectionsProfileReader->isFunctionHot(F.getName())) {
- EverMadeChange |= F.setSectionPrefix("hot");
+ F.setSectionPrefix("hot");
} else if (ProfileGuidedSectionPrefix) {
// The hot attribute overwrites profile count based hotness while profile
// counts based hotness overwrite the cold attribute.
// This is a conservative behabvior.
if (F.hasFnAttribute(Attribute::Hot) ||
PSI->isFunctionHotInCallGraph(&F, *BFI))
- EverMadeChange |= F.setSectionPrefix("hot");
+ F.setSectionPrefix("hot");
// If PSI shows this function is not hot, we will placed the function
// into unlikely section if (1) PSI shows this is a cold function, or
// (2) the function has a attribute of cold.
else if (PSI->isFunctionColdInCallGraph(&F, *BFI) ||
F.hasFnAttribute(Attribute::Cold))
- EverMadeChange |= F.setSectionPrefix("unlikely");
+ F.setSectionPrefix("unlikely");
else if (ProfileUnknownInSpecialSection && PSI->hasPartialSampleProfile() &&
PSI->isFunctionHotnessUnknown(F))
- EverMadeChange |= F.setSectionPrefix("unknown");
+ F.setSectionPrefix("unknown");
}
/// This optimization identifies DIV instructions that can be