Alex -

On Tue, Sep 17, 2013 at 04:21:43PM +0300, Alex Susu wrote:
>      Did anybody use Dead code elimination (DCE)?

        We used it, but that dates back almost a
decade, when we analyzed several large projects
in embedded environments.

Let me summarize the problems I still remember.

(1) CIL introduces "goto" statements even in
    "goto"-free source code.  The `Partial'
    module is not smart enough to disentangle
    all kinds of cross-block jumps and thus
    opportunities for eliminating e.g. one
    branch of an "if" are missed even if the
    condition is known.

(2) `Partial' does not respect the "volatile"
    attribute of constants.  It might wrongly
    flag expressions as constant and in turn
    code as suitable for elimination.  See my
    comment in "partial.ml" around line 1100.

(3) Precise pointer analysis turned out to be
    crucial.  The default `Olf' module is much
    to imprecise, but you can simply replace it
    with `Golf' at the top of "ptranal.ml".
    Golf returns _much_ smaller alias-sets,
    opening up further DCE opportunities.

    A more powerful pointer-analysis like the
    "Generalized Multi-Level Flow" as hinted in
    Manuvir Das' papers is still missing in
    CIL's code base, though highly desirable.

HTH,
        Chris

------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
CIL-users mailing list
CIL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cil-users

Reply via email to