[PATCH] ArgumentPromotion: Don't hack on functions containing musttail calls

Nick Lewycky nicholas at mxc.ca
Sat Jul 5 19:50:57 PDT 2014


Isn't this overly conservative?

  define internal void @aaa() {
    %X = ...
    %Y = ...
    call void @bbb(i8 %X, i8 %Y)
    ret void
  }
  
  define internal void @bbb(i8 %X, i8 %Y) {
    musttail call void @ccc(i8 %X, i8 %Y)
    ret void
  }
  
  define internal void @ccc(i8 %X, i8 %Y) {
    call @use(i8 %X)
    ret void
  }

You can totally knock out %Y, right?

http://reviews.llvm.org/D4352






More information about the llvm-commits mailing list