[PATCH] D135497: [NFC][3/n] Remove enable-new-pm from Inline tests

Sebastian Peryt via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 7 16:32:57 PDT 2022


speryt added a comment.

There are still few tests left with which I'm not sure what resolution would be the best. Any comments are highly appreciated.

In the test `dead-calls-willreturn.ll` in the last function tested (caller_willreturn) all of the calls are present, which looking at the comment is not expected.

  ; @caller_willreturn is marked as willreturn, so all called functions also must
  ; return. All calls are dead.
  define void @caller_willreturn() ssp {
  ; CHECK-LABEL: @caller_willreturn(
  ; CHECK-NEXT:  entry:
  ; CHECK-NEXT:    ret void
  ;
  entry:
    call void @readnone_may_not_return() willreturn
    call void @readnone_willreturn()
    ret void
  }

Output IR

  ; Function Attrs: ssp
  define void @caller_willreturn() #2 {
  entry:
    br label %while.body.i
  
  while.body.i:                                     ; preds = %while.body.i, %entry
    br label %while.body.i
  
  readnone_may_not_return.exit:                     ; No predecessors!
    ret void
  }

In tests `alloca-merge-align.ll` and `array_merge.ll` extra allocas are added. In case of `alloca-merge-align.ll` alignment of this alloca is also different than the rest - 4 instead of 8.

In tests `inline-cold-callee.ll` and `inline-hot-callee.ll` results are flipped. What I mean by that is in test where calls should be inlined those aren't and in calls where they shouldn't they are.

And finally in `delete-call.ll` two statistics are missing: `abstract-call-sites` and `cgscc-passmgr`.

My best guess is that I might have incorrectly used call to `inline` pass in new PM. What I've been trying for cases where "-inline" flag was used have been "-passes='inline'" and "-passes='cgscc(inline)'". Nothing works as expected.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D135497/new/

https://reviews.llvm.org/D135497



More information about the llvm-commits mailing list