This is an archive of the discontinued LLVM Phabricator instance.

Avoid PT_LOAD to have overlapping p_offset ranges on EM_AMDGPU
AbandonedPublic

Authored by dineshkb-amd on Oct 9 2019, 9:07 AM.

Details

Summary

Changes introduced in commit https://llvm.org/svn/llvm-project/lld/trunk@370180 allows PT_LOAD to have overlapping p_offset ranges on EM_AMDGPU and EM_SPARCV9. However this is introducing crashes in an AMD internal test cases. Thus is selectively disable for AMDGPU.

The test case is not included as it requires elaborate setup and has several application layers.

Diff Detail

Event Timeline

dineshkb-amd created this revision.Oct 9 2019, 9:07 AM
MaskRay requested changes to this revision.Oct 9 2019, 6:14 PM

You can work around your internal tests with -z separate-code, instead of disabling the feature in the code.

This revision now requires changes to proceed.Oct 9 2019, 6:14 PM
MaskRay added a subscriber: bcain.Oct 25 2019, 6:35 PM

Is this a permanent constraint for AMDGPU or just a temporary workaround? If the latter, it's best to annotate that's the case.

If it is a permanent constraint, can it be described as a quality of the target instead of a guard based on a specific target?

ELF/Writer.cpp
2244

This identifier name is clearer if it's more explicit about the meaning. e.g. EnableAlignment, EnableAddrExpr or TargetMachineSupportsAlignment.

Is this a permanent constraint for AMDGPU or just a temporary workaround? If the latter, it's best to annotate that's the case.

If it is a permanent constraint, can it be described as a quality of the target instead of a guard based on a specific target?

@dineshkb-amd does not respond. My understanding is that AMD has one or a few tests that rely on the non-overlapping p_offset property. I think @dineshkb-amd should just work around that particular test and don't change lld code at all.

MaskRay resigned from this revision.Nov 7 2019, 4:57 PM
dineshkb-amd abandoned this revision.Nov 25 2019, 7:59 AM

Apologies for the late reply, the change is accommodated internally.