Package com.tonic.analysis.ssa.llvm
Class LlvmLowering
- java.lang.Object
-
- com.tonic.analysis.ssa.llvm.LlvmLowering
-
public final class LlvmLowering extends Object
Entry point lowering YABR SSA IR to textual LLVM IR.
-
-
Constructor Summary
Constructors Constructor Description LlvmLowering()Creates a lowering with the default configuration.LlvmLowering(LlvmLoweringConfig config)Creates a lowering.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringlower(IRMethod method)Lowers a single method to a complete LLVM IR module (declares + one define).StringlowerToModule(List<IRMethod> methods)Lowers several methods into one module; callees defined in the module are not re-declared.
-
-
-
Constructor Detail
-
LlvmLowering
public LlvmLowering()
Creates a lowering with the default configuration.
-
LlvmLowering
public LlvmLowering(LlvmLoweringConfig config)
Creates a lowering.- Parameters:
config- the configuration to use; null selects the defaults
-
-
Method Detail
-
lower
public String lower(IRMethod method)
Lowers a single method to a complete LLVM IR module (declares + one define).- Parameters:
method- the SSA method to lower- Returns:
- the module's LLVM IR text
- Throws:
UnsupportedOperationException- when the method uses a construct outside the lowered subset
-
lowerToModule
public String lowerToModule(List<IRMethod> methods)
Lowers several methods into one module; callees defined in the module are not re-declared.- Parameters:
methods- the SSA methods to lower- Returns:
- the module's LLVM IR text
- Throws:
UnsupportedOperationException- when a method uses a construct outside the lowered subset
-
-