-
Notifications
You must be signed in to change notification settings - Fork 444
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove ReferenceMap recalculation (almost) everywhere and switch to m…
…ore fine-grained solutions (#4757) * Get rid of unused RefMap in ConstantTypeSubstitution Signed-off-by: Anton Korobeynikov <[email protected]> * Convert ConstantFolding to DeclarationLookup Signed-off-by: Anton Korobeynikov <[email protected]> * Convert SyntacticEquivalence to DeclarationLookup Signed-off-by: Anton Korobeynikov <[email protected]> * Switch SubstituteParameters to DeclarationLookup. It stops populating refmap with cloned paths, but it seems it does not matter according to tests. In any way, the refmap was not fully correct after it. Signed-off-by: Anton Korobeynikov <[email protected]> * Switch TypeInference to ResolutionContext Signed-off-by: Anton Korobeynikov <[email protected]> * Remove refMap dependency from TypeChecking entirely. Clean up corresponding API around Signed-off-by: Anton Korobeynikov <[email protected]> * Make DiscoverActionsInlining a ResolutionContext: no ReferenceMap is required Signed-off-by: Anton Korobeynikov <[email protected]> * Switch action inliner not to use ReferenceMap Signed-off-by: Anton Korobeynikov <[email protected]> * Update tests Signed-off-by: Anton Korobeynikov <[email protected]> * Finally remove ReferenceMap recalculation from ActionsInliner Signed-off-by: Anton Korobeynikov <[email protected]> * Switch to abseil time routines in time tracker Signed-off-by: Anton Korobeynikov <[email protected]> * Ensure name generator is inherited for nested TypeInference calls Signed-off-by: Anton Korobeynikov <[email protected]> * Ensure we always resolve to original declaration, not to the cloned one. This is particular important when mixing ResolveReferences with a Transform: various maps (e.g. TypeMap) are formulated in terms of original IR, not cloned. Signed-off-by: Anton Korobeynikov <[email protected]> * Make DefaultArguments not to require ReferenceMap Signed-off-by: Anton Korobeynikov <[email protected]> * Remove ReferenceMap from CheckCoreMethods Signed-off-by: Anton Korobeynikov <[email protected]> * Move EntryPriorities to ResolutionContext Signed-off-by: Anton Korobeynikov <[email protected]> * Remove RefMap from SpecializeGenericTypes Signed-off-by: Anton Korobeynikov <[email protected]> * Remove RefMap from SpecializeGenericFunctions Signed-off-by: Anton Korobeynikov <[email protected]> * Make StrengthReduce refmap-independent Signed-off-by: Anton Korobeynikov <[email protected]> * Make DoConstantFolding a ResolutionContext, so it could resolve if necessary Signed-off-by: Anton Korobeynikov <[email protected]> * Remove refmap from frontent ConstantFolding invocation Signed-off-by: Anton Korobeynikov <[email protected]> * Make UniqueNames refmap-less Signed-off-by: Anton Korobeynikov <[email protected]> * Remove RefMap from RemoveParserControlFlow Signed-off-by: Anton Korobeynikov <[email protected]> * Switch TableApply to DeclarationLookup Signed-off-by: Anton Korobeynikov <[email protected]> * Get rid of RefMap from DirectCalls Signed-off-by: Anton Korobeynikov <[email protected]> * Switch Deprecated to ResolutionContext Signed-off-by: Anton Korobeynikov <[email protected]> * DefaultValues does not use RefMap at all Signed-off-by: Anton Korobeynikov <[email protected]> * No need for RefMap in BindVariables Signed-off-by: Anton Korobeynikov <[email protected]> * Move StaticAsserts to ResolutionContext Signed-off-by: Anton Korobeynikov <[email protected]> * Move StructInitializers to ResolutionContext Signed-off-by: Anton Korobeynikov <[email protected]> * TableKeyNames does not need refMap Signed-off-by: Anton Korobeynikov <[email protected]> * ResetHeaders do not need RefMap Signed-off-by: Anton Korobeynikov <[email protected]> * Remove MoveDeclarations out of RefMap Signed-off-by: Anton Korobeynikov <[email protected]> * No need for refMap in SimplifySwitch Signed-off-by: Anton Korobeynikov <[email protected]> * Make UniqueParameters RefMap-less Signed-off-by: Anton Korobeynikov <[email protected]> * Remove refMap from RemoveReturns / RemoveExits Signed-off-by: Anton Korobeynikov <[email protected]> * Remove RefMap from DontcareArgs Signed-off-by: Anton Korobeynikov <[email protected]> * Remove refmap from MoveConstructors Signed-off-by: Anton Korobeynikov <[email protected]> * Move RemoveActionParameters out of RefMap Signed-off-by: Anton Korobeynikov <[email protected]> * SetHeaders do not use RefMap Signed-off-by: Anton Korobeynikov <[email protected]> * Remove RefMap from CheckConstants Signed-off-by: Anton Korobeynikov <[email protected]> * Reduce RefMap proliferation in LocalizeActions Signed-off-by: Anton Korobeynikov <[email protected]> * Remove much of refMap usage from functions inlining Signed-off-by: Anton Korobeynikov <[email protected]> * Remove refMap from SimplifyControlFlow and around Signed-off-by: Anton Korobeynikov <[email protected]> * Reduce refMap dependency inside Specialize Signed-off-by: Anton Korobeynikov <[email protected]> * Reduce refMap usage around SimplifyExpressions Signed-off-by: Anton Korobeynikov <[email protected]> * Silence a warning Signed-off-by: Anton Korobeynikov <[email protected]> * Remove RefMap from DoSimplifyExpressions Signed-off-by: Anton Korobeynikov <[email protected]> * Recognize nested TypeInference learners Signed-off-by: Anton Korobeynikov <[email protected]> * Restore type checking instead of inference to emphasize read-only mode here Signed-off-by: Anton Korobeynikov <[email protected]> * Restore old renaming scheme Signed-off-by: Anton Korobeynikov <[email protected]> * Do not recalculate name generator contents on each inliner iteration Signed-off-by: Anton Korobeynikov <[email protected]> * Reformat Signed-off-by: Anton Korobeynikov <[email protected]> * Add fixme about declaration lookup caching Signed-off-by: Anton Korobeynikov <[email protected]> * Make visitor context required for alias analysis routines Signed-off-by: Anton Korobeynikov <[email protected]> * Get rid of PassManager for MoveConstructors Signed-off-by: Anton Korobeynikov <[email protected]> * Get rid of EntryPriorities PassManager wrapper Signed-off-by: Anton Korobeynikov <[email protected]> * Remove PassManager wrapper over InstantiateDirectCalls Signed-off-by: Anton Korobeynikov <[email protected]> * Remove PassManager from Deprecated Signed-off-by: Anton Korobeynikov <[email protected]> --------- Signed-off-by: Anton Korobeynikov <[email protected]>
- Loading branch information
Showing
100 changed files
with
1,129 additions
and
978 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.