This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU/GFX10: Don't generate s_code_end padding in the asm-printer
ClosedPublic

Authored by nhaehnle on Jun 17 2019, 6:07 AM.

Details

Summary

The purpose of the padding is to guard against stale code being
fetched into the instruction cache by the lowest level prefetching.
We're generating relocatable ELF here, and so the padding should
arguably be added by the linker. This is in fact what Mesa does.

This also fixes multi-part shaders for Mesa.

Change-Id: I6bfede58f20e9f337762ccf39ef9e0e263e69e82

Diff Detail

Event Timeline

nhaehnle created this revision.Jun 17 2019, 6:07 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 17 2019, 6:07 AM
This revision is now accepted and ready to land.Jun 17 2019, 8:52 AM
rampitec added inline comments.Jun 17 2019, 9:05 AM
lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
346

Just a note, rocm will probably need this as well, although that is not yet known. If we move it into the linker then no.

This revision was automatically updated to reflect the committed changes.