[PATCH] D155375: [wip/help] Access TargetMachine without crashing
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 31 14:36:07 PDT 2023
arsenm added a comment.
In D155375#4522229 <https://reviews.llvm.org/D155375#4522229>, @JonChesterfield wrote:
> In D155375#4508222 <https://reviews.llvm.org/D155375#4508222>, @arsenm wrote:
>
>> What were you trying to use the target machine for here?
>
> I wanted to query the amount of LDS available for the architecture with the plan of setting [min max] frame dimensions on allocations. Working around by leaving max unspecified when unknown, where it is unknown because I couldn't make this ^ patch work. I think it would be possible to only use target machine from the old pass manager but that's a mess. Very tempting to delete the new pass manager code and go down that path, but probably better not to,
You should be able to have the TargetMachine as a member of the pass struct, passed in to the pass constructor in the passbuilder callback
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155375/new/
https://reviews.llvm.org/D155375
More information about the llvm-commits
mailing list