summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/python_api/thread/main.cpp
diff options
context:
space:
mode:
authorMax Kazantsev <max.kazantsev@azul.com>2018-08-17 06:19:17 +0000
committerMax Kazantsev <max.kazantsev@azul.com>2018-08-17 06:19:17 +0000
commit7b78d3920c713de2555b5d0f476bc31a0d9aac5d (patch)
tree18ee8d8625eb2a73c7239d2e4e71942066e6cf63 /lldb/packages/Python/lldbsuite/test/python_api/thread/main.cpp
parentcfa3e66b8e97f9e60e902def91e361dec9ad0577 (diff)
downloadbcm5719-llvm-7b78d3920c713de2555b5d0f476bc31a0d9aac5d.tar.gz
bcm5719-llvm-7b78d3920c713de2555b5d0f476bc31a0d9aac5d.zip
[MustExecute] Fix algorithmic bug in isGuaranteedToExecute. PR38514
The description of `isGuaranteedToExecute` does not correspond to its implementation. According to description, it should return `true` if an instruction is executed under the assumption that its loop is *entered*. However there is a sophisticated alrogithm inside that tries to prove that the instruction is executed if the loop is *exited*, which is not the same thing for infinite loops. There is an attempt to protect from dealing with infinite loops by prohibiting loops without exit blocks, however an infinite loop can have exit blocks. As result of that, MustExecute can falsely consider some blocks that are never entered as mustexec, and LICM can hoist dangerous instructions out of them basing on this fact. This may introduce UB to programs which did not contain it initially. This patch removes the problematic algorithm and replaced it with a one which tries to prove what is required in description. Differential Revision: https://reviews.llvm.org/D50558 Reviewed By: reames llvm-svn: 339984
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/python_api/thread/main.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud