From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80047.outbound.protection.outlook.com [40.107.8.47]) by sourceware.org (Postfix) with ESMTPS id D9A26398600D; Fri, 11 Sep 2020 10:32:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D9A26398600D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=Andrea.Corallo@arm.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Vd/9n5cfVVA6a5ya3Rj2f0XzTLycWaq+IZBmpfJ5cYg=; b=tBE7Blw+69vOdAZ9TMZlN2YhCSFnHod1vVCjkywhwNmMvIBXUBpum88DCyn4Pn1fzyRvF+YN3i4fJepDau8L6lPZ/OQPTwRVShssfhdCHrsxB5qzJcA1hF1u3iFdqD05+c/feHxgGbbVpJ91GwZWmQny6EQpjP3k9bvN7WSoxCI= Received: from DB6PR0802CA0035.eurprd08.prod.outlook.com (2603:10a6:4:a3::21) by AM0PR08MB4241.eurprd08.prod.outlook.com (2603:10a6:208:140::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3370.16; Fri, 11 Sep 2020 10:32:05 +0000 Received: from DB5EUR03FT029.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:a3:cafe::a6) by DB6PR0802CA0035.outlook.office365.com (2603:10a6:4:a3::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3370.16 via Frontend Transport; Fri, 11 Sep 2020 10:32:05 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; gcc.gnu.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;gcc.gnu.org; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT029.mail.protection.outlook.com (10.152.20.131) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3370.16 via Frontend Transport; Fri, 11 Sep 2020 10:32:04 +0000 Received: ("Tessian outbound e8cdb8c6f386:v64"); Fri, 11 Sep 2020 10:32:04 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 9a137ecbf174013d X-CR-MTA-TID: 64aa7808 Received: from 8661b5145826.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 96DFD34D-E503-43EB-8CE0-1401EAA14830.1; Fri, 11 Sep 2020 10:31:42 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 8661b5145826.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 11 Sep 2020 10:31:42 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CwKEH29pzBiVvjDL5Un+bHDSk5NwWJFJ2X6yd8YvIzdhaz4wvzlyQPb0TWj0/Wfv5xo9HAI52PpdQ6W0Z2r8M/8QgK+EewaiIBe8lmjswd6kEjK8yqjGkprvg7pdPh0wcBA/qbnJyFlVJFNHq499mrp/NsFnnT+HiIuXGPM0j/F/YtkdXk4lC05Ynmq0cBxuDwCWwdsMVoBhTTDKVRB1KEpgsZ9KWqJzVVzV5QmdDu+6WDDjBv2XglRFnnVkHGLNUcILu2bSuKASexA7I1eRW0n1FRvwyU507PRQBo7zizvxJDwa2iS6g0uDZ1psvTDRQZXI53hEjQmwoSn5MJhRMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Vd/9n5cfVVA6a5ya3Rj2f0XzTLycWaq+IZBmpfJ5cYg=; b=KwWGXGt73/Qm6EFkUT/QctwUHub6ajNM+gtE7Vfhr12hp0XIgI3kpzH5kBLh6XQUtbv0RSPD2XYwBki1wq2ZMR9YWxLqCQfLeYml7xpdYwQKNo+WEeYTmjp2fQISdgR0ciOvznHAiAQZRImD1Dk9eIw5ooQYp99Adt8+EGkjxE3K5x95N7c+AJV/Oj/cmkkCMbLMKofab4lh6snBdTNCCHsJYodXxywx6iHeAwj9qBwhNGA4+A8lAugvCF6PdM2RoXJL8IGb7VsL7e7n708k2rKJlLzH2pQDF843klA3BJa6rNVkGzDXAdAJsw4y3jhPnFHmFK/zVVo2Vmcgd3nePA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Vd/9n5cfVVA6a5ya3Rj2f0XzTLycWaq+IZBmpfJ5cYg=; b=tBE7Blw+69vOdAZ9TMZlN2YhCSFnHod1vVCjkywhwNmMvIBXUBpum88DCyn4Pn1fzyRvF+YN3i4fJepDau8L6lPZ/OQPTwRVShssfhdCHrsxB5qzJcA1hF1u3iFdqD05+c/feHxgGbbVpJ91GwZWmQny6EQpjP3k9bvN7WSoxCI= Authentication-Results-Original: gcc.gnu.org; dkim=none (message not signed) header.d=none;gcc.gnu.org; dmarc=none action=none header.from=arm.com; Received: from AM6PR08MB4900.eurprd08.prod.outlook.com (2603:10a6:20b:cc::10) by AM6PR08MB4643.eurprd08.prod.outlook.com (2603:10a6:20b:c8::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3370.16; Fri, 11 Sep 2020 10:31:41 +0000 Received: from AM6PR08MB4900.eurprd08.prod.outlook.com ([fe80::d070:f136:4090:9ed3]) by AM6PR08MB4900.eurprd08.prod.outlook.com ([fe80::d070:f136:4090:9ed3%5]) with mapi id 15.20.3348.019; Fri, 11 Sep 2020 10:31:41 +0000 From: Andrea Corallo To: David Malcolm Cc: jit@gcc.gnu.org, nd@arm.com, gcc-patches@gcc.gnu.org Subject: Re: [PATCH V2] libgccjit: Add new gcc_jit_context_new_blob entry point References: <59a8d345c642d49281a601278946e087a4bbe3e2.camel@redhat.com> <87zh9kumwi.fsf@arm.com> <93e3d65a0b04b13a5d5c9970a2058d167357ed6c.camel@redhat.com> <22479e6a6a1e27df07a3d2c2cfb8c6c8420a7d3d.camel@redhat.com> Date: Fri, 11 Sep 2020 12:31:39 +0200 In-Reply-To: (David Malcolm's message of "Thu, 10 Sep 2020 18:22:44 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: LO2P265CA0461.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a2::17) To AM6PR08MB4900.eurprd08.prod.outlook.com (2603:10a6:20b:cc::10) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from e124257 (217.140.106.37) by LO2P265CA0461.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a2::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3370.16 via Frontend Transport; Fri, 11 Sep 2020 10:31:40 +0000 X-Originating-IP: [217.140.106.37] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: efd9708b-cd3b-4f2e-9dc4-08d8563ded6b X-MS-TrafficTypeDiagnostic: AM6PR08MB4643:|AM0PR08MB4241: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:9508;OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 6QMvBzGfi1IOiLWb1Ji2idlyjJSnEkG1bUB6Evn7fKmXQ67zxU4mj+ja2SmRq5Ttp4oflL6PrqK/tZ2GJ1O732MRIbaDUxWVf8Wz1lA2ZVZ2YEmip4Lp8QOrjHV1WJvXwKLJ6YwEWpZUTkLfyUS+8uEehI2r9CcwKW0exRTUG3mAlEh1ZTrLxUrFGfckTL8BJGWx0ByqBWOhviR7LfEENfTZib+NtjFIf0sE2r+chCs8WBFpj1iC1WHD1m26qOaT7xZf0wplLmotswunl0v5YFwTgaS4QVjoZkPlAbuX6n9chJrMJZQKv47sVUQaXaJIWParpoqkMS0Lompk48t0Bg== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR08MB4900.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(39860400002)(366004)(136003)(346002)(396003)(6916009)(44832011)(66946007)(5660300002)(52116002)(6486002)(316002)(66556008)(66476007)(6496006)(8676002)(36756003)(16526019)(86362001)(2906002)(4326008)(478600001)(8936002)(186003)(956004)(26005)(2616005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: +mG7c+JK1bFX8nG5bMUNBypDipH14zbfw0VVyjTQ5JGF2QAwu7ee+UcgTBUaytaBYpAVSIiqb2JK8ugY5T44eNWkEWnIn1+B+bYd0ptOci4ekGovqdzWZsjpu3cRgpPT6f3ilvg9/kMafZ1+hOd7OcDo8jdNlphVVS8ND9urtqzCzj23O2m5WbfZKizkoHYoTwpgwUj4nd+utfeWv+FV3DdBxknd77M0aHFy1Xy4r3CAAlj+pLUh6AGGGsxYtFYt3FSgg/3FXha4y4FiCoHDJfYHaXGw3+Ewytaw54CpcjhXsLpYeljIT2jYlEpP5A6jb0QlmYq/lVJCo0xTKOhfXy230uTCAe5xGSQ8ZyqionjtafBYzIlXFsTqPaf8p2dufFlATN32HbeTZg/joBD1vq8JceKzdfoWYMiJKuKXyuIrIKChNbo9CIfR7Mu4V4EZ2QSUdiGs34Khf26tI8ly8sJfu+Ax5Z08NX8WWmy3uKXoLY3H0dS6kvihaFD39kLUasrCVGKSfKAxGd5unwVcZ6BTHqJUEBFYCKfWzZzVJ4BIWp449IYpiosuuuJv5xccYvBRMiOWBZkNI+KNPi84L9p7y/D/lPNs8Q0TXLkZ6lQfnk5NsRqZ7OJobeZ85aIDZGVEZI9I1cRDoHzpJXwMuw== X-MS-Exchange-Transport-Forked: True X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4643 Original-Authentication-Results: gcc.gnu.org; dkim=none (message not signed) header.d=none;gcc.gnu.org; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT029.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 946228ab-4f79-49c5-010c-08d8563ddf20 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1gWWHsZo51UIUxF6c5QN50ztPAw3zTX21i32BHOg+5DbcMZUIhCB5BmKXuaaME0Pmyv6sOVR/NU5zDCwA3mPqeRASLkLkL5f7xRTd5IZl2h6HdYLQtozszkU57UOGGkV32c9L0OzZ/AnZTT3N6GWzbKBubqklrs0jqlPN5P+h04WhjdUr+v6pH7cV2dND/C6CLzsOZnTG0JdUDfUQhpv72Eu36CJnXHjPgFDiADdPWAqO0gflIsTpHPQmEe8UViBlJm8Nv77Xv/yt2LxE3ZYcYaJjZP6itBgISAZ1MX+U9eNNAqyURwm8FOiqqNCT3PdUKpl1onL6HqIIYJBPVPRO3iQRkthJgQNTtqQAJdONul442M/meGr/cFBy9NJZ4ibQKhojq9J2k7flT2Dy53DOg== X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(4636009)(396003)(39860400002)(136003)(376002)(346002)(46966005)(336012)(70206006)(956004)(6486002)(86362001)(2616005)(450100002)(44832011)(316002)(4326008)(6496006)(36756003)(26005)(478600001)(2906002)(8676002)(6862004)(70586007)(81166007)(356005)(47076004)(186003)(82740400003)(82310400003)(16526019)(8936002)(5660300002); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Sep 2020 10:32:04.9081 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: efd9708b-cd3b-4f2e-9dc4-08d8563ded6b X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DB5EUR03FT029.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB4241 X-Spam-Status: No, score=-14.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, MSGID_FROM_MTA_HEADER, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: jit@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Jit mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Sep 2020 10:32:08 -0000 Hi Dave, thanks for the review! David Malcolm writes: [...] > Was there a reason for using reinterpret_cast here, rather than > static_cast? Yes the reason is that apparently we can't use static_cast for that: "error: invalid =E2=80=98static_cast=E2=80=99 from type =E2=80=98gcc_jit_lv= alue*=E2=80=99 to type =E2=80=98gcc::jit::recording::global*=E2=80=99" Why is that is another question I fear I'm not very qualified to answer. If you feel is necessary and want to suggest some rework to improve this I'll be happy to put some effort in if you like. >> diff --git a/gcc/jit/libgccjit.h b/gcc/jit/libgccjit.h >> index 1c5a12e9c01..3cbcbef2693 100644 >> --- a/gcc/jit/libgccjit.h >> +++ b/gcc/jit/libgccjit.h >> @@ -788,6 +788,20 @@ gcc_jit_context_new_global (gcc_jit_context *ctxt, >> gcc_jit_type *type, >> const char *name); >> =20 >> +#define LIBGCCJIT_HAVE_gcc_jit_global_set_initializer >> + >> +/* Set a static initializer for a global return the global itself. [...] > > OK for master with these nits fixed, assuming your usual testing. > > Thanks! > Dave After applying the suggestions and having tested it I've installed the patch as 4ecc0061c40. Thanks! Andrea