<div dir="ltr">Right now we have a healthy mixture of two ways to respond to -Oz and -Os in LLVM:<div><br></div><div>1) Pass this info to the PassManagerBuilder and then toggle some flag to the pass to change thresholds.</div><div>2) When running over IR, inspect it for the minsize or optsize attribute.</div><div><br></div><div>Regardless of the particulars of what these mean and/or how they relate to -O2 vs -O3 for example, I'd really like to at least get to *one* way of doing this.</div><div><br></div><div>The only way that is really compatible with LTO use cases is to use the function attributes, so I'd suggest we actively work toward that. That sound good to others? Thoughts?</div><div><br></div><div>If folks like this, I will attempt to update the few places where we get this wrong. I already have some patches but wanted to make sure everyone likes this direction.</div><div><br></div><div>-Chandler</div></div>