Giter VIP home page Giter VIP logo

Comments (2)

Lol3rrr avatar Lol3rrr commented on July 22, 2024

Proposal

We should change the ways that we generate the interference Graph to correctly represent the destructured case. For this we should check if a variable is no longer used in a Block and only gets used once in a following Block and if that use case is as an Entry in a Phi-Node otherwise continue as normal. However if that is the Case, the current Variables liveness ends at the end of the current Block and we "raise" the start of the Variable defined by the Phi-Node to the end of the Block as well. This would basically mimic the way that the destructured SSA would look without actually changing the IR we are working with.

Problems

This would not deal with multiple Phi Nodes correctly, because we dont garantuee anything about the Order and therefore could still mess things up in that sense.
Its also unclear on how this could be implemented efficiently, but this would take a backseat as correctness is the Priority right now

from cpiler.

Lol3rrr avatar Lol3rrr commented on July 22, 2024

Temporary Solution

For a temporary Fix we could use the fact that variables of the same group are assigned to the same underlying Memory location and we could therefore store the Phi-Entries to the shared memory location at the end of their blocks and replace the Phi-Node with a simple read from the shared memory location. This should work correctly and generate the correct result.

Problem

This obviously comes with a performance penalty because we need to perform at least two more extra memory writes and one more memory read. Moreover this also isnt really a fix because we are now just working around this issue and avoiding it instead of properly fixing its root cause

from cpiler.

Related Issues (12)

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.