More changes to get llvm-py to compile with LLVM 3.0
This commit is contained in:
parent
c09903e54f
commit
3120dbf29e
3 changed files with 12 additions and 10 deletions
|
|
@ -135,7 +135,8 @@ class _ObjectCache(type):
|
||||||
# Cacheables
|
# Cacheables
|
||||||
#===----------------------------------------------------------------------===
|
#===----------------------------------------------------------------------===
|
||||||
|
|
||||||
class Cacheable(object, metaclass=_ObjectCache):
|
class Cacheable(object):
|
||||||
|
__metaclass__ = _ObjectCache
|
||||||
"""Objects that can be cached.
|
"""Objects that can be cached.
|
||||||
|
|
||||||
Objects that wrap a PyCObject are cached to avoid "aliasing", i.e.,
|
Objects that wrap a PyCObject are cached to avoid "aliasing", i.e.,
|
||||||
|
|
|
||||||
|
|
@ -929,9 +929,9 @@ _wrap_pass( SingleLoopExtractor )
|
||||||
_wrap_pass( StripDeadPrototypes )
|
_wrap_pass( StripDeadPrototypes )
|
||||||
_wrap_pass( StripNonDebugSymbols )
|
_wrap_pass( StripNonDebugSymbols )
|
||||||
_wrap_pass( StripSymbols )
|
_wrap_pass( StripSymbols )
|
||||||
_wrap_pass( StructRetPromotion )
|
//_wrap_pass( StructRetPromotion )
|
||||||
_wrap_pass( TailCallElimination )
|
_wrap_pass( TailCallElimination )
|
||||||
_wrap_pass( TailDuplication )
|
//_wrap_pass( TailDuplication )
|
||||||
_wrap_pass( UnifyFunctionExitNodes )
|
_wrap_pass( UnifyFunctionExitNodes )
|
||||||
|
|
||||||
_wrap_pass( Internalize2 )
|
_wrap_pass( Internalize2 )
|
||||||
|
|
@ -1743,9 +1743,9 @@ static PyMethodDef core_methods[] = {
|
||||||
_pass( StripDeadPrototypes )
|
_pass( StripDeadPrototypes )
|
||||||
_pass( StripNonDebugSymbols )
|
_pass( StripNonDebugSymbols )
|
||||||
_pass( StripSymbols )
|
_pass( StripSymbols )
|
||||||
_pass( StructRetPromotion )
|
//_pass( StructRetPromotion )
|
||||||
_pass( TailCallElimination )
|
_pass( TailCallElimination )
|
||||||
_pass( TailDuplication )
|
//_pass( TailDuplication )
|
||||||
_pass( UnifyFunctionExitNodes )
|
_pass( UnifyFunctionExitNodes )
|
||||||
|
|
||||||
_pass( Internalize2 )
|
_pass( Internalize2 )
|
||||||
|
|
|
||||||
|
|
@ -325,19 +325,20 @@ void LLVMSetDoesNotThrow(LLVMValueRef fn, int DoesNotThrow)
|
||||||
return fnp->setDoesNotThrow((bool)DoesNotThrow);
|
return fnp->setDoesNotThrow((bool)DoesNotThrow);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
LLVMValueRef LLVMGetIntrinsic(LLVMModuleRef module, int id,
|
LLVMValueRef LLVMGetIntrinsic(LLVMModuleRef module, int id,
|
||||||
LLVMTypeRef *types, unsigned n_types)
|
LLVMTypeRef *types, unsigned n_types)
|
||||||
{
|
{
|
||||||
assert(types);
|
assert(types);
|
||||||
|
|
||||||
std::vector< llvm::ArrayRef<llvm::Type*> > types_vec;
|
std::vector< llvm::Type* > types_vec;
|
||||||
unwrap_cvec(types, n_types, types_vec);
|
unwrap_vec(types, n_types, types_vec);
|
||||||
|
|
||||||
llvm::Module *modulep = llvm::unwrap(module);
|
llvm::Module *modulep = llvm::unwrap(module);
|
||||||
assert(modulep);
|
assert(modulep);
|
||||||
|
|
||||||
llvm::Function *intfunc = llvm::Intrinsic::getDeclaration(modulep,
|
llvm::Function *intfunc = llvm::Intrinsic::getDeclaration(modulep,
|
||||||
llvm::Intrinsic::ID(id), &types_vec[0], types_vec.size());
|
llvm::Intrinsic::ID(id), types_vec[0]);
|
||||||
|
|
||||||
return wrap(intfunc);
|
return wrap(intfunc);
|
||||||
}
|
}
|
||||||
|
|
@ -501,8 +502,8 @@ void LLVMAdd ## P ## Pass (LLVMPassManagerRef passmgr) { \
|
||||||
|
|
||||||
define_pass( AAEval )
|
define_pass( AAEval )
|
||||||
define_pass( AliasAnalysisCounter )
|
define_pass( AliasAnalysisCounter )
|
||||||
define_pass( AlwaysInliner )
|
//define_pass( AlwaysInliner )
|
||||||
define_pass( BasicAliasAnalysis )
|
//define_pass( BasicAliasAnalysis )
|
||||||
define_pass( BlockPlacement )
|
define_pass( BlockPlacement )
|
||||||
define_pass( BreakCriticalEdges )
|
define_pass( BreakCriticalEdges )
|
||||||
define_pass( CodeGenPrepare )
|
define_pass( CodeGenPrepare )
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue