diff options
| author | venkataram-nv <vedavamadath@nvidia.com> | 2024-09-18 20:42:07 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-18 20:42:07 -0700 |
| commit | b808aa4df50d46eaa569561f7e464c55c1c2d72a (patch) | |
| tree | 5483a3f9e73a401ff82d66fd1ac3729a9a84a97c /source/slang/slang-ir-eliminate-phis.cpp | |
| parent | 3240799c00488858afc7eeac9d1dc479609a1040 (diff) | |
Report AD checkpoint contexts (#5058)
* Transferring source locations when creating phi instructions
* Tracking for simple variables
* Deriving source locations for loop counters
* Printing checkpoint structure breakdown
* More readable output format
* Special behavior for loop counters
* Writing report to file
* Add slangc option to enable checkpoint reports
* Display types of checkpointed fields
* Message in case there are no checkpointing contexts
* Catch source locations for function calls
* Source cleanup
* Fix compilation warnings
* Remove stray dump()
* Provide the report through diagnostic notes
* Add missing path for sourceLoc during unzip pass
* Add tests for reporting intermediates
* Include more transfer cases for source locations
* Fix ordering in address elimination
* Fill in more holes with source location transfer
* Remove debugging line
* Reverting changes to diagnostic sink
* Simplify address elimination using source location RAII contexts
* Eliminating manual source loc transfers in forward transcription
* Fix local var adaptation to use RAII location setter
* Simplify primal hoisting logic for source location transfer
* Simplify unzipping with RAII location scopes
* Simplify transpose logic
* Cleaning up for rev.cpp
* Reverting spacing changes
* Fix mistake with source loc RAII instantiation
* Fix formatting issues
Diffstat (limited to 'source/slang/slang-ir-eliminate-phis.cpp')
| -rw-r--r-- | source/slang/slang-ir-eliminate-phis.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/slang/slang-ir-eliminate-phis.cpp b/source/slang/slang-ir-eliminate-phis.cpp index b17fad6ec..0db2fc765 100644 --- a/source/slang/slang-ir-eliminate-phis.cpp +++ b/source/slang/slang-ir-eliminate-phis.cpp @@ -462,6 +462,7 @@ struct PhiEliminationContext // to the temporary that will replace it. // param->transferDecorationsTo(temp); + temp->sourceLoc = param->sourceLoc; } // The other main auxilliary sxtructure is used to track @@ -550,6 +551,7 @@ struct PhiEliminationContext auto user = use->getUser(); m_builder.setInsertBefore(user); auto newVal = m_builder.emitLoad(temp); + newVal->sourceLoc = param->sourceLoc; m_builder.replaceOperand(use, newVal); } @@ -938,6 +940,7 @@ struct PhiEliminationContext newOperands.getCount(), newOperands.getArrayView().getBuffer()); oldBranch->transferDecorationsTo(newBranch); + newBranch->sourceLoc = oldBranch->sourceLoc; // TODO: We could consider just modifying `branch` in-place by clearing // the relevant operands for the phi arguments and setting its operand |
