aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2023-06-18 17:49:53 -0700
committerFangrui Song <i@maskray.me>2023-06-18 17:49:53 -0700
commite17bc023f4e5b79f08bfc7f624f8ff0f0cf17ce4 (patch)
tree9096a224223946b0e3415a00d299def31c90bf3f /llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
parent507efbcce03d8c2c5dbea3028bc39f02c88fea79 (diff)
downloadllvm-e17bc023f4e5b79f08bfc7f624f8ff0f0cf17ce4.zip
llvm-e17bc023f4e5b79f08bfc7f624f8ff0f0cf17ce4.tar.gz
llvm-e17bc023f4e5b79f08bfc7f624f8ff0f0cf17ce4.tar.bz2
[MC] flushPendingLabels: set Atom for new fragment after D71368
Fixes: c26c5e47ab9ca60835f191c90fa751e9a7dd0f3d (essentially a no-op) The newly created MCDataFragment should inherit Atom (see MCMachOStreamer::finishImpl). To the best of my knowledge, this change cannot be tested at present, but this is important to ensure MCExpr.cpp:AttemptToFoldSymbolOffsetDifference gives the same result in case we evaluate the expression again with a MCAsmLayout. In the following case, ``` .section __DATA,xray_instr_map lxray_sleds_start1: .space 16 Lxray_sleds_end1: .section __DATA,xray_fn_idx .quad (Lxray_sleds_end1-lxray_sleds_start1)>>4 // can be folded without a MCAsmLayout ``` When we have a MCAsmLayout, without this change, evaluating (Lxray_sleds_end1-lxray_sleds_start1)>>4 again will fail due to `FA->getAtom() == nullptr && FB.getAtom() != nullptr` in MachObjectWriter::isSymbolRefDifferenceFullyResolvedImpl, called by AttemptToFoldSymbolOffsetDifference.
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp')
0 files changed, 0 insertions, 0 deletions