This PR is a rebased version of #4479 by James Dong.
---
The primary purpose of this PR is to add the code from my prototype as a PR, for licensing reasons.
The commit history is messy, and the code is not especially clean.
Fixes https://github.com/KhronosGroup/SPIRV-Tools/issues/3196.
Currently, handles promotion of divergence due to reconvergence rules, but doesn't handle "late merges" caused by a later-than-necessary declared merge block.
Co-authored-by: Jakub Kuderski <kubak@google.com>
This PR adds a new executable spirv-lint with a simple "Hello, world!"
program, along with its associated library and a dummy unit test.
For now, only adds to CMake and Bazel; other build systems will be added
in a future PR.
Issue: #3196