[FuncSpec][NFC] Refactor internal structures.
`ArgInfo` is reduced to only contain a pair of {formal,actual} values. The specialized function `Fn` and the `Partial` flag are redundant in this structure. The `Gain` is moved to a new struct `SpecializationInfo`. The value mappings created by cloneCandidateFunction() are being used by rewriteCallSites() for matching the formal arguments of recursive functions. The list of specializations is passed by reference to calculateGains() instead of being returned by value. The `IsPartial` flag is removed from isArgumentInteresting() and getPossibleConstants() as it's no longer used anywhere in the code. Differential Revision: https://reviews.llvm.org/D120753
Loading
Please sign in to comment