[be] Linter fixes for LeaveSSA
Lauren Tan committed
Feb 15, 2023 at 15:22 UTC
d1fd0449eeb5207649e0d202081d971bf486cab8
1 file changed
+6
-3
compiler/forget/src/SSA/LeaveSSA.ts
+6
-3
@@ -86,7 +86,7 @@ import {
86
* )
87
* ```
88
*/
89
-export function leaveSSA(fn: HIRFunction) {
89
+export function leaveSSA(fn: HIRFunction): void {
90
// For "memoizable" phis (see docblock), this maps the original identifiers to the identifier they
91
// should be reassigned to. The keys are phi operands, and the values are the phi id to which
92
// they are being explicitly reassigned.
@@ -101,7 +101,7 @@ export function leaveSSA(fn: HIRFunction) {
101
phi: Phi;
102
block: BasicBlock;
103
};
104
- function pushPhis(arr: Array<PhiState>, block: BasicBlock) {
104
+ function pushPhis(arr: Array<PhiState>, block: BasicBlock): void {
105
for (const phi of block.phis) {
106
arr.push({ phi, block });
107
}
@@ -335,7 +335,10 @@ export function leaveSSA(fn: HIRFunction) {
335
// Rewrite @param place's identifier based on the given rewrite mapping, if the identifier
336
// is present. Also expands the mutable range of the target identifier to include the
337
// place's range.
338
-function rewritePlace(place: Place, rewrites: Map<Identifier, Identifier>) {
338
+function rewritePlace(
339
+ place: Place,
340
+ rewrites: Map<Identifier, Identifier>
341
+): void {
342
const prevIdentifier = place.identifier;
343
const nextIdentifier = rewrites.get(prevIdentifier);
344
if (nextIdentifier === undefined || nextIdentifier === prevIdentifier) {