summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/Makefile.sources
diff options
context:
space:
mode:
authorRoland Scheidegger <[email protected]>2018-05-15 04:35:50 +0200
committerRoland Scheidegger <[email protected]>2018-05-16 00:04:48 +0200
commite01af38d6faf5dfd0f4ac6548ae03c27cca1dede (patch)
treeb877282f21480650a74a4dc6df4b95bd87dfdf40 /src/gallium/drivers/r600/Makefile.sources
parentbd0b6b9f17d401aa70eac279a3541d8e2a96ae0f (diff)
gallivm: Use alloca_undef with array type instead of alloca_array
Use a single allocation of array type instead of the old-style array allocation for the temp and immediate arrays. Probably only makes a difference if they aren't used indirectly (so, if we used them solely because there's too many temps or immediates). In this case the sroa and early-cse passes can sometimes do some optimizations which they otherwise cannot. (As a side note, for the temp reg array, we actually really should use one allocation per array id, not just one for everything.) Note that the instcombine pass would actually promote such allocations to single alloc of array type as well, but it's too late for some artificial shaders we've seen to help (we don't want to run instcombine at the beginning due to its cost, hence would need another sroa/cse pass after instcombine). sroa/early-cse help there because they can actually eliminate all of the huge shader, reducing it to a single const output (don't ask...). (Interestingly, instcombine also removes all the bitcasts we do on that allocation for single-value gathering, and in the end directly indexes into the single vector elements, which according to spec is only semi-valid, but this happens regardless. Another thing instcombine also does is use inbound GEPs, which is probably something we should do manually as well - for indirectly indexed reg files llvm may not be able to figure it out on its own, but we should be able to guarantee all pointers are always inbound. In any case, by the looks of it using single allocation with array type seems to be the right thing to do even for ordinary shaders.) No piglit change. Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/Makefile.sources')
0 files changed, 0 insertions, 0 deletions