<div class="gmail_quote"><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><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><div><br></div><div>-eric</div></div>