Comments (7)
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.
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.
Yes, and you need to add some code to register it in getCanonicalizationPatterns
for the op: results.insert<YourFolder>(context);
.
from circt.
I believe this is also already occurring here:
Line 213 in 8582458
from circt.
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.
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.
Great!
from circt.
Related Issues (20)
- [CI] LLVM Rebuild configuration suddenly broken? HOT 2
- [Arc] Add basic assertion support HOT 15
- [FIRRTL] Add back owning module constraint for local targets after removing use of ExtractInstances
- [HGLDD] Emit HW struct and array types
- Wiring problem error with const source and non-const sink w/no-ref-type option
- [FIRRTL][CheckCombLoops] Missing RWProbeOp support, crashes HOT 1
- [FIRRTL] LowerMemory change in #6719 leads to ambiguous targets in EmitOMIR HOT 3
- [Comb] Missed optimization opportunity for multiply used boolean operations
- [SV] SVExtractTestCode not Extracting Assert Properties
- [OM] parsing depend on the ordering of Class HOT 5
- [firrtl] extmodules with HasBlackBoxInline instantiated only in a layer not emitted into layers location
- [SMT] Add quantifier attribute and pattern support to ExportSMTLIB HOT 1
- [FIRRTL] Not generate "automatic logic" in the output SystemVerilog file HOT 2
- [FIRRTL] ‘firtool’ crashes with an error when receives a ‘fir’ file with no main module HOT 3
- [FIRRTL][InferWidths] When there is no unique minimal solution for width constraints, what should be the width? HOT 9
- Looking for circt==1.48.1.dev34 HOT 1
- [FIRRTL] isX lowering doesn't work for bundles HOT 2
- [FIRRTL] sizeof intrinsic doesn't work on bundles HOT 1
- Duplicate expressions possibly due to spilled event control expressions in LTL statements
- [comb] Break out some canonicalizations into optimization pass
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from circt.