https://github.com/shader-slang/slang
Raw File
Tip revision: 2e35b08d279b4eb37a359941a06970cdea973502 authored by Yong He on 12 February 2024, 22:23:53 UTC
Fix #3566. (#3574)
Tip revision: 2e35b08
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