|Dataflow and function calls firstname.lastname@example.org (Yuri Gribov) (2009-07-23)|
|Re: Dataflow and function calls email@example.com (gopi) (2009-07-28)|
|Re: Dataflow and function calls firstname.lastname@example.org (Yuri Gribov) (2009-07-29)|
|Re: Dataflow and function calls email@example.com (kamal) (2009-08-01)|
|Date:||Sat, 1 Aug 2009 07:02:48 -0700 (PDT)|
|Posted-Date:||01 Aug 2009 16:50:30 EDT|
On Jul 23, 11:01 am, Yuri Gribov <tetra2...@googlemail.com> wrote:
> Now comes the question. Imagine that I want to calculate reach-defs
> via standard dataflow techniques (we use simple three-address code
> without SSA). How should I handle call instructions? Should call kill
> all definitions or keep them? ...
> Finally my questions are:
> 0) How do you generally handle call instructions when doing dataflow
> 1) Is my approach with explicit loads/stores correct? If yes - how do
> I place them to avoid inefficient code above?
data-flow analysis does not assume anything about function calls. Its
for you to define a basic-block and its associated def-use [or better
Depending on the language and type of arguments, I would try to assume
a function call is not the end of a basic block and instead modify def-
use chains appropriately (eg:- a pointer can only modify some variable
to which it points -or ones adjacent to it in memory, or that a
function that does a pass-by-value cannot possibly modify variables in
the caller). The larger the basic block, the greater the amt of
optimization one can do.
> 2) Why is this important topic (calls/ambiguous commands + dataflow,
> optimal placing of loads/stores) not covered in compiler textbooks (I
> did not find it neither in dragon-book nor in draft version of
> "Engineering a compiler")?
think they don't cover a hell lot of things in the dragon book. Look
for research papers on what techniques were used, and how effective
> 3) Could you recommend a textbook or online course which covers such
> deep but important details?
This one is pretty good for optimizations implemented in HP's C/C++
Return to the
Search the comp.compilers archives again.