[PATCH] Use a Factory Method for MachineFunctionInfo Creation
Marcello Maggioni
hayarms at gmail.com
Mon Dec 22 23:27:46 PST 2014
LGTM
Marcello
2014-12-22 20:55 GMT-08:00 Mehdi Amini <mehdi.amini at apple.com>:
> Hi,
>
> Attached is a patch that add a factory static method for
> MachineFunctionInfo Creation.
>
> The context is that we want to have a pass which would be common to
> multiple backends. It uses a base MachineFunctionInfo class to communicate
> with a given backend. The backend specific passes needs to have specific
> fields in the MachineFunctionInfo class, and thus uses a subclass. The
> problem is that the “backend independent” pass only knows about the common
> MachineFunctionInfo subclass. Overriding the factory method allows to
> delegate the creation of the MachineFunctionInfo to a virtual method on the
> TargetMachine for instance.
>
> —
> Mehdi
>
>
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141222/8c871ced/attachment.html>
More information about the llvm-commits
mailing list