[PATCH] D143576: [LowerTypeTests] Support generating Armv6-M jump tables.

Simon Tatham via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 8 06:27:59 PST 2023


simon_tatham added a comment.

I don't see how. `TargetTransformInfo` isn't a base class with target-specific descendants. It wraps an `Impl` class which you can't get out of it, and even if you could, there's no LLVM-style `dyn_cast` setup to allow detecting its concrete type.

(I mean, I could try //adding// both those facilities, but surely the result would be just as ugly, if not worse!)

I agree this is an unusual thing to be doing in `TargetTransformInfo`, because mostly its query methods return quantitative data to inform IR transformations that don't directly use target-specific facilities. But `LowerTypeTests` is a very unusual IR pass already for its use of `inlineasm`, so it's not surprising that it has unusual needs in this area.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D143576



More information about the llvm-commits mailing list