John Kåre Alsaker 
							
						 
					 
					
						
						
						
						
							
						
						
							2fe28ae0a4 
							
						 
					 
					
						
						
							
							Use dynamic dispatch for queries  
						
						
						
						
					 
					
						2023-04-30 09:48:47 +02:00 
						 
				 
			
				
					
						
							
							
								Josh Soref 
							
						 
					 
					
						
						
						
						
							
						
						
							e09d0d2a29 
							
						 
					 
					
						
						
							
							Spelling - compiler  
						
						... 
						
						
						
						* account
* achieved
* advising
* always
* ambiguous
* analysis
* annotations
* appropriate
* build
* candidates
* cascading
* category
* character
* clarification
* compound
* conceptually
* constituent
* consts
* convenience
* corresponds
* debruijn
* debug
* debugable
* debuggable
* deterministic
* discriminant
* display
* documentation
* doesn't
* ellipsis
* erroneous
* evaluability
* evaluate
* evaluation
* explicitly
* fallible
* fulfill
* getting
* has
* highlighting
* illustrative
* imported
* incompatible
* infringing
* initialized
* into
* intrinsic
* introduced
* javascript
* liveness
* metadata
* monomorphization
* nonexistent
* nontrivial
* obligation
* obligations
* offset
* opaque
* opportunities
* opt-in
* outlive
* overlapping
* paragraph
* parentheses
* poisson
* precisely
* predecessors
* predicates
* preexisting
* propagated
* really
* reentrant
* referent
* responsibility
* rustonomicon
* shortcircuit
* simplifiable
* simplifications
* specify
* stabilized
* structurally
* suggestibility
* translatable
* transmuting
* two
* unclosed
* uninhabited
* visibility
* volatile
* workaround
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> 
						
						
					 
					
						2023-04-17 16:09:18 -04:00 
						 
				 
			
				
					
						
							
							
								John Kåre Alsaker 
							
						 
					 
					
						
						
						
						
							
						
						
							6d99dd9189 
							
						 
					 
					
						
						
							
							Address comments  
						
						
						
						
					 
					
						2023-04-06 08:25:53 +02:00 
						 
				 
			
				
					
						
							
							
								John Kåre Alsaker 
							
						 
					 
					
						
						
						
						
							
						
						
							36b4199a8e 
							
						 
					 
					
						
						
							
							Don't rely on Debug impl for Erased  
						
						
						
						
					 
					
						2023-04-06 08:25:53 +02:00 
						 
				 
			
				
					
						
							
							
								John Kåre Alsaker 
							
						 
					 
					
						
						
						
						
							
						
						
							785459d630 
							
						 
					 
					
						
						
							
							Erase query cache values  
						
						
						
						
					 
					
						2023-04-06 08:25:52 +02:00 
						 
				 
			
				
					
						
							
							
								Camille GILLOT 
							
						 
					 
					
						
						
						
						
							
						
						
							1ca103a168 
							
						 
					 
					
						
						
							
							Ensure value is on the on-disk cache before returning.  
						
						
						
						
					 
					
						2023-03-11 22:41:01 +00:00 
						 
				 
			
				
					
						
							
							
								John Kåre Alsaker 
							
						 
					 
					
						
						
						
						
							
						
						
							3b26d71e04 
							
						 
					 
					
						
						
							
							Avoid implementing Debug for QueryConfig  
						
						
						
						
					 
					
						2023-02-26 23:35:52 +01:00 
						 
				 
			
				
					
						
							
							
								John Kåre Alsaker 
							
						 
					 
					
						
						
						
						
							
						
						
							3fd7c4a17d 
							
						 
					 
					
						
						
							
							Make rustc_query_system take QueryConfig by instance.  
						
						
						
						
					 
					
						2023-02-26 23:35:47 +01:00 
						 
				 
			
				
					
						
							
							
								John Kåre Alsaker 
							
						 
					 
					
						
						
						
						
							
						
						
							056c5b3b57 
							
						 
					 
					
						
						
							
							Make query keys Copy  
						
						
						
						
					 
					
						2023-02-21 22:15:46 +01:00 
						 
				 
			
				
					
						
							
							
								John Kåre Alsaker 
							
						 
					 
					
						
						
						
						
							
						
						
							067bf2ac13 
							
						 
					 
					
						
						
							
							Move provider fields back to rustc_query_impl  
						
						
						
						
					 
					
						2023-02-16 14:55:05 +01:00 
						 
				 
			
				
					
						
							
							
								John Kåre Alsaker 
							
						 
					 
					
						
						
						
						
							
						
						
							a51a20531d 
							
						 
					 
					
						
						
							
							Factor query arena allocation out from query caches  
						
						
						
						
					 
					
						2023-02-16 14:54:53 +01:00 
						 
				 
			
				
					
						
							
							
								Camille GILLOT 
							
						 
					 
					
						
						
						
						
							
						
						
							128f2224af 
							
						 
					 
					
						
						
							
							Remove OnHit callback from query caches.  
						
						... 
						
						
						
						This is not useful now that query results are `Copy`. 
						
						
					 
					
						2023-02-04 15:21:21 +00:00 
						 
				 
			
				
					
						
							
							
								Nilstrieb 
							
						 
					 
					
						
						
						
						
							
						
						
							9fe4efe115 
							
						 
					 
					
						
						
							
							Abolish QueryVTable in favour of more assoc items on QueryConfig  
						
						... 
						
						
						
						This may introduce additional mono _but_ may help const fold things
better and especially may help not constructing a `QueryVTable` anymore
which is cheap but not free. 
						
						
					 
					
						2023-01-02 20:22:19 +01:00 
						 
				 
			
				
					
						
							
							
								gimbles 
							
						 
					 
					
						
						
						
						
							
						
						
							f8b30084ac 
							
						 
					 
					
						
						
							
							Use DepKind instead of &str  
						
						
						
						
					 
					
						2022-12-23 18:39:49 +05:30 
						 
				 
			
				
					
						
							
							
								Camille GILLOT 
							
						 
					 
					
						
						
						
						
							
						
						
							9f2c6b0b09 
							
						 
					 
					
						
						
							
							Sanity check computed value for feeable queries.  
						
						
						
						
					 
					
						2022-11-29 18:42:23 +00:00 
						 
				 
			
				
					
						
							
							
								Nilstrieb 
							
						 
					 
					
						
						
							
							
						
						
						
							
						
						
							6d26ea86da 
							
						 
					 
					
						
						
							
							Rename Ctxt and CTX to Tcx and Qcx  
						
						... 
						
						
						
						This makes it consistent and clear which context is used. 
						
						
					 
					
						2022-11-06 13:25:06 +01:00 
						 
				 
			
				
					
						
							
							
								Nilstrieb 
							
						 
					 
					
						
						
							
							
						
						
						
							
						
						
							36be251a35 
							
						 
					 
					
						
						
							
							Merge QueryDescription into QueryConfig  
						
						... 
						
						
						
						`QueryDescription` has gone through a lot of refactoring and doesn't
make sense anymore. 
						
						
					 
					
						2022-11-05 16:24:13 +01:00 
						 
				 
			
				
					
						
							
							
								nils 
							
						 
					 
					
						
						
							
							
						
						
						
							
						
						
							24ce4cfa20 
							
						 
					 
					
						
						
							
							Remove the describe method from the QueryDescription trait  
						
						... 
						
						
						
						It was called directly already, but now it's even more useless since it
just forwards to the free function. Call it directly. 
						
						
					 
					
						2022-10-14 22:35:56 +02:00 
						 
				 
			
				
					
						
							
							
								Joshua Nelson 
							
						 
					 
					
						
						
						
						
							
						
						
							0a9d7dbca2 
							
						 
					 
					
						
						
							
							Remove unnecessary TRY_LOAD_FROM_DISK constant  
						
						
						
						
					 
					
						2022-09-09 20:24:02 -05:00 
						 
				 
			
				
					
						
							
							
								Joshua Nelson 
							
						 
					 
					
						
						
						
						
							
						
						
							7208bdee33 
							
						 
					 
					
						
						
							
							Remove cache_on_disk from QueryVTable  
						
						... 
						
						
						
						This is not only simpler, but removes a generic function and unwrap.
