[llvm-dev] Adding BB input/output registers during ISel

Tim Northover via llvm-dev llvm-dev at lists.llvm.org
Wed Jun 1 09:25:08 PDT 2016


On 1 June 2016 at 08:13, Tyler Kenney via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> I'd like to
> add this newly-created big vector value as an input reg for all BBs that
> reference the original stack object but do not contain it's LIFETIME_START
> node, and I'd like to add it as an output reg for all BBs that reference the
> original stack object but do not contain it's LIFETIME_END node.

This doesn't sound sufficient. For example:

    int foo(int res, int tst) {
      if (tst) bar();
      return res;
    }

Whatever register contains "res" is also a live-in & out for the
basic-block calling bar even though it's not referenced there. I think
you need some kind of real CFG analysis.

Tim.


More information about the llvm-dev mailing list