On Mon, Mar 18, 2019 at 04:38:42PM +0100, Peter Zijlstra wrote: > With CONFIG_PROFILE_ALL_BRANCHES, the "if" macro converts the > conditional to an array index. This can cause GCC to create horrible > code. When there are nested ifs, the generated code uses register > values to encode branching decisions. > > Make it easier for GCC to optimize by keeping the conditional as a > conditional rather than converting it to an integer. This shrinks the > generated code quite a bit, and also makes the code sane enough for > objtool to understand. > > Cc: rost...@goodmis.org > Cc: valentin.schnei...@arm.com > Cc: l...@amacapital.net > Cc: brge...@gmail.com > Cc: catalin.mari...@arm.com > Cc: mi...@kernel.org > Cc: dvlas...@redhat.com > Cc: will.dea...@arm.com > Cc: julien.thie...@arm.com > Cc: torva...@linux-foundation.org > Cc: dvyu...@google.com > Cc: b...@alien8.de > Cc: t...@linutronix.de > Cc: james.mo...@arm.com > Cc: l...@kernel.org > Cc: h...@zytor.com > Reported-by: Peter Zijlstra <pet...@infradead.org> > Signed-off-by: Josh Poimboeuf <jpoim...@redhat.com> > Signed-off-by: Peter Zijlstra (Intel) <pet...@infradead.org> > Link: https://lkml.kernel.org/r/20190307174802.46fmpysxyo35hh43@treble
Missing "From" me. -- Josh