Author: Sanjay Patel Date: 2021-01-10T12:32:21-05:00 New Revision: 0aa75fb12faa04e07ba1a6e334605357b6a159c9
URL: https://github.com/llvm/llvm-project/commit/0aa75fb12faa04e07ba1a6e334605357b6a159c9 DIFF: https://github.com/llvm/llvm-project/commit/0aa75fb12faa04e07ba1a6e334605357b6a159c9.diff LOG: [SLP] put verifyFunction call behind EXPENSIVE_CHECKS A severe compile-time slowdown from this call is noted in: https://llvm.org/PR48689 My naive fix was to put it under LLVM_DEBUG ( 267ff79 ), but that's not limiting in the way we want. This is a quick fix (or we could just remove the call completely and rely on some later pass to discover potentially wrong IR?). A bigger/better fix would be to improve/limit verifyFunction() as noted in: https://llvm.org/PR47712 Differential Revision: https://reviews.llvm.org/D94328 Added: Modified: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp Removed: ################################################################################ diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp index f124dd8ef374..d0b6b432e93e 100644 --- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp +++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp @@ -2499,7 +2499,11 @@ BoUpSLP::~BoUpSLP() { "trying to erase instruction with users."); Pair.getFirst()->eraseFromParent(); } - LLVM_DEBUG(verifyFunction(*F)); +#ifdef EXPENSIVE_CHECKS + // If we could guarantee that this call is not extremely slow, we could + // remove the ifdef limitation (see PR47712). + assert(!verifyFunction(*F, %dbgs())); +#endif } void BoUpSLP::eraseInstructions(ArrayRef<Value *> AV) { _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits