[PATCH] D115750: [SLP]Further improvement of the cost model for scalars used in buildvectors.

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 3 09:04:07 PDT 2022


RKSimon added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:6583
+                             "insertelement users.\n";
+                   if (TEs.front()) TEs.front()->dump(); TEs.back()->dump();
+                   dbgs() << "SLP: Current total cost = " << Cost << "\n");
----------------
ABataev wrote:
> RKSimon wrote:
> > ABataev wrote:
> > > ABataev wrote:
> > > > RKSimon wrote:
> > > > > Is this correct - not sure if you want braces here or just a newline
> > > > Want to dump TreeEntries here, if possible, helps to get more info about the graph, rather than just an instruction.
> > > Ah, did not understand the question. Everything is ok here, just the first element might be a `nullptr`
> > OK - but maybe put TEs.back()->dump(); on a separate line so it doesn't look like it should be:
> > ```
> > if (TEs.front()) { TEs.front()->dump(); TEs.back()->dump(); }
> > ```
> > I'm very surprised clang-format didn't catch this
> Will enclose first dump into braces explicitly, clang-format wants to make them in one line.
That's scary - I guess because this is all inside the LLVM_DEBUG macro...


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115750/new/

https://reviews.llvm.org/D115750



More information about the llvm-commits mailing list