Operand's defining op may not be valid for adding to the worklist under
stict mode
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
@rriddle
I'm not sure if we should do the check in AddToWorklist or just make it as this CL. Besides, I found this bug by the assertion we had before. Do you think we need a test (testing remove/replace/insert operations) or still have the assertion is enough?
What do you think?
Ahah, missed this comment before I sent the other one. What do you mean by if we should do the check in AddToWorklist? Also, I think it'd be nice to have a test for this if we can.
Sorry, didn't say that clearly. I mean things this like
virtual void AddToWorklist(...); // in GreedyPatternRewriteDriver void AddToWorklist(...) override { // in MultiOpPatternRewriteDriver if (strictMode) ... }
Then we may only need to override notifyOperationRemoved. Not sure which one is better in term of design.
Will add a test in later patch.
Yeah, let's try switching to that. From a glance that feels like it could be cleaner.
Will add a test in later patch.