[all-commits] [llvm/llvm-project] 8903db: [StatepointLowering] Properly handle local and non...
dantrushin via All-commits
all-commits at lists.llvm.org
Mon May 16 03:05:08 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8903dbef8ff675e0529ee83ab8c5191ba466e380
https://github.com/llvm/llvm-project/commit/8903dbef8ff675e0529ee83ab8c5191ba466e380
Author: Denis Antrushin <dantrushin at gmail.com>
Date: 2022-05-16 (Mon, 16 May 2022)
Changed paths:
M llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp
M llvm/test/CodeGen/X86/statepoint-vreg-details.ll
Log Message:
-----------
[StatepointLowering] Properly handle local and non-local relocates of the same value.
FunctionLoweringInfo::StatepointRelocationMaps map is used to pass GC pointer
lowering information from statepoint to gc.relocate which may appear ini
different block.
D124444 introduced different lowering for local and non-local relocates.
Local relocates use SDValue and non-local relocates use value exported to VReg.
But I overlooked the fact that StatepointRelocationMap is indexed not by
GCRelocate instruction, but by derived pointer. This works incorrectly when
we have two relocates (one local and another non-local) of the same value,
because they need different relocation records.
This patch fixes the problem by recording relocation information per relocate
instruction, not per derived pointer. This way, each gc.relocate can be lowered
differently.
Reviewed By: skatkov
Differential Revision: https://reviews.llvm.org/D125538
More information about the All-commits
mailing list