cleanup
This commit is contained in:
parent
1d4c431b23
commit
5dd0948c65
13 changed files with 24 additions and 24 deletions
|
|
@ -156,7 +156,7 @@ class PassManager(object):
|
|||
|
||||
def add(self, pass_obj):
|
||||
'''Add a pass to the pass manager.
|
||||
|
||||
|
||||
pass_obj --- Either a Pass instance, a string name of a pass
|
||||
'''
|
||||
if isinstance(pass_obj, Pass):
|
||||
|
|
@ -340,7 +340,7 @@ def build_pass_managers(tm, opt=2, loop_vectorize=False, vectorize=False,
|
|||
inline_threshold=2000, pm=True, fpm=True, mod=None):
|
||||
'''
|
||||
tm --- The TargetMachine for which the passes are optimizing for.
|
||||
The TargetMachine must stay alive until the pass managers
|
||||
The TargetMachine must stay alive until the pass managers
|
||||
are removed.
|
||||
opt --- [0-3] Optimization level. Default to 2.
|
||||
loop_vectorize --- [boolean] Whether to use loop-vectorizer.
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@ from llvm.core import *
|
|||
|
||||
class TBAABuilder(object):
|
||||
'''Simplify creation of TBAA metadata.
|
||||
|
||||
Each TBAABuidler object operates on a module.
|
||||
|
||||
Each TBAABuidler object operates on a module.
|
||||
User can create multiple TBAABuilder on a module
|
||||
'''
|
||||
|
||||
|
||||
def __init__(self, module, rootid):
|
||||
'''
|
||||
module --- the module to use.
|
||||
|
|
@ -23,7 +23,7 @@ class TBAABuilder(object):
|
|||
def get_node(self, name, parent=None, const=False):
|
||||
'''Returns a MetaData object representing a TBAA node.
|
||||
|
||||
Use loadstore_instruction.set_metadata('tbaa', node) to
|
||||
Use loadstore_instruction.set_metadata('tbaa', node) to
|
||||
bind a type to a memory.
|
||||
'''
|
||||
parent = parent or self.root
|
||||
|
|
|
|||
|
|
@ -454,7 +454,7 @@ class TestEngineBuilder(TestCase):
|
|||
with self.assertRaises(llvm.LLVMException):
|
||||
# Ensure the targetmachine is owned.
|
||||
llvm._util.check_is_unowned(tm)
|
||||
|
||||
|
||||
|
||||
with self.assertRaises(llvm.LLVMException):
|
||||
# Ensure the module is owned.
|
||||
|
|
@ -932,7 +932,7 @@ class TestCPUSupport(TestCase):
|
|||
|
||||
arg = le.GenericValue.real(Type.double(), 1.234)
|
||||
retval = ee.run_function(func, [arg])
|
||||
|
||||
|
||||
golden = math.sin(1.234)
|
||||
answer = retval.as_real(Type.double())
|
||||
self.assertTrue(abs(answer-golden)/golden < 1e-5)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue