[PATCH] Use a Factory Method for MachineFunctionInfo Creation

Mehdi Amini mehdi.amini at apple.com
Mon Dec 22 20:55:14 PST 2014


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-a-factory-method-to-MachineFunctionInfo.patch
Type: application/octet-stream
Size: 1404 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141222/6b1a6c78/attachment.obj>
-------------- next part --------------




More information about the llvm-commits mailing list