Re: [Intel-gfx] [PATCH v2] drm/i915: Allow optimized platform checks

2017-09-29 Thread Joonas Lahtinen
On Wed, 2017-09-27 at 17:41 +0100, Tvrtko Ursulin wrote: > From: Tvrtko Ursulin > > If we store the platform as a bitmask, and convert the > IS_PLATFORM macro to use it, we allow the compiler to > merge the IS_PLATFORM(a) || IS_PLATFORM(b) || ... checks > into a single conditional. > > As a seco

Re: [Intel-gfx] [PATCH v2] drm/i915: Allow optimized platform checks

2017-09-28 Thread Jani Nikula
On Wed, 27 Sep 2017, Tvrtko Ursulin wrote: > From: Tvrtko Ursulin > > If we store the platform as a bitmask, and convert the > IS_PLATFORM macro to use it, we allow the compiler to > merge the IS_PLATFORM(a) || IS_PLATFORM(b) || ... checks > into a single conditional. > > As a secondary benefit t

Re: [Intel-gfx] [PATCH v2] drm/i915: Allow optimized platform checks

2017-09-27 Thread Chris Wilson
Quoting Tvrtko Ursulin (2017-09-27 17:41:38) > From: Tvrtko Ursulin > > If we store the platform as a bitmask, and convert the > IS_PLATFORM macro to use it, we allow the compiler to > merge the IS_PLATFORM(a) || IS_PLATFORM(b) || ... checks > into a single conditional. > > As a secondary benefi

[Intel-gfx] [PATCH v2] drm/i915: Allow optimized platform checks

2017-09-27 Thread Tvrtko Ursulin
From: Tvrtko Ursulin If we store the platform as a bitmask, and convert the IS_PLATFORM macro to use it, we allow the compiler to merge the IS_PLATFORM(a) || IS_PLATFORM(b) || ... checks into a single conditional. As a secondary benefit this saves almost 1k of text: text data