Skip to content

Commit

Permalink
Revamp TransformConstClassBranches to find multiple transforms in a m…
Browse files Browse the repository at this point in the history
…ethod

Summary:
This pass is quite limited in that it looks for a branch right at the beginning of a method for a possible transform. This meant things like inlining had to be configured specially to make a transform happen.

I started out on a refactor to relax such configuration requirements, making the transform look more thoroughly and even find many relevant transforms in a method. But I'm afraid isn't enough for the original goal of relaxing config requirements.

SwitchEquivFinder does not traverse throw edges, so an otherwise understandable chunk of code wrapped in a try/catch won't get represented/transformed. In practice that means the various configurations for preventing inlining have to stay in place. This diff is still a step in a better direction though.

Reviewed By: beicy

Differential Revision: D51050351

fbshipit-source-id: 19b620d661b648fd91ae60cdd5736615d839970d
  • Loading branch information
wsanville authored and facebook-github-bot committed Dec 28, 2023
1 parent ecfadb8 commit 8b2e567
Show file tree
Hide file tree
Showing 3 changed files with 255 additions and 194 deletions.
Loading

0 comments on commit 8b2e567

Please sign in to comment.