[PATCH] D17962: [PM] Port memdep to the new pass manager.

Chandler Carruth via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 8 10:05:39 PST 2016


chandlerc created this revision.
chandlerc added a reviewer: joker.eph.
chandlerc added a subscriber: llvm-commits.
Herald added a subscriber: mcrosier.

This is a fairly straightforward port to the new pass manager with one
exception. It removes a very questionable use of releaseMemory() in
the old pass to invalidate its caches between runs on a function.
I don't think this is really guaranteed to be safe. I've just used the
more direct port to the new PM to address this by nuking the results
object each time the pass runs. While this could cause some minor malloc
traffic increase, I don't expect the compile time performance hit to be
noticable, and it makes the correctness and other aspects of the pass
much easier to reason about.

That said I'm sending it out for review so that Mehdi can help me confirm that
there is no obvious and significant compile time regression here.

There is sadly very limited testing at this point as there are only two
tests of memdep, and both rely on GVN. I'll be porting GVN next and that
will exercise this heavily though.

http://reviews.llvm.org/D17962

Files:
  include/llvm/Analysis/MemoryDependenceAnalysis.h
  include/llvm/InitializePasses.h
  include/llvm/Transforms/Utils/BasicBlockUtils.h
  lib/Analysis/Analysis.cpp
  lib/Analysis/MemDepPrinter.cpp
  lib/Analysis/MemoryDependenceAnalysis.cpp
  lib/CodeGen/MachineFunctionPass.cpp
  lib/Passes/PassBuilder.cpp
  lib/Passes/PassRegistry.def
  lib/Transforms/Scalar/DeadStoreElimination.cpp
  lib/Transforms/Scalar/GVN.cpp
  lib/Transforms/Scalar/MemCpyOptimizer.cpp
  lib/Transforms/Scalar/MergedLoadStoreMotion.cpp
  lib/Transforms/Utils/BasicBlockUtils.cpp
  test/Other/new-pass-manager.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17962.50050.patch
Type: text/x-patch
Size: 39117 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160308/6884a49e/attachment.bin>


More information about the llvm-commits mailing list