[PATCH] D133891: [SLP]Improve isUndefVector function by adding insertelement analysis.
Alexey Bataev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 20 12:23:21 PDT 2022
ABataev added a comment.
In D133891#3803629 <https://reviews.llvm.org/D133891#3803629>, @srj wrote:
> As of yet, I haven't been unable to get a `.ll` file that will repro this -- we crash while generating it, and AFAIK there isn't a way to defer running the SLP pass until llc -- so currently the simplest repro case requires building Halide locally. In the meantime, here's a stacktrace of the failure:
>
> #1 0x00007ffff07a6546 in __GI_abort () at abort.c:79
> #2 0x00007ffff07fded8 in __libc_message (action=action at entry=do_abort, fmt=fmt at entry=0x7ffff091bc2f "%s\n") at ../sysdeps/posix/libc_fatal.c:155
> #3 0x00007ffff080593a in malloc_printerr (str=str at entry=0x7ffff091e0d0 "free(): invalid next size (fast)") at malloc.c:5628
> #4 0x00007ffff0806d94 in _int_free (av=0x7ffff0952b80 <main_arena>, p=0x555556250330, have_lock=have_lock at entry=0) at malloc.c:4481
> #5 0x00007ffff080a9d4 in __GI___libc_free (mem=<optimized out>) at malloc.c:3309
> #6 0x00007ffff3b8dc7a in llvm::slpvectorizer::BoUpSLP::vectorizeTree(llvm::slpvectorizer::BoUpSLP::TreeEntry*) [clone .localalias] ()
> from /usr/local/google/home/srj/GitHub/Halide/distrib/lib/libHalide.so
> #7 0x00007ffff3ba4a11 in llvm::slpvectorizer::BoUpSLP::vectorizeTree(llvm::MapVector<llvm::Value*, llvm::SmallVector<llvm::Instruction*, 2u>, llvm::DenseMap<llvm::Value*, unsigned int, llvm::DenseMapInfo<llvm::Value*, void>, llvm::detail::DenseMapPair<llvm::Value*, unsigned int> >, std::vector<std::pair<llvm::Value*, llvm::SmallVector<llvm::Instruction*, 2u> >, std::allocator<std::pair<llvm::Value*, llvm::SmallVector<llvm::Instruction*, 2u> > > > >&) [clone .localalias] ()
> from /usr/local/google/home/srj/GitHub/Halide/distrib/lib/libHalide.so
> #8 0x00007ffff3ba71b4 in llvm::slpvectorizer::BoUpSLP::vectorizeTree() [clone .localalias] ()
> from /usr/local/google/home/srj/GitHub/Halide/distrib/lib/libHalide.so
> #9 0x00007ffff3bb4f0b in llvm::SLPVectorizerPass::tryToVectorizeList(llvm::ArrayRef<llvm::Value*>, llvm::slpvectorizer::BoUpSLP&, bool) [clone .localalias] ()
> from /usr/local/google/home/srj/GitHub/Halide/distrib/lib/libHalide.so
> #10 0x00007ffff3bb6976 in llvm::SLPVectorizerPass::vectorizeInsertElementInst(llvm::InsertElementInst*, llvm::BasicBlock*, llvm::slpvectorizer::BoUpSLP&) [clone .localalias] () from /usr/local/google/home/srj/GitHub/Halide/distrib/lib/libHalide.so
> #11 0x00007ffff3bb8096 in llvm::SLPVectorizerPass::vectorizeSimpleInstructions(llvm::SmallSetVector<llvm::Instruction*, 8u>&, llvm::BasicBlock*, llvm::slpvectorizer::BoUpSLP&, bool) [clone .localalias] () from /usr/local/google/home/srj/GitHub/Halide/distrib/lib/libHalide.so
> #12 0x00007ffff3bbb77d in llvm::SLPVectorizerPass::vectorizeChainsInBlock(llvm::BasicBlock*, llvm::slpvectorizer::BoUpSLP&) [clone .localalias] ()
> from /usr/local/google/home/srj/GitHub/Halide/distrib/lib/libHalide.so
> #13 0x00007ffff3bbef23 in llvm::SLPVectorizerPass::runImpl(llvm::Function&, llvm::ScalarEvolution*, llvm::TargetTransformInfo*, llvm::TargetLibraryInfo*, llvm::--Type <RET> for more, q to quit, c to continue without paging--
> AAResults*, llvm::LoopInfo*, llvm::DominatorTree*, llvm::AssumptionCache*, llvm::DemandedBits*, llvm::OptimizationRemarkEmitter*) [clone .localalias] ()
> from /usr/local/google/home/srj/GitHub/Halide/distrib/lib/libHalide.so
> #14 0x00007ffff3bbfcdd in llvm::SLPVectorizerPass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) ()
> from /usr/local/google/home/srj/GitHub/Halide/distrib/lib/libHalide.so
> #15 0x00007ffff368cd9d in llvm::detail::PassModel<llvm::Function, llvm::SLPVectorizerPass, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) () from /usr/local/google/home/srj/GitHub/Halide/distrib/lib/libHalide.so
> #16 0x00007ffff24b9d2c in llvm::detail::PassModel<llvm::Function, llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) ()
> from /usr/local/google/home/srj/GitHub/Halide/distrib/lib/libHalide.so
> #17 0x00007ffff4bcec07 in llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) ()
> from /usr/local/google/home/srj/GitHub/Halide/distrib/lib/libHalide.so
> #18 0x00007ffff15afda5 in llvm::detail::PassModel<llvm::Module, llvm::ModuleToFunctionPassAdaptor, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) () from /usr/local/google/home/srj/GitHub/Halide/distrib/lib/libHalide.so
> #19 0x00007ffff15a6e9c in Halide::Internal::CodeGen_LLVM::optimize_module() () from /usr/local/google/home/srj/GitHub/Halide/distrib/lib/libHalide.so
You can use -mllvm -opt-bisect-limit to limit number of transformation passes
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133891/new/
https://reviews.llvm.org/D133891
More information about the llvm-commits
mailing list