From patchwork Mon Feb 11 16:32:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Sebor X-Patchwork-Id: 1039939 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-495833-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="SjM83A/Y"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="uhFIyMzg"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43yrsx1C1Pz9sML for ; Tue, 12 Feb 2019 03:32:17 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=mPhFmj2zRLmcrheRfzp5TJwqENC0IbmfVbwLp2SDcpdZTW694Y kChSA4jv3B6dZA2bai/BWNtLpr4DkeHf0t97TnBvwVptX7U1sG+/IzJKzKLuwzip T1UJ7DJiOZ8juvHJcACpoLo8kQ222y5G5ZWL/0Yc+Y1L/DmxKCld9fhXw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; s= default; bh=cxl9KYnznkabSDTuVB11Y36KM3U=; b=SjM83A/YZ2AGnGefOT2w Gb7o9BIe6yfqbw1uTa/aN8msONG2ssCOghOkcDkqYBFurS9dRN0IVXBKMbGO1j11 +zbkWpR83JhsB3zMKGsNKLqTVb2g88SJ1cLT2uczz21YEjJFOVZixlMHvB+y973Q 0ooXa7j+7g32RTsT8sueA0A= Received: (qmail 45739 invoked by alias); 11 Feb 2019 16:32:11 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 45715 invoked by uid 89); 11 Feb 2019 16:32:10 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00, FREEMAIL_FROM, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=designed, appearances X-HELO: mail-qk1-f176.google.com Received: from mail-qk1-f176.google.com (HELO mail-qk1-f176.google.com) (209.85.222.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 11 Feb 2019 16:32:09 +0000 Received: by mail-qk1-f176.google.com with SMTP id m9so6792387qkl.4 for ; Mon, 11 Feb 2019 08:32:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:subject:message-id:date:user-agent:mime-version :content-language; bh=Jh+gwsJwE/EyfGV7YysPahxJ/KHB2kH3HDFHw00wago=; b=uhFIyMzgRcA5OtluwIj7OyXGpywcpgUhJ02fCqeBOyuFfoMSaZmHh2vFRFBjtNnc7G KX6jkjnX74Xyrpnqh0oaLKKZD4iGwjJGjduT4wjTe8tXuM9fnj7uRODfQEvORWKGtPEW qq4zGPHSm4oflbVu+dsaw8ObGDMbMix1RV0ZkPSGCyMWHmA4i3fVIUCdePHaU9WjeEwu 80QZxaZltUnZ+r86MPSEWM5aXYT8lOXNDhDekXJphmvkKIyZaZ19Uk+NFTA5Hq6BksZl z/TTEaJfJX+Ippjx72/X9Pj6FaX+rnQNlZxtxZ+ZsngxMKa4+tg06S0PTAELV5Ax9DTt a1Tg== Received: from [192.168.0.106] (174-16-97-54.hlrn.qwest.net. [174.16.97.54]) by smtp.gmail.com with ESMTPSA id k5sm9245101qti.41.2019.02.11.08.32.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Feb 2019 08:32:06 -0800 (PST) To: Jan Hubicka , "gcc-patches@gcc.gnu.org" From: Martin Sebor Subject: [PATCH] correct comments in tree-prof/inliner-1.c Message-ID: Date: Mon, 11 Feb 2019 09:32:05 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1 MIME-Version: 1.0 X-IsSubscribed: yes I noticed the comments in the test don't correspond to what it's designed to exercise: namely that the call to hot_function() is inlined and the call to cold_function() is not, rather than the other way around. Attached is a patch that adjusts the comments. Honza, please let me know if this looks correct to you. Thaks Martin gcc/testsuite/ChangeLog: * gcc.dg/tree-prof/inliner-1.c: Correct comments. Index: gcc/testsuite/gcc.dg/tree-prof/inliner-1.c =================================================================== --- gcc/testsuite/gcc.dg/tree-prof/inliner-1.c (revision 268755) +++ gcc/testsuite/gcc.dg/tree-prof/inliner-1.c (working copy) @@ -28,15 +28,15 @@ main () for (i = 0; i < 1000000; i++) { if (a) - cold_function (); + cold_function (); /* Should not be inlined. */ else - hot_function (); + hot_function (); /* Should be inlined. */ } return 0; } -/* cold function should be inlined, while hot function should not. - Look for "cold_function () [tail call];" call statement not for the - declaration or other appearances of the string in dump. */ +/* The call to hot_function should be inlined, while cold_function should + not be. Look for the "cold_function ();" call statement and not for + its declaration or other occurrences of the string in the dump. */ /* { dg-final-use { scan-tree-dump "cold_function ..;" "optimized"} } */ /* { dg-final-use { scan-tree-dump-not "hot_function ..;" "optimized"} } */