From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 48EBE3857C5E; Wed, 6 Dec 2023 18:02:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 48EBE3857C5E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1701885756; bh=2iesR3iZ12v3VN3oetidohei25VniB/ObjgTh62VDBA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=PsA+qoQwIl0Ay308aEfD3WsvBGy0keUoyql5bz08LakAgWleBQbhwTyaKyMhZ4IB4 aK+JekbofZCL4qBP03ZjY96G+OsvOvylMMN0nfF1ge+vySUpiDfosFoOd6hSDJY/6h 5jniSkskPHsXAxfRKrnO4MbAVvs+0mmh9AqwprvE= From: "matz at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/88345] -Os overrides -falign-functions=N on the command line Date: Wed, 06 Dec 2023 18:02:35 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 9.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: matz at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: hubicka at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D88345 --- Comment #21 from Michael Matz --- (In reply to Jan Hubicka from comment #20) > >=20 > > Live patching (user-space) doesn't depend on any particular alignment of > > functions, on x86-64 at least. (The plan for other architectures would= n't need > > any specific alignment either). Note that the above complaints about m= issing > > alignment is for kernel (!) ftrace/livepatching on arm64 (!), not on x8= 6_64. >=20 > I had impression that x86-64 also needs forced alignment so the patching > can be always done atomically. But it is not a big practical difference > if we go with a flag specifying minimal function alignment. Not for userspace live patching (it's done while the process is stopped). kernel live patching may or may not need it. Point being that alignment shouldn't be implied by the live patching options as its orthogonal.=