From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by sourceware.org (Postfix) with ESMTPS id 28A9C3858C74 for ; Sun, 6 Feb 2022 19:40:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 28A9C3858C74 Received: by mail-wr1-x429.google.com with SMTP id m5so4016835wrb.2 for ; Sun, 06 Feb 2022 11:40:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=XPzVEht04mq+L5S6TcQXXjnGtBfYI9AG6erWvjYoREg=; b=3G6EmGG+nLXVnbfdovoTNsXH59PIyC3U8SWVk7PEGVgfJtJ4EHXhHw5nJvMZkx80wx qXwoB/FQ3Ib/Kr92WaIN+bYxQbSjAz+EDKzTSkdKdVsK3RfQBAnQgjuLndpSmIANjSpo dRyy8iylRFRpJqSeGGpse64+oXfjcZUQGtElkNQIRSIsGqyfBJXU2L0KQpap93WTigXQ wxIyXGuntXs+Fq4QwCaOlz38n7/h7vA2XA2u33C+h1eUdwBgSh3j2Rm4DlpTb6oyWbbY v1LNUXfy+qRvUGUAingMTgyDXBSKN9WI8a+Zvo3hdcZE9uUCAY+iAVUIk5imKZqunqiI STaQ== X-Gm-Message-State: AOAM530s9YE0RQnPl5hCLjh5+h7iy7rakdzVAYdNRyelDFhTsa9Q1bsy 45skhVAWD21nX6QIV50aEdmfVpiH3vIxf7jBYBYw1Rcp X-Google-Smtp-Source: ABdhPJzISR6+YEhr7olwbtLD17JSMXGj5a+bbNB2P99DUxD+OWm4lkAwgs791ntg9+5P4I2OowcpRgTRFp2G5MvmB+A= X-Received: by 2002:adf:e843:: with SMTP id d3mr3512041wrn.528.1644176457778; Sun, 06 Feb 2022 11:40:57 -0800 (PST) MIME-Version: 1.0 From: Shubham Narlawar Date: Mon, 7 Feb 2022 01:10:45 +0530 Message-ID: Subject: Query regarding generating NOTE instruction at GIMPLE level To: GCC Development X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Feb 2022 19:41:01 -0000 Hello, Is it possible to generate a NOTE instruction at GIMPLE level? My use case scenario is as below - I want to create a note for __builtin_xyz(_x) such that there is a placeholder just before function call and in RTL pass, I want to modify/assign register number at this placeholder location. _x = (unsigned int) _y; __builtin_xyz(_x); //_x is constant expression For above builtin function call, I want to insert a note just before the function call. I tried generating GIMPLE_NOP instruction as below - _x = (unsigned int) _y; GIMPLE_NOP __builtin_xyz(_x); But as per my understanding, a NOTE instruction behaves similar to GIMPLE_NOP that is to create a placeholder for some computation. 1. Is there any attribute that can be added to GIMPLE instruction? If yes, then there must be a mechanism that translates those attributes to NOTE instructions in the RTL pass? 2. Is there any different approach on achieving above goal? Thanks and Regards, Shubham