00cdbfe6efa84d5f6f4293980f79cc94002c64f5 |
|
19-Jan-2017 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir/search: Use the correct bit size for integer comparisons The previous code always compared integers as 64-bit. Due to variations in sign-extension in the code generated by nir_opt_algebraic.py, this meant that nir_search doesn't always do what you want. Instead, 32-bit values should be matched as 32-bit and 64-bit values should be matched as 64-bit. While we're here we unify the unsigned and signed paths. Now that we're using the right bit size, they should be the same since the only difference we had before was sign extension. This gets the UE4 bitfield_extract optimization working again. It had stopped working due to the constant 0xff00ff00 getting sign-extended when it shouldn't have. Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Reviewed-by: Eric Anholt <eric@anholt.net> Cc: "17.0 13.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit bb96b034616d9d099752efb005b5c05e8644059c)
/external/mesa3d/src/compiler/nir/nir_search.c
|
e8328e55e7ac26bbf3b3a47a1bb1cae4ab9130a2 |
|
10-Jan-2017 |
Timothy Arceri <timothy.arceri@collabora.com> |
nir/algebraic: add support for conditional helper functions to expressions Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir_search.c
|
c472568b4e458c9882a98850668f99144c7ca6bf |
|
10-Jan-2017 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir/search: Only allow matching SSA values This is more correct and should also be a tiny bit faster since we're just comparing pointers instead of calling nir_src_equal. Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com> Cc: "13.0" <mesa-stable@lists.freedesktop.org>
/external/mesa3d/src/compiler/nir/nir_search.c
|
3bf6c6c3adb8e5dc2488fda93aa7dde3ca256b34 |
|
11-Oct-2016 |
Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> |
nir: zero allocated memory where needed Signed-off-by: Marek Olšák <marek.olsak@amd.com>
/external/mesa3d/src/compiler/nir/nir_search.c
|
3a9e6102b4baae3f50956e5f150c9e59138f4cc0 |
|
18-Aug-2016 |
Kenneth Graunke <kenneth@whitecape.org> |
nir/search: Extend 'a@bool' to handle a couple of system values. load_front_face and load_helper_invocation produce booleans. On Broadwell: total instructions in shared programs: 11638956 -> 11638011 (-0.01%) instructions in affected programs: 115093 -> 114148 (-0.82%) helped: 628 HURT: 14 Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir_search.c
|
e8543feba790b68edfcacc9554967118029b88f8 |
|
18-Aug-2016 |
Kenneth Graunke <kenneth@whitecape.org> |
nir/search: Fold src_is_bool()/alu_instr_is_bool() into src_is_type(). I don't want src_is_bool() and src_is_type(x, nir_type_bool) to behave differently. Having the logic spread out over three functions makes it harder to decide where to put new logic, as well. So, combine them all. It's a bit simpler because there's now only one recursive function rather than a pair of mutually recursive functions. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir_search.c
|
241870fe5b91c6efaa77a68dc9ed4a335dc76650 |
|
18-Aug-2016 |
Kenneth Graunke <kenneth@whitecape.org> |
nir/search: Introduce a src_is_type() helper for 'a@type' handling. Currently, 'a@type' can only match if 'a' is produced by an ALU instruction. This is rather limited - there are other cases we can easily detect which we should handle. Extending the code in-place would be fairly messy, so we introduce a new src_is_type() helper. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir_search.c
|
dfbae7d64f4d563bc65af338cdcb217f10474c1c |
|
07-May-2016 |
Rob Clark <robclark@freedesktop.org> |
nir/algebraic: support for power-of-two optimizations Some optimizations, like converting integer multiply/divide into left/ right shifts, have additional constraints on the search expression. Like requiring that a variable is a constant power of two. Support these cases by allowing a fxn name to be appended to the search var expression (ie. "a#32(is_power_of_two)"). Signed-off-by: Rob Clark <robclark@freedesktop.org> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir_search.c
|
7e0ee3a38b033aad12a0c19dc5437bc9c011437a |
|
25-Apr-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir/search: Respect the bit_size parameter on nir_search_value Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
/external/mesa3d/src/compiler/nir/nir_search.c
|
940da2ce0ec989c8c8f1df2ad26f4a95014f4d08 |
|
22-Apr-2016 |
Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> |
nir: Add missing break into switch in construct_value() There seemed to be missing one break in nested switchcases. Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> Reviewed-by: Antia Puentes <apuentes@igalia.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/compiler/nir/nir_search.c
|
3663a2397e47da9b766b0c4239a8b74ac77b5d04 |
|
23-Mar-2016 |
Samuel Iglesias Gonsálvez <siglesias@igalia.com> |
nir: add bit_size info to nir_load_const_instr_create() Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir_search.c
|
3babb7b0a4037c4ae98078611a827af6dd3e121e |
|
04-Apr-2016 |
Kenneth Graunke <kenneth@whitecape.org> |
nir: Use PRIi64 and PRIu64 instead of %ld and %lu. %ld and %lu aren't the right format specifiers for int64_t and uint64_t on 32-bit (x86) systems. They're %zu on Linux and %Iu on Windows. Use the standard C99 macros in hopes that they work everywhere. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/compiler/nir/nir_search.c
|
eb93d6dec82cd02e97b0a673fb11eef1f31777e7 |
|
28-Mar-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir/search: Don't match inexact expressions with exact subexpressions In the first pass of implementing exact handling, I made a mistake with search-and-replace. In particular, we only reallly handled exact/inexact on the root of the tree. Instead, we need to check every node in the tree for an exact/inexact match. As an example of this, consider the following GLSL code precise float a = b + c; if (a < 0) { do_stuff(); } In that case, only the add will be declared "exact" and an expression that looks for "b + c < 0" will still match and replace it with "b < -c" which may yield different results. The solution is to simply bail if any of the values are exact when matching an inexact expression. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/compiler/nir/nir_search.c
|
0bea0e7141a7698118bfd465fdb4adf8e0b21bc8 |
|
22-Mar-2016 |
Rob Clark <robclark@freedesktop.org> |
nir: fix dangling ssadef->name ptrs In many places, the convention is to pass an existing ssadef name ptr when construction/initializing a new nir_ssa_def. But that goes badly (as noticed by garbage in nir_print output) when the original string gets freed. Just use ralloc_strdup() instead, and add ralloc_free() in the two places that would care (not that the strings wouldn't eventually get freed anyways). Also fixup the nir_search code which was directly setting ssadef->name to use the parent instruction as memctx. Signed-off-by: Rob Clark <robclark@freedesktop.org> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir_search.c
|
3a7cb6534c3f82482c05f6a6813308cf2cad131f |
|
17-Mar-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir/algebraic: Allow for flagging operations as being inexact Reviewed-by: Francisco Jerez <currojerez@riseup.net>
/external/mesa3d/src/compiler/nir/nir_search.c
|
a6f25fa7d77cbbce113b92690dc43ed2ed9a0211 |
|
17-Mar-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir/search: Propagate exactness into newly created expressions Reviewed-by: Francisco Jerez <currojerez@riseup.net>
/external/mesa3d/src/compiler/nir/nir_search.c
|
58fe7837b844da0c466a8573702d745f6f9975e6 |
|
14-Aug-2015 |
Connor Abbott <connor.w.abbott@intel.com> |
nir: propagate bitsize information in nir_search When we replace an expresion we have to compute bitsize information for the replacement. We do this in two passes to validate that bitsize information is consistent and correct: first we propagate bitsize from child nodes to parent, then we do it the other way around, starting from the original's instruction destination bitsize. v2 (Iago): - Always use nir_type_bool32 instead of nir_type_bool when generating algebraic optimizations. Before we used nir_type_bool32 with constants and nir_type_bool with variables. - Fix bool comparisons in nir_search.c to account for bitsized types. v3 (Sam): - Unpack the double constant value as unsigned long long (8 bytes) in nir_algrebraic.py. v4 (Sam): - Use helpers to get type size and base type from nir_alu_type. Signed-off-by: Iago Toral Quiroga <itoral@igalia.com> Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
/external/mesa3d/src/compiler/nir/nir_search.c
|
3124ce699bb3844e793f00e00bfbea5c91744f90 |
|
17-Nov-2015 |
Connor Abbott <connor.w.abbott@intel.com> |
nir: add a bit_size parameter to nir_ssa_dest_init v2: Squash multiple commits addressing the new parameter in different files so we don't break the build (Iago) v3: Fix tgsi (Samuel) v4: Fix nir_clone.c (Samuel) v5: Fix vc4 and freedreno (Iago) v6 (Sam) - Fix build errors in nir_lower_indirect_derefs - Use helper to get type size from nir_alu_type. Signed-off-by: Iago Toral Quiroga <itoral@igalia.com> Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Tested-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
/external/mesa3d/src/compiler/nir/nir_search.c
|
084b24f5582567ebf5aa94b7f40ae3bdcb71316b |
|
16-Mar-2016 |
Iago Toral Quiroga <itoral@igalia.com> |
nir: rename nir_const_value fields to include bitsize information Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
/external/mesa3d/src/compiler/nir/nir_search.c
|
a39a8fbbaa129f4e52f2a3ad2747182e9a74d910 |
|
17-Jan-2016 |
Emil Velikov <emil.velikov@collabora.com> |
nir: move to compiler/ Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Acked-by: Matt Turner <mattst88@gmail.com> Acked-by: Jose Fonseca <jfonseca@vmware.com>
/external/mesa3d/src/compiler/nir/nir_search.c
|