On Tue, Apr 23, 2019 at 12:35 PM Sasha Levin <sashal@xxxxxxxxxx> wrote: > > On Tue, Apr 23, 2019 at 12:04:21PM -0700, Nathan Chancellor wrote: > >Hi Greg and Sasha, > > > >Please apply this commit to 4.4 through 5.0 (patches are threaded in > >reply to this one), which will prevent Clang from emitting references > >to compiler runtime functions and doing some performance-killing > >optimization when using CONFIG_CC_OPTIMIZE_FOR_SIZE. > > > >Please let me know if I did something wrong or if there are any > >objections. > > This looks like a fix for a performance regression, which don't usually > end up in stable unless they are severe enough. > > This patch looks simple enough, and seeing peterz on it suggests to me > that this was significant enough for someone to notice. Is this really > the case, or is this just one of those %0.01 performance regression > things? I don't recall specific measurements, but when I tried Peter's suggestion and measured it, I wondered to myself how the initial patch was ever correct. The revert (what Nathan sent) should really be applied for folks building w/ Clang+CONFIG_CC_OPTIMIZE_FOR_SIZE=y, which is what some CrOS devices (and some Qualcomm BSPs) are doing. Rather than cherry pick this patch around to a bunch of different trees, it would be much better for this to land in -stable and for those trees not to diverge over this. Nathan, thank you for sending. -- Thanks, ~Nick Desaulniers