[SimplifyCFG] `markAliveBlocks()`: recognize that normal dest of `invoke`d `noreturn...
authorRoman Lebedev <lebedev.ri@gmail.com>
Fri, 4 Feb 2022 22:28:24 +0000 (01:28 +0300)
committerRoman Lebedev <lebedev.ri@gmail.com>
Fri, 4 Feb 2022 23:15:07 +0000 (02:15 +0300)
commit598833c987593ce192fa827f162cae8c867c9d43
tree26c07f684542d733551053df615e650be8ab39a7
parent75c1d1dab41709a9e0780ad2fbad23e46bfba4dd
[SimplifyCFG] `markAliveBlocks()`: recognize that normal dest of `invoke`d `noreturn` function is `unreachable`

As per LangRef's definition of `noreturn` attribute:
```
noreturn
  This function attribute indicates that the function never returns
  normally, hence through a return instruction.
  This produces undefined behavior at runtime if the function
  ever does dynamically return. nnotated functions may still
  raise an exception, i.a., nounwind is not implied.
```
llvm/lib/Transforms/Utils/Local.cpp
llvm/test/CodeGen/X86/catchret-regmask.ll
llvm/test/Transforms/SimplifyCFG/invoke.ll