Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clang-13 regression: -Rpass=inline doesn't display anything on a simple test case #51402

Closed
sylvestre opened this issue Oct 4, 2021 · 4 comments
Labels
bugzilla Issues migrated from bugzilla clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' worksforme Resolved as "works for me"

Comments

@sylvestre
Copy link
Collaborator

Bugzilla Link 52060
Version trunk
OS Linux
Blocks #50580 #51489
CC @zygoloid,@tstellar

Extended Description

$ export VERSION=12
$ echo "
int foo(int x, int y) attribute((always_inline));
int foo(int x, int y) { return x + y; }
int bar(int j) { return foo(j, j - 2); }" > foo.cc

$ clang-$VERSION -O2 -Rpass=inline foo.cc -c
foo.cc:4:25: remark: _Z3fooii inlined into _Z3bari with (cost=always): always inline attribute at callsite bar:0:25; [-Rpass=inline]
int bar(int j) { return foo(j, j - 2); }

$ export VERSION=13
$ echo "
int foo(int x, int y) attribute((always_inline));
int foo(int x, int y) { return x + y; }
int bar(int j) { return foo(j, j - 2); }" > foo.cc

$ clang-$VERSION -O2 -Rpass=inline foo.cc -c

=> Empty

@sylvestre
Copy link
Collaborator Author

Adding a main function fixed it:

echo "
int foo(int x, int y) attribute((always_inline));
int foo(int x, int y) { return x + y; }
int bar(int j) { return foo(j, j - 2); }
int sum = 0;

int main(int argc, const char *argv[]) {
for (int i = 0; i < 30; i++)
bar(argc);
return sum;
}

" > foo.cc
clang-$VERSION -O2 -Rpass=inline foo.cc -c

@tstellar
Copy link
Collaborator

mentioned in issue #51489

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 11, 2021
@asl asl added this to the LLVM 13.0.1 release milestone Dec 12, 2021
@tstellar
Copy link
Collaborator

The deadline for requesting fixes for the release has passed. This bug is being removed from the LLVM 13.0.1 release milestone. If you have a fix or think this bug is important enough to block the release, please explain why in a comment and add the bug back to the LLVM 13.0.1 release milestone.

@tstellar tstellar removed this from the LLVM 13.0.1 release milestone Dec 22, 2021
@arsenm
Copy link
Contributor

arsenm commented Aug 14, 2023

I see the remark today, old release

@arsenm arsenm closed this as not planned Won't fix, can't repro, duplicate, stale Aug 14, 2023
@EugeneZelenko EugeneZelenko added the worksforme Resolved as "works for me" label Aug 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' worksforme Resolved as "works for me"
Projects
None yet
Development

No branches or pull requests

5 participants