davidxl added inline comments. ================ Comment at: lib/CodeGen/CodeGenPGO.cpp:768 @@ +767,3 @@ + llvm::IndexedInstrProfReader *PGOReader = CGM.getPGOReader(); + if (!InstrumentValueSites && !PGOReader) + return; ---------------- && --> ||
================ Comment at: lib/CodeGen/CodeGenPGO.cpp:782 @@ +781,3 @@ + Builder.CreateCall( + CGM.getIntrinsic(llvm::Intrinsic::instrprof_value_profile), Args); + } ---------------- add return here? ================ Comment at: lib/CodeGen/CodeGenPGO.cpp:813 @@ +812,3 @@ + Vals.push_back(MDHelper.createString( + getRawFuncName(Symtab.getFuncName(VD[I].Value)))); + Vals.push_back(MDHelper.createConstant( ---------------- Why not pushing the mapping to string to the user (transformation)? Annotating IR with long strings can bloat the IR size a bit. There is also a symtab create interface added which takes module as input which is way more efficient (do not need to walk through the whole profiile data) http://reviews.llvm.org/D8940 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits