Code Monkey home page Code Monkey logo

Comments (4)

vnmakarov avatar vnmakarov commented on July 2, 2024 1

Thank you for interesting in MIR.

I was asked this question several times.

To be honest right now I'd like to keep MIR away from implementing vector insns. It is not important feature for implementing lighweight tier1 JITs.

It is a very target dependent feature. Besides arithmetic insns you need insns to pack and unpack vectors, other necessary insns. Also why only fp insns? It would be logical to add integer vector insns too. Also you need new vector types, a lot of target dependent machine code to implement the vector insns (call ABI could be complicated even more). For me next logical step would be implementing autovectorization in MIR. It is so complicated area requiring a lot of expertise and efforts to implement huge code, a whole can of worms. So adding even simple vector insns would considerably complicate MIR.

I am not saying that MIR will never support vector insns. Simply I'd like to try MIR in Ruby JIT implementation and I don't see how vector insns could help this goal. If I see that MIR could be successful as tier2 compiler I probably will think hard about adding vector insns and which ones.

from mir.

sletz avatar sletz commented on July 2, 2024

I agree with @vnmakarov here. We have a similar use case with Faust and we just added a backend to use MIR, see #54.

The thing is that MIR seems perfect to deploy reasonably fast code using a small an easy to deploy piece of code. It you really want the fastest code, then you'll have to use the LLVM path.

from mir.

dibyendumajumdar avatar dibyendumajumdar commented on July 2, 2024

Hi, I think MIR should avoid the complexity and bloat from vector insns because there is no need for MIR to be like LLVM. The huge strength of MIR is small size and reasonable performance. I would hate to see feature creep in MIR that then makes it lose its special asset. No point in making another LLVM.

from mir.

rogergreen2003 avatar rogergreen2003 commented on July 2, 2024

Ok. Thank you for your answers. Anyway, I will try to add some basic SIMD stuff in a local branch to see if is feasible.

My purpose of using SIMD in MIR is not to create a super-optimizin compiler, but it is including the SIMD datatypes and operations in the IR itself in order to avoid external add-ons to a language as intrinsics are used in C/C++.

from mir.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.