https://github.com/shader-slang/slang
Raw File
Tip revision: 641f7bdc4ea4f75385c30d833cce4619a411ec67 authored by Sai Praveen Bangaru on 03 September 2023, 19:57:15 UTC
Loop inversion: Handle case where loop can have additional inner breaks (#3178)
Tip revision: 641f7bd
slang-ir-single-return.h
// slang-ir-single-return.h
#pragma once

namespace Slang
{
    struct IRModule;
    struct IRGlobalValueWithCode;

    // Convert the CFG of `func` to have only a single `return` at the end.
    void convertFuncToSingleReturnForm(IRModule* module, IRGlobalValueWithCode* func);

    bool isSingleReturnFunc(IRGlobalValueWithCode* func);

    int getReturnCount(IRGlobalValueWithCode* func);
}
back to top