[llvm] 4e6ff75 - [Vectorize] Fix a warning

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 22 15:35:13 PDT 2024


Author: Kazu Hirata
Date: 2024-08-22T15:35:05-07:00
New Revision: 4e6ff75efa14e0156c005ffcf3d7964dc754b792

URL: https://github.com/llvm/llvm-project/commit/4e6ff75efa14e0156c005ffcf3d7964dc754b792
DIFF: https://github.com/llvm/llvm-project/commit/4e6ff75efa14e0156c005ffcf3d7964dc754b792.diff

LOG: [Vectorize] Fix a warning

This patch fixes:

  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:7245:1: error:
  unused function 'planContainsAdditionalSimplifications'
  [-Werror,-Wunused-function]

Added: 
    

Modified: 
    llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index f2de38f46c86aa..f3fb888f20cbbd 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -7241,7 +7241,7 @@ InstructionCost LoopVectorizationPlanner::cost(VPlan &Plan,
 /// not have corresponding recipes in \p Plan and are not marked to be ignored
 /// in \p CostCtx. This means the VPlan contains simplification that the legacy
 /// cost-model did not account for.
-static bool
+[[maybe_unused]] static bool
 planContainsAdditionalSimplifications(VPlan &Plan, ElementCount VF,
                                       VPCostContext &CostCtx, Loop *TheLoop,
                                       LoopVectorizationCostModel &CM) {


        


More information about the llvm-commits mailing list