[PATCH] D123964: CodeGen: Replace some uses of LLVMTargetMachine with TargetMachine
Matthias Braun via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 26 20:17:13 PDT 2022
MatzeB requested changes to this revision.
MatzeB added a comment.
This revision now requires changes to proceed.
> All target knowledge should be in the TargetMachine base
class. LLVMTargetMachine extends with pass machinery, which most code
should not have access to.
My understanding was that `TargetMachine` is the public/outside interface (for frontends etc.). And that `LLVMTargetMachine` is a concrete subclass for all targets implemented using `lib/CodeGen`. In theory you can implement a complete target from scratch without using `lib/CodeGen` and then you would implement `TargetMachine` without using `LLVMTargetMachine`.
So to me this change looks confusing/unnecessary, since any code within lib/CodeGen is totally free to use `LLVMTargetMachine` in my interpretation...
Requesting changes for clarification
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123964/new/
https://reviews.llvm.org/D123964
More information about the llvm-commits
mailing list