summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-ir-loop-inversion.cpp
Commit message (Collapse)AuthorAge
* formatEllie Hermaszewska2024-10-29
| | | | | | | * format * Minor test fixes * enable checking cpp format in ci
* Variadic Generics Part 2: IR lowering and specialization. (#4849)Yong He2024-08-18
| | | | | | | | | * Variadic Generics Part 2: IR lowering and specialization. * Update design doc status. * Update design doc. * Resolve review comments.
* Correctly pass values from the conditional block to the loop during ↵Ellie Hermaszewska2023-11-06
| | | | | inversion (#3311) Co-authored-by: Yong He <yonghe@outlook.com>
* Fix loop inversion issue that caused ordinary blocks with multiple ↵Sai Praveen Bangaru2023-09-18
| | | | | | | | | | | | | predecessors (#3211) * Add test case for while loop * Fix loop inversion issue that caused ordinary blocks with multiple predecessors The original version can leave the CFG in an invalid state with `e4` not being a break block or merge point, but having multiple predecessors. The updated version creates a separate jump block for each break instruction to avoid this issue. * Fixup tests
* Loop inversion: Handle case where loop can have additional inner breaks (#3178)Sai Praveen Bangaru2023-09-03
| | | | | | | | | | | | | | | * Loop inversion: Handle case where loop can have additional inner breaks - We now have another critical-edge-breaking block `e4` that is the target of inner breaks. - Both `e4` and `e1` (the break branch from the loop condition) branch to the loop's ne break block `b2`. - `b2` is a clone of the old break block `b`, and it simply branches to the old break block. This fixes an IR validation issue in `tests/autodiff/reverse-while-loop-2.slang` * Delete region-wave-masks.slang --------- Co-authored-by: Yong He <yonghe@outlook.com>
* Be more careful about merge blocks during loop inversion (#3136)Ellie Hermaszewska2023-08-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | * fix block eater * Be more careful about merge blocks during loop inversion * Restrict loop inversion to loops without continue jumps * Remove multiple back-edges from loops for SPIR-V * Wiggle cross compile test output * Make loop-inversion more conservative * Allow loops on false side in cfg normalization * Do not set loop continue block during inversion * Add loop inversion test to failing test list for spirv * Simplify single use continue blocks in spirv legalization * wobble expected failure list --------- Co-authored-by: Yong He <yonghe@outlook.com>
* Add loop inversion pass (#2899)Ellie Hermaszewska2023-08-17
* Generalize collectInductionValues * Support affine transformations of loop index as induction variables * Test for generalized induction value collection * Neaten inductive variable finding * Make types more specific * Add loop inversion pass * Test output changes after loop inversion * Store the type of implication success when finding inductive variables * Test that loop induction finding does not alway succeed * Support chains of additions and branches of additions in induction variable finding * Use c++17 for downstream compilers * Wiggle expected output for cross compile test after loop inversion * Add loop inversion test * Simplify IfElse instructions with a single trivial block * Invert loops with a user inserted break * Limit loop inversion to loops with a 4 instruction or less comparison block * regenerate vs projects