I have hope it will see compile time and bootstrap time improvements. 
						
						
					 
					
						2022-09-09 20:21:58 -05:00 
						 
				 
			
				
					
						
							
							
								Joshua Nelson 
							
						 
					 
					
						
						
						
						
							
						
						
							4856affd90 
							
						 
					 
					
						
						
							
							Make HandleCycleError an enum instead of a macro-generated closure  
						
						... 
						
						
						
						- Add a `HandleCycleError` enum to rustc_query_system, along with a `handle_cycle_error` function
- Move `Value` to rustc_query_system, so `handle_cycle_error` can use it
- Move the `Value` impls from rustc_query_impl to rustc_middle. This is necessary due to orphan rules. 
						
						
					 
					
						2022-09-06 19:26:08 -05:00 
						 
				 
			
				
					
						
							
							
								Joshua Nelson 
							
						 
					 
					
						
						
						
						
							
						
						
							4e09a13bb8 
							
						 
					 
					
						
						
							
							Don't create two new closures for each query  
						
						... 
						
						
						
						- Parameterize DepKindStruct over `'tcx`
    This allows passing in an invariant function pointer in `query_callback`,
    rather than having to try and make it work for any lifetime.
- Add a new `execute_query` function to `QueryDescription` so we can call `tcx.$name` without needing to be in a macro context 
						
						
					 
					
						2022-09-01 18:47:54 -05:00 
						 
				 
			
				
					
						
							
							
								SparrowLii 
							
						 
					 
					
						
						
						
						
							
						
						
							cbc6bd2019 
							
						 
					 
					
						
						
							
							add depth_limit in QueryVTable  
						
						
						
						
					 
					
						2022-08-24 09:42:12 +08:00 
						 
				 
			
				
					
						
							
							
								Ralf Jung 
							
						 
					 
					
						
						
						
						
							
						
						
							3dad266f40 
							
						 
					 
					
						
						
							
							consistently use VTable over Vtable (matching stable stdlib API RawWakerVTable)  
						
						
						
						
					 
					
						2022-07-20 17:12:07 -04:00 
						 
				 
			
				
					
						
							
							
								mark 
							
						 
					 
					
						
						
						
						
							
						
						
							e489a94dee 
							
						 
					 
					
						
						
							
							rename ErrorReported -> ErrorGuaranteed  
						
						
						
						
					 
					
						2022-03-02 09:45:25 -06:00 
						 
				 
			
				
					
						
							
							
								bors 
							
						 
					 
					
						
						
						
						
							
						
						
							3b1fe7e7c9 
							
						 
					 
					
						
						
							
							Auto merge of  #94084  - Mark-Simulacrum:drop-sharded, r=cjgillot  
						
						... 
						
						
						
						Avoid query cache sharding code in single-threaded mode
In non-parallel compilers, this is just adding needless overhead at compilation time (since there is only one shard statically anyway). This amounts to roughly ~10 seconds reduction in bootstrap time, with overall neutral (some wins, some losses) performance results.
Parallel compiler performance should be largely unaffected by this PR; sharding is kept there. 
						
						
					 
					
						2022-02-27 14:04:07 +00:00 
						 
				 
			
				
					
						
							
							
								Eduard-Mihai Burtescu 
							
						 
					 
					
						
						
						
						
							
						
						
							b7e95dee65 
							
						 
					 
					
						
						
							
							rustc_errors: let DiagnosticBuilder::emit return a "guarantee of emission".  
						
						
						
						
					 
					
						2022-02-23 06:38:52 +00:00 
						 
				 
			
				
					
						
							
							
								Mark Rousskov 
							
						 
					 
					
						
						
						
						
							
						
						
							9deed6f74e 
							
						 
					 
					
						
						
							
							Move Sharded maps into each QueryCache impl  
						
						
						
						
					 
					
						2022-02-20 12:10:46 -05:00 
						 
				 
			
				
					
						
							
							
								Mark Rousskov 
							
						 
					 
					
						
						
						
						
							
						
						
							e240783a4d 
							
						 
					 
					
						
						
							
							Switch QueryJobId to a single global counter  
						
						... 
						
						
						
						This replaces the per-shard counters with a single global counter, simplifying
the JobId struct down to just a u64 and removing the need to pipe a DepKind
generic through a bunch of code. The performance implications on non-parallel
compilers are likely minimal (this switches to `Cell<u64>` as the backing
storage over a `u64`, but the latter was already inside a `RefCell` so it's not
really a significance divergence). On parallel compilers, the cost of a single
global u64 counter may be more significant: it adds a serialization point in
theory. On the other hand, we can imagine changing the counter to have a
thread-local component if it becomes worrisome or some similar structure.
The new design is sufficiently simpler that it warrants the potential for slight
changes down the line if/when we get parallel compilation to be more of a
default.
A u64 counter, instead of u32 (the old per-shard width), is chosen to avoid
possibly overflowing it and causing problems; it is effectively impossible that
we would overflow a u64 counter in this context. 
						
						
					 
					
						2022-02-08 18:49:55 -05:00 
						 
				 
			
				
					
						
							
							
								Camille GILLOT 
							
						 
					 
					
						
						
						
						
							
						
						
							138e96b719 
							
						 
					 
					
						
						
							
							Do not require QueryCtxt for cache_on_disk.  
						
						
						
						
					 
					
						2021-10-23 18:12:43 +02:00 
						 
				 
			
				
					
						
							
							
								Camille GILLOT 
							
						 
					 
					
						
						
						
						
							
						
						
							7c0920f5fb 
							
						 
					 
					
						
						
							
							Build the query vtable directly.  
						
						
						
						
					 
					
						2021-10-23 16:59:19 +02:00 
						 
				 
			
				
					
						
							
							
								Camille GILLOT 
							
						 
					 
					
						
						
						
						
							
						
						
							0a5666b838 
							
						 
					 
					
						
						
							
							Do not depend on the stored value when trying to cache on disk.  
						
						
						
						
					 
					
						2021-10-21 20:00:45 +02:00 
						 
				 
			
				
					
						
							
							
								Camille GILLOT 
							
						 
					 
					
						
						
						
						
							
						
						
							df71d0874a 
							
						 
					 
					
						
						
							
							Compute query vtable manually.  
						
						
						
						
					 
					
						2021-10-20 18:41:28 +02:00 
						 
				 
			
				
					
						
							
							
								Camille GILLOT 
							
						 
					 
					
						
						
						
						
							
						
						
							aa404c24dd 
							
						 
					 
					
						
						
							
							Make hash_result an Option.  
						
						
						
						
					 
					
						2021-10-20 18:29:18 +02:00 
						 
				 
			
				
					
						
							
							
								Camille GILLOT 
							
						 
					 
					
						
						
						
						
							
						
						
							fedd7785fe 
							
						 
					 
					
						
						
							
							Access StableHashingContext in rustc_query_system.  
						
						
						
						
					 
					
						2021-10-03 16:08:55 +02:00 
						 
				 
			
				
					
						
							
							
								Camille GILLOT 
							
						 
					 
					
						
						
						
						
							
						
						
							fd318a2f9b 
							
						 
					 
					
						
						
							
							Reduce amount of function pointers.  
						
						
						
						
					 
					
						2021-05-30 15:15:22 +02:00 
						 
				 
			
				
					
						
							
							
								Mark Rousskov 
							
						 
					 
					
						
						
						
						
							
						
						
							981135ae8e 
							
						 
					 
					
						
						
							
							Streamline try_start code  
						
						... 
						
						
						
						This shifts some branches around and avoids interleaving parallel and
