user13704283
user13704283

Reputation: 11

How to use the -pgo-instr-gen arguments with llvm opt

I want to test the PGO with llvm and I find most of the tutorial in the internet uses clang with argument -fprofile-instr-use to enable PGO instrumentation. However, what I have is an llvm bitcode file instead of the source code and I want to apply PGO to these bitcode files. I noticed the opt tool has the argument -pgo-instr-gen.

However, after I applied it to my bitcode like:

opt -pgo-instr-gen input.ll -o output.ll

and then tried to run the output.ll with lli, I got a segmentation fault. So, what is the correct way to enable PGO in such cases?

Upvotes: 1

Views: 199

Answers (0)

Related Questions