Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base: 5dd8c543ab
...
compare: jit_prototype
Checking mergeability… Don't worry, you can still create the pull request.
This comparison is big! We're only showing the most recent 250 commits
Commits on Mar 20, 2011
@bacek bacek Kind of prototype of generated op bodies within current bytecode 88d4cd3
@bacek bacek Extend test 920516c
@bacek bacek Don't override ctx<level> if provided. a44bfe5
@bacek bacek Pregenerate 'BasicBlock' for each opcode and replace 'goto offset' wi…
…th 'goto label' to reflect future semantic of jitted Sub
a31e86f
luben karavelov more test for generating constants ff6ba19
luben karavelov Flesh out LLVM::Constant aa6f121
@bacek bacek Use bit of static typing in LLVM bindings. 1c76a45
Commits on Mar 21, 2011
@bacek bacek Add shortcuts to create few Parrot types. 0e47a3a
@bacek bacek Merge branch 'opsc_llvm' into jit_prototype 25cdb27
@bacek bacek Add LLVM::BasicBlock.insert_before(); 8e99372
@bacek bacek Create llvm function for jitted sub c220762
@bacek bacek Return self from Value.name for simplify chained calls. 989835a
@bacek bacek Handle params/returns 16a0448
@bacek bacek First actual JITting - handle 'goto offset' in LLVM::Trans::JIT. 34472b3
@bacek bacek Improve Type::PMC slightly.
LLVM doesn't like pointer(void). It should be replaced with pointer(int8()). Which makes sanse but still quite surprise.
881929c
@bacek bacek Fix typo 0729979
@bacek bacek Add module.verify at the end of "JITting" 3a50185
@bacek bacek Add few more ops to enable simple loops. 9a5cbee
@bacek bacek Add Type::function for create FunctionType 240d755
@bacek bacek Switch Module to use Type::function 175b576
Commits on Mar 22, 2011
@bacek bacek Add LLVM::BasicBlock.insert_before(); f1a81ea
@bacek bacek Return self from Value.name for simplify chained calls. 1f4542e
@bacek bacek Improve Type::PMC slightly.
LLVM doesn't like pointer(void). It should be replaced with pointer(int8()). Which makes sanse but still quite surprise.
b440a5c
@bacek bacek Fix typo a9482e2
@bacek bacek Add Type::function for create FunctionType 25c884a
@bacek bacek Switch Module to use Type::function 71d072f
@bacek bacek Fix bug with Value.name.
We should actually return result of LLVM call.
84952f9
@bacek bacek Add BasicBlock.prev 0adf372
@jkeenan jkeenan Add t/library/*/*.t to list of globs included in \@library_tests, hen…
…ce run during 'make test'.
c21ee4f
@luben luben Add more Builder methods cf06776
@luben luben Merge branch 'opsc_llvm' of github.com:parrot/parrot into opsc_llvm a9403d6
@luben luben * Add list of all available optimizer passes
* some stylistic fixes in builder
79bb548
@luben luben Some more BasicBlock methods 0376785
@luben luben fix copy/paste error 0ac018a
@bacek bacek [cage] Trailing whitespace. 0998fee
@luben luben serialize and deserialize LLVM bitcode to files 424fb27
@bacek bacek Implement function fetching and navigation 203d726
@bacek bacek Split LLVM_Engine.class_init function for initalize LLVM once only. A…
…dd empty .init. Fix memory leak in .load_module.
e0e05e1
@bacek bacek Fix loading of bitcode. d2f863f
@bacek bacek Use empty LLVM_Engine to load bitcode 656caea
@bacek bacek Rework bitcode loading slightly. 13d22b9
@bacek bacek Fix testing loaded module.
Fe have to find proper function from it to call.
856b74a
@bacek bacek Merge branch 'opsc_llvm' into jit_prototype
Conflicts:
	runtime/parrot/library/LLVM/BasicBlock.pm
	runtime/parrot/library/LLVM/Module.pm
09f8fc6
@bacek bacek Reapply fix. 88158c6
@bacek bacek Actually load CUR_CTX. d2ecf13
@bacek bacek Add proto for Parrot_io_printf. e740bad
@bacek bacek Create complex parrot's types once only. 73a5845
@bacek bacek Add * variants of parrot types. a308bd8
@bacek bacek Add Function.return_type. 7003a3b
@bacek bacek Create complex parrot's types once only. 67151ce
@bacek bacek Add * variants of parrot types. ae04e65
@bacek bacek Add Function.return_type. 1738a31
@bacek bacek Add Module type introspection. d96afc5
@bacek bacek Add Module.find_function 4430c2e
@jkeenan jkeenan Add generated files to .gitignore and MANIFEST.generated. Re-run mk_m…
…anifest_and_skip.pl. Add files as needed to FLUID_FILES_2 target in config/gen/makefiles/root.in.
9a0e222
Commits on Mar 23, 2011
@jkeenan jkeenan Overhaul auto::llvm to require minimum version of LLVM. Modify steps …
…test file accordingly.
50f9d43
@bacek bacek Merge branch 'opsc_llvm' into jit_prototype d4a977f
Commits on Mar 24, 2011
@jkeenan jkeenan Use 'llvm-config' to simplify probe for LLVM; adjust tests accordingly. 1594ff8
Commits on Mar 25, 2011
@jkeenan jkeenan Refactor code into internal method to make more execution paths testa…
…ble. Then test them.
8504fc2
@luben luben llvm config step:
 * add --llvm-config option to Configure.pl
 * add proper libs an cflags to the build system
85144a2
@luben luben link libLLVM only to llvm_engine.so, not to libparrot b704d9e
@luben luben load discovered libLLVM.so in LLVM.pm 0004a71
Commits on Mar 26, 2011
@bacek bacek Add stub for JITter 778e759
@bacek bacek Add proto.t for prototyping. 859188f
@bacek bacek Include JIT into opsc. e06d5f2
@bacek bacek Load PBC in JIT.new f376e0a
@bacek bacek Minor style changes. 4418be2
@bacek bacek Generate %!ops for lookup ops. Redispatch PAST::Op deeper inside. 9093704
@bacek bacek Load jitted_ops.bc as module with all precompiled stuff c53341e
@bacek bacek Add LLVM::Builder. We'll need it. 51c269f
@bacek bacek Flesh out future JIT algorithm 3f3f651
@bacek bacek Create jitted_sub 6d03e93
@bacek bacek Load LLVM_engine in LLVM.pm a8ec0bc
@bacek bacek Proper test file d371c74
@bacek bacek Move creating of jit_context into separate function to simplify testing. 4beb14b
@bacek bacek Return self when needed. 8932af7
@bacek bacek Move all LLVM initialization into _llvm_init 05ef4a8
@bacek bacek Remove code migrated to Ops::JIT f4ac5af
@bacek bacek Function.first_basic_block and .last_basic_block 4ac7226
@bacek bacek Merge branch 'opsc_llvm' into jit_prototype 5ad0e00
@bacek bacek Add test for BB creating. b84f770
@bacek bacek Implement generating of BasicBlocks for jitted Sub ed2c889
@bacek bacek Jump from "entry" block to first op. 49e1ad5
@bacek bacek Fix starting of jit. Factor out _keep_going function. 0f272d9
@bacek bacek Change _count_args to _opsize. 0f7940e
@bacek bacek Add more skeleton stubs for processing ops. 6e4e308
@bacek bacek Add totally untested _jit_ops 15d07dd
@bacek bacek Finish creating of basic skeleton for JITted Sub 474a43b
@jkeenan jkeenan Use Parrot::Configure::Utils::capture_output() to run 'llvm-config --…
…bindir'. Will work more cleanly than backticks on machines with no LLVM whatsoever.
f4d3f2a
Commits on Mar 27, 2011
@bacek bacek Create lookup hash of declared functions. 6a582f8
@bacek bacek Store declared variables in %jit_context. 70c4d2d
@bacek bacek Start jitting actual PAST::*:
1. Handle simple Vars/Vals.
2. Generate function calls.
c9fc22d
@bacek bacek Workaround for MMD "failure".
MMD fail to choose Ops::Op vs PAST::Block.
7014b15
@bacek bacek "Register constants" JITting. 0eb0f3c
@bacek bacek Fallthrough for PAST::Op<undef> 5d96131
@bacek bacek Fix JIT.jit and add .optimize method. 81dd66b
@bacek bacek Create ccont in Sub.invoke when it's null.
This is (temporary) workaround for jit prototype purpose.
a35c94e
@bacek bacek Rework test to be kind of real jit proto. 4a04e0f
Commits on Mar 28, 2011
@bacek bacek Dequote strings during parsing 77d0dcf
@bacek bacek Fix copy-paster error in Builder.inbounds_gep. 5deb7b5
@bacek bacek Fix generating SCONST. They aren't cstrings apparently eedef4e
@bacek bacek Readd test pir files 6537caa
@bacek bacek Temporary remove "if" for unblock testing. 8a041c8
@bacek bacek Suppress debug output when not requested. 9671e11
@bacek bacek Fix LLVM::Constant signatures. ea057fe
@bacek bacek Load constants once 65a47cb
@bacek bacek Handle NCONSTs b80df2d
@bacek bacek Add test output of number 392c9fe
@bacek bacek More 'jitted' ops 3deba82
@bacek bacek Don't load num_constans. We don't need them. 20b9c7c
Commits on Mar 29, 2011
@bacek bacek Mass add 'multi' to enforce check of types by PCC. Also remove some '…
…Str' and 'Int' because they are not supported by nqp/parrot
d6710e7
@bacek bacek Wrap LLVM::Builder.call result into LLVM::Value fb03753
@bacek bacek Implement registers 1b1c47f
@bacek bacek Mass add 'multi' to enforce check of types by PCC. Also remove some '…
…Str' and 'Int' because they are not supported by nqp/parrot
6d12eb5
@bacek bacek Rework variables in %jit_context to store pointers.
This is preparation for proper handing of assignments.
e2eaf76
@bacek bacek DRY: move loading of registers into separate function. fd4926d
@bacek bacek Wrap LLVM::Builder.call result into LLVM::Value cd5674e
@bacek bacek Merge Builder.insert_into_builder and _with_name versions into one. aa6f66d
@bacek bacek Made to always be named parameter for consistency 05f30bb
@bacek bacek Remove useless Str 0e06465
@bacek bacek Merge branch 'opsc_llvm' into jit_prototype c46a38e
@bacek bacek Fix LLVM::Constant signatures. e055329
@bacek bacek Fix merge error. 50bd6be
@bacek bacek Rework handling of variables (including registers) to be more generic…
… on LHS of assignements.
1353044
@bacek bacek Fix merge error. 0b16604
@bacek bacek Use llvm_config from Configure.pl parameters instead of hardcoded "ll…
…vm-config"
d1b4ccd
Commits on Mar 30, 2011
@bacek bacek Use "multi" for auto-generated methods as well. 7b1db1e
@bacek bacek Use llvm_config from Configure.pl parameters instead of hardcoded "ll…
…vm-config"
36cce34
@bacek bacek Use "multi" for auto-generated methods as well. 35a8807
@bacek bacek [llvm] Rework generation of "enum classes".
$foo++ doesn't increase number somehow. Use explicit +1.
8f4dace
@bacek bacek [llvm] Fix creating of LLVM::Values 0ef24dc
@bacek bacek [llvm] Fix Build?Cmp invokation bc00fa7
@bacek bacek [llvm] Fix generating of bitwise ops c5dc43d
@bacek bacek Made $!jitted_sub explicit attribute of Ops::JIT df1a537
@bacek bacek Implement "if" jitting. fb218b1
@bacek bacek Enable a lot of debugging. e212ede
@bacek bacek [llvm] Rework generation of "enum classes".
$foo++ doesn't increase number somehow. Use explicit +1.
4e2e1be
@bacek bacek [llvm] Fix creating of LLVM::Values 05840ef
@bacek bacek [llvm] Fix Build?Cmp invokation 6d1337f
@bacek bacek [llvm] Fix generating of bitwise ops 15b1c9a
@bacek bacek Implement handling of ++. fba17c9
@bacek bacek Implement handling of -- 2d9fb3b
@bacek bacek DRY: factor out _process_prefix_protfix. 87f022d
@bacek bacek [llvm] Add BasicBlock.first/.last_instruction 98c57a3
@bacek bacek [llvm] Bind semi-generated LLVMIsAFoo functions. 57eef87
@bacek bacek [llvm] Bind LLVM::Value.isAFoo methods.
TODO: rename them to more perlish style similar as in LLVM::Builder.
d6340d0
@bacek bacek Add more test cases. 14c3172
@bacek bacek Temporary disable keep_going check. We shouldn't stop on local branches 8738165
@bacek bacek Don't insert uncoditional branch if last instruction is terminator. 1d7a17a
@bacek bacek Implement handling of == a76f6b1
@bacek bacek Support Parrot's constants in goto_offset handling 9d8dbe4
@bacek bacek Remove accidentally committed _dumper. 0052c45
@bacek bacek [llvm] Add BasicBlock.first/.last_instruction f53c3b9
@bacek bacek [llvm] Bind semi-generated LLVMIsAFoo functions. fd74043
@bacek bacek [llvm] Bind LLVM::Value.isAFoo methods.
TODO: rename them to more perlish style similar as in LLVM::Builder.
9352457
@luben luben make more perlish method names a732aa3
Commits on Mar 31, 2011
@bacek bacek Merge branch 'master' into opsc_llvm
Conflicts:
	config/auto/llvm.pm
	t/steps/auto/llvm-01.t
2fa2a5f
@jkeenan jkeenan Undeleted git-conflict marker caused Perl syntax error; delete it. aff726f
@jkeenan jkeenan Same commit as in master. f04d23a
@bacek bacek Rename few generated methods for consistency with Builder. 403668a
@bacek bacek Revert "link libLLVM only to llvm_engine.so, not to libparrot"
This reverts commit b704d9e.
5a77625
@bacek bacek Handle some variable declarations ba48854
@bacek bacek More register/constants handling. 2b43930
@bacek bacek Vivify declared variables. ac86bda
@bacek bacek Update test ops. 13ac7bc
Commits on Apr 02, 2011
@bacek bacek Add proper unittest for "end-to-end" jitter testing. cf79a9f
@bacek bacek Embed expected results into test. 8496f10
@bacek bacek Add expected results and enable more tests 9de7241
@bacek bacek Don't recreate Ops::File for each test. 320a8e7
@bacek bacek Implement ParrotInterpeter.mark. It's required to be child interprete…
…r independent from parent in terms of memory management.
84e3931
@bacek bacek Don't waste space for attributes. Store LLVMExecutionEngine directly …
…in PMC_data.
226e5bb
@bacek bacek Reorganize logical blocks in test as preparation for more-than-one-su…
…b JITting.
5d7a091
@bacek bacek Resurrect keep_going flag with handling "branch" and "jump" ops. 6ba48b4
Commits on Apr 04, 2011
@bacek bacek Use less pir. b20b8dd
@bacek bacek Don't use Parrot_api functions until I figure out what they are doing…
… to ->api_jmp_buf.
c0b5399
@bacek bacek Comment-out unused variable. f448688
@bacek bacek Refactor test to expose "runloop" explicitely. 16e2eec
@bacek bacek Add Ops::JIT.module to access generated LLVM module. Rework test to i…
…nitialize engine once only
dc87ca6
@bacek bacek Add PCC ops to jitted.ops. c1dbe0f
@bacek bacek Add test for simple PCC calls. ac5d73b
@bacek bacek [llvm] Add Type.opcode_t 50e04be
@bacek bacek [llvm] Add stubs for handling Module.global dbdc85f
@bacek bacek Add few more variable and function aliases to Ops::JIT 8ab0fe5
@bacek bacek Implement calculation of special ops size f5806fb
@bacek bacek Add CUR_OPCODE define back. It's acually used 1116095
@bacek bacek [llvm] Add Type.opcode_t 8cf3d99
@bacek bacek [llvm] Add stubs for handling Module.global 3ba281e
Commits on Apr 06, 2011
@bacek bacek [opsc] Fix parsing of enclosed EXPR. moritz++ and jnthn++ for help ce26842
Commits on Apr 12, 2011
@bacek bacek Fix previous commit: we need explicit ws fece603
@bacek bacek Update test to recent code changes. 3ce7b62
@bacek bacek Update test to latest code changes. b139e39
@bacek bacek Update test to latest code changes. 9e8d596
@bacek bacek Rework handling of '->' and '.' to be postfix 0f9bcc2
@bacek bacek Add more ops for jitting test. 06fda1a
@bacek bacek Add more tests. 0d384e7
@bacek bacek Add LLVM::Type::initialize_from_module to take advantage of precompil…
…ed bytecode.
5952810
@bacek bacek Don't initialize all types to prevent segfault. I'll fix it later. 589fcc7
@bacek bacek Stylish changes in error handling cdda279
@bacek bacek Initialize LLVM types from loaded bitcode 5029f51
@bacek bacek Generate int constants 9217a4a
@bacek bacek Initial (broken) handling of -> access 36fbc18
@bacek bacek More semantically correct op_macro jitting eb7660d
@bacek bacek Temporary skip undeclared functions instead of dying 5bffc3b
Commits on Apr 13, 2011
@bacek bacek Fix emitting C for postcircumfix<()> ae083d5
@bacek bacek Kind of prototype-in-prototype for handling macros 6c471c4
Commits on Apr 14, 2011
@bacek bacek Make vim's syntax highlighting more happy. 1f5c141
@bacek bacek Add skeleton for testing of C macros parsing. 5ec3de4
@bacek bacek Add c_macros as independent module. e68d919
@bacek bacek First cut of parsing multiline defines 7ca4f34
@bacek bacek Add test for multiline define with args. ebe6771
Commits on Apr 18, 2011
@bacek bacek Add metadata accessors c65ee16
Commits on Apr 25, 2011
@bacek bacek Merge branch 'master' into opsc_llvm
Conflicts:
	config/auto/llvm.pm
	t/steps/auto/llvm-01.t
04933aa
@bacek bacek Add CXX compilation rules. 9a03493
@bacek bacek Add llvm_extra.cpp with supplimentary LLVM functions. 2973176
@bacek bacek Bind and use new dumping functions 7ad3085
@bacek bacek Add usage/testing of new LLVM::Module.dump. 90b57bd
@bacek bacek Add more LLVM::Module.dump tests. Because we can! 48694c4
@bacek bacek Use template specialization for dumping modules. Also rename 'do_prin…
…t' to 'dump_to_string'
67c4b8b
@bacek bacek Specialize only related part of dumping of LLVM::Stuff. 1fa34b4
@bacek bacek Merge branch 'opsc_llvm' into jit_prototype
Conflicts:
	config/auto/llvm.pm
90f735e
@bacek bacek Fix merge shenanigans 615c59a
@bacek bacek Use new function names. c7e795d
Commits on Apr 26, 2011
@bacek bacek Move deep_clone into Utils cd19a6f
@bacek bacek Move Preprocessor into own class aad9e1f
@bacek bacek Add ability to set CPP for Actions f67c1bf
@bacek bacek Fix check for existence of Preprocessor. ef59717
@bacek bacek Add couple more macros ef15bdc
@bacek bacek Add handling of pirop<!> 7e97c5d
@bacek bacek Use preprocessor in tests 7b874a6
Commits on Apr 30, 2011
@bacek bacek Add fetching of ElementType from pointer type 9d5bd6c
@bacek bacek Implement fetching of TypeKind 0fea15f
Commits on May 01, 2011
@bacek bacek Add opsc build dependency on LLMV ea1641f
@bacek bacek [llvm] Extract defined types from LLMVModule and expose it via bindings 6610a93
@bacek bacek [llvm] Add more methods to LLVM::Type b029c56
@bacek bacek Initial cut of extracting of underlying struct type from llvm bitcode…
…. Now we can generate proper accessor for something like 'interp->ctx'
5127ff6
@bacek bacek Add handcrafted structs definitions for future use in 'keyed' access 4d2e471
@bacek bacek Finish 'proper' handling of struct access c6b2f49
@bacek bacek Add more struct definitions 287cc0f
Commits on May 02, 2011
@bacek bacek Add VTABLE_invoke preprocessing 271ece1
@bacek bacek Refactor generating of VTABLE macros. Add PMC_data. 422545b
@bacek bacek Add proper preamble to jitted.ops so LLVM will have a chance to gener…
…ate more stuff used in jitter.
44dca61
@bacek bacek [llvm] Change Builder.call to accept Value instead of Function. This …
…is required for generating pointer-to-function calls.
749b11c
@bacek bacek [llvm] Init struct.PMC and struct.STRING from LLVM bitcode. f44ba3e
@bacek bacek Remove debug _dumper accea3a
@bacek bacek [llvm] Add Constant.int_to_ptr d57dac0
@bacek bacek Add NULL and NEED_CONTINUATION definisions a805ebc
@bacek bacek Fix debug output 66dd433
@bacek bacek Refactor generating of GEP to share common logic with just variable aea9fbe
@bacek bacek Handle 'unnamed' function calls. E.g. 'foo->bar()' is parsed as (call…
… (keyed_arrow 'foo 'bar) ())
6716d63
@bacek bacek More checks and debug in handling pirop<=> 0e82ef7