Other |
---|
tbdUnresolved |
Relates :
|
|
Relates :
|
Implement a debug Java class, with methods that are identity functions, i.e. have a single input and directly output that value. DebugClass::identity(int) -> int DebugClass::identity(long) -> long ... Intrinsify the "identity" methods, and turn it into a OpaqueDelayNode. At first, keep it Opaque, i.e. the output type is the bottom_type. Once the input is narrower, we could also narrow the output value, but we don't have to. We can randomize this, and narrow or even remove the node completely. This has the effect of artificially delaying constant folding and other IGVN transformations. Maybe this triggers bugs where we did not properly notify all necessary outputs. Or maybe something wrongly optimizes, etc. In the end, we can remove the nodes in the last IGVN round, or just create a backend identity operation. I would start with simple cases like primitive types such as int, long, float, etc. Later we could also consider objects. One idea is to add such nodes randomly into the graph, but that could lead to unexpected results, as some patterns may not be expected. And data/ctrl flow may get out of balance. Therefore, I would just keep it as a intrinsified Java method, which we can add just like any other arithmetic operation. This could help us reproduce notification issues, and other constant folding issues. We can use it manually, or through fuzzers (e.g. Templates).