mesa/src
Roland Scheidegger 8b9ab674b9 gallivm: add early cse pass
This pass is quite cheap, and can simplify the IR quite a bit for our
generated IR.
In particular on a variety of shaders I've found the time saved by
other passes due to the simplified IR more than makes up for the cost
of this pass, and on top of that the end result is actually better.
The only downside I've found is this enables the LICM pass to move some
things out of the main shader loop (in the case I've seen, instanced
vertex fetch (which is constant within the jit shader) plus the derived
instructions in the shader) which it couldn't do before for some reason.
This would actually be desirable but can increase compile time
considerably (licm seems to have considerable cost when it actually can
move things out of loops, due to alias analysis). But blaming early cse
for this seems inappropriate. (Note that the first two sroa / earlycse
passes are similar to what a standard llvm opt -O1/-O2 pipeline would
do, albeit this has some more passes even before but I don't think
they'd do much for us.)
It also in particular helps some crazy shader used for driver
verification (don't ask...) a lot (about factor of 6 faster in compile
time) (due to simplfiying the ir before LICM is run).
While here, also move licm behind simplifycfg. For some shaders there
seems to be very significant compile time gains (we've seen a factor
of 10000 albeit that was a really crazy shader you'd certainly never
see in a real app), beause LICM is quite expensive and there's cases
where running simplifycfg (along with sroa and early-cse) before licm
reduces IR complexity significantly. (I'm not entirely sure if it would
make sense to also run it afterwards.)

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2018-04-24 04:49:39 +02:00
..
amd ac/radv/radeonsi: refactor harvest config register getters. 2018-04-24 09:08:34 +10:00
broadcom util: Move util_is_power_of_two to bitscan.h and rename to util_is_power_of_two_or_zero 2018-03-29 14:09:23 -07:00
compiler glsl/glcpp: Handle hex constants with 0X prefix 2018-04-24 09:55:05 +10:00
egl x11: Only report supported DRI3/Present versions 2018-03-30 16:53:51 +01:00
gallium gallivm: add early cse pass 2018-04-24 04:49:39 +02:00
gbm gbm: remove never-implemented function 2018-03-28 16:25:52 +01:00
getopt
glx meson: fix warnings about comparing unlike types 2018-04-06 15:29:53 -07:00
gtest autotools: include meson build files in tarball 2018-01-19 16:30:51 -08:00
hgl meson: Add Haiku platform support v4 2018-02-16 16:56:34 -06:00
intel i965/fs: Return mlen * 8 for size_read() for INTERPOLATE_AT_* 2018-04-23 14:04:42 -07:00
loader dri3: Don't fail on version mismatch 2018-03-20 08:52:59 +00:00
mapi glapi: define GL_API to be KEYWORD1 in glapi_dispatch.c (v2) 2018-03-30 14:33:33 -06:00
mesa mesa: rename api_validate.{c,h} -> draw_validate.{c,h} 2018-04-24 09:23:30 +10:00
util mesa: include mtypes.h less 2018-04-12 19:31:30 -04:00
vulkan vulkan: Update the XML and headers to 1.1.73 2018-04-16 07:59:25 -07:00
git_sha1.h.in meson: Build i965 and dri stack 2017-10-09 13:42:44 -07:00
Makefile.am vulkan: Drop vk_android_native_buffer.xml 2018-04-10 19:29:49 -07:00
meson.build meson: build tests for gallium mesa state tracker 2018-04-18 09:03:57 -07:00
SConscript buildsys: move file regeneration logic to the script itself 2017-10-27 13:38:37 +01:00