[PATCH] D31963: ThinLTOBitcodeWriter: keep comdats together, rename if leader is renamed

Bob Haarman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 11 17:23:26 PDT 2017


inglorion added inline comments.


================
Comment at: test/Transforms/ThinLTOBitcodeWriter/comdat.ll:5-26
+; MERGED: ${{"?lwt[^ ]+}} = comdat any
+; MERGED: $nlwt = comdat any
+; MERGED: {{@"?lwt_aliasee[^ ]*}} = private unnamed_addr global
+; MERGED-SAME: comdat(${{"?lwt[^ ]+}})
+; MERGED: {{@"?lwt_nl[^ ]+}} = hidden unnamed_addr global
+; MERGED-SAME: comdat(${{"?lwt[^ ]+}})
+; MERGED: {{@"?nlwt_aliasee[^ ]*}} = private unnamed_addr global
----------------
pcc wrote:
> Please move these checks next to the corresponding input IR (where possible).
What is a good way to do that? When I wrote the checks next to the IR, I got errors, because the IR was emitted in a different order from how I wrote it. Specifically, all the comdat declarations come first, then all the globals, then all the functions. So I could reorder my code to be in that same order, but that would mix things from different comdats together, which, as you pointed out elsewhere, made the test harder to read. I thought this was a reasonable compromise - putting all the same comdats together in the IR, and putting the same modules together in the checks. But if you have a better suggestion, I'm all ears.


https://reviews.llvm.org/D31963





More information about the llvm-commits mailing list