Chris Dodd

Results 121 comments of Chris Dodd

I've pulled together both changes in #4562

The midend def_use pass uses the context as well as the node, so can deal with DAGs just fine.

I've added support for loops for frontend DefUse, midend DefUse, midend localCopyprop and general ControlFlowVisitor use. Midend Defuse uses that generic ControlFlowVisitor, but it turned out localCopyprop didn't work properly...

> There are two issues with existing PR: > > 1. Warning about `popcnti` being uninitialized. > 2. `v = v & (v - 1);` is removed by simplifyUseDef (`n...

> > 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...

> @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 > ``` I don't see any Compiler Bugs with this code...

Ok, there were some more issues with the flow analysis over loops that wer breaking the forloop2 test, so I've fixed that too. Flow analysis over loops is non-trivial with...

I'm still working on code to unroll loops to support targets that don't support loops natively, but this is already a pretty large change and has all the necessary support...

So loops in an action like this: > action a1(bit x, bit y) { > // Nested loops > foreach (bit i in 1 .. x) { > foreach (bit...

@asl @fruffy @thantry and anyone else with interest -- there will likely be some discussion of this in the next P4 Language working group meeting on May 6 (https://p4.org/working-groups/) -...