[PATCH 1/4] iommu/iova: Optimise rbtree searching

2017-07-18 Thread Robin Murphy
From: Zhen Lei Checking the IOVA bounds separately before deciding which direction to continue the search (if necessary) results in redundantly comparing both pfns twice each. GCC can already determine that the final comparison op is redundant and optimise it down to

[PATCH 1/4] iommu/iova: Optimise rbtree searching

2017-07-18 Thread Robin Murphy
From: Zhen Lei Checking the IOVA bounds separately before deciding which direction to continue the search (if necessary) results in redundantly comparing both pfns twice each. GCC can already determine that the final comparison op is redundant and optimise it down to 3 in total, but we can go