commit | c6236e830e88de072235dbf1caab8def6cc47ab4 | [log] [tgz] |
---|---|---|
author | Jiawei Shao <jiawei.shao@intel.com> | Wed Apr 02 13:33:20 2025 -0700 |
committer | Dawn LUCI CQ <dawn-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Apr 02 13:33:20 2025 -0700 |
tree | fbba521e1322f2cdd19ea3ad61ab4a69fb9d9e92 | |
parent | 388f632c14a6479ce7aa22772d0c72c28d4c1025 [diff] |
Reland "Range Analysis: Get loop exit condition from body block" This is a reland of commit 1411699ba4cdf29eca037c4320543ab8189bad28 This patch uses `std::numeric_limits<int32_t>::max()` instead of `-2147483648_i` in the tests to fix the error that uses `-` on `2147483648` as an `int32_t`. Original change's description: > Range Analysis: Get loop exit condition from body block > > This patch is the third part to implement the computation of the > range on the loop control variables. In this patch we implement the > function `GetBinaryToCompareLoopControlVariableInLoopBody()` to get > the condition to exit the loop in the loop body block if the loop > meets the below requirements (a straightforward for-loop): > - The loop control variable is only used as the parameter of the > load instruction. > - The first instruction is to load the loop control variable into a > temporary variable. > - The second instruction is to compare the temporary variable with > a constant value and save the result to a boolean variable. > - The second instruction cannot be a comparison that will never be > true (out of range of 32-bit integer). > - The third instruction is an `ifelse` expression that uses the > boolean variable got in the second instruction as the condition. > - The true block of the above `ifelse` expression doesn't contain > `exit_loop`. > - The false block of the above `ifelse` expression only contains > `exit_loop`. > > Bug: chromium:348701956 > Test: tint_unittests > Change-Id: Ie99911791eb6530e6d081ac9b54c2ec74e1be64c > Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/233294 > Commit-Queue: Jiawei Shao <jiawei.shao@intel.com> > Reviewed-by: James Price <jrprice@google.com> Bug: chromium:348701956 Change-Id: Idf4ccfab7961fa68d7d5c62f1555c81cbfa73fb6 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/234275 Commit-Queue: James Price <jrprice@google.com> Reviewed-by: James Price <jrprice@google.com> Reviewed-by: dan sinclair <dsinclair@chromium.org>
Dawn is an open-source and cross-platform implementation of the WebGPU standard. More precisely it implements webgpu.h
that is a one-to-one mapping with the WebGPU IDL. Dawn is meant to be integrated as part of a larger system and is the underlying implementation of WebGPU in Chromium.
Dawn provides several WebGPU building blocks:
webgpu.h
version that Dawn implements.webgpu.h
.Helpful links:
Developer documentation:
User documentation: (TODO, figure out what overlaps with the webgpu.h docs)
BSD 3-Clause License, please see LICENSE.
This is not an officially supported Google product.