[PATCH] D26402: [ThinLTO] Make inline assembly handling more efficient in summary

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 8 08:08:49 PST 2016


tejohnson created this revision.
tejohnson added a reviewer: mehdi_amini.
tejohnson added a subscriber: llvm-commits.

The change in r285513 to prevent exporting of locals used in
inline asm added all locals in the llvm.used set to the reference
set of functions containing inline asm. Since these locals were marked
NoRename, this automatically prevented importing of the function.

Unfortunately, this caused an explosion in the summary reference lists
in some cases. In my particular example, it happened for a large protocol
buffer generated C++ file, where many of the generated functions
contained an inline asm call. It was exacerbated when doing a ThinLTO
PGO instrumentation build, where the PGO instrumentation included
thousands of private __profd_* values that were added to llvm.used.

We really only need to include a single llvm.used local (NoRename) value
in the reference list of a function containing inline asm to block it
being imported. However, it seems cleaner to add a flag to the summary
that explicitly describes this situation, which is what this patch does.


https://reviews.llvm.org/D26402

Files:
  include/llvm/IR/ModuleSummaryIndex.h
  lib/Analysis/ModuleSummaryAnalysis.cpp
  lib/Bitcode/Reader/BitcodeReader.cpp
  lib/Bitcode/Writer/BitcodeWriter.cpp
  lib/Transforms/IPO/FunctionImport.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26402.77197.patch
Type: text/x-patch
Size: 6546 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161108/66ae1dd5/attachment.bin>


More information about the llvm-commits mailing list