[PATCH] D41741: LowerTypeTests: Add limited support for aliases
Vlad Tsyrklevich via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 4 14:08:56 PST 2018
vlad.tsyrklevich created this revision.
vlad.tsyrklevich added a reviewer: pcc.
Herald added subscribers: mgrang, eraman, mehdi_amini.
LowerTypeTests moves some function definitions from individual object
files to the merged module, leaving a stub to be called in the merged
module's jump table. If an alias was pointing to such a function
definition LowerTypeTests would fail because the alias would be left
without a definition to point to.
This change 1) emits information about aliases to the ThinLTO summary,
2. replaces aliases pointing to function definitions that are moved to
the merged module with function declarations, and 3) re-emits those
aliases in the merged module pointing to the correct function
definitions.
The patch does not correctly fix all possible mis-uses of aliases in
LowerTypeTests. For example, it does not handle aliases with a different
type from the pointed to function.
The addition of alias data increases the size of Chrome build artifacts
by less than 1%.
Repository:
rL LLVM
https://reviews.llvm.org/D41741
Files:
lib/Transforms/IPO/LowerTypeTests.cpp
lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp
test/Transforms/LowerTypeTests/Inputs/import-alias.yaml
test/Transforms/LowerTypeTests/export-alias.ll
test/Transforms/LowerTypeTests/import-alias.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41741.128651.patch
Type: text/x-patch
Size: 6293 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180104/b6eda9d7/attachment.bin>
More information about the llvm-commits
mailing list