[PATCH] D26008: CodeGen: Handle missed case of block removal during BlockPlacement.

Kyle Butt via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 27 14:09:34 PDT 2016


iteratee added a comment.

I found this by observing it in the debug logs while looking for something else, so I think the direct fix is worth committing, even if we do a better fix later.



================
Comment at: lib/CodeGen/MachineBlockPlacement.cpp:1503
   else
-    rotateLoop(LoopChain, ExitingBB, LoopBlockSet);
+    rotateLoop(LoopChain, PreferredLoopExit, LoopBlockSet);
 
----------------
davidxl wrote:
> Should the right fix be to move the 'findBestLoopExit' after buildChain call?
That would require re-writing findBestLoopExit to not assume that the blocks weren't all in a single chain already.

We should re-write it to do that, but I think that's out of scope for an existing use after free bug.


Repository:
  rL LLVM

https://reviews.llvm.org/D26008





More information about the llvm-commits mailing list