Recently introduced convertToDeclaration is very similar
to code used in filterModule function.
Patch reuses it to reduce duplication.
Details
Details
- Reviewers
pcc tejohnson • espindola - Commits
- rGd3704f67adb6: Recommit r324455 "[ThinLTO] - Simplify code in ThinLTOBitcodeWriter."
rG5f133dc99b42: [ThinLTO] - Simplify code in ThinLTOBitcodeWriter.
rL324574: Recommit r324455 "[ThinLTO] - Simplify code in ThinLTOBitcodeWriter."
rL324455: [ThinLTO] - Simplify code in ThinLTOBitcodeWriter.
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
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.