<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Nov 14, 2014 at 5:04 PM, Eric Christopher <span dir="ltr"><<a href="mailto:echristo@gmail.com" target="_blank">echristo@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_quote"><span class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_quote"><div><br></div><div>a) How does this change the pass manager? Some of the command line options (many) change which passes are run when. It should be as simple as checking the function attribute for each pass to decide when to run, but if one invokes a chain then you might have other issues or if the command line option invokes module/cgscc passes (see c below).</div><div> </div></div></blockquote><div><br></div></span><div>Relatedly you might want to look at all of the flags passed via -backend-args, i.e.  -enable-global-merge=false as a good first step for things that will need to be handled this way. I.e. some optimization options could be turned off because of known code problems with those function (similarly opt levels etc).</div><div><br></div><div>Honestly not sure how important this use is though. LTO + different optimization options for each module/function? Weird. But it's something to keep in mind I guess.</div><span class="HOEnZb"><font color="#888888"><div><br></div></font></span></div></blockquote><div><br></div><div>From what I heard and read, there seems to be cases where different functions in a module require different optimization options. But for now, I'm going to assume that we can handle most cases by just checking the function attribute to decide whether or not to run a pass.</div></div></div></div>