summaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
diff options
context:
space:
mode:
authorRoman Lebedev <lebedev.ri@gmail.com>2021-10-27 16:05:09 +0300
committerRoman Lebedev <lebedev.ri@gmail.com>2021-10-27 18:01:05 +0300
commitab1dbcecd6f0969976fafd62af34730436ad5944 (patch)
treee3dcee662ec34be617f534e4c9bb6971cd114564 /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
parent5a8a7b3bf807b3c8c2b3772eb70386846a72013f (diff)
[IR] `IRBuilderBase::CreateSelect()`: if cond is a constant i1, short-circuit
While we could emit such a tautological `select`, it will stick around until the next instsimplify invocation, which may happen after we count the cost of this redundant `select`. Which is precisely what happens with loop vectorization legality checks, and that artificially increases the cost of said checks, which is bad. There is prior art for this in `IRBuilderBase::CreateAnd()`/`IRBuilderBase::CreateOr()`. Refs. https://reviews.llvm.org/D109368#3089809
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp')
0 files changed, 0 insertions, 0 deletions