aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2023-06-18 16:00:18 -0700
committerFangrui Song <i@maskray.me>2023-06-18 16:00:18 -0700
commitada137a4c2a292c34927f0f22bd4c6fba4d3df87 (patch)
treeb671441a954c0d5fe41e8ff408adb2cd3eadbc86 /llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
parentc26c5e47ab9ca60835f191c90fa751e9a7dd0f3d (diff)
downloadllvm-ada137a4c2a292c34927f0f22bd4c6fba4d3df87.zip
llvm-ada137a4c2a292c34927f0f22bd4c6fba4d3df87.tar.gz
llvm-ada137a4c2a292c34927f0f22bd4c6fba4d3df87.tar.bz2
[MC] Remove unneeded MCDataFragment check from AttemptToFoldSymbolOffsetDifference
If FA == FB, we can use SA.getOffset() - SB.getOffset() even if FA is not a MCDataFragment, as the only case this can be problematic (different offsets for a variable-size fragment) is invalid/unreachable. If FA != FB, the `if (FI->getKind() != MCFragment::FT_Data)` check below can bail out correctly. This change will help Mach-O fold more expressions. For ELF this is NFC, unless evaluateFixup has a bug that would evaluate an expression differently.
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp')
0 files changed, 0 insertions, 0 deletions