DAG Construction Process

raghavan97@yahoo.co.in
Wed, 31 Oct 2007 02:58:15 -0000

          From comp.compilers

Related articles
DAG Construction Process raghavan97@yahoo.co.in (2007-10-31)
Re: DAG Construction Process nkavv@skiathos.physics.auth.gr (Uncle Noah) (2007-10-31)
| List of all articles for this month |

From: raghavan97@yahoo.co.in
Newsgroups: comp.compilers
Date: Wed, 31 Oct 2007 02:58:15 -0000
Organization: Compilers Central
Keywords: analysis
Posted-Date: 31 Oct 2007 00:18:23 EDT

Hi,


I am trying to implement optimization within a basic block. I
understand that the Conversion of unoptimized code to DAG and
subsequent regeneration of quads from the DAG is a good way to
optimize the Intermediate code. I read the Algorithm given in pp 549
of the Dragon Book.


I do not understand how to create a DAG for scenarios where there is
an assignment as the the first access of leaves. For e.g., if the
unoptimized IC is of the form


f = b + c
c = b




My questions are


(1) Can leaves have attached identifiers ?
(2) The code regeneration talks of walking through interior nodes in
the DAG for the optimal code generation. In case leaves have attached
identifiers, then how do we deal with that during the Quad
regeneration ?
(3) How would we be able to differentiate the situation where we have
unoptimized code as
f = b + c
c = b
v/s
c = b
f = b + c


Can somebody shed more light on this or point to material for DAG
construction for Basic Blocks ?


Thanks.


Bye,
Raghavan V


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.