Change doCallSiteSplitting to iterate until we reach the terminator instruction.
tryToSplitCallSite can replace BB's terminator in case BB is a successor of
itself. Then IE will be invalidated and we also have to check the current
terminator.
Details
Diff Detail
Event Timeline
I am not entirely sure if that's the best solution, but it should work. Maybe it would be nicer to split the pas into an analysis and transformation phase, then we would get rid of the problem.
@uabelho it would be great if you could check if this patch together with D43824 fixes the regressions you are seeing?
@fhahn: What the status with this now?
I've reverted r325126 (Recommit r325001: [CallSiteSplitting] Support splitting of blocks with instrs before call.) downstream
to avoid the regressions I saw, but that is getting increasingly difficult now since D43729 made it into tree.
It would thus be very nice if this (and D43822 ?) could land so I could remove my local reverts.
Accepting in to make arc happy. Jun, I created a TODO for myself to split it up in analysis & transformation. It might take a few weeks until I get around to that though.