From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-oln040092253053.outbound.protection.outlook.com [40.92.253.53]) by sourceware.org (Postfix) with ESMTPS id 486E13857C73 for ; Thu, 12 Nov 2020 05:04:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 486E13857C73 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iLXnot9KoHpt+Lfj/bXVjlQya0TM8RwMywFMfK6dfgbBB8bzrNVAnGfAu8Rw2zzGaEWRcnwLuGFnE2RyV8CBwRzF7T7CeDrVvqEGVS5Ysvbiud+Jg2+kSpNW+3si9MUcRtmUsAxc8wRpdZQktHH+YePSD9ZBtWuPH+Iw86kG8c+b2a+AWlP0iIe1hNplYnj/jtuZ8md53O5/YRoachSJsHQLAVICqYPADNjsBGNsT8Z8lo9ErDm/0zDp/N4lCZObRr6XDalu1+gD35lVTfFnOuLKENqsOljEPaVAfJzMjxLKBjz9uHWz3BXyZNnk1FhDHBeALWFWIOFN0vnp1uwjuQ== 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=4iK3pSYMngYC7SUVuKn4KQVh+l/gi7rg9Mdgmi/425Y=; b=Swk+ADZSg6LGTojNjzt5J6+5RYsrGQZUgeXXB1LLJ8tKbIjOJ0GWXWHVHJqe5JOMs0bvptj5kCb4j7+7ldGnmO5Aph36tSRV3jkldXaYA/z+3ADDXJAWtex5kNF1186q5KdsXkCphYYItNmrmJw54ucz7Ra2yyG+yZvACx8nh5W9n9Cd3j02p51mu2VgtF4ZiYu+77C6ThfuctpHNtpQksfLB8UYv0iTvni5b2Kzx9minUovh5EamacAMC9Cr5rgrdk6QmVcg5QmDBvbLLuqmz/xbnMnTXOMSijvzi9fmjoRYQmC37PgsQKkTn+YmvmaI0oP+pL1Yre/4lKPId9q4A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from HK2APC01FT005.eop-APC01.prod.protection.outlook.com (2a01:111:e400:7ebc::4b) by HK2APC01HT048.eop-APC01.prod.protection.outlook.com (2a01:111:e400:7ebc::326) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3564.22; Thu, 12 Nov 2020 05:04:41 +0000 Received: from SL2PR02MB3596.apcprd02.prod.outlook.com (2a01:111:e400:7ebc::4a) by HK2APC01FT005.mail.protection.outlook.com (2a01:111:e400:7ebc::148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3564.22 via Frontend Transport; Thu, 12 Nov 2020 05:04:41 +0000 Received: from SL2PR02MB3596.apcprd02.prod.outlook.com ([fe80::a1e9:efdc:8c75:8377]) by SL2PR02MB3596.apcprd02.prod.outlook.com ([fe80::a1e9:efdc:8c75:8377%7]) with mapi id 15.20.3541.025; Thu, 12 Nov 2020 05:04:35 +0000 From: visitor x To: "gcc-help@gcc.gnu.org" Subject: Re: Re: When will gcc assign local variables to registers? Thread-Topic: Re: When will gcc assign local variables to registers? Thread-Index: AQHWt+mSQZgfAKBlWkyUlSXGaLkO3qnD8jO6 Date: Thu, 12 Nov 2020 05:04:35 +0000 Message-ID: References: In-Reply-To: Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-incomingtopheadermarker: OriginalChecksum:D5F9AEC01E1D93E1DE23208468407A8B00A9A491257450547295DFFC63941155; UpperCasedChecksum:5A431A297C167C667DF9B1F0757B080228F7E1F083FB3F90231DB3A2C40D5D0F; SizeAsReceived:6869; Count:43 x-tmn: [SjV49oAzAIf0ZxmAzMt+7R4iIKlqmK9jWp9ZJbMzFUA=] x-ms-publictraffictype: Email x-incomingheadercount: 43 x-eopattributedmessage: 0 x-ms-office365-filtering-correlation-id: 23276b87-4c00-47a4-165c-08d886c8731b x-ms-traffictypediagnostic: HK2APC01HT048: x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: xX0rEdgPknWoQo+jGY8jrctQe/LGCvJUOuZNLMtCmY9sEHY5Ie/r2CLS1qfk3Cxm4dp7JvaW3WTkV4MbculckgBR3Xs91TVV8kENp8jep4clVJhPSF0KND2Mtm5Jtt7rktFpQvmrII1I5C67em6Ggu8VP0RbeI2u/8+qBZcXjUAFQPr9jVhnOx328fwXYGyFL37JDZGTuCOMnWufGfQgzA== x-ms-exchange-antispam-messagedata: PJ6YupqXag+0w00qJp3iCL9qj+LFlMafK01chaIloxOBNyX7fWDppJytavUONwFuaCsxjKKn07KXYKxT+IBvZsk34r7Exb9W146lDDxGOcSKCDbQlu3c73o600SeFfZ0n4+sle7cmAAD+BNQDbRQog== x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-AuthSource: HK2APC01FT005.eop-APC01.prod.protection.outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 23276b87-4c00-47a4-165c-08d886c8731b X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Nov 2020 05:04:35.5221 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HK2APC01HT048 X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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: Thu, 12 Nov 2020 05:04:46 -0000 Thank you for the pointer. I learned SSA and realized that the problem is more challenging than I thou= ght. As far, my understanding of SSA is that compilers restrict the definit= ion site of each variable to only one by introducing phi-function and other= tools. In this way it facilitates data flow analysis and further optimizat= ion such as dead code elimination. My idea before is to list all possible manners that compilers assign variab= les to registers, then it may be easier to recover variables from binary. N= ow it seems to be an impossible mission. So I rethink my ultimate goal, ess= entially a track to variable access sequence, which doesn=92t require full = decompilation (maybe). All we need to know is whether two instructions access the same variable (o= r say object if compilers care about only values). It sounds like an alias = analysis in binary. Is it a specialized subfield in program/binary analysis= ?