From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 298C23858C42; Wed, 22 Nov 2023 13:20:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 298C23858C42 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1700659228; bh=QrXjM7QcLfIQHzTqLbmENjfvGI2VP3OQSovKPaveRJE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=SC7UNBuJJc09on98XmG4LGmnEDumZFaKLAyuRyZi8iJ2fMT54eCdw24PbIvm7Sduu QVUJiQ7Idhi17Xzt78qYPZ1viTbEzhEYxhJCCU75vMv3zPqtttkIokejKoL+WGj1xJ F173v7dG489vBw3fcKcB+1U9eavjCUcjGNgHDWGA= From: "hubicka 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, 22 Nov 2023 13:20:26 +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: hubicka at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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 Jan Hubicka changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hubicka at gcc dot gnu.org --- Comment #17 from Jan Hubicka --- -falign-functions/-falign-jumps/-falign-labels/-falign-loops are originally= are intended for performance tuning. Starting function entry close to the end = of page of code cache may lead to wasted code cache space as well as higher overhead calling the function when CPU fetches page which contains just lit= tle useful information. As such I would like to keep them affecting only hot code (we should update documentation for that). Internally we have FUNCTION_BOUNDARY which specif= ies minimal alignment needed by ABI, which is set to 8bits for i386. My understanding is that -fpatchable-function-entry requires the alignment to = be 64bits in order to make it possible to atomically change the instruction. So perhaps we want to make FUNCTION_BOUNDARY to be 64 for functions where we output the patchable entry? I am also OK with extending the flag syntax or adding -fmin-function-alignm= ent to specify optional user-defined minimum (increase FUNCTION_BOUNDARY) if th= at seems useful, but I think the first one is most consistent way to go with l= ive patching?=