Commit graph

794 commits

Author SHA1 Message Date
Siu Kwan Lam
5debe65fe1 all llvmpy PyCapsule objects have a name.
pycap_get should throw when PyCapsule_GetPointer returns NULL.
2012-09-21 14:31:54 -07:00
Mark Florisson
bc03c9a8b7 Fix GC head for debug builds for gufunc fake arrays 2012-09-21 22:46:48 +02:00
Mark Florisson
10b3f188cc Some more progress towards CUDA gufuncs 2012-09-21 22:46:48 +02:00
Siu Kwan Lam
d642bfdfe6 Merge pull request #23 from dand-oss/master
pycap_new() template replaces a bunch of macro code
2012-09-21 13:46:32 -07:00
Mark Florisson
cd9c5e7c79 Use meta to decompile python functions into ASTs 2012-09-21 22:39:48 +02:00
Mark Florisson
b0137289b9 Use meta to decompile python functions into ASTs 2012-09-21 22:39:48 +02:00
dand-oss
0ee70e1a92 pycap_new() template replaces a bunch of macro code 2012-09-21 09:22:03 -05:00
Siu Kwan Lam
0ee5e2e845 Raise TypeError when a function is called with the wrong argument.
Otherwise, llvm will give assertion error which is hard to trackdown.
2012-09-20 15:15:26 -07:00
Siu Kwan Lam
e7ad6c7439 Remove the need to build temporary std::vector. 2012-09-19 14:20:19 -07:00
Siu Kwan Lam
b748d34f48 a simply exercise for tbaa tree building. 2012-09-19 12:31:51 -07:00
Siu Kwan Lam
9767ac4d47 Improve error-handling for PyCapsule_GetPointer and related functions. 2012-09-15 19:10:05 -07:00
Siu Kwan Lam
0079b1de07 Cleanup all memory allocations and their exception handling 2012-09-15 18:34:15 -07:00
Siu Kwan Lam
f17d4f7d62 Add try-catch to all exposed functions 2012-09-15 18:17:16 -07:00
Siu Kwan Lam
d77c3a61e1 Better error handling for PyCapsule_GetPointer 2012-09-14 19:28:21 -07:00
Siu Kwan Lam
56796cad61 Follow up on pull request 21. Since PyCapsule_GetPointer returns NULL on error, we should check if the list element is Py_None. 2012-09-14 18:42:49 -07:00
Siu Kwan Lam
f9efc23e2d Merge pull request #21 from laanwj/2012_09_metadata_none
Thanks!
2012-09-14 18:18:03 -07:00
Wladimir J. van der Laan
c94e852c0e MetaData operands can be None. Handle this. 2012-09-14 17:09:28 +02:00
Ilan Schnell
53d782bd39 update setup.py 2012-09-13 21:23:40 -05:00
Ilan Schnell
5df7c4d159 improve test to not use hardcoded test directory 2012-09-13 10:57:48 -05:00
Ilan Schnell
77d199e60d add atomic tests 2012-09-12 17:26:03 -05:00
Ilan Schnell
211f273000 add attribute test 2012-09-12 16:26:52 -05:00
Ilan Schnell
e6bfbca6e8 update readme 2012-09-12 15:55:36 -05:00
Ilan Schnell
8af02c5a7e add the assembly test 2012-09-12 15:50:29 -05:00
Ilan Schnell
b8dd256e11 add intrinsic tests to test module 2012-09-12 15:46:20 -05:00
Ilan Schnell
2b9ac16733 move issue 10 test case into common tests 2012-09-12 15:34:41 -05:00
Ilan Schnell
6d60c4a469 add inline test to common test suite 2012-09-12 15:18:12 -05:00
Ilan Schnell
28c659ec90 Merge pull request #20 from laanwj/2012_09_module_named_metadata
Add support for module named metadata
2012-09-12 12:27:55 -07:00
Wladimir J. van der Laan
e2d8079b93 Support MetaDataString, and correctly represent MetaData Values in _make_value 2012-09-12 21:23:54 +02:00
Wladimir J. van der Laan
7f69beb258 Access to MetaData operands
This is not available in the C API, so add functions to extra.cpp:

