Path: csiph.com!au2pb.net!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news.iecc.com!.POSTED!nerds-end From: George Neuner Newsgroups: comp.compilers Subject: Re: IR Representation Date: Tue, 08 Sep 2015 18:45:55 -0400 Organization: A noiseless patient Spider Lines: 19 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <15-09-012@comp.compilers> References: <15-09-005@comp.compilers> NNTP-Posting-Host: news.iecc.com Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: miucha.iecc.com 1441758489 42657 2001:470:1f07:1126:0:676f:7373:6970 (9 Sep 2015 00:28:09 GMT) X-Complaints-To: abuse@iecc.com NNTP-Posting-Date: Wed, 9 Sep 2015 00:28:09 +0000 (UTC) Keywords: optimize, code Posted-Date: 08 Sep 2015 20:28:09 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Xref: csiph.com comp.compilers:1607 On Fri, 4 Sep 2015 14:39:00 -0300, Cisar wrote: >- I believe that a linear sequence of instructions would be easier to >optimize/analyze, right? Not necessarily. Tree or dag forms tend to be better for analyzing control flow and for rearranging code. Dag forms are particularly good for finding common subexpressions. Linear forms tend to be better for analyzing data dependencies, for scheduling, etc. Some compilers use a hybrid IR where control flow is expressed as a tree or dag in which the nodes are linear form basic blocks. And, of course, you can use a linear IR as your basic form and, where needed, create separate trees or dags which reference it. George