[PATCH] D15139: [IR] Reformulate LLVM's EH funclet IR

Joseph Tremoulet via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 6 17:10:05 PST 2015


JosephTremoulet added inline comments.

================
Comment at: lib/CodeGen/WinEHPrepare.cpp:86
@@ -114,1 +85,3 @@
+  DenseMap<BasicBlock *, ColorVector> BlockColors;
+  MapVector<BasicBlock *, std::vector<BasicBlock *>> FuncletBlocks;
 };
----------------
> IIUC the DenseMap will require a contiguous allocation sized like the number of BasicBlocks

Um, sorry, clearly I didn't understand correctly.  For one, I meant the `MapVector`, not the `DenseMap`, and for two, its vector would be sized like the number of funclets, not the number of blocks.  So that's no different footprint-wise than the explicit `EntryBlocks` vector, and to boot is easier to read and maintain.  So, disregard this comment, sorry for the noise.

(and, separately, IIUC now, the `DenseMap` does indeed fit all its entries in a contiguous allocation, but I'm less concerned with that since the API surface is the same and we can always switch it back to `std::map` if it makes something blow up [or have `DenseMap` degrade gracefully or etc])


http://reviews.llvm.org/D15139





More information about the llvm-commits mailing list