Class LlvmLowering


  • public final class LlvmLowering
    extends Object
    Entry point lowering YABR SSA IR to textual LLVM IR.
    • 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