This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] GFX10 PAL: Only pad with s_code_end in pipeline compilation
AbandonedPublic

Authored by tpr on May 20 2020, 4:03 PM.

Details

Reviewers
nhaehnle
rampitec
Summary

For PAL, GFX10 s_code_end padding is now added only for a full pipeline
compilation, not a shader compilation.

Change-Id: I0d4fa364178a79c47d8e22177c424722e3c9686d

Diff Detail

Event Timeline

tpr created this revision.May 20 2020, 4:03 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 20 2020, 4:03 PM
arsenm added inline comments.May 20 2020, 4:50 PM
llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
323–324

Should move to predicate function

334

Could break out of the whole loop?

rampitec added inline comments.May 20 2020, 4:50 PM
llvm/test/CodeGen/AMDGPU/s_code_end_pal_pipeline.ll
10

Can you create a separate test instead?

tpr marked an inline comment as done.May 21 2020, 1:01 AM
tpr added inline comments.
llvm/test/CodeGen/AMDGPU/s_code_end_pal_pipeline.ll
10

This file s_code_end_pal_pipeline.ll is a new separate test. arc diff got confused in the way it constructed the diff -- I modified the original s_code_end.ll to expect PAL to not do padding, and added this new s_code_end_pal_pipeline.ll to check that it does add padding for a PAL pipeline.

rampitec added inline comments.May 21 2020, 8:56 AM
llvm/test/CodeGen/AMDGPU/s_code_end_pal_pipeline.ll
10

Ah, indeed. Very confusing.

tpr updated this revision to Diff 265989.May 25 2020, 2:54 AM

V2: Review comments: Separate predicate function; early exit on CS.

tpr marked 2 inline comments as done.May 25 2020, 2:55 AM
This revision is now accepted and ready to land.May 26 2020, 9:51 AM
tpr abandoned this revision.May 27 2020, 1:57 AM

I am abandoning this, because it turns out that it is difficult to reliably detect whether we have a PAL pipeline or a PAL shader compilation. Instead, the LLPC linker will remove the padding, and then adds it back on after concatenating .text sections.