The flag -fcs-profile-generate for enabling CSIRPGO moves the pass
pgo-instrumentation after inlining. Function entry coverage works fine
with this change, so remove the assert. I had originally left this
assert in because I had not tested this at the time.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Unit Tests
Event Timeline
Comment Actions
The only different between -fprofile-generate and -fcs-profile-generate is when the pgo-instr-gen pass is added, so I don't think an explicit test is necessary. We have lots of tests in test/Transforms/PGOProfile that use opt < %s -passes=pgo-instr-gen that uses this code to inject the llvm.instrprof intrinsics, but I couldn't find test that trigger this using the frontend flags.
That being said, I would be happy to add some tests if that's what we want. I think it would need to be a clang test that checks if the instrumentation code is injected correctly.
Comment Actions
Test CSIRPGO + function coverage and refactor substitutions in compiler-rt/test/profile.