Path: csiph.com!xmission!feeder.erje.net!us.feeder.erje.net!news.linkpendium.com!news.linkpendium.com!news.iecc.com!.POSTED!nerds-end From: =?UTF-8?B?Q8Opc2Fy?= Newsgroups: comp.compilers Subject: Re: IR Representation Date: Fri, 11 Sep 2015 17:01:52 -0300 Organization: Compilers Central Lines: 26 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <15-09-013@comp.compilers> References: <15-09-005@comp.compilers> <15-09-006@comp.compilers> <15-09-010@comp.compilers> <15-09-011@comp.compilers> NNTP-Posting-Host: news.iecc.com Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: miucha.iecc.com 1442075226 72309 2001:470:1f07:1126:0:676f:7373:6970 (12 Sep 2015 16:27:06 GMT) X-Complaints-To: abuse@iecc.com NNTP-Posting-Date: Sat, 12 Sep 2015 16:27:06 +0000 (UTC) Keywords: optimize, design Posted-Date: 12 Sep 2015 12:27:05 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:1608 Thank you Anton [and John]. With the addition of an artificial node everything made sense now. Now I am wondering, how do you usually represent conditional nodes and looping structures using trees? Eg.: c = a + b; if c > 10 goto L1 else goto L2 L1: a = 10; goto L3; L2: a = 20; L3: CC)sar. On Tue, Sep 8, 2015 at 4:49 AM, Anton Ertl wrote: >>This linear representation is really just an array of IR instructions, >>something on these lines: vector; As operands >>instructions have pointers to entries in the symbol table. > > Sounds like quadruples. ...