summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-ir-lower-defer.h
blob: c00104745746bd6672168c3422b587d0df202c47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// slang-ir-lower-defer.h
#pragma once

#include "slang-ir.h"

namespace Slang
{
struct IRModule;
class DiagnosticSink;

/// Lower the `defer` statements.
///
/// Duplicates the child instructions of each `defer` to the end of each
/// dominated block whose terminator jumps to a location that is not dominated
/// by the `defer`. Also removes all `IRDefer` instructions after that.
void lowerDefer(IRModule* module, DiagnosticSink* sink);

} // namespace Slang