diff options
author | ZhaoQi <zhaoqi01@loongson.cn> | 2025-01-20 10:00:05 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-20 10:00:05 +0800 |
commit | 0288d065eecb1208971dc4cdcc71731e34c6fca0 (patch) | |
tree | 67a6e61bc0842440dd7f4a12364bc1f85d101aa8 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 814b34f31e163e76b816194004689985f5b9fd7b (diff) | |
download | llvm-0288d065eecb1208971dc4cdcc71731e34c6fca0.zip llvm-0288d065eecb1208971dc4cdcc71731e34c6fca0.tar.gz llvm-0288d065eecb1208971dc4cdcc71731e34c6fca0.tar.bz2 |
[LoongArch] Avoid scheduling relaxable code sequence and attach relax relocs (#121330)
If linker relaxation enabled, relaxable code sequence expanded from
pseudos should avoid being separated by instruction scheduling. This
commit tags scheduling boundary for them to avoid being scheduled.
(Except for `tls_le/tls_ie` and `call36/tail36`. Because `tls_le/tls_ie`
can be scheduled and have no influence to relax, `call36/tail36` are
expanded later in `LoongArchExpandPseudo` pass.)
A new mask target-flag is added to attach relax relocs to the relaxable
code sequence. (No need to add it for `tls_le` and `call36/tail36`
because we can simply add relax relocs for them according to their
relocs. But for other code sequence, such as `PCALA_{HI20/LO12}`, we
must use the mask flag, mainly because relax should not be added when
code model is large.)
Because of the new mask target-flag, get "direct" flags is necessary
when using their target-flags. In addition, code sequence after being
optimized by `MergeBaseOffset` pass may not relaxable any more, so the
relax "bitmask" flag should be removed.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions