[PATCH] D59788: [MemDepAnalysis] Allow caller to pass in an OrderedBasicBlock.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 27 10:03:32 PDT 2019


fhahn added a comment.

In D59788#1443448 <https://reviews.llvm.org/D59788#1443448>, @fhahn wrote:

> In D59788#1441992 <https://reviews.llvm.org/D59788#1441992>, @rnk wrote:
>
> > I was working on restarting the in-instruction order tracking discussion, but the pathological test case I came up with didn't benefit from it:
> >
> >   const std::vector<unsigned> &lookup(std::string k) {
> >     static std::map<std::string, std::vector<unsigned>> the_map = {
> >       {"s", {1, 2, 3}},
> >       {"s", {1, 2, 3}},
> >       ... repeat 200x, or arbitrarily long
> >     };
> >     return the_map[k];
> >   }
> >
> >
> > This causes clang to generate a very large BB that DSE spends a lot of time on. However, invalidating the order numbers only on removal wasn't enough to drastically improve performance, so I lost the motivation to drive it through. The ordering helped significantly with my less simplified test case (`std::map<unsigned, std::vector<StringRef>>`, see rC345329 <https://reviews.llvm.org/rC345329> which removed it), but I wasn't happy with it.
>
>
>


@rnk is there any chance you still have the full reproducer? I did not manage to reproduce the long time spent in DSE with the snippet above and I cannot share the reproducer I have unfortunately :(


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D59788





More information about the llvm-commits mailing list