{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":75787966,"defaultBranch":"main","name":"DirectXShaderCompiler","ownerLogin":"microsoft","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2016-12-07T01:42:19.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/6154722?v=4","public":true,"private":false,"isOrgOwned":true},"refInfo":{"name":"","listCacheKey":"v0:1716920131.0","currentOid":""},"activityList":{"items":[{"before":"cdc56031b562359967ea440060a110a388d8f782","after":"128e6ce2be8f09539c97cf28d6066d9a6b32b15c","ref":"refs/heads/main","pushedAt":"2024-05-24T20:39:38.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"tex3d","name":"Tex Riddell","path":"/tex3d","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/5661778?s=80&v=4"},"commit":{"message":"NFC: ExtractIRForPassTest.py error reporting when pass not found (#6325)\n\nThis just adds convenient error reporting to `ExtractIRForPassTest.py`\r\nwhen the specified pass is not found.\r\n\r\nNo functional change.","shortMessageHtmlLink":"NFC: ExtractIRForPassTest.py error reporting when pass not found (#6325)"}},{"before":"a1b945c1a3e0866b409c00d7ff2ed077060f5a57","after":"cdc56031b562359967ea440060a110a388d8f782","ref":"refs/heads/main","pushedAt":"2024-05-24T14:05:53.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"sudonatalie","name":"Natalie Chouinard","path":"/sudonatalie","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1953083?s=80&v=4"},"commit":{"message":"[SPIR-V] Add error message for SamplerFeedback (#6640)\n\nSampler feedback resource types are not supported by the SPIR-V backend,\r\nbut they would previously fail silently until a function was called on\r\nthem. This change makes the error message more explicit on the type.\r\n\r\nRelated to #6614","shortMessageHtmlLink":"[SPIR-V] Add error message for SamplerFeedback (#6640)"}},{"before":"b41d8a947842baca76ca58b7f96a5695a7a2d5eb","after":"a1b945c1a3e0866b409c00d7ff2ed077060f5a57","ref":"refs/heads/main","pushedAt":"2024-05-23T16:00:38.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"amaiorano","name":"Antonio Maiorano","path":"/amaiorano","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6893883?s=80&v=4"},"commit":{"message":"Loop exit restructurizer: don't iterate over uses while mutating them (#6644)\n\nThe SkipBlockWithBranch function does the following:\r\n- Splits the block into three blocks with an if-then-endif structure.\r\n- Moves most instructions from the original block into the \"then\" block\r\n- If any of those values are used outside the original block, they are\r\npropagated through newly-constructed phis in the 'endif' block.\r\n\r\nThis algorithm had a bug where the uses of a value were being scanned\r\nwhile the uses were also being updated. In some cases a downstream\r\nout-of-block use could be skipped. That results in an invalid module\r\nbecause now the original definition is now in the 'then' block, which\r\ndoes not dominate the downstream out-of-block use.\r\n\r\nAdd a test that demonstrates the problem.","shortMessageHtmlLink":"Loop exit restructurizer: don't iterate over uses while mutating them ("}},{"before":"a6f4025957270d12d10b2932e68ca384c5a05f61","after":"b41d8a947842baca76ca58b7f96a5695a7a2d5eb","ref":"refs/heads/main","pushedAt":"2024-05-23T14:21:30.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"amaiorano","name":"Antonio Maiorano","path":"/amaiorano","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6893883?s=80&v=4"},"commit":{"message":"Fix LoopDeletion incorrectly updating PHI with multiple duplicate inputs (#6643)\n\nLoopDeletion was incorrectly updating PHI nodes in the target block when\r\nit had duplicate input edges. This happens, for example, when deleting a\r\nloop that uses a switch with multiple cases that exit the same way.\r\n\r\nAfter determining that this was the bug, I found this fix in LLVM:\r\nhttps://reviews.llvm.org/D34516 and applied it here.","shortMessageHtmlLink":"Fix LoopDeletion incorrectly updating PHI with multiple duplicate inp…"}},{"before":"86da226c4f377bc90c08491923b8e72ab3d0864c","after":"a6f4025957270d12d10b2932e68ca384c5a05f61","ref":"refs/heads/main","pushedAt":"2024-05-22T20:38:51.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"pow2clk","name":"Greg Roth","path":"/pow2clk","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/38554235?s=80&v=4"},"commit":{"message":"Calculate preferred alignment when lowering groupshared matrices (#6589)\n\nWhen flattening the global for a groupshared matrix, the alignment\r\ninformation was getting lost. As a result, the alignments of the loads\r\nand stores were calculating their own alignment based on preferred\r\nalignment and trailing zeros of the index. The preferred alignment\r\nswitched to 16 when the type size was over 128 bits due to a heuristic\r\nwhose rationale is lost to time. When the global has its own alignment,\r\nthat gets used, so by calculating it at lowering, the alignments are\r\nconsistent and reliable.\r\n\r\nIncludes testing for a few matrix variants and a pass test.\r\n\r\nfixes #6416","shortMessageHtmlLink":"Calculate preferred alignment when lowering groupshared matrices (#6589)"}},{"before":"0bdd15b75f8390f1dd79887e34d26b4acd5224ba","after":"86da226c4f377bc90c08491923b8e72ab3d0864c","ref":"refs/heads/main","pushedAt":"2024-05-22T16:44:02.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"s-perron","name":"Steven Perron","path":"/s-perron","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/31666470?s=80&v=4"},"commit":{"message":"Fix aligment for empty structs (#6635)\n\nWe have a special case to that the the size and alignment for an empty\r\nstruct is `{1,0}`. However that is not correct. See\r\n\r\nhttps://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#interfaces-alignment-requirements.\r\n\r\n> An empty structure has a base alignment equal to the size of the\r\nsmallest\r\nscalar type permitted by the capabilities declared in the SPIR-V module.\r\n(e.g.,\r\nfor a 1 byte aligned empty struct in the StorageBuffer storage class,\r\nStorageBuffer8BitAccess or UniformAndStorageBuffer8BitAccess must be\r\ndeclared\r\nin the SPIR-V module.\r\n\r\nI'm not 100% sure how DXC handle this minimum alignment, but I figured I\r\nwould inialize the alignment to 1. If there are not members, then it\r\nwill remain 1, and I would let the rest of the logic happen. No special\r\ncase.\r\n\r\nFixes #2882","shortMessageHtmlLink":"Fix aligment for empty structs (#6635)"}},{"before":"9ad095dfe6c33175b60052d61925045791c9f5f6","after":"0bdd15b75f8390f1dd79887e34d26b4acd5224ba","ref":"refs/heads/main","pushedAt":"2024-05-22T13:54:31.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"s-perron","name":"Steven Perron","path":"/s-perron","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/31666470?s=80&v=4"},"commit":{"message":"Update SPIR-V.rst (#6642)\n\nMini typo","shortMessageHtmlLink":"Update SPIR-V.rst (#6642)"}},{"before":"9ee3f23d9cc3dd7b4ed463ca938a03cefd0dc706","after":"9ad095dfe6c33175b60052d61925045791c9f5f6","ref":"refs/heads/main","pushedAt":"2024-05-22T08:59:45.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"Keenuts","name":"Nathan Gauër","path":"/Keenuts","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/4282252?s=80&v=4"},"commit":{"message":"[SPIR-V] Add support for SampleCmpLevel (#6618)\n\nSampleCmpLevel is similar to SampleCmpLevel0, except the LOD level can\r\nbe specified using either a const-offset, or a variable. This should be\r\navailable starting SM6.7\r\n\r\nFixes #6613\r\n\r\n---------\r\n\r\nSigned-off-by: Nathan Gauër ","shortMessageHtmlLink":"[SPIR-V] Add support for SampleCmpLevel (#6618)"}},{"before":null,"after":"26ba5bc5fcee885f3950464f354c40ee7ab101e4","ref":"refs/heads/zhengxingli/common-factor-optimization-upstream-release-1.8.2405","pushedAt":"2024-05-21T23:03:00.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"lizhengxing","name":"Zhengxing li","path":"/lizhengxing","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/9673915?s=80&v=4"},"commit":{"message":"Reassociate: add global reassociation algorithm (#6598)\n\nThis PR pulls the upstream change, Reassociate: add global reassociation\nalgorithm\n(https://github.com/llvm/llvm-project/commit/b8a330c42ab43879119cd3a305756d28aefe9fe6),\ninto DXC with miminal changes.\n\nFor the code below:\n foo = (a * b) * c\n bar = (a * d) * c\n\nAs the upstream change states, it can identify the a*c is a common\nfactor and redundant.\n\nThis is part 1 of the fix for #6593.\n\n(cherry picked from commit 6f9c107b78c1161cef9c44bec714e081ddbae275)","shortMessageHtmlLink":"Reassociate: add global reassociation algorithm (#6598)"}},{"before":"1ee70fdc646f6b4002f89f7473b55c2e72c5342e","after":"9ee3f23d9cc3dd7b4ed463ca938a03cefd0dc706","ref":"refs/heads/main","pushedAt":"2024-05-21T22:37:04.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"lizhengxing","name":"Zhengxing li","path":"/lizhengxing","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/9673915?s=80&v=4"},"commit":{"message":"More aggressive reassociations (#6626)\n\nAlthough DXC applied the upstream change, Reassociate: add global\r\nreassociation algorithm\r\n(https://github.com/llvm/llvm-project/commit/b8a330c) in this PR\r\n(https://github.com/microsoft/DirectXShaderCompiler/pull/6598), it still\r\nmight overlook some obvious common factors.\r\n\r\nOne case has been observed is:\r\n```\r\n %Float4_0 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %1, i32 1)\r\n %Float4_0.w = extractvalue %dx.types.CBufRet.f32 %Float4_0, 3\r\n %Float2_0 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %1, i32 0)\r\n %Float2_0.y = extractvalue %dx.types.CBufRet.f32 %Float2_0, 1\r\n\r\n /* %Float4_1 is redundant with %Float4_0 since they invokes cbufferLoadLegacy with same parameters */\r\n %Float4_1 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %1, i32 1)\r\n\r\n /* %Float4_1.w is redundant with %Float4_0.w */\r\n %Float4_1.w = extractvalue %dx.types.CBufRet.f32 %Float4_1, 3 \r\n\r\n /* %Float2_1 is redundant with %Float2_0 since they invokes cbufferLoadLegacy with same parameters */\r\n %Float2_1 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %1, i32 0)\r\n\r\n /* %Float2_1.y is redundant with %Float2_0.y */\r\n %Float2_1.y = extractvalue %dx.types.CBufRet.f32 %Float2_1, 1\r\n\r\n ....\r\n %11 = fmul fast float %Float4_0.w, %10\r\n %12 = fmul fast float %11, %Float2_0.y\r\n ....\r\n %14 = fmul fast float %Float4_1.w, %13\r\n %15 = fmul fast float %14, %Float2_1.y \r\n\r\n(%Float4_0.w * %Float2_0.y) equals to (%Float4_1.w * %Float2_1.y), they should be reassociated to a common factor\r\n\r\n```\r\nThe upstream change can't identify this common factor because DXC\r\ndoesn't know (%Float4_0.w, %Float4_1.w) and (%Float2_0.y, %Float2_1.y)\r\nare redundant when running Reassociate pass. Those redundancies will be\r\neliminated in GVN pass.\r\n\r\nFor DXC can identify more common factors, this PR will aggressively run\r\nReassociate pass again after GVN pass and then run GVN pass again to\r\nremove the redundancies generared in this run of Reassociate pass.\r\n\r\nChanging the order of floating point operations causes the precision\r\nissue. In case some shaders get unexpected results due to this PR, use\r\n\"-opt-disable aggressive-reassociation\" to disable this PR and roll\r\nback.\r\n\r\nThis is part 3 of the fix for\r\nhttps://github.com/microsoft/DirectXShaderCompiler/issues/6593.","shortMessageHtmlLink":"More aggressive reassociations (#6626)"}},{"before":"06c4b1194013769259ae232c0540e774327c6172","after":"b052e1b2441bdb36a63900025cd9824af5d1f168","ref":"refs/heads/zhengxingli/common-factor-optimization-more-reassocations","pushedAt":"2024-05-21T20:48:28.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"lizhengxing","name":"Zhengxing li","path":"/lizhengxing","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/9673915?s=80&v=4"},"commit":{"message":"More aggressive reassociations\n\nAlthough DXC applied the upstream change, Reassociate: add global reassociation algorithm (llvm/llvm-project@b8a330c) in this PR (https://github.com/microsoft/DirectXShaderCompiler/pull/6598), it still might overlook some obvious common factors.\n\nOne case has been observed is:\n %Float4_0 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %1, i32 1)\n %Float4_0.w = extractvalue %dx.types.CBufRet.f32 %Float4_0, 3\n %Float2_0 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %1, i32 0)\n %Float2_0.y = extractvalue %dx.types.CBufRet.f32 %Float2_0, 1\n\n /* %Float4_1 is redundant with %Float4_0 since they invokes cbufferLoadLegacy with same parameters */\n %Float4_1 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %1, i32 1)\n\n /* %Float4_1.w is redundant with %Float4_0.w */\n %Float4_1.w = extractvalue %dx.types.CBufRet.f32 %Float4_1, 3\n\n /* %Float2_1 is redundant with %Float2_0 since they invokes cbufferLoadLegacy with same parameters */\n %Float2_1 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %1, i32 0)\n\n /* %Float2_1.y is redundant with %Float2_0.y */\n %Float2_1.y = extractvalue %dx.types.CBufRet.f32 %Float2_1, 1\n\n ....\n %11 = fmul fast float %Float4_0.w, %10\n %12 = fmul fast float %11, %Float2_0.y\n ....\n %14 = fmul fast float %Float4_1.w, %13\n %15 = fmul fast float %14, %Float2_1.y\n\n(%Float4_0.w * %Float2_0.y) equals to (%Float4_1.w * %Float2_1.y), they should be reassociated to a common factor\n\nThe upstream change can't identify this common factor because DXC doesn't know (%Float4_0.w, %Float4_1.w) and (%Float2_0.y, %Float2_1.y) are redundant when running Reassociate pass. Those redundancies will be eliminated in GVN pass.\n\nFor DXC can identify more common factors, this PR will aggressively run Reassociate pass again after GVN pass and then run GVN pass again to remove the redundancies generared in this run of Reassociate pass.\n\nChanging the order of floating point operations causes the precision issue. In case some shaders get unexpected results due to this PR, use \"-opt-disable aggressive-reassociation\" to disable this PR and roll back.\n\nThis is part 3 of the fix for #6593.","shortMessageHtmlLink":"More aggressive reassociations"}},{"before":"6a34e29175e3aa6da1cf498de227fbd15be55c6e","after":"1ee70fdc646f6b4002f89f7473b55c2e72c5342e","ref":"refs/heads/main","pushedAt":"2024-05-21T20:45:39.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"lizhengxing","name":"Zhengxing li","path":"/lizhengxing","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/9673915?s=80&v=4"},"commit":{"message":"Add a flag for the upstream global reassociation algorithm change (#6625)\n\nThis PR (https://github.com/microsoft/DirectXShaderCompiler/pull/6598)\r\npulls the upstream global reassociation algorithm change in DXC and can\r\nreduce redundant calculations obviously.\r\n\r\nHowever, from the testing result of a large offline suite of shaders,\r\nsome shaders got worse compilation results and couldn't benefit from\r\nthis upstream change.\r\n\r\nThis PR adds a flag for the upstream global reassociation change. It\r\nwould be easier to roll back if a shader get worse compilation result\r\ndue to this upstream change.\r\n\r\nThis is part 2 of the fix for #6593.","shortMessageHtmlLink":"Add a flag for the upstream global reassociation algorithm change (#6625"}},{"before":"aab21dc581d6101d9f02a5a23958aacb7cbea5b1","after":null,"ref":"refs/heads/dependabot/pip/utils/git/requests-2.32.0","pushedAt":"2024-05-21T19:39:39.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"pow2clk","name":"Greg Roth","path":"/pow2clk","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/38554235?s=80&v=4"}},{"before":"6f9c107b78c1161cef9c44bec714e081ddbae275","after":"6a34e29175e3aa6da1cf498de227fbd15be55c6e","ref":"refs/heads/main","pushedAt":"2024-05-21T19:39:35.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"pow2clk","name":"Greg Roth","path":"/pow2clk","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/38554235?s=80&v=4"},"commit":{"message":"Bump requests from 2.31.0 to 2.32.0 in /utils/git (#6638)\n\nBumps [requests](https://github.com/psf/requests) from 2.31.0 to 2.32.0.\r\n\r\nRelease notes\r\nSourced from https://github.com/psf/requests/releases requests's\r\nreleases.\r\n\r\nv2.32.0\r\nFixed an issue where setting `verify=False` on the first\r\nrequest from a\r\nSession will cause subsequent requests to the _same_ origin to\r\nalso ignore\r\ncert verification, regardless of the value of `verify`.\r\n(\r\nhttps://github.com/psf/requests/security/advisories/GHSA-9wx4-h78v-vm56\r\n\r\nImprovements\r\n\r\n`verify=True` now reuses a global SSLContext which should\r\nimprove\r\nrequest time variance between first and subsequent requests. It should\r\nalso minimize certificate load time on Windows systems when using a\r\nPython\r\nversion built with OpenSSL 3.x. (\r\nhttps://redirect.github.com/psf/requests/issues/6667)\r\nRequests now supports optional use of character detection\r\n(`chardet` or `charset_normalizer`) when\r\nrepackaged or vendored.\r\nThis enables `pip` and other projects to minimize their\r\nvendoring\r\nsurface area. The `Response.text()` and\r\n`apparent_encoding` APIs\r\nwill default to `utf-8` if neither library is present. (https://redirect.github.com/psf/requests/issues/6702)\r\n\r\n\r\n[![Dependabot compatibility\r\nscore](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=requests&package-manager=pip&previous-version=2.31.0&new-version=2.32.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)\r\n\r\nDependabot will resolve any conflicts with this PR as long as you don't\r\nalter it yourself. You can also trigger a rebase manually by commenting\r\n`@dependabot rebase`.\r\n\r\n\r\n\r\nSigned-off-by: dependabot[bot] \r\nCo-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>","shortMessageHtmlLink":"Bump requests from 2.31.0 to 2.32.0 in /utils/git (#6638)"}},{"before":"d4efcf2adeb3bdf9e9268be854f4299600208f3f","after":"4a2d290f88934f6f1729c8a270639f338289b71a","ref":"refs/heads/zhengxingli/common-factor-optimization-upstream-with-flag","pushedAt":"2024-05-21T19:10:07.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"lizhengxing","name":"Zhengxing li","path":"/lizhengxing","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/9673915?s=80&v=4"},"commit":{"message":"Add a flag for the upstream global reassociation algorithm change\n\nThis PR (https://github.com/microsoft/DirectXShaderCompiler/pull/6598) pulls the upstream global reassociation algorithm change in DXC and can reduce redundant calculations obviously.\n\nHowever, from the testing result of a large offline suite of shaders, some shaders got worse compilation results and couldn't benefit from this upstream change.\n\nThis PR adds a flag for the upstream global reassociation change. It would be easier to roll back if a shader get worse compilation result due to this upstream change.\n\nThis is part 2 of the fix for #6593.","shortMessageHtmlLink":"Add a flag for the upstream global reassociation algorithm change"}},{"before":"66acf8de22649b72dc17430347eeaf1952102cd4","after":"6f9c107b78c1161cef9c44bec714e081ddbae275","ref":"refs/heads/main","pushedAt":"2024-05-21T18:55:40.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"lizhengxing","name":"Zhengxing li","path":"/lizhengxing","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/9673915?s=80&v=4"},"commit":{"message":"Reassociate: add global reassociation algorithm (#6598)\n\nThis PR pulls the upstream change, Reassociate: add global reassociation\r\nalgorithm\r\n(https://github.com/llvm/llvm-project/commit/b8a330c42ab43879119cd3a305756d28aefe9fe6),\r\ninto DXC with miminal changes.\r\n\r\nFor the code below:\r\n foo = (a * b) * c\r\n bar = (a * d) * c\r\n\r\nAs the upstream change states, it can identify the a*c is a common\r\nfactor and redundant.\r\n\r\nThis is part 1 of the fix for #6593.","shortMessageHtmlLink":"Reassociate: add global reassociation algorithm (#6598)"}},{"before":"7776de8c68e590f3ed5bf1c400ddab9714c2c027","after":"e3a604a3a4d6273c8ae35c09e868292b362a6109","ref":"refs/heads/zhengxingli/common-factor-optimization-upstream","pushedAt":"2024-05-21T17:30:59.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"lizhengxing","name":"Zhengxing li","path":"/lizhengxing","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/9673915?s=80&v=4"},"commit":{"message":"Reassociate: add global reassociation algorithm\n\nThis PR pulls the upstream change, Reassociate: add global reassociation algorithm (https://github.com/llvm/llvm-project/commit/b8a330c42ab43879119cd3a305756d28aefe9fe6), into DXC with miminal changes.\n\nFor the code below:\n foo = (a * b) * c\n bar = (a * d) * c\n\nAs the upstream change states, it can identify the a*c is a common factor and redundant.\n\nThis is part 1 of the fix for #6593.","shortMessageHtmlLink":"Reassociate: add global reassociation algorithm"}},{"before":"1658b068b50012e41eaf012db0761edbee76a1ea","after":"66acf8de22649b72dc17430347eeaf1952102cd4","ref":"refs/heads/main","pushedAt":"2024-05-21T09:47:22.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"sudonatalie","name":"Natalie Chouinard","path":"/sudonatalie","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1953083?s=80&v=4"},"commit":{"message":"[SPIR-V] Remove always disabled test (#6634)\n\nThis test was marked DISABLED_ in gtest at the time it was added in PR\r\n#3155, so it appears that it was never passing. Specifically, the CHECK\r\nfor `DebugFunction [[func1]]` fails. I don't think it's a priority to\r\nimplement debug info for unreferenced functions at this point, so opting\r\nto simply remove it.\r\n\r\nThis is the last test in the unsupported directory so it can now be\r\nremoved entirely.\r\n\r\nFixes #6616","shortMessageHtmlLink":"[SPIR-V] Remove always disabled test (#6634)"}},{"before":null,"after":"aab21dc581d6101d9f02a5a23958aacb7cbea5b1","ref":"refs/heads/dependabot/pip/utils/git/requests-2.32.0","pushedAt":"2024-05-21T06:34:05.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"dependabot[bot]","name":null,"path":"/apps/dependabot","primaryAvatarUrl":"https://avatars.githubusercontent.com/in/29110?s=80&v=4"},"commit":{"message":"---\nupdated-dependencies:\n- dependency-name: requests\n dependency-type: direct:production\n...\n\nSigned-off-by: dependabot[bot] ","shortMessageHtmlLink":"---"}},{"before":"8af0fbe7ac4b60fa348e6116379d536ee881ee59","after":"06c4b1194013769259ae232c0540e774327c6172","ref":"refs/heads/zhengxingli/common-factor-optimization-more-reassocations","pushedAt":"2024-05-17T21:05:55.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"lizhengxing","name":"Zhengxing li","path":"/lizhengxing","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/9673915?s=80&v=4"},"commit":{"message":"More aggressive reassociations\n\nAlthough DXC applied the upstream change, Reassociate: add global reassociation algorithm (llvm/llvm-project@b8a330c) in this PR (https://github.com/microsoft/DirectXShaderCompiler/pull/6598), it still might overlook some obvious common factors.\n\nOne case has been observed is:\n %Float4_0 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %1, i32 1)\n %Float4_0.w = extractvalue %dx.types.CBufRet.f32 %Float4_0, 3\n %Float2_0 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %1, i32 0)\n %Float2_0.y = extractvalue %dx.types.CBufRet.f32 %Float2_0, 1\n\n /* %Float4_1 is redundant with %Float4_0 since they invokes cbufferLoadLegacy with same parameters */\n %Float4_1 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %1, i32 1)\n\n /* %Float4_1.w is redundant with %Float4_0.w */\n %Float4_1.w = extractvalue %dx.types.CBufRet.f32 %Float4_1, 3\n\n /* %Float2_1 is redundant with %Float2_0 since they invokes cbufferLoadLegacy with same parameters */\n %Float2_1 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %1, i32 0)\n\n /* %Float2_1.y is redundant with %Float2_0.y */\n %Float2_1.y = extractvalue %dx.types.CBufRet.f32 %Float2_1, 1\n\n ....\n %11 = fmul fast float %Float4_0.w, %10\n %12 = fmul fast float %11, %Float2_0.y\n ....\n %14 = fmul fast float %Float4_1.w, %13\n %15 = fmul fast float %14, %Float2_1.y\n\n(%Float4_0.w * %Float2_0.y) equals to (%Float4_1.w * %Float2_1.y), they should be reassociated to a common factor\n\nThe upstream change can't identify this common factor because DXC doesn't know (%Float4_0.w, %Float4_1.w) and (%Float2_0.y, %Float2_1.y) are redundant when running Reassociate pass. Those redundancies will be eliminated in GVN pass.\n\nFor DXC can identify more common factors, this PR will aggressively run Reassociate pass again after GVN pass and then run GVN pass again to remove the redundancies generared in this run of Reassociate pass.\n\nChanging the order of floating point operations causes the precision issue. In case some shaders get unexpected results due to this PR, use \"-opt-disable aggressive-reassociation\" to disable this PR and roll back.\n\nThis is part 3 of the fix for #6593.","shortMessageHtmlLink":"More aggressive reassociations"}},{"before":"aa61d01e9ef635094476c2c989b1cd8c1af75378","after":"d4efcf2adeb3bdf9e9268be854f4299600208f3f","ref":"refs/heads/zhengxingli/common-factor-optimization-upstream-with-flag","pushedAt":"2024-05-17T19:23:44.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"lizhengxing","name":"Zhengxing li","path":"/lizhengxing","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/9673915?s=80&v=4"},"commit":{"message":"Add a flag for the upstream global reassociation algorithm change\n\nThis PR (https://github.com/microsoft/DirectXShaderCompiler/pull/6598) pulls the upstream global reassociation algorithm change in DXC and can reduce redundant calculations obviously.\n\nHowever, from the testing result of a large offline suite of shaders, some shaders got worse compilation results and couldn't benefit from this upstream change.\n\nThis PR adds a flag for the upstream global reassociation change. It would be easier to roll back if a shader get worse compilation result due to this upstream change.\n\nThis is part 2 of the fix for #6593.","shortMessageHtmlLink":"Add a flag for the upstream global reassociation algorithm change"}},{"before":"66235919cc85ef93e896305775386875f9fb7751","after":"aa61d01e9ef635094476c2c989b1cd8c1af75378","ref":"refs/heads/zhengxingli/common-factor-optimization-upstream-with-flag","pushedAt":"2024-05-17T19:21:21.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"lizhengxing","name":"Zhengxing li","path":"/lizhengxing","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/9673915?s=80&v=4"},"commit":{"message":"Add a flag for the upstream global reassociation algorithm change\n\nThis PR (https://github.com/microsoft/DirectXShaderCompiler/pull/6598) pulls the upstream global reassociation algorithm change in DXC and can reduce redundant calculations obviously.\n\nHowever, from the testing result of a large offline suite of shaders, some shaders got worse compilation results and couldn't benefit from this upstream change.\n\nThis PR adds a flag for the upstream global reassociation change. It would be easier to roll back if a shader get worse compilation result due to this upstream change.\n\nThis is part 2 of the fix for #6593.","shortMessageHtmlLink":"Add a flag for the upstream global reassociation algorithm change"}},{"before":"24325172217ff3c27a7161e46382bcb2285d2624","after":"1658b068b50012e41eaf012db0761edbee76a1ea","ref":"refs/heads/main","pushedAt":"2024-05-17T15:06:12.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"sudonatalie","name":"Natalie Chouinard","path":"/sudonatalie","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1953083?s=80&v=4"},"commit":{"message":"[SPIR-V] Enable more unsupported tests (#6630)\n\nThe following tests only required minor test syntax changes to pass:\r\n- tools/clang/test/CodeGenSPIRV/cast.2float.interlocked.hlsl\r\n-\r\ntools/clang/test/CodeGenSPIRV/meshshading.nv.error.fncall.amplification.vulkan1.2.hlsl\r\n(+ replacing NV ext with EXT)\r\n- tools/clang/test/CodeGenSPIRV/var.init.extvector.hlsl\r\n\r\nIssue #6621 has been filed to track the failure of\r\ntools/clang/test/CodeGenSPIRV/oo.class.static.member.hlsl.\r\n\r\nRelated to #6616","shortMessageHtmlLink":"[SPIR-V] Enable more unsupported tests (#6630)"}},{"before":"d64f5f2699f806215c97d75555046971057ece63","after":"24325172217ff3c27a7161e46382bcb2285d2624","ref":"refs/heads/main","pushedAt":"2024-05-17T13:59:35.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"s-perron","name":"Steven Perron","path":"/s-perron","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/31666470?s=80&v=4"},"commit":{"message":"[SPIR-V] Implement WaveMutliPrefix* (#6608)\n\nImplements the Shader Model 6.5 WaveMultiPrefix* intrinsic functions\r\nusing the group operation from SPV_NV_shader_subgroup_partitioned,\r\nPartitionedExclusiveScanNV, which performs a partitioned exclusive scan\r\noperation across a subset of invocations (\"lanes\") in a subgroup\r\n(\"wave\"). The subset of the partition is determined by the provided\r\nballot (\"mask\") parameter, which follows the same requirements for\r\nvalid partitioning and active invocations/lanes as the HLSL parameter.\r\n\r\nNote that WaveMultiPrefixCountBits remains unimplemented because it does\r\nnot directly map to a SPIR-V GroupNonUniformArithmetic instruction that\r\naccepts the PartitionedExclusiveScanNV Group Operation.\r\n\r\nDirectX Spec:\r\nhttps://microsoft.github.io/DirectX-Specs/d3d/HLSL_ShaderModel6_5.html#wavemultiprefix-functions\r\nSPIR-V Extension:\r\nhttps://htmlpreview.github.io/?https://github.com/KhronosGroup/SPIRV-Registry/blob/main/extensions/NV/SPV_NV_shader_subgroup_partitioned.html\r\n\r\nDepends on #6596\r\nFixes #6600","shortMessageHtmlLink":"[SPIR-V] Implement WaveMutliPrefix* (#6608)"}},{"before":"83ba82e1f3da7f564480bb23deb1abe591eaa01f","after":"d64f5f2699f806215c97d75555046971057ece63","ref":"refs/heads/main","pushedAt":"2024-05-17T13:33:42.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"sudonatalie","name":"Natalie Chouinard","path":"/sudonatalie","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1953083?s=80&v=4"},"commit":{"message":"[SPIR-V] Enable rayquery tests (#6627)\n\nThese tests were previously marked as \"unsupported\" because they were\r\nmisconfigured at the time they were added and never run. Minor changes\r\nhave been made to make them passing tests.\r\n\r\nNote that rayquery_assign.cs.hlsl has been removed because it no longer\r\nproduces an error. A similar non-erroring check exists in\r\nrayquery_init_expr.hlsl\r\n\r\nRelated to #6616","shortMessageHtmlLink":"[SPIR-V] Enable rayquery tests (#6627)"}},{"before":"348040254ed77c00dc4bae16678a38d77187abbb","after":"83ba82e1f3da7f564480bb23deb1abe591eaa01f","ref":"refs/heads/main","pushedAt":"2024-05-17T13:07:59.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"s-perron","name":"Steven Perron","path":"/s-perron","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/31666470?s=80&v=4"},"commit":{"message":"[SPIR-V] Remove bad test (#6632)\n\nThis test is marked as unsupported (ignored), but it currently fails to\r\ncompile both for SPIR-V and DXIL with the same Sema error: \"cannot\r\nimplicitly convert from 'SecondStruct' to 'FirstStruct'\". If it would\r\nhave succeeded for SPIR-V at some point in the past it's no longer valid\r\nanyways, so removing it.\r\n\r\nRelated to #6616","shortMessageHtmlLink":"[SPIR-V] Remove bad test (#6632)"}},{"before":"cf566e1f3fec4fd1e3a7cd0ae6fad4c5864f9603","after":"348040254ed77c00dc4bae16678a38d77187abbb","ref":"refs/heads/main","pushedAt":"2024-05-17T03:22:53.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"amaiorano","name":"Antonio Maiorano","path":"/amaiorano","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6893883?s=80&v=4"},"commit":{"message":"Fix use-after-free in SimplifyCFG (#6628)\n\nWhen SimplifySwitchOnSelect calls SimplifyTerminatorOnSelect, it holds\r\nonto the select's condition value to use for the conditional branch it\r\nreplaces the switch with. When removing the switch's unused\r\npredecessors, it must make sure not to delete PHIs in case one of them\r\nis used by the condition value, otherwise the condition value itself may\r\nget deleted, resulting in an use-after-free.\r\n\r\nNote that this was fixed in LLVM as well:\r\n\r\nhttps://github.com/llvm/llvm-project/commit/dc3b67b4cad5c18a687edfabd50779c3c656c620","shortMessageHtmlLink":"Fix use-after-free in SimplifyCFG (#6628)"}},{"before":"811ef49333f3bd637f34f25ba7404a74e165bdc0","after":"cf566e1f3fec4fd1e3a7cd0ae6fad4c5864f9603","ref":"refs/heads/main","pushedAt":"2024-05-17T01:13:01.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"amaiorano","name":"Antonio Maiorano","path":"/amaiorano","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6893883?s=80&v=4"},"commit":{"message":"Fix dxil-remove-dead-blocks removing switch with multiple same successor (#6610)\n\nGiven a switch with a constant condition and all cases the same\r\n(branching to the same successor), dxil-remove-dead-blocks would\r\nincorrectly remove the switch when replacing it with a branch, by\r\nforgetting to remove the N-1 incoming values to the PHIs in the\r\nsuccessor block.","shortMessageHtmlLink":"Fix dxil-remove-dead-blocks removing switch with multiple same succes…"}},{"before":"fd7e54bcd527daeb0e400c200aab4f66730525e6","after":"811ef49333f3bd637f34f25ba7404a74e165bdc0","ref":"refs/heads/main","pushedAt":"2024-05-17T01:10:35.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"amaiorano","name":"Antonio Maiorano","path":"/amaiorano","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6893883?s=80&v=4"},"commit":{"message":"Fix false positive assert in SuccIterator::operator+= (#6623)\n\nThe implementation of index_is_valid was incorrect returning false when\r\nthe input index was equal to Term->getNumSuccessors(). The end iterator\r\nwill have such an index, and it is valid to construct such an iterator.\r\n\r\nFor example, assume we have a block with two successors:\r\n\r\n```\r\nBasicBlock* bb = ...;\r\nSuccIterator b(bb); // Index 0\r\nSuccIterator e(bb, true); // Index 2, for example\r\n\r\nSuccIterator v = b;\r\nb += 2; // Without this fix, this asserts\r\nassert(b == e);\r\n```\r\n\r\nNote that this was also fixed upstream in\r\nhttps://reviews.llvm.org/D47467\r\n\r\n---------\r\n\r\nCo-authored-by: github-actions[bot] \r\nCo-authored-by: Natalie Chouinard ","shortMessageHtmlLink":"Fix false positive assert in SuccIterator::operator+= (#6623)"}},{"before":"c72d018b791b35581c851977ba5740bb7a3c096d","after":"8af0fbe7ac4b60fa348e6116379d536ee881ee59","ref":"refs/heads/zhengxingli/common-factor-optimization-more-reassocations","pushedAt":"2024-05-16T22:04:19.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"lizhengxing","name":"Zhengxing li","path":"/lizhengxing","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/9673915?s=80&v=4"},"commit":{"message":"More aggressive reassociations\n\nAlthough DXC applied the upstream change, Reassociate: add global reassociation algorithm (llvm/llvm-project@b8a330c) in this PR (https://github.com/microsoft/DirectXShaderCompiler/pull/6598), it still might overlook some obvious common factors.\n\nOne case has been observed is:\n %Float4_0 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %1, i32 1)\n %Float4_0.w = extractvalue %dx.types.CBufRet.f32 %Float4_0, 3\n %Float2_0 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %1, i32 0)\n %Float2_0.y = extractvalue %dx.types.CBufRet.f32 %Float2_0, 1\n\n /* %Float4_1 is redundant with %Float4_0 since they invokes cbufferLoadLegacy with same parameters */\n %Float4_1 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %1, i32 1)\n\n /* %Float4_1.w is redundant with %Float4_0.w */\n %Float4_1.w = extractvalue %dx.types.CBufRet.f32 %Float4_1, 3\n\n /* %Float2_1 is redundant with %Float2_0 since they invokes cbufferLoadLegacy with same parameters */\n %Float2_1 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %1, i32 0)\n\n /* %Float2_1.y is redundant with %Float2_0.y */\n %Float2_1.y = extractvalue %dx.types.CBufRet.f32 %Float2_1, 1\n\n ....\n %11 = fmul fast float %Float4_0.w, %10\n %12 = fmul fast float %11, %Float2_0.y\n ....\n %14 = fmul fast float %Float4_1.w, %13\n %15 = fmul fast float %14, %Float2_1.y\n\n(%Float4_0.w * %Float2_0.y) equals to (%Float4_1.w * %Float2_1.y), they should be reassociated to a common factor\n\nThe upstream change can't identify this common factor because DXC doesn't know (%Float4_0.w, %Float4_1.w) and (%Float2_0.y, %Float2_1.y) are redundant when running Reassociate pass. Those redundancies will be eliminated in GVN pass.\n\nFor DXC can identify more common factors, this PR will aggressively run Reassociate pass again after GVN pass and then run GVN pass again to remove the redundancies generared in this run of Reassociate pass.\n\nChanging the order of floating point operations causes the precision issue. In case some shaders get unexpected results due to this PR, use \"-opt-disable aggressive-reassociation\" to disable this PR and roll back.\n\nThis is part 3 of the fix for #6593.","shortMessageHtmlLink":"More aggressive reassociations"}}],"hasNextPage":true,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"djE6ks8AAAAEU2QOiAA","startCursor":null,"endCursor":null}},"title":"Activity · microsoft/DirectXShaderCompiler"}