"""1This file demonstrates a trivial function "fpadd" returning the sum of2two floating-point numbers.3"""45from llvmlite import ir67# Create some useful types8double = ir.DoubleType()9fnty = ir.FunctionType(double, (double, double))1011# Create an empty module...12module = ir.Module(name=__file__)13# and declare a function named "fpadd" inside it14func = ir.Function(module, fnty, name="fpadd")1516# Now implement the function17block = func.append_basic_block(name="entry")18builder = ir.IRBuilder(block)19a, b = func.args20result = builder.fadd(a, b, name="res")21builder.ret(result)2223# Print the module IR24print(module)252627