From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18143 invoked by alias); 12 Mar 2018 20:13:49 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 18134 invoked by uid 89); 12 Mar 2018 20:13:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:3424, HX-Received:10.176.80.229, H*c:alternative, road X-HELO: mail-ua0-f175.google.com Received: from mail-ua0-f175.google.com (HELO mail-ua0-f175.google.com) (209.85.217.175) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 12 Mar 2018 20:13:47 +0000 Received: by mail-ua0-f175.google.com with SMTP id n24so7682521ual.12 for ; Mon, 12 Mar 2018 13:13:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Nt4U1XfaXUkxxJvC2LmEGEkhVi17bBqtJsBmgJ6fK4w=; b=lydoPRnMIdNvUwfe9EZ4EyxjPWrQy2BbRKgHnUfkzjKEAWXoUQoFirTXFUhCtKXkSk BgfyfT8JwGkO7aXD2xNc9ii+5Yo8ukcf5xehS++++dhoj7xZOvSxD4pzVqj3kIrh6Y1X FZKaGgwImtVjaAEbXNhLxLjqHlukQ1uZpOs66k/EhFZezPhDQhkJw7t84J+LgTZBGqM1 H6TenVR3O3HqbZG9saonEC1wkMwOkvPxR91RQOgTofi4ARaHwIlbAJChXgzS95lAinss xx1gzAM6kjEvSkAUwpQcfQTk9ZjjUOuzlwOakUnJsqSq33R6fpqAmElCaWodDinhFtZH gFMQ== X-Gm-Message-State: AElRT7GzwCVcbgw+iRRwX/mq8WxoKp9jaEQJcdfXvGu+v2meKSv4G3H3 Jze28jMGPIGqvrUJMhb9NLrDUZvgIKRoCpudikk= X-Google-Smtp-Source: AG47ELv/GeC6pU9jiyK3gZMUjiyKUr9Ou+aaKFhAwErwWWgZ6l4Tgqz+RaqK9IYOwqv44UXOrgIB7dvdtosy6UYC/0M= X-Received: by 10.176.80.229 with SMTP id d34mr6507142uaa.88.1520885625841; Mon, 12 Mar 2018 13:13:45 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.68.70 with HTTP; Mon, 12 Mar 2018 13:13:45 -0700 (PDT) In-Reply-To: References: From: Deruupu Sutoomo Date: Mon, 12 Mar 2018 20:13:00 -0000 Message-ID: Subject: Re: [ Plugins ] Read-only, or...? To: Richard Biener Cc: GCC Development Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2018-03/txt/msg00148.txt.bz2 Alright! I was trying to avoid touching internal functions, but I suppose it would have to be inevitable. Before I got diving into the old archives, documentation and blog posts, do you have any pointers for where I should look to get started -- especially for using GCC internals? On Mon, Mar 12, 2018 at 2:15 PM, Richard Biener wrote: > On Mon, Mar 12, 2018 at 3:47 PM, Deruupu Sutoomo > wrote: > > Hello! I have a question regarding Plugins... > > > > I implemented a small one as a test to get used to working with GIMPLE > and > > basic blocks. I read the Plugin API page, the wiki, and followed a > tutorial > > to get started. However, I seem to have hit a bit of a road block in > > actually modifying the output of the compiled program itself. > > > > Are plugins a "read-only" look at the compilation model? If I wanted to > > provide an implementation of an intrinsic or modify a C++-compiled > > Translation Unit in some fashion, are plugins what I should be looking > at? > > plugins are not restricted to introspection, you have full access to all > internal GCC functions so modifying the IL is possible. > > It might be easier to actually patch GCC though. > > Richard. > > > Background: I am attempting to add a function which relies on "compiler > > magic" and the file system to pull data made available to the program, > > replacing every instance of that function with the appropriate > > implementation (the data is to be constexpr). > > > > ( This is my first time on the mailing list, after carefully reading the > > descriptions for the others and asking around, this seemed to be > > appropriate. Let em know if I have the wrong space! ) >