[PATCH] Use discriminator information in sample profiles.

Chandler Carruth chandlerc at gmail.com
Tue Mar 4 05:06:07 PST 2014


  Just a minor nit. Generally looks good.


================
Comment at: lib/Transforms/Scalar/SampleProfile.cpp:68
@@ -67,3 +67,3 @@
 
-typedef DenseMap<uint32_t, uint32_t> BodySampleMap;
+typedef DenseMap<std::pair<uint32_t, uint32_t>, uint32_t> BodySampleMap;
 typedef DenseMap<BasicBlock *, uint32_t> BlockWeightMap;
----------------
I would use a small struct for the line+discriminator pair. It will make a lot of the rest of your code simpler. You could make it a typedef of a pair, but I'd probably just make it a struct to give it a nice name.


http://llvm-reviews.chandlerc.com/D2857

BRANCH
  discriminator-profile

ARCANIST PROJECT
  llvm



More information about the llvm-commits mailing list