[PATCH] D97722: [NewPM] Revamp pass names

Madhur Amilkanthwar via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 3 10:25:32 PST 2021


The purpose of C++ class names is to use it as key to the table. If you can
assign an unique key to each pass inherited from PassInfoMixin then that
will serve the purpose. But the idea of keeping a central map is useful for
programmers' productivity.




On Wed, Mar 3, 2021, 2:12 AM Arthur Eubanks via Phabricator <
reviews at reviews.llvm.org> wrote:

> aeubanks added a comment.
>
> I don't really like having C++ class names leak anywhere, it's at best
> implementation defined and as mentioned leads to incompatibilities between
> compilers.
> If we create a table, we have to duplicate class names and make sure
> they're in sync which doesn't seem ideal. I'm trying to reduce the number
> of things to worry about with the new PM, namely the difference between the
> 2 types of pass names.
> The legacy PM already didn't have C++ class names leaked and it seems like
> people were fine with not having a central list of class names for passes.
>
> For passes added in *TargetMachine, currently the name is duplicated, but
> I do plan on a follow-up change to easily register passes which will solve
> that.
>
>
> Repository:
>   rG LLVM Github Monorepo
>
> CHANGES SINCE LAST ACTION
>   https://reviews.llvm.org/D97722/new/
>
> https://reviews.llvm.org/D97722
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210303/3d33e110/attachment.html>


More information about the llvm-commits mailing list