This change is updating remaining Inline tests
by removing -enable-new-pm=0 flag and adjusting CHECKs
where it is required.
Details
- Reviewers
aeubanks - Commits
- rG98190d2122d1: [NFC][3/n] Remove enable-new-pm from Inline tests
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
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.
the new pass manager inliner doesn't do alloca merging, see the comments around the DisableInlinedAllocaMerging in Inliner.cpp. so we can just delete those tests, including alloca-dbgdeclare-merge.ll
inline-{hot,cold}-callee.ll can be deleted, see https://reviews.llvm.org/D33157 where those tests are testing legacy PM-specific code paths
delete-call.ll/dead-calls-willreturn.ll test functionality added in https://reviews.llvm.org/rGeb9acbfb0522f4f69f1a11e47ebeda7f1a61e1df that's not present in the new PM pass. I tried seeing if it had any compile time impact when ported to the new PM pass, it doesn't seem to, so no reason to port it, so we can drop those tests
Sorry, I didn't realize that update means completely new diff rather than merging with previous changes. This is merge of my 2 previous patches.