-
Notifications
You must be signed in to change notification settings - Fork 448
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 <anton@korobeynikov.info> * Convert ConstantFolding to DeclarationLookup Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> * Convert SyntacticEquivalence to DeclarationLookup Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> * 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 <anton@korobeynikov.info> * Switch TypeInference to ResolutionContext Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> * Remove refMap dependency from TypeChecking entirely. Clean up corresponding API around Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> * Make DiscoverActionsInlining a ResolutionContext: no ReferenceMap is required Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> * Switch action inliner not to use ReferenceMap Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> * Update tests Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> * Finally remove ReferenceMap recalculation from ActionsInliner Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> * Switch to abseil time routines in time tracker Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> * Ensure name generator is inherited for nested TypeInference calls Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> * 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 <anton@korobeynikov.info> * Make DefaultArguments not to require ReferenceMap Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> * Remove ReferenceMap from CheckCoreMethods Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> * Move EntryPriorities to ResolutionContext Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> * Remove RefMap from SpecializeGenericTypes Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> * Remove RefMap from SpecializeGenericFunctions Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> * Make StrengthReduce refmap-independent Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> * Make DoConstantFolding a ResolutionContext, so it could resolve if necessary Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> * Remove refmap from frontent ConstantFolding invocation Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> * Make UniqueNames refmap-less Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> * Remove RefMap from RemoveParserControlFlow Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> * Switch TableApply to DeclarationLookup Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> * Get rid of RefMap from DirectCalls Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> * Switch Deprecated to ResolutionContext Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> * DefaultValues does not use RefMap at all Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> * No need for RefMap in BindVariables Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> * Move StaticAsserts to ResolutionContext Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> * Move StructInitializers to ResolutionContext Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> * TableKeyNames does not need refMap Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> * ResetHeaders do not need RefMap Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> * Remove MoveDeclarations out of RefMap Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> * No need for refMap in SimplifySwitch Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> * Make UniqueParameters RefMap-less Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> * Remove refMap from RemoveReturns / RemoveExits Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> * Remove RefMap from DontcareArgs Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> * Remove refmap from MoveConstructors Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> * Move RemoveActionParameters out of RefMap Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> * SetHeaders do not use RefMap Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> * Remove RefMap from CheckConstants Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> * Reduce RefMap proliferation in LocalizeActions Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> * Remove much of refMap usage from functions inlining Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> * Remove refMap from SimplifyControlFlow and around Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> * Reduce refMap dependency inside Specialize Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> * Reduce refMap usage around SimplifyExpressions Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> * Silence a warning Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> * Remove RefMap from DoSimplifyExpressions Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> * Recognize nested TypeInference learners Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> * Restore type checking instead of inference to emphasize read-only mode here Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> * Restore old renaming scheme Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> * Do not recalculate name generator contents on each inliner iteration Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> * Reformat Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> * Add fixme about declaration lookup caching Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> * Make visitor context required for alias analysis routines Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> * Get rid of PassManager for MoveConstructors Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> * Get rid of EntryPriorities PassManager wrapper Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> * Remove PassManager wrapper over InstantiateDirectCalls Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> * Remove PassManager from Deprecated Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info> --------- Signed-off-by: Anton Korobeynikov <anton@korobeynikov.info>
- 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.