Allow the front-end to create calls with a static chain
authorRichard Henderson <rth@redhat.com>
Wed, 19 Nov 2014 13:30:59 +0000 (05:30 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Wed, 19 Nov 2014 13:30:59 +0000 (05:30 -0800)
commitf2d3d07ee55fa52b41c1ec08e51269831961a772
tree7cca5afeed122318032b1af7171e8154c14590df
parentc21df29bcfc04945d3a7be6a0c6e306fc9efc505
Allow the front-end to create calls with a static chain

And, at the same time, allow indirect calls to have a static chain.
We'll always eliminate the static chain if we can prove it's unused.

        * calls.c (prepare_call_address): Allow decl or type for first arg.
        (expand_call): Pass type to prepare_call_address if no decl.
        * gimple-fold.c (gimple_fold_call): Eliminate the static chain if
        the function doesn't use it; fold it otherwise.
        * gimplify.c (gimplify_call_expr): Gimplify the static chain.
        * tree-cfg.c (verify_gimple_call): Allow a static chain on indirect
        function calls.

From-SVN: r217770
gcc/ChangeLog
gcc/calls.c
gcc/gimple-fold.c
gcc/gimplify.c
gcc/tree-cfg.c