[PATCH] D23701: [PM] Rework the new PM support for building the ModuleSummaryIndex to directly produce the index as the value type result.

Chandler Carruth via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 18 18:55:06 PDT 2016


chandlerc created this revision.
chandlerc added a reviewer: tejohnson.
chandlerc added a subscriber: llvm-commits.
Herald added subscribers: mcrosier, mehdi_amini.

This requires making the index movable which is straightforward. It
greatly simplifies things by allowing us to completely avoid the builder
API and the layers of abstraction inherent there. Instead both pass
managers can directly construct these when run by value. They still
won't be constructed truly eagerly thanks to the optional in the legacy
PM. The code that directly builds the index can also just share a direct
function.

A notable change here is that the result type of the analysis for the
new PM is no longer a reference type. This was really problematic when
making changes to how we handle result types to make our interface
requirements *much* more strict and precise. But I think this is an
overall improvement.

https://reviews.llvm.org/D23701

Files:
  include/llvm/Analysis/ModuleSummaryAnalysis.h
  include/llvm/IR/ModuleSummaryIndex.h
  lib/Analysis/ModuleSummaryAnalysis.cpp
  lib/LTO/ThinLTOCodeGenerator.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23701.68642.patch
Type: text/x-patch
Size: 10483 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160819/c964f665/attachment.bin>


More information about the llvm-commits mailing list