[PATCH] D36943: Migrate WholeProgramDevirt to new Optimization Remark API
Adam Nemet via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 21 08:51:48 PDT 2017
anemet accepted this revision.
anemet added a comment.
This revision is now accepted and ready to land.
LGTM with the nits below. We're done migrating!!!! Thanks for your work on this!
================
Comment at: lib/Transforms/IPO/WholeProgramDevirt.cpp:1439
Function *F = DT.second;
- DISubprogram *SP = F->getSubprogram();
- emitOptimizationRemark(F->getContext(), DEBUG_TYPE, *F, SP,
- Twine("devirtualized ") + F->getName());
+ // DISubprogram *SP = F->getSubprogram();
+
----------------
Remove this line.
================
Comment at: lib/Transforms/IPO/WholeProgramDevirt.cpp:1441-1448
+ std::unique_ptr<OptimizationRemarkEmitter> OwnedORE;
+ OptimizationRemarkEmitter *ORE;
+ if (OREGetter)
+ ORE = &OREGetter(F);
+ else {
+ OwnedORE = make_unique<OptimizationRemarkEmitter>(F);
+ ORE = OwnedORE.get();
----------------
A comment would be good, explaining the strategy with old vs new PM.
https://reviews.llvm.org/D36943
More information about the llvm-commits
mailing list