Package com.tonic.analysis.ssa.llvm
Class LlvmLoweringConfig
- java.lang.Object
-
- com.tonic.analysis.ssa.llvm.LlvmLoweringConfig
-
public final class LlvmLoweringConfig extends Object
Configuration forLlvmLowering, following the project's builder-plus-presets convention.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLlvmLoweringConfig.BuilderMutable builder forLlvmLoweringConfig.static classLlvmLoweringConfig.ObjectModelHow Java's object/reference/runtime model is lowered.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static LlvmLoweringConfig.Builderbuilder()static LlvmLoweringConfigdefaults()Creates the default preset: no target header, raw LLVM arithmetic, computational subset only.static LlvmLoweringConfigfullObjectModel()Creates a preset enabling the full object/runtime-model lowering via the jvm_* runtime ABI.StringgetDataLayout()LlvmLoweringConfig.ObjectModelgetObjectModel()StringgetTargetTriple()booleanisEmitDivisionGuards()
-
-
-
Method Detail
-
getTargetTriple
public String getTargetTriple()
- Returns:
- the target triple emitted as a module header, or null to omit
-
getDataLayout
public String getDataLayout()
- Returns:
- the target datalayout emitted as a module header, or null to omit
-
isEmitDivisionGuards
public boolean isEmitDivisionGuards()
- Returns:
- whether JVM-faithful guards are emitted around integer division cases that are undefined behavior in raw LLVM sdiv/srem; off by default
-
getObjectModel
public LlvmLoweringConfig.ObjectModel getObjectModel()
- Returns:
- how the object/reference/runtime model is lowered;
LlvmLoweringConfig.ObjectModel.NONEby default
-
defaults
public static LlvmLoweringConfig defaults()
Creates the default preset: no target header, raw LLVM arithmetic, computational subset only.- Returns:
- the default configuration
-
fullObjectModel
public static LlvmLoweringConfig fullObjectModel()
Creates a preset enabling the full object/runtime-model lowering via the jvm_* runtime ABI.- Returns:
- the configuration with
LlvmLoweringConfig.ObjectModel.RUNTIME_ABI
-
builder
public static LlvmLoweringConfig.Builder builder()
- Returns:
- a new builder with default settings
-
-