From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by sourceware.org (Postfix) with ESMTPS id A0E4C3858C52 for ; Wed, 18 May 2022 10:23:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A0E4C3858C52 Received: by mail-wr1-x436.google.com with SMTP id t6so2036887wra.4 for ; Wed, 18 May 2022 03:23:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Ix2pE/fqTBkcrmqHFFfBF9Jqf1MIDpiaZRnjMY8M8nc=; b=0N98uhZprBgf++HJsBh+cZqn0QYgDqFs1QgwzkPyDBwycIZpYd/BpvXkWnHLduXirX ncbywLbRSdtZU1ohSoVcfSM6geqTtsD5XpDG4KgVXt4I4w8SoabhGuPS7OhwPdPgUL0Q jNNb7EEFjR1cdXOy7gNSnd+SMiesHuYXu7S3VDO04GyeyGVY7z0xTKUfrH0NLzAaYWwD kRwqUoz/KW1kzcTq5+HPZEwa5nT4P4l06sany6beXvIDwOs7C2ChEVYlpphEk/bah819 nQ+oVH2u9WtEDzLjWK4iCDenrXF82k15lrLKiZH59JiNwgHmG5jEVyX2qv5uViqt3/3U jRnw== X-Gm-Message-State: AOAM530Y9VmwFyjsqWq4JmHAcK45od+WTDuyoR8yInUydjSZ1DyrCrZL jAW6CK7TvqjT1KQbp8yfAFO3MiZ64tXJQ65VKIQ= X-Google-Smtp-Source: ABdhPJyjGapThPWCXZrbCxgCBDWKkgyNUInh2ISmfEpqTOHXRblktL3ii0yuck2Yc/HxIp+u2t34/sRM5HrMbUhZkgA= X-Received: by 2002:a05:6000:1788:b0:20c:a43c:10fa with SMTP id e8-20020a056000178800b0020ca43c10famr21984934wrg.511.1652869400350; Wed, 18 May 2022 03:23:20 -0700 (PDT) MIME-Version: 1.0 References: <062812e4-e912-4eaf-876c-91006a6c47a6@gmx.net> In-Reply-To: From: Jonathan Wakely Date: Wed, 18 May 2022 11:23:09 +0100 Message-ID: Subject: Re: Re: gcc optimization options and lto (detailed info) To: Roman Kellner Cc: Stefan Ring , gcc-help Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 May 2022 10:23:23 -0000 On Wed, 18 May 2022 at 10:24, Roman Kellner wrote: > > Hi Jonathan, hi Stefan, hi all > > Thanks for your support. > > Since no detailed documenation on coding do's and dont's related to optimizations is available, except reading the code itself which will take me probably ages to get into, > is there any common good practice how to avoid effects of optimizations: Why do you want to avoid the effects of optimizations? If your code is correct, then it will behave the same optimized or unoptimized, LTO or not. I don't understand what you're so concerned about that you think you need to tweak optimization options in precise detail. If you think LTO might cause problems for your OS, you can just not use it. Don't contort the code in strange ways to solve hypothetical problems.