[PATCH] D42971: [ThinLTO] - Simplify code in ThinLTOBitcodeWriter.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 7 05:29:55 PST 2018


grimar requested review of this revision.
grimar added a comment.

Sorry, I had to revert it after commit, it broke few bots.

It happened because it turned out that order of proccessing
globals is important here, with 'ShouldKeepDefinition' implementation
it works only if aliases are dropped first (like original code did)
(https://github.com/llvm-mirror/llvm/blob/master/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp#L320)
otherwise if we drop the aliasee's metadata first, condition 
`if (HasTypeMetadata(...` will never trigger for alias and we never drop it.

I suggest to use work list then. It even makes code a bit more simple.
Updated the patch, verified that check-all pass.


https://reviews.llvm.org/D42971





More information about the llvm-commits mailing list