Re: [patch] IDE problems on SMP, fixed? (fwd)

David S. Miller (davem@dm.cobaltmicro.com)
Thu, 30 Jul 1998 09:55:30 -0700


Date: Thu, 30 Jul 1998 09:43:28 -0700 (PDT)
From: Linus Torvalds <torvalds@transmeta.com>

If anybody feels like doing something like this, it shouldn't be
inherently hard to do at least a simplistic one. You may not be
able to follow function pointers etc, but essentially the only
thing you need is a "extended C" parser to parse "calling
conventions" (the "extended" part comes from the fact that macros
and inline functions would be counted as "calls" - and the fact
that you have to "linearize" the functions to take care of all
conditionals and go through all combinations: the latter part is
the hard one).

The latest EGCS code has a C parser in the library used for the CPP
preprocessor that is modular and minimal enough for these purposes,
then you could jackhammer the flow analysis pass into it using some
minimalized form of RTL (or better, do control flow the way described
in Chapter 7 of Muchnik's compiler book, via structual analysis).

Then extend it to work on many files at once, and to combine calls and
scopes into a global "flow" knowledge.

This should be sufficient backend matter for such a tool.

(no, before anyone asks, I don't have time to work on this :-)

Later,
David S. Miller
davem@dm.cobaltmicro.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html