summaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
diff options
context:
space:
mode:
authorRoman Lebedev <lebedev.ri@gmail.com>2021-05-25 20:47:53 +0300
committerRoman Lebedev <lebedev.ri@gmail.com>2021-05-25 21:02:28 +0300
commit149e018d12642cf8cda9b26f2ffc66a63cc3cc25 (patch)
tree90893c1b6c64cadf2befb22f80e15e6de92cb98f /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
parent8e30b55c82cc245f8b59ef3b29d95c9797584b63 (diff)
[LoopIdiom] 'arithmetic right-shift until zero': don't turn potentially infinite loops into finite ones
Nowadays LLVM does not assume that all loops are finite, so if we want to produce a finite loop from a potentially-infinite one, we must ensure that the original loop is known to be a finite one. For this transform, it only matters for arithmetic right-shifts. For them, either the function or the loop must be known to be `mustprogress`, or the original value being shifted must be known to be non-negative (because iff the sign bit was set, it will never become zero, but will become `-1` in the "end"). It would be really good for alive2 to actually complain about this, but it currently does not: https://github.com/AliveToolkit/alive2/issues/726
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp')
0 files changed, 0 insertions, 0 deletions