<div dir="ltr"><div class="gmail_extra">On Thu, Mar 28, 2013 at 12:22 PM, Nadav Rotem <span dir="ltr"><<a href="mailto:nrotem@apple.com" target="_blank" class="cremed">nrotem@apple.com</a>></span> wrote:<br><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">IMHO the right way to handle target function attributes is to re-initialize the target machine and TTI for every function (if the attributes changed).  Do you have another solution in mind ?</blockquote>
</div><br>I don't really understand this.</div><div class="gmail_extra"><br></div><div class="gmail_extra">TargetMachine and TTI may be quite expensive to initialize. Doing so for each (sometimes tiny) function processed doesn't make a lot of sense to me.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">Wouldn't it be better to design a TargetMachine (and TTI, or other passes that are similar) which provides context-sensitive answers? You could imagine this being a wrapper which delegates to one of two real TM and TTI implementations based on a mode switch.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra" style>Alternatively, we could look at partitioning functions into two modules, and then bring up the infrastructure once per module.</div><div class="gmail_extra" style>
<br></div><div class="gmail_extra" style>I would personally choose between these based on how much shared functionality there would be in the TM and TTI between the two.</div></div>