- `LLVMMetaDataGetOperand` wraps MDNode::getOperand
- `LLVMMetaDataGetNumOperands` wraps MDNode::getNumOperands
2012-09-12 20:59:59 +02:00
Wladimir J. van der Laan
6e6bd1ea71 Add support for module named metadata
This is mainly useful to get access to top-level debug information through 'llvm.dbg.cu'.

Wraps LLVM C-API functions `LLVMGetNamedMetadataNumOperands`, `LLVMGetNamedMetadataOperands` and `LLVMAddNamedMetadataOperand`.

Also add testcase.
2012-09-12 20:03:24 +02:00
Siu Kwan Lam
5ee6bba66b Fix invalid prototype after switches to size_t instead of unsigned int. 2012-09-10 17:22:20 -07:00
dand-oss
db00a6b8de C++ cleanup of old C conventions - prefer C++ casting to unsafe C style casts - use templates to encapsulate casting - prefer new to malloc - apply const when possible - decalare variables as near to use as possible 2012-09-10 16:52:50 -07:00
Siu Kwan Lam
47baa49160 Merge pull request #18 from laanwj/2012_09_constantint_value
Thanks!
2012-09-10 16:41:19 -07:00
Siu Kwan Lam
cc12434f57 Add thread local 2012-09-10 16:37:20 -07:00
Ilan Schnell
16b833be2b ENH: we should use llvmpy consistently as the project name 2012-09-09 22:42:22 -05:00
Wladimir J. van der Laan
41953602bf Add ways to get the value of a ConstantInt
- property z_ext_value gets the zero-extended value using LLVMConstIntGetZExtValue
- property s_ext_value gets the sign-extended value using LLVMConstIntGetSExtValue
- add test case for both
2012-09-09 12:40:40 +02:00
Wladimir J. van der Laan
3b22d5accf Add wrapping constructor for (signed) long long
Completely analogous to how unsigned long long is handled
2012-09-09 12:04:27 +02:00
Siu Kwan Lam
8a159b35f0 refactor llvm_cbuilder 2012-09-07 17:53:22 -07:00
Siu Kwan Lam
af44641bb9 add noalias attribute to parameters 2012-09-07 17:53:22 -07:00
Siu Kwan Lam
1e4633c44d add invariant variable 2012-09-07 17:53:22 -07:00
Siu Kwan Lam
b941ae5f1f Use non-temporal hint at memory store for vectorizer.
Note: LLVM optimizer is smart enough to not use NT write if it is slower.
2012-09-07 17:53:22 -07:00
Siu Kwan Lam
fbb7208b85 add invariant load
add related test
2012-09-06 20:00:01 -07:00
Siu Kwan Lam
82117d899e add support for metadata.
add related test.
2012-09-06 15:47:23 -07:00
Siu Kwan Lam
8505256510 Inline ufunc kernel in vectorize. (Better io throughput) 2012-09-04 10:08:07 -07:00
Siu Kwan Lam
78cde30883 Revive inline_function() 2012-09-04 10:06:36 -07:00
Siu Kwan Lam
c439c2fb40 Merge pull request #16 from laanwj/2012_08_calledfunction
Implement property CallOrInvokeInstruction.called_function.
Thanks.
2012-09-02 14:34:05 -07:00
Wladimir J. van der Laan
5bd4991f0b Implement property CallOrInvokeInstruction.called_function
Also add a testcase.
2012-09-02 13:23:47 +02:00
Siu Kwan Lam
5d14461c84 Fix ConstantExpr opcode to use C++ enum values.
Note: C++ opcode is different from C opcode values.
Add ConstantExpr opcode name.
Add test for these.
2012-09-01 20:53:33 -07:00
Siu Kwan Lam
76c60adbca Merge pull request #15 from laanwj/2012_08_constantexpr_opcode
Implement property ConstantExpr.opcode
2012-09-01 20:10:44 -07:00
Wladimir J. van der Laan
c033ba02a4 Implement property ConstantExpr.opcode
Use LLVM C-API function `LLVMGetConstOpcode`
2012-09-01 17:33:55 +02:00