@@ -1098,7 +1098,7 @@ fn start_executing_work<B: ExtraBackendMethods>(
1098
1098
// There are a few environmental pre-conditions that shape how the system
1099
1099
// is set up:
1100
1100
//
1101
- // - Error reporting only can happen on the main thread because that's the
1101
+ // - Error reporting can only happen on the main thread because that's the
1102
1102
// only place where we have access to the compiler `Session`.
1103
1103
// - LLVM work can be done on any thread.
1104
1104
// - Codegen can only happen on the main thread.
@@ -1110,16 +1110,16 @@ fn start_executing_work<B: ExtraBackendMethods>(
1110
1110
// Error Reporting
1111
1111
// ===============
1112
1112
// The error reporting restriction is handled separately from the rest: We
1113
- // set up a `SharedEmitter` the holds an open channel to the main thread.
1113
+ // set up a `SharedEmitter` that holds an open channel to the main thread.
1114
1114
// When an error occurs on any thread, the shared emitter will send the
1115
1115
// error message to the receiver main thread (`SharedEmitterMain`). The
1116
1116
// main thread will periodically query this error message queue and emit
1117
1117
// any error messages it has received. It might even abort compilation if
1118
- // has received a fatal error. In this case we rely on all other threads
1118
+ // it has received a fatal error. In this case we rely on all other threads
1119
1119
// being torn down automatically with the main thread.
1120
1120
// Since the main thread will often be busy doing codegen work, error
1121
1121
// reporting will be somewhat delayed, since the message queue can only be
1122
- // checked in between to work packages.
1122
+ // checked in between two work packages.
1123
1123
//
1124
1124
// Work Processing Infrastructure
1125
1125
// ==============================
@@ -1133,7 +1133,7 @@ fn start_executing_work<B: ExtraBackendMethods>(
1133
1133
// thread about what work to do when, and it will spawn off LLVM worker
1134
1134
// threads as open LLVM WorkItems become available.
1135
1135
//
1136
- // The job of the main thread is to codegen CGUs into LLVM work package
1136
+ // The job of the main thread is to codegen CGUs into LLVM work packages
1137
1137
// (since the main thread is the only thread that can do this). The main
1138
1138
// thread will block until it receives a message from the coordinator, upon
1139
1139
// which it will codegen one CGU, send it to the coordinator and block
@@ -1142,10 +1142,10 @@ fn start_executing_work<B: ExtraBackendMethods>(
1142
1142
//
1143
1143
// The coordinator keeps a queue of LLVM WorkItems, and when a `Token` is
1144
1144
// available, it will spawn off a new LLVM worker thread and let it process
1145
- // that a WorkItem. When a LLVM worker thread is done with its WorkItem,
1145
+ // a WorkItem. When a LLVM worker thread is done with its WorkItem,
1146
1146
// it will just shut down, which also frees all resources associated with
1147
1147
// the given LLVM module, and sends a message to the coordinator that the
1148
- // has been completed.
1148
+ // WorkItem has been completed.
1149
1149
//
1150
1150
// Work Scheduling
1151
1151
// ===============
@@ -1165,7 +1165,7 @@ fn start_executing_work<B: ExtraBackendMethods>(
1165
1165
//
1166
1166
// Doing LLVM Work on the Main Thread
1167
1167
// ----------------------------------
1168
- // Since the main thread owns the compiler processes implicit `Token`, it is
1168
+ // Since the main thread owns the compiler process's implicit `Token`, it is
1169
1169
// wasteful to keep it blocked without doing any work. Therefore, what we do
1170
1170
// in this case is: We spawn off an additional LLVM worker thread that helps
1171
1171
// reduce the queue. The work it is doing corresponds to the implicit
@@ -1216,7 +1216,7 @@ fn start_executing_work<B: ExtraBackendMethods>(
1216
1216
// ------------------------------
1217
1217
//
1218
1218
// The final job the coordinator thread is responsible for is managing LTO
1219
- // and how that works. When LTO is requested what we'll to is collect all
1219
+ // and how that works. When LTO is requested what we'll do is collect all
1220
1220
// optimized LLVM modules into a local vector on the coordinator. Once all
1221
1221
// modules have been codegened and optimized we hand this to the `lto`
1222
1222
// module for further optimization. The `lto` module will return back a list
0 commit comments