[PATCH] [MemoryDependenceAnalysis] Fix compile time slowdown

Bruno Cardoso Lopes bruno.cardoso at gmail.com
Tue Sep 30 12:46:03 PDT 2014


Hi Robin and Daniel,

Thanks for the review.

Regarding Robin's questions:

- ~1% compile time speed up on sqlite3
- It looks like it's redundant indeed; However, getNonLocalPointerDepFromBB can
  bail out inside recursive calls and the final result maybe be false (which is
  success in this case) instead of true; i.e. we currently have no way, besides
  the limit, to tell GVN that we're aborting because the search is expensive. I
  could change the way it works to be more clear about this, but I'm not sure
  it's worth the effort and I tried to be less intrusive as possible.
- Because of GVN, I assumed 100 as the low threshold and only tried from
  100-1000, I don't have all the numbers anymore, but Limit=500 yields 1m54s
  and Limit=1000 goes near ~2m50.

Also, regenerated the patch with more context.

Daniel, that's awesome. Thanks for sharing your plans, looking forward for this
speedup. Let me know how much you can get for this testcase, I'm curious :-)

The source in question comes from http://mednafen.sourceforge.net, to
reproduce:

$ cd mednafen
$ clang -flto -O2 -c src/hw_cpu/huc6280/huc6280.cpp -I./include -DHAVE_MKDIR -DLSB_FIRST -DSIZEOF_DOUBLE=8 -o huc.bc

http://reviews.llvm.org/D5532

Files:
  lib/Analysis/MemoryDependenceAnalysis.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5532.14243.patch
Type: text/x-patch
Size: 1700 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140930/850872dd/attachment.bin>


More information about the llvm-commits mailing list