This removes some duplication from splitCallSite and makes it easier to
add additional code dealing with each predecessor. It also allows us to
split for more than 2 predecessors, although that is not enabled for
now.
Details
Diff Detail
Event Timeline
lib/Transforms/Scalar/CallSiteSplitting.cpp | ||
---|---|---|
112 | We potentially record more than 2 conditions now I think and I thought 3 might be better suited to avoid dynamic allocations. I am happy to change it to 2 if you prefer that. | |
152 | This function does not require knowing the size of the SmallVector, so I thought there is no need to make the type more restrictive. I am happy to change it if you prefer that |
LGTM !
lib/Transforms/Scalar/CallSiteSplitting.cpp | ||
---|---|---|
112 | I'm okay with 3, but I don't think this change increase the possibility of recording more than 2 conditions through single predecessors. | |
152 | As it's used only with ConditionsTy tightly in our current implementation, I may prefer to be consistent with ConditionsTy for now. | |
282–283 | Thanks for handling this. |
Why don't we use 2 instead of 3?