[LLVMdev] tblgen bug in handling case , switch_on

Mikhail Glushenkov the.dead.shall.rise at gmail.com
Sun Sep 6 11:13:58 PDT 2009


Hi Sanjiv,

On Sun, Sep 6, 2009 at 8:07 PM, Mikhail
Glushenkov<the.dead.shall.rise at gmail.com> wrote:
> [...]

[Sorry, the formatting was a bit off]

> The following snippet gives the expected behaviour (not tested, but
> you should get the idea):

(case
    (switch_on "O0"),
        (append_cmd "-disable-opt"),

    (or (and (switch_on "O1")
             (not (switch_on "O0"))),
        (not (switch_on "O0"))),
    (append_cmd "-constmerge -globaldce -globalopt -ipsccp
-jump-threading -simplifycfg -gvn -scalarrepl"),

    (or (and (switch_on "O2"),
             (not (switch_on "O0"))),
        (not (switch_on "O0"))),
    (append_cmd "-instcombine"))


> -O2 is the default, but -O0 overrides both -O2 and -O1; -O2 overrides -O1.


-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments



More information about the llvm-dev mailing list