Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert WrappedPrimitives logic to service, run within IPCP
Summary: This is a large diff, but what I'm trying to achieve here is a Pass that really, just sets up a few things based on its configuration, to allow the real work to happen from within IPCP with the intraprocedural analyzer/state of an individual method that already gets computed. Because IPCP is already capable of modeling the creation and movement of ObjectWithImmutAttr instances, I feel like this work fits in here fairly well and is overall a cleaner/simpler to plug in new functionality, as opposed to the original WrappedPrimitives RFC diff which tries to make up a bunch of trees of usages, in a way that isn't even correct. Overall, the flow of events in this version of the work is: - `WrappedPrimitivesPass::eval_pass()` will read the Redex config to learn about the types/method refs involved, and will mark the unwrapped method refs as root to prevent removals. - IPCP will call into the WrappedPrimitives service, per method to see if any work is configured or if the method has relevant transforms. - `WrappedPrimitivesPass::run_pass()`, which ideally will run right after the first run of IPCP will then report metrics, and undo the marking of roots. It will also reset the state so that subsequent IPCP runs will call into the WrappedPrimitives service and have it be a noop. Reviewed By: NTillmann Differential Revision: D63414216 fbshipit-source-id: 9837a9b3a70858741728f637be1e24fb5906cc55
- Loading branch information