Giter VIP home page Giter VIP logo

Comments (7)

lattner avatar lattner commented on June 10, 2024

Hi @cgyurgyik: the simplest explanation is that the pattern isn't matching and the rewrite not happening. If you set a break point on the replaceOpWithNewOp call, is it getting hit?

Make sure the canonicalization patterns are getting registered correctly.

-Chris

from circt.

cgyurgyik avatar cgyurgyik commented on June 10, 2024

No, replaceOpWithNewOp is not getting hit, which is why I thought I was fudging something simple up.
By registered, do you mean it sets the following: hasCanonicalizer = 1 ?

from circt.

lattner avatar lattner commented on June 10, 2024

Yes, and you need to add some code to register it in getCanonicalizationPatterns for the op: results.insert<YourFolder>(context);.

from circt.

cgyurgyik avatar cgyurgyik commented on June 10, 2024

I believe this is also already occurring here:

results.insert<Folder>(context);

from circt.

lattner avatar lattner commented on June 10, 2024

Ok, then I'm not really sure why it isn't triggering - once it does, the filecheck logic should work fine :-). I'd step through the code in a debugger to figure out what isn't happening as you expect. For example, is the if (inputs[size - 1] == inputs[size - 2] line getting reached, etc.

from circt.

cgyurgyik avatar cgyurgyik commented on June 10, 2024

Ok so I ended up using a constant as the last two arguments, and it works fine now. Thanks for the back-and-forth!

from circt.

lattner avatar lattner commented on June 10, 2024

Great!

from circt.

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.