[PATCH] D48505: ThinLTO: Preserve alias-to-alias information (PR37884)

Vlad Tsyrklevich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 22 14:10:38 PDT 2018


vlad.tsyrklevich created this revision.
vlad.tsyrklevich added reviewers: eugenis, tejohnson.
Herald added subscribers: llvm-commits, steven_wu, eraman, inglorion, mehdi_amini.

Change the BitcodeWriter/ModuleSummaryAnalysis to save the target of an
alias as the aliasee it points to, instead of the base object the alias
points to, e.g. without recursively dereferencing aliases until a
GlobalObject is reached. This is necessary for interprocedural analyses
that want to conservatively avoid evaluating call paths including
dso_preemptable symbols such as dso_local alias -> dso_preemptable alias
-> dso_local function.

Value::stripInBoundsOffsetsNoFollowAliases() is required to match the
logic of GlobalAlias::getBaseObject() without 'dereferencing' aliases,
its implementation matches that of stripPointerCastsNoFollowAliases().
The current stripInBoundsOffsets*() methods did not document that they
also strip aliases.


Repository:
  rL LLVM

https://reviews.llvm.org/D48505

Files:
  include/llvm/IR/ModuleSummaryIndex.h
  include/llvm/IR/Value.h
  lib/Analysis/ModuleSummaryAnalysis.cpp
  lib/Bitcode/Writer/BitcodeWriter.cpp
  lib/IR/Value.cpp
  lib/LTO/LTO.cpp
  test/Bitcode/thinlto-alias-to-alias.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48505.152540.patch
Type: text/x-patch
Size: 8447 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180622/0c31e982/attachment.bin>


More information about the llvm-commits mailing list