https://github.com/shader-slang/slang
Raw File
Tip revision: 47d0e8abe4f2fe3c2eede35079676210d1db0b1a authored by Yong He on 29 June 2023, 21:23:35 UTC
Small fixes to GLSL-legalize and func-property prop. (#2950)
Tip revision: 47d0e8a
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