This moves of the r600 logic out of isGlobalLoad() and into the
TableGen files.
Details
Diff Detail
Event Timeline
LGTM, but I still thinking checking GetUnderlyingObject for selection is broken. It should at least check for it returning null which is common
What are the problems with GetUnderLyingObject? Don't CLC restrictions shield us from potentially failing cases (the only objects are initialized in constant AS)?
with or without renaming the instructions LGTM.
lib/Target/AMDGPU/EvergreenInstructions.td | ||
---|---|---|
239 | I think it'd also make sense to rename the instructions: |
You could loop over them and have an unanalyzed select or phi on the pointer which will fail to find the object. It also has a search depth lint, and it's a pretty heavyweight check for a select pattern
OK, thanks. I guess the solution for r600 is:
move rodata out of code segment.
introduce constant AS pool in mesa, make sure that rodata is at the beginning of that pool (also takes care of NULL address for user buffers)
allocate __constant user buffers from the new pool.
I think it'd also make sense to rename the instructions:
VTX_READ_GLOBAL -> VTX_READ_ID1. so the vtx to AS assignment is reduced to one place (the pattern).