[PATCH] Use discriminator information in sample profiles.

Diego Novillo dnovillo at google.com
Wed Mar 5 06:43:53 PST 2014



================
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;
----------------
Chandler Carruth wrote:
> 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.
Done.


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

BRANCH
  discriminator-profile

ARCANIST PROJECT
  llvm



More information about the llvm-commits mailing list