[mlir:bytecode] Only visit the all regions path if the op has regions
authorRiver Riddle <riddleriver@gmail.com>
Tue, 25 Jul 2023 23:06:02 +0000 (16:06 -0700)
committerTobias Hieta <tobias@hieta.se>
Thu, 10 Aug 2023 07:06:20 +0000 (09:06 +0200)
commit685bcc1d732a929e6ad92d63f5f3368726e7830c
treec6d33d93f2153e9ed577f9fceb293dc719de7add
parent99b39d7df62365d5c0c1fad776b4fd3b0e452277
[mlir:bytecode] Only visit the all regions path if the op has regions

Zero region operations return true for both isBeforeAllRegions and
isAfterAllRegions when using WalkStage. The bytecode walk only
expects region holding operations in the after regions path, so
guard against that.
mlir/lib/Bytecode/Writer/IRNumbering.cpp