[PATCH] D20314: Move ProfileSummary to IR
Sean Silva via llvm-commits
llvm-commits at lists.llvm.org
Tue May 17 15:40:04 PDT 2016
silvas added a comment.
Sorry if this is a stupid question, but why do we need separate InstrProfSummary and SampleProfileSummary? Do you expect most client passes to do different things depending on which one it is?
================
Comment at: include/llvm/IR/ProfileSummary.h:68
@@ +67,3 @@
+ /// Derived classes implement this method to return a vector of Metadata.
+ virtual std::vector<Metadata *> getFormatSpecificMD(LLVMContext &Context) = 0;
+ /// \brief Return detailed summary as metadata.
----------------
No need to make this virtual. Just switch on Kind.
Then InstrProfSummary and SampleProfileSummary don't need to inherit.
As a rule of thumb I don't think you will need anything "protected".
http://reviews.llvm.org/D20314
More information about the llvm-commits
mailing list