[llvm] 200f3bb - [NFC][LLVM] Namespace cleanup in SpeculativeExecution.cpp (#163767)

via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 16 10:16:28 PDT 2025


Author: Rahul Joshi
Date: 2025-10-16T10:16:24-07:00
New Revision: 200f3bb3066951ccd13cc75830edc236cd7906d4

URL: https://github.com/llvm/llvm-project/commit/200f3bb3066951ccd13cc75830edc236cd7906d4
DIFF: https://github.com/llvm/llvm-project/commit/200f3bb3066951ccd13cc75830edc236cd7906d4.diff

LOG: [NFC][LLVM] Namespace cleanup in SpeculativeExecution.cpp (#163767)

Added: 
    

Modified: 
    llvm/lib/Transforms/Scalar/SpeculativeExecution.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Scalar/SpeculativeExecution.cpp b/llvm/lib/Transforms/Scalar/SpeculativeExecution.cpp
index ebcbd2bf87a87..fa66a038844db 100644
--- a/llvm/lib/Transforms/Scalar/SpeculativeExecution.cpp
+++ b/llvm/lib/Transforms/Scalar/SpeculativeExecution.cpp
@@ -149,8 +149,6 @@ bool SpeculativeExecutionLegacyPass::runOnFunction(Function &F) {
   return Impl.runImpl(F, TTI);
 }
 
-namespace llvm {
-
 bool SpeculativeExecutionPass::runImpl(Function &F, TargetTransformInfo *TTI) {
   if (OnlyIfDivergentTarget && !TTI->hasBranchDivergence(&F)) {
     LLVM_DEBUG(dbgs() << "Not running SpeculativeExecution because "
@@ -328,11 +326,11 @@ bool SpeculativeExecutionPass::considerHoistingFromTo(
   return true;
 }
 
-FunctionPass *createSpeculativeExecutionPass() {
+FunctionPass *llvm::createSpeculativeExecutionPass() {
   return new SpeculativeExecutionLegacyPass();
 }
 
-FunctionPass *createSpeculativeExecutionIfHasBranchDivergencePass() {
+FunctionPass *llvm::createSpeculativeExecutionIfHasBranchDivergencePass() {
   return new SpeculativeExecutionLegacyPass(/* OnlyIfDivergentTarget = */ true);
 }
 
@@ -362,4 +360,3 @@ void SpeculativeExecutionPass::printPipeline(
     OS << "only-if-divergent-target";
   OS << '>';
 }
-}  // namespace llvm


        


More information about the llvm-commits mailing list