On 03/05/2018 15:06, Chris Wilson wrote:
Quoting Joonas Lahtinen (2018-05-03 14:59:35)
Quoting Chris Wilson (2018-05-02 20:21:42)
I caught the compiler emitting the if(!NULL) guard at the start of
dma_fence_put(); on the request it should know for certain is already
non-NULL. Mark up the function as non-null and tell the compiler that
the request pointer doesn't change:
add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-5 (-5)
Function old new delta
i915_request_retire 1782 1777 -5
Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
Cc: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>
Heh, Tvrtko out Joonased Jonas, as he complained that this was doing the
compiler's job: "where does it end?"
Yeah, Joonas is getting soft. ;)
My concern was that we could then go around annotating many function
arguments which cannot take NULLs. (Which I think we should not do.) So
it seemed random to annotate just one for one branch saved, with
potentially just one compiler version/whatever. Just my 2c.
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx