def insert_pure_function(module, fnty, name):
 fn = module.get_or_insert_function(fnty, name=name)
 fn.attributes.add('readonly')
 fn.attributes.add('nounwind')
 return fn

def insert_pure_function ( module , fnty , name ) : fn = module . get_or_insert_function ( fnty , name = name ) fn . attributes . add ( 'readonly' ) fn . attributes . add ( 'nounwind' ) return fn
insert a pure function in the given module .