Commit 121d0bf
committed
meshletcodec: Remove extra null checks for clang via assume
In decodeMeshletSimd, data can not be null (even if input buffer is
NULL/0, this is invalid as minimum encoded size is 16 bytes).
decodeVerticesSimd and decodeTrianglesSimd may return NULL if they
encounter a bounds error; however, if they exit normally, we do not need
to do if (!data) check. This is not obvious to the compiler from the
regular function flow here unless data is explicitly marked as non-null;
builtin_assume does that for clang which streamlines the branch flow
here.1 parent c4c747b commit 121d0bf
1 file changed
+5
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
872 | 872 | | |
873 | 873 | | |
874 | 874 | | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
875 | 880 | | |
876 | 881 | | |
877 | 882 | | |
| |||
0 commit comments