[Assignment Tracking] Elide a map copy in some cases
Restructure AssignmentTrackingLowering::join to avoid a map copy in the case where BB has more than one pred. We only need to perform a copy of a pred LiveOut if there's exactly one already-visited pred (Result = PredLiveOut). With more than one pred the result is built by calling Result = join(std::move(Result), PredLiveOut) for each subsequent pred, where join parameters are const &. i.e. with more than 1 pred we can avoid copying by referencing the first two pred LiveOuts in the first join and then using a move + reference for the rest. This reduces compile time for CTMark LTO-O3-g builds. Reviewed By: jmorse Differential Revision: https://reviews.llvm.org/D144732
Loading
Please sign in to comment