Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Lachlan Sneff
    @lachlansneff
    @sunfishcode Do you know what's going on here? https://travis-ci.org/cretonne/cretonne/jobs/391915031
    Pat Hickey
    @pchickey
    @lachlansneff I think that test is checking that heap accesses get legalized in a certain way, and you just changed the way that worked, so you'll have to go and fix the tests as well
    Lachlan Sneff
    @lachlansneff
    Ah, that makes sense
    Lachlan Sneff
    @lachlansneff
    There we go, tested successfully on my machine. Took about 30 minutes to run all the tests
    Lachlan Sneff
    @lachlansneff
    Finally, the ci has completed
    Kevin Watters
    @kevinw
    @sunfishcode looks great, thanks so much for followin gup
    Kevin Watters
    @kevinw
    a general note: i'm learning cretonne, and having trouble with one bit of the docs—looking at seal_block(), and it says "Declares that all the predecessors of this block are known." what's a predecessor?
    also:
    my experiment is making a compiler that's heavily multithreaded from the get go, and i'm having trouble seeing which parts of the code are meant to be used from multiple threads. are there examples of using for example, multiple Contexts across different threads?
    Lachlan Sneff
    @lachlansneff
    The general design is that you can compile each context in a separate thread
    (And each context generally corresponds to a function)
    And then, you link everything together at the end with relocations
    Kevin Watters
    @kevinw
    that's the "finalize" bits?
    Lachlan Sneff
    @lachlansneff
    Oh, not sure about the module interface
    My use of cretonne doesn't use that
    Kevin Watters
    @kevinw
    ok, that helps though
    Lachlan Sneff
    @lachlansneff
    I think that the module interface is not multithreaded rn
    You'll likely have to write a new backend
    Kevin Watters
    @kevinw
    i can poke around the nebulet sources to learn more i'm sure—that's your project right?
    Lachlan Sneff
    @lachlansneff
    Yep!
    Just looking around the module lib, it looks like it's designed to act as a single unit.
    So, if you want to use that, you'll probably just compile that on a single thread
    If you want to multithread, you gotta implement stuff yourself
    Kevin Watters
    @kevinw
    cool
    I could be wrong, @sunfishcode would know.
    Kevin Watters
    @kevinw
    well, these are super helpful
    thank you
    Lachlan Sneff
    @lachlansneff
    My pleasure!
    Dan Gohman
    @sunfishcode
    @kevinw Yeah, multithreaded compilation, at the level of each function being compilable in parallel, is something that the Cretonne components are designed to support, and we have users that do this, but we don't have a ready-made solution for this in the Cretonne tree itself yet
    A predecessor in that context is a branch instruction that branches to the block
    Sealing is declaring that all branches to a block have been provided
    Lachlan Sneff
    @lachlansneff
    Cretonne doesn't support inlining, right?
    Dan Gohman
    @sunfishcode
    It does not include an inliner at this time, right :-)
    Lachlan Sneff
    @lachlansneff
    Could it at some point? Or does the pre-function compiling prevent that?
    I suppose it wouldn't make a difference, actually
    Dan Gohman
    @sunfishcode
    Yes, I anticipate it will do inlining in the future
    @kevinw There should be one Context per thread, and the Context on a given thread can be reused for multiple functions
    And yeah, the Module interface is an effort to work towards a higher-level API that takes care of more things for you, and eventually it should perform parallel compilation automatically, but at present it doesn't yet.
    Kevin Watters
    @kevinw
    @sunfishcode are there other open source users I could learn from besides nebulet?
    Dan Gohman
    @sunfishcode
    @kevinw The main open source user that's doing parallel compilation is the SpiderMonkey port, https://github.com/sunfishcode/gecko-dev/tree/baldrdash/js/src
    Though in that case the parallelism is implemented in C++ code
    The high-level story is, Cretonne is designed to compile each function completely independently of other functions
    Lachlan Sneff
    @lachlansneff
    Nebulet may multithread the compilation of sips eventually once it supports multiple cpu cores.
    Grégoire Geis
    @71
    I haven't had the chance to take a look at all of the code yet, so what happens when mutually recursive functions get compiled, since they're supposed to be compiled independently?
    By the way, sorry I opened two issues that now seem unnecessary, I Ctrl+F'd "IRC", found nothing, somehow didn't see the link to the Gitter chat until now and immediately jumped to GH issues.
    Lachlan Sneff
    @lachlansneff
    @6A What do you mean by mutually recursive function?
    Grégoire Geis
    @71
    @lachlansneff Function A calls function B, and function B calls function A.
    Lachlan Sneff
    @lachlansneff
    Oh, relocations are applied later