summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineLoopInfo.cpp
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@apple.com>2017-01-25 22:55:13 +0000
committerAkira Hatanaka <ahatanaka@apple.com>2017-01-25 22:55:13 +0000
commitfdcd18b4c90ba59dcb8bd7b8267e61f6e0f016eb (patch)
tree8d5f9d462037999812255bea4f69f91158002c96 /llvm/lib/CodeGen/MachineLoopInfo.cpp
parent1f5f06435d5a8958127faf454dbe2205d2fc2b73 (diff)
downloadbcm5719-llvm-fdcd18b4c90ba59dcb8bd7b8267e61f6e0f016eb.tar.gz
bcm5719-llvm-fdcd18b4c90ba59dcb8bd7b8267e61f6e0f016eb.zip
[CodeGen] Suppress emission of lifetime markers if a label has been seen
in the current lexical scope. clang currently emits the lifetime.start marker of a variable when the variable comes into scope even though a variable's lifetime starts at the entry of the block with which it is associated, according to the C standard. This normally doesn't cause any problems, but in the rare case where a goto jumps backwards past the variable declaration to an earlier point in the block (see the test case added to lifetime2.c), it can cause mis-compilation. To prevent such mis-compiles, this commit conservatively disables emitting lifetime variables when a label has been seen in the current block. This problem was discussed on cfe-dev here: http://lists.llvm.org/pipermail/cfe-dev/2016-July/050066.html rdar://problem/30153946 Differential Revision: https://reviews.llvm.org/D27680 llvm-svn: 293106
Diffstat (limited to 'llvm/lib/CodeGen/MachineLoopInfo.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud