Anton Korobeynikov
Anton Korobeynikov
> Transform is a very expensive visitor. It can copy the entire IR AST if small leaf elements like Path Expressions or members are cloned. It's not the `Transform` or...
@ChrisDodd Consider the following P4 code: ```p4 bit _popcount(in bit val) { bit n = 0; bit v = val; for (bit popcnti in 1 .. 64w63) { if (v...
> I think issue 2 was likely coming from local copyprop -- I've fixed that so it doesn't incorrectly propagate into the loop the first time through. The warning is...
> But I don't see a problem with the `v =`... being removed -- it is still there after SimplifyDefUse, and also still there after LocalCopyprop (now). Updating frontend DefUse...
@ChrisDodd I am seeing null checks failed at https://github.com/p4lang/p4c/pull/4562/files#diff-6eaf37d31585aaaa76257fcc3f96a3d523ad39cd3adb88a225389df8b60814c8R959: ``` Compiler Bug: p4c/frontends/p4/def_use.h:204: Null location ``` (line 204 downstream is `LocationSet::add`). So, apparently, `storageMap` contains empty location for the loop...
> I've added your two testcase here, but more testcases would be nice Let me see what I'm having downstream. I cannot submit them directly as they use private packages,...
Here are the tests: ```p4 bit foo(in bit aa, in bit bb) { // Do some magic to ensure aa / bb will not be simplified return aa - bb;...
> turns out there was a small bug in def_use for ForInStatements setting reachable defs for the body of the loop (was unioning in the Have you pushed these fixes?...
> Are these loops meant to be bounded or unbounded? If bounded we should definitely have a pass unrolling them. I guess the key question is what is the definition...
Do we want to add `abseil-*` checks here?