Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SROA] Avoid expensive isComplete() call (NFC)
llvm#83381 introduced a call to PHINode::isComplete() in Mem2Reg, which is O(n^2) in the number of predecessors, resulting in pathological compile-time regressions for cases with many predecessors. Remove the isComplete() check and instead cache the attribute lookup, to only perform it once per function. Actually setting the FMF flag is cheap.
- Loading branch information