-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Wasm] Move all WasmIR optimizer and macro handling into emit stage
- Loading branch information
1 parent
1cf1852
commit 894b9da
Showing
11 changed files
with
320 additions
and
241 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
129 changes: 0 additions & 129 deletions
129
wasm/wasm.ir/src/org/jetbrains/kotlin/wasm/ir/WasmIrExpressionBuilder.kt
This file was deleted.
Oops, something went wrong.
18 changes: 18 additions & 0 deletions
18
wasm/wasm.ir/src/org/jetbrains/kotlin/wasm/ir/convertors/InstructionsFlowConverter.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* | ||
* Copyright 2010-2024 JetBrains s.r.o. and Kotlin Programming Language contributors. | ||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. | ||
*/ | ||
|
||
package org.jetbrains.kotlin.wasm.ir.convertors | ||
|
||
import org.jetbrains.kotlin.wasm.ir.WasmInstr | ||
|
||
internal fun processInstructionsFlow(input: Sequence<WasmInstr>): Sequence<WasmInstr> { | ||
val macroTableHandled = handleMacroTable(input) | ||
val macroIfHandled = handleMacroIf(macroTableHandled) | ||
val removedUnreachableCode = removeUnreachableInstructions(macroIfHandled) | ||
val mergedWithDrop = removeInstructionPriorDrop(removedUnreachableCode) | ||
val mergedWithUnreachable = removeInstructionPriorUnreachable(mergedWithDrop) | ||
val mergedWithTee = mergeSetAndGetIntoTee(mergedWithUnreachable) | ||
return mergedWithTee | ||
} |
Oops, something went wrong.