[llvm] Overhaul the TargetMachine and LLVMTargetMachine Classes (PR #111234)

via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 9 04:34:52 PDT 2024


paperchalice wrote:

> 1. Make `CodeGenTargetMachine` behave the same way it did before, and add a `dyn_cast` option to it to confirm whether a `TargetMachine` was implemented with code gen support; or
> 2. Keep the PR the way it is; i.e. `CodeGenTargetMachine` is just a set of function implementations a `TargetMachine` can inherit.

I'd prefer 2, because IIUC all targets in `lib/Target` inherit `LLVMTargetMachine`. For long-term goal, I would prefer to avoid concept like `LLVMTargetMachine`, but this is off-topic.

https://github.com/llvm/llvm-project/pull/111234


More information about the llvm-commits mailing list