<div dir="ltr">LGTM<div><br></div><div>Marcello</div></div><div class="gmail_extra"><br><div class="gmail_quote">2014-12-22 20:55 GMT-08:00 Mehdi Amini <span dir="ltr"><<a href="mailto:mehdi.amini@apple.com" target="_blank">mehdi.amini@apple.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
Attached is a patch that add a factory static method for MachineFunctionInfo Creation.<br>
<br>
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.<br>
<br>
—<br>
<span class="HOEnZb"><font color="#888888">Mehdi<br>
<br>
</font></span><br><br>
<br>
<br>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div><br></div>