[llvm] [Propeller] Make BBID containing information about MBB's size to detect ir drift (PR #79545)
    Rahman Lavaee via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Jan 29 06:03:50 PST 2024
    
    
  
================
@@ -468,7 +468,11 @@ MachineFunction::CreateMachineBasicBlock(const BasicBlock *BB,
   // blocks.
   if (Target.getBBSectionsType() == BasicBlockSection::Labels ||
       Target.getBBSectionsType() == BasicBlockSection::List)
-    MBB->setBBID(BBID.has_value() ? *BBID : UniqueBBID{NextBBID++, 0});
+    MBB->setBBID(BBID.has_value()
+                     ? *BBID
+                     : UniqueBBID{((NextBBID++ & 0x0000ffff) << 32) |
+                                      (MBB->size() & 0x0000ffff),
----------------
rlavaee wrote:
At this point (MBB creation time) MBB size is most definitely zero. So it won't be useful.
https://github.com/llvm/llvm-project/pull/79545
    
    
More information about the llvm-commits
mailing list