summaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@sifive.com>2022-01-06 08:17:07 -0800
committerCraig Topper <craig.topper@sifive.com>2022-01-06 08:23:42 -0800
commit56ca11e31e6ad4fda6476ee65537529963a2708e (patch)
treef5affc6c8c2b4488e2b3a56b88436f6d421cfc26 /lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.cpp
parent2ccf0b76bcaf0895e04f14e3ff53c59dd96f9f0f (diff)
[RISCV] Add an MIR pass to replace redundant sext.w instructions with copies.
Function calls and compare instructions tend to cause sext.w instructions to be inserted. If we make good use of W instructions, these operations can often end up being redundant. We don't always detect these during SelectionDAG due to things like phis. There also some cases caused by failure to turn extload into sextload in SelectionDAG. extload selects to LW allowing later sext.ws to become redundant. This patch adds a pass that examines the input of sext.w instructions trying to determine if it is already sign extended. Either by finding a W instruction, other instructions that produce a sign extended result, or looking through instructions that propagate sign bits. It uses a worklist and visited set to search as far back as necessary. Reviewed By: asb, kito-cheng Differential Revision: https://reviews.llvm.org/D116397
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.cpp')
0 files changed, 0 insertions, 0 deletions