[PATCH] D30046: [globalisel] Change LLT constructor string into an LLT subclass that knows how to generate it.

Ahmed Bougacha via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 16 09:20:27 PST 2017


ab requested changes to this revision.
ab added a comment.
This revision now requires changes to proceed.

This is a layering violation, and that's a big no-no.  For instance, it woudln't be too hard to break the tblgen link by doing NFC changes to LLT.

I think the least bad option is to move the self-contained parts of LLT to some llvm/Support/LowLevelType.h, and put the Type* <> LLT conversions in llvm/CodeGen/LowLevelType.h, which would just include llvm/Support/LowLevelType.h.

And MVT isn't a good example to follow, in part because it's header-only, IIRC completely self-contained, and IIRC doesn't reference IR Type at all.


https://reviews.llvm.org/D30046





More information about the llvm-commits mailing list