Work on the JIT

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Work on the JIT

Gene Harvey

Hi all,

 

I’ve submitted a patch to the bug tracker containing fixes for the JIT which will hopefully allow us to continue work on it. It also allows for building with versions of LLVM up to 8.0 (Although, for LLVM-5.0 a llvm::getFunctionAddress  fails with no output to stderr and then calls `exit 1`. Very frustrating indeed.)

 

I plan to continue work on it with a refactor of the module management (focusing on getting rid of `new`), and then work on implementing the JIT for functions. However, I wanted to discuss whether we should continue using MCJIT, or move on to ORC JIT. The ORC JIT seems to fit our needs better, and would have solved some of the bugs that we had because they wouldn’t be allowed to happen. In particular, bug #55492, which was caused by adding functions to the singleton jit_typeinfo module after it had been finalized.

 

Also, there’s another bug which crashes octave if we use `sin` on a 1x1 matrix, so I’ll add that to the tracker if the patch goes through.

 

Cheers,

Gene Harvey

Reply | Threaded
Open this post in threaded view
|

Re: Work on the JIT

jbect
Le 01/06/2019 à 05:36, Gene Harvey a écrit :

I’ve submitted a patch to the bug tracker containing fixes for the JIT which will hopefully allow us to continue work on it. It also allows for building with versions of LLVM up to 8.0 (Although, for LLVM-5.0 a llvm::getFunctionAddress  fails with no output to stderr and then calls `exit 1`. Very frustrating indeed.)

 

I plan to continue work on it with a refactor of the module management (focusing on getting rid of `new`), and then work on implementing the JIT for functions. However, I wanted to discuss whether we should continue using MCJIT, or move on to ORC JIT. The ORC JIT seems to fit our needs better, and would have solved some of the bugs that we had because they wouldn’t be allowed to happen. In particular, bug #55492, which was caused by adding functions to the singleton jit_typeinfo module after it had been finalized.

 

Also, there’s another bug which crashes octave if we use `sin` on a 1x1 matrix, so I’ll add that to the tracker if the patch goes through.


Hi Harvey,

This is great news, I will try your patch as soon as possible !

Concerning the move form MCJIT to ORC JIT : how hard would it be to make the change ?  If you are able to do it, I would say go ahead.

@++
Julien

Reply | Threaded
Open this post in threaded view
|

Re: Work on the JIT

Gene Harvey
Hi Julien,

Honestly, I'm not sure how difficult it would be. Perhaps someone with experience in this might chime in. Ideally, the actual LLVM layer would be decoupled from the rest of the JIT codebase and we could just swap them out whenever the new system is ready.

However, this is just for the future. For now, I think a refactor to improve modularity/maintainability is most important so we can get more people working on this.

Gene Harvey

-------- Original message --------
From: Julien Bect <[hidden email]>
Date: 6/1/19 08:59 (GMT-06:00)
Subject: Re: Work on the JIT

Le 01/06/2019 à 05:36, Gene Harvey a écrit :

I’ve submitted a patch to the bug tracker containing fixes for the JIT which will hopefully allow us to continue work on it. It also allows for building with versions of LLVM up to 8.0 (Although, for LLVM-5.0 a llvm::getFunctionAddress  fails with no output to stderr and then calls `exit 1`. Very frustrating indeed.)

 

I plan to continue work on it with a refactor of the module management (focusing on getting rid of `new`), and then work on implementing the JIT for functions. However, I wanted to discuss whether we should continue using MCJIT, or move on to ORC JIT. The ORC JIT seems to fit our needs better, and would have solved some of the bugs that we had because they wouldn’t be allowed to happen. In particular, bug #55492, which was caused by adding functions to the singleton jit_typeinfo module after it had been finalized.

 

Also, there’s another bug which crashes octave if we use `sin` on a 1x1 matrix, so I’ll add that to the tracker if the patch goes through.


Hi Harvey,

This is great news, I will try your patch as soon as possible !

Concerning the move form MCJIT to ORC JIT : how hard would it be to make the change ?  If you are able to do it, I would say go ahead.

@++
Julien