non-parallel versions of the function too much. 
						
						
					 
					
						2021-05-02 12:25:48 -04:00 
						 
				 
			
				
					
						
							
							
								Camille GILLOT 
							
						 
					 
					
						
						
						
						
							
						
						
							c26d965714 
							
						 
					 
					
						
						
							
							Move report_cycle to rustc_query_system.  
						
						... 
						
						
						
						The call to `ty::print::with_forced_impl_filename_line`
is done when constructing the description,
at the construction of the QueryStackFrame. 
						
						
					 
					
						2021-02-20 23:36:31 +01:00 
						 
				 
			
				
					
						
							
							
								Camille GILLOT 
							
						 
					 
					
						
						
						
						
							
						
						
							3897395787 
							
						 
					 
					
						
						
							
							Move Query to rustc_query_system.  
						
						... 
						
						
						
						Rename it to QueryStackFrame and document a bit. 
						
						
					 
					
						2021-02-20 22:53:47 +01:00 
						 
				 
			
				
					
						
							
							
								Camille GILLOT 
							
						 
					 
					
						
						
						
						
							
						
						
							0144d6a3b7 
							
						 
					 
					
						
						
							
							Do not hold query key in Query.  
						
						
						
						
					 
					
						2021-02-20 22:53:46 +01:00 
						 
				 
			
				
					
						
							
							
								Camille GILLOT 
							
						 
					 
					
						
						
						
						
							
						
						
							49c1b07a9e 
							
						 
					 
					
						
						
							
							Decouple QueryContext from DepContext.  
						
						
						
						
					 
					
						2021-02-19 17:51:49 +01:00 
						 
				 
			
				
					
						
							
							
								Camille GILLOT 
							
						 
					 
					
						
						
						
						
							
						
						
							6f04883023 
							
						 
					 
					
						
						
							
							Remove QueryAccessors::to_dep_node.  
						
						
						
						
					 
					
						2021-02-19 17:51:49 +01:00 
						 
				 
			
				
					
						
							
							
								Camille GILLOT 
							
						 
					 
					
						
						
						
						
							
						
						
							15b0bc6b83 
							
						 
					 
					
						
						
							
							Separate the query cache from the query state.  
						
						
						
						
					 
					
						2021-02-13 21:14:58 +01:00 
						 
				 
			
				
					
						
							
							
								Mark Rousskov 
							
						 
					 
					
						
						
						
						
							
						
						
							f564d7abba 
							
						 
					 
					
						
						
							
							Switch query descriptions to just String  
						
						... 
						
						
						
						In practice we never used the borrowed variant anyway. 
						
						
					 
					
						2021-02-08 17:20:41 -05:00 
						 
				 
			
				
					
						
							
							
								Camille GILLOT 
							
						 
					 
					
						
						
						
						
							
						
						
							0a4d948b4a 
							
						 
					 
					
						
						
							
							Remove unused ProfileCategory.  
						
						
						
						
					 
					
						2020-10-22 22:35:32 +02:00 
						 
				 
			
				
					
						
							
							
								Julian Wollersberger 
							
						 
					 
					
						
						
						
						
							
						
						
							52cedcab92 
							
						 
					 
					
						
						
							
							Remove <CTX: QueryContext> in a bunch of places.  
						
						... 
						
						
						
						It was only needed by `find_cycle_in_stack()` in job.rs, but needed to be forwarded through dozens of types. 
						
						
					 
					
						2020-10-19 11:11:09 +02:00 
						 
				 
			
				
					
						
							
							
								Julian Wollersberger 
							
						 
					 
					
						
						
						
						
							
						
						
							39b0e79285 
							
						 
					 
					
						
						
							
							Remove generic argument from QueryConfig.  
						
						
						
						
					 
					
						2020-10-12 16:04:49 +02:00 
						 
				 
			
				
					
						
							
							
								mark 
							
						 
					 
					
						
						
						
						
							
						
						
							9e5f7d5631 
							
						 
					 
					
						
						
							
							mv compiler to compiler/  
						
						
						
						
					 
					
						2020-08-30 18:45:07 +03:00