[PATCH] D49362: [ThinLTO] Compute constant references

Eugene Leviant via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 30 12:04:27 PDT 2018


evgeny777 updated this revision to Diff 158033.
evgeny777 added a comment.
Herald added a subscriber: jfb.

I've updated the review with the full version. I've tested on few large applications and results are quite promising in terms of both performance and image size

> Will we miss some cases if the reference is on something like a bitcast that feeds a non-volatile load?

I don't think so. Actually this logic conforms to `GlobalStatus` computation in `analyzeGlobalAux`, which is the core of `globalopt`


https://reviews.llvm.org/D49362

Files:
  include/llvm/Bitcode/LLVMBitCodes.h
  include/llvm/IR/ModuleSummaryIndex.h
  include/llvm/LTO/LTO.h
  include/llvm/Linker/IRMover.h
  lib/Analysis/ModuleSummaryAnalysis.cpp
  lib/Bitcode/Reader/BitcodeReader.cpp
  lib/Bitcode/Writer/BitcodeWriter.cpp
  lib/IR/ModuleSummaryIndex.cpp
  lib/LTO/LTO.cpp
  lib/LTO/ThinLTOCodeGenerator.cpp
  lib/Linker/IRMover.cpp
  lib/Linker/LinkModules.cpp
  lib/Transforms/IPO/FunctionImport.cpp
  test/Bitcode/thinlto-function-summary-callgraph-relbf.ll
  test/Bitcode/thinlto-function-summary-callgraph.ll
  test/ThinLTO/X86/Inputs/globals-import.ll
  test/ThinLTO/X86/Inputs/index-const-prop.ll
  test/ThinLTO/X86/dot-dumper.ll
  test/ThinLTO/X86/export.ll
  test/ThinLTO/X86/funcimport.ll
  test/ThinLTO/X86/globals-import-const-fold.ll
  test/ThinLTO/X86/globals-import.ll
  test/ThinLTO/X86/index-const-prop.ll
  test/ThinLTO/X86/index-const-prop2.ll
  tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49362.158033.patch
Type: text/x-patch
Size: 43573 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180730/6870c864/attachment.bin>


More information about the llvm-commits mailing list