OSDN Git Service

The absence of noreturn doesn't ensure mayReturn
authorDavid Majnemer <david.majnemer@gmail.com>
Sat, 25 Jun 2016 00:55:12 +0000 (00:55 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Sat, 25 Jun 2016 00:55:12 +0000 (00:55 +0000)
commit115455e435bee444b3be39026b6706e1a074b2c5
treedaf799314a05a6c4f69557416c133d4a3a71119d
parent7360cd168a1f0aac78dac31feeb2f0addaa400f3
The absence of noreturn doesn't ensure mayReturn

There are two separate issues:
- LLVM doesn't consider infinite loops to be side effects: we happily
  hoist/sink above/below loops whose bounds are unknown.
- The absence of the noreturn attribute is insufficient for us to know
  if a function will definitely return.  Relying on noreturn in the
  middle-end for any property is an accident waiting to happen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273762 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/Instruction.h
lib/IR/Instruction.cpp
test/Transforms/FunctionAttrs/noreturn.ll [deleted file]