bugGNU Octave - Bugs: bug #51574, Build failure with --enable-jit...

 
 

bug #51574: Build failure with --enable-jit with LLVM 3.8

Submitted by:  Julien Bect <jbect>
Submitted on:  Tue 25 Jul 2017 08:38:00 PM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Build Failure
Status: NoneAssigned to: None
Originator Name: Open/Closed: Open
Release: 4.2.1Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 31 Jul 2017 10:57:25 AM UTC, comment #5:

Here is a significant improvement over the previous series of patches.

The difference between the old LLVM JIT (used in Max Brister's code) and the newer MC-JIT is that a new module must be created each time. It is not possible to modify a module after finalizeObject has been called. This is explained here:

http://blog.llvm.org/2013/07/using-mcjit-with-kaleidoscope-tutorial.html

This new series of patches creates a new module for each jit_info/jit_function_info object, which solves the problem:

BISTs still do not pass, but this is already much better ;-)

(file #41372)

Julien Bect <jbect>
Wed 26 Jul 2017 08:23:04 PM UTC, comment #4:

Here is a slightly improved series of patch.

None of the real problems mentioned below are solved, but I'm starting to understand a little better what is goind on...

(file #41349)

Julien Bect <jbect>
Wed 26 Jul 2017 06:51:40 AM UTC, comment #3:

I just found out that, in its present state, my patched version of stable is only able to jit one for loop, but not two of them...

Consider for instance the attached additional test function test_pisum2.m. So now we have two very similar test functions, names test_pisum and test_pisum2.

The jit is able to optimize the first for loop, but ignores the second one.

And the results are reversed if I call test_pisum2 first:

Obviously, there is something wrong... I have to understand better what is really going on.

Julien Bect <jbect>
Wed 26 Jul 2017 06:39:39 AM UTC, comment #2:

Hello Michael,

Yes, I realize that it would be more natural to do this work on the default branch.

I have tried rebasing the pacthes there, but I get the following error:

Apparently OCT_MAKE_DECL_LIST has been removed, but I haven't yet tried to figure out what the proper replacement should be.

Could you (or anybody else) help me fix this issue?

@++
Julien

Julien Bect <jbect>
Tue 25 Jul 2017 09:24:07 PM UTC, comment #1:

This looks very promising. One question: have you
tried applying your patches to the current development
system? This would be the natural place for wider testing.

Thanks very much for this contribution!

Michael

Michael Godfrey <godfrey>
Project Member
Tue 25 Jul 2017 08:38:00 PM UTC, original submission:

Octave stable currently fails to build with LLVM 3.8 (and with all LLVM releases since LLVM 3.4 or 3.5, as far as I know).

I have managed to get it to build with the attached series of patches (currently in a very rough form).

make check currently crashes on jit.tst but at least I manage to get a significant speedup on the attached test function...

Julien Bect <jbect>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #41334:  stable-jit-LLVM38-patches.tar.gz added by jbect (4KiB - application/gzip)
file #41335:  test_pisum.m added by jbect (137B - text/x-objcsrc)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by asr
  • -unavailable- added by godfrey (Posted a comment)
  • -unavailable- added by jbect (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 06 Oct 2017 02:23:31 AM UTCasrCarbon-Copy-=>Added asr
    Mon 31 Jul 2017 10:57:24 AM UTCjbectAttached File-=>Added stable-jit-LLVM38-patches-v5.tar.gz, #41372
    Wed 26 Jul 2017 08:23:04 PM UTCjbectAttached File-=>Added stable-jit-LLVM38-patches-v2.tar.gz, #41349
    Tue 25 Jul 2017 08:38:00 PM UTCjbectAttached File-=>Added stable-jit-LLVM38-patches.tar.gz, #41334
      Attached File-=>Added test_pisum.m, #41335

    Back to the top


    Powered by Savane 3.1-cleanup1