diff options
| author | hev <wangrui@loongson.cn> | 2025-11-07 21:01:53 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-07 21:01:53 +0800 |
| commit | cdc3cb20543bcb574f08ab23bffe0699f7a9cdc8 (patch) | |
| tree | 7b6a478d81518ad3579913b4bd46871f5d622205 /lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.h | |
| parent | 3719c438dc4a6d5035fc8da4bfe2a04acdaecfea (diff) | |
| download | llvm-cdc3cb20543bcb574f08ab23bffe0699f7a9cdc8.zip llvm-cdc3cb20543bcb574f08ab23bffe0699f7a9cdc8.tar.gz llvm-cdc3cb20543bcb574f08ab23bffe0699f7a9cdc8.tar.bz2 | |
[LoongArch] Add `isSafeToMove` hook to prevent unsafe instruction motion (#163725)
This patch introduces a new virtual method
`TargetInstrInfo::isSafeToMove()` to allow backends to control whether a
machine instruction can be safely moved by optimization passes.
The `BranchFolder` pass now respects this hook when hoisting common
code. By default, all instructions are considered safe to to move.
For LoongArch, `isSafeToMove()` is overridden to prevent
relocation-related instruction sequences (e.g. PC-relative addressing
and calls) from being broken by instruction motion. Correspondingly,
`isSchedulingBoundary()` is updated to reuse this logic for consistency.
Fixes #163681
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.h')
0 files changed, 0 insertions, 0 deletions
