[PATCH] D60169: Proposed refactoring for lib/Target/X86 to remove layering issue

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 19 14:02:59 PDT 2019


rnk added a comment.

Personally, I wondered why X86MCTargetDesc depends on InstPrinter. I was thinking maybe it would be easiest to cut that dependency edge. Looking at the usages, I think it mostly uses the instprinter do that we can implement various `print*` methods of MC-derived classes, like `X86MCExpr::printImpl`. That makes some sense. For LLVM IR, we have a separate AsmParser library, but the AsmWriter is part of IR because it's just too darn convenient to be able to dump anything, any time, code size be damned. So, with that in mind, I guess merging them makes some sense. What do other people think?

The change to merge them is quite large. I wonder if it would be simpler to handle this like we handle clang/Sema+Parse. Aren't those also circularly dependent?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60169/new/

https://reviews.llvm.org/D60169





More information about the llvm-commits mailing list