]> granicus.if.org Git - llvm/commit
[Attributor][Fix] Resolve various liveness issues
authorJohannes Doerfert <jdoerfert@anl.gov>
Sun, 4 Aug 2019 18:38:53 +0000 (18:38 +0000)
committerJohannes Doerfert <jdoerfert@anl.gov>
Sun, 4 Aug 2019 18:38:53 +0000 (18:38 +0000)
commit6bb8764ed0bf77b054fa74dcc68da05b672a61c0
treedae15e06ffb1ee9551b38917984dd77b2563ced1
parenteaebb0f61dadd7243bcebad841213c538a25a0a2
[Attributor][Fix] Resolve various liveness issues

Summary:
This contains various fixes:
  - Explicitly determine and return the next noreturn instruction.
  - If an invoke calls a noreturn function which is not nounwind we
    keep the unwind destination live. This also means we require an
    invoke. Though we can still add the unreachable to the normal
    destination block.
  - Check if the return instructions are dead after we look for calls
    to avoid triggering an optimistic fixpoint in the presence of
    assumed liveness information.
  - Make the interface work with "const" pointers.
  - Some simplifications

While additional tests are included, full coverage is achieved only with
D59978.

Reviewers: sstefan1, uenoku

Subscribers: hiraditya, bollu, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D65701

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367791 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Transforms/IPO/Attributor.h
lib/Transforms/IPO/Attributor.cpp
test/Transforms/FunctionAttrs/liveness.ll