[llvm] fc3cc8a - [VectorCombine] skip debug intrinsics first for efficiency

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 29 10:58:55 PDT 2020


Author: Sanjay Patel
Date: 2020-03-29T13:58:04-04:00
New Revision: fc3cc8a4b074d42f5352824ccd53de2e592a7af7

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

LOG: [VectorCombine] skip debug intrinsics first for efficiency

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Vectorize/VectorCombine.cpp b/llvm/lib/Transforms/Vectorize/VectorCombine.cpp
index ba3ff87884b0..70ee8cc233cc 100644
--- a/llvm/lib/Transforms/Vectorize/VectorCombine.cpp
+++ b/llvm/lib/Transforms/Vectorize/VectorCombine.cpp
@@ -261,8 +261,11 @@ static bool runImpl(Function &F, const TargetTransformInfo &TTI,
     // use->defs, so we're more likely to succeed by starting from the bottom.
     // TODO: It could be more efficient to remove dead instructions
     //       iteratively in this loop rather than waiting until the end.
-    for (Instruction &I : make_range(BB.rbegin(), BB.rend()))
+    for (Instruction &I : make_range(BB.rbegin(), BB.rend())) {
+      if (isa<DbgInfoIntrinsic>(I))
+        continue;
       MadeChange |= foldExtractExtract(I, TTI);
+    }
   }
 
   // We're done with transforms, so remove dead instructions.


        


More information about the llvm-commits mailing list