[K/N] Turn on optimistic escape analysis
For new MM (with tracing GC), it is safe to turn it on
This commit is contained in:
+2
-1
@@ -1710,7 +1710,8 @@ internal class CodeGeneratorVisitor(
|
||||
|
||||
private fun needLifetimeConstraintsCheck(valueToAssign: LLVMValueRef, irClass: IrClass): Boolean {
|
||||
// TODO: Likely, we don't need isFrozen check here at all.
|
||||
return functionGenerationContext.isObjectType(valueToAssign.type) && !irClass.isFrozen(context)
|
||||
return context.config.memoryModel != MemoryModel.EXPERIMENTAL
|
||||
&& functionGenerationContext.isObjectType(valueToAssign.type) && !irClass.isFrozen(context)
|
||||
}
|
||||
|
||||
private fun isZeroConstValue(value: IrExpression): Boolean {
|
||||
|
||||
+1
-4
@@ -1812,10 +1812,7 @@ internal object EscapeAnalysis {
|
||||
val intraproceduralAnalysisResult =
|
||||
IntraproceduralAnalysis(context, moduleDFG, externalModulesDFG, callGraph).analyze()
|
||||
InterproceduralAnalysis(context, generationState, callGraph, intraproceduralAnalysisResult, externalModulesDFG, lifetimes,
|
||||
// TODO: This is a bit conservative, but for more aggressive option some support from runtime is
|
||||
// needed (namely, determining that a pointer is from the stack; this is easy for x86 or x64,
|
||||
// but what about all other platforms?).
|
||||
propagateExiledToHeapObjects = true
|
||||
propagateExiledToHeapObjects = context.config.memoryModel != MemoryModel.EXPERIMENTAL
|
||||
).analyze()
|
||||
} catch (t: Throwable) {
|
||||
val extraUserInfo =
|
||||
|
||||
Reference in New Issue
Block a user