Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Make shrink-wrapping more stable. Changes: * Correctly detect landing pads at the dominance frontier, bailing on such cases because we are not prepared to split LPs that are target of a critical edge. * Disable FOP's store removal by default - this is experimental and shouldn t go to prod because removing a store that we failed to detect it's actually necessary is disastrous. This pass currently doesn't have a great impact on the number of stores reduced, so it is not a problem. Most stores reduced are due shrink wrapping anyway. * Fix stack access identification - correctly estimate memory length of weird instructions, bail if we don't know. * Make rules for shrink-wrapping more strict: cancel shrink wrapping on a number of cases when we are not 100% sure that we are dealing with a regular callee-saved register. * Add basic block folding to SW. Sometimes when splitting critical edges we create a lot of redundant BBs with the same instructions, same successor but different predecessor. Fold all identical BBs created by splitting critical edges. * Change defaults: now the threshold used to determine when to perform SW is more conservative, to be sure we are moving a spill to a colder area. This effort, along with BB folding, helps us to avoid hurting icache performance by indiscriminately increasing code size. (cherry picked from FBD5315086)
- Loading branch information