[all-commits] [llvm/llvm-project] 333cdd: [SimplifyCFG] Reapply: when eliminating `unreachab...

Roman Lebedev via All-commits all-commits at lists.llvm.org
Fri Jan 13 10:05:45 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 333cdd41255adb122b1a3cedac5bc6aef5c0982c
      https://github.com/llvm/llvm-project/commit/333cdd41255adb122b1a3cedac5bc6aef5c0982c
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2023-01-13 (Fri, 13 Jan 2023)

  Changed paths:
    M llvm/include/llvm/Transforms/Utils/Local.h
    M llvm/lib/Transforms/Utils/Local.cpp
    M llvm/lib/Transforms/Utils/SimplifyCFG.cpp
    M llvm/test/Transforms/SimplifyCFG/UnreachableEliminate.ll
    M llvm/test/Transforms/SimplifyCFG/wineh-unreachable.ll

  Log Message:
  -----------
  [SimplifyCFG] Reapply: when eliminating `unreachable` landing pads, mark `call`s as `nounwind`

This time the change is in it's least intrusive form since only the return
type in prototype for `removeUnwindEdge()` is changed, since only a single
specific caller need that knowledge.

We really can't recover that knowledge, and `nounwind` knowledge,
(and not just a lack of the unwind edge, aka `call` instead of `invoke`),
is e.g. part of the reasoning in e.g. `mayHaveSideEffects()`.

Note that this is call-site-specific knowledge,
just because some callsite had an `unreachable`
unwind edge, does not mean that all will.




More information about the All-commits mailing list