[PATCH] Add function entry count metadata.

Philip Reames listmail at philipreames.com
Tue May 12 14:53:41 PDT 2015


Reading through the code, I was a left a bit confused as to the actual structure.  Could you update with the LangRef update so that it's easier to review?  Also, tests for correct usage would be helpful.


================
Comment at: lib/IR/Function.cpp:995
@@ +994,3 @@
+  MDBuilder MDB(getContext());
+  setMetadata(LLVMContext::MD_prof, MDB.createFunctionEntryCount(Count));
+}
----------------
I'm mildly bothered by using the same name for two different pieces of metadata.  Is there a reason not to use a different name here?

http://reviews.llvm.org/D9628

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list