Implement constant folding in the IR backend for JVM
The newly added pass folds the set of constant functions of the current backend, plus IrBuiltIns.
This commit is contained in:
committed by
max-kammerer
parent
7e4d33be24
commit
79fcaae991
+20
@@ -4379,11 +4379,26 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/constants"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
|
||||
}
|
||||
|
||||
@TestMetadata("comparisonFalse.kt")
|
||||
public void testComparisonFalse() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/constants/comparisonFalse.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("comparisonTrue.kt")
|
||||
public void testComparisonTrue() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/constants/comparisonTrue.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("constantsInWhen.kt")
|
||||
public void testConstantsInWhen() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/constants/constantsInWhen.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("divisionByZero.kt")
|
||||
public void testDivisionByZero() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/constants/divisionByZero.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("float.kt")
|
||||
public void testFloat() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/constants/float.kt");
|
||||
@@ -17176,6 +17191,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/primitiveTypes/kt2269.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt2269NotOptimizable.kt")
|
||||
public void testKt2269NotOptimizable() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/primitiveTypes/kt2269NotOptimizable.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt2275.kt")
|
||||
public void testKt2275() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/primitiveTypes/kt2275.kt");
|
||||
|
||||
Reference in New Issue
Block a user