Index: lib/Transforms/IPO/SampleProfile.cpp =================================================================== --- lib/Transforms/IPO/SampleProfile.cpp +++ lib/Transforms/IPO/SampleProfile.cpp @@ -253,6 +253,8 @@ if (InstWeight > Weight) Weight = InstWeight; } + if (Weight > 0) + VisitedBlocks.insert(BB); Entry.first->second = Weight; return Weight; }