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

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 26 12:29:43 PDT 2019


fhahn added a comment.

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.


Yes, it looks like there is another compile time problem in DSE, which is independent of the order query issue. I have an input file with a huge number of stores, and the majority of the time is spent getting dependency info (but not in OrderedBB). It is probably the same issue you are seeing. Did you create a PR for it already?


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