[PATCH] D30309: CodeGen: BlockPlacement: Precompute layout for chains of triangles.

Kyle Butt via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 2 14:38:29 PST 2017


iteratee added inline comments.


================
Comment at: lib/CodeGen/MachineBlockPlacement.cpp:1147
+    // existing chain
+    auto Found = TriangleChainMap.find(&BB);
+    // If it is, remove the chain from the map, grow it, and put it back in the
----------------
davidxl wrote:
> use the insert method so that you can modify the chain in place.
I actually can't do that, because you find it base on the key being the edge source, and insert it based on the key being the edge destination.

I wrote it that way initially, and then wondered why all my chains were of length 1.

I'll add a comment though, because someone might come and try to clean it up.


https://reviews.llvm.org/D30309





More information about the llvm-commits mailing list