https://github.com/shader-slang/slang
Raw File
Tip revision: 5902acdabc4445a65741a7a6a3a95f223e301059 authored by Yong He on 23 January 2024, 07:19:40 UTC
[LSP] Fetch configs directly from didConfigurationChanged message. (#3478)
Tip revision: 5902acd
slang-ir-autodiff-cfg-norm.h
// slang-ir-autodiff-cfg-norm.h
#pragma once

#include "slang-ir-insts.h"

namespace Slang
{
    struct IRModule;

    struct IRCFGNormalizationPass
    { 
        DiagnosticSink* sink;
    };

        /// Eliminate "break" statements from breakable regions
        /// (loops, switch-case). This will use temporary booleans 
        /// instead of a break statement, in order to ensure all
        /// branches inside the breakable region always have a valid
        /// "after" block.
        ///
    void normalizeCFG(
        IRModule*                                        module,
        IRGlobalValueWithCode*                           func,
        IRCFGNormalizationPass const& options = IRCFGNormalizationPass());
    
    IRBlock* getOrCreateTopLevelCondition(IRLoop* loopInst);
}
back to top