https://github.com/shader-slang/slang
Raw File
Tip revision: 61fc9fe0a2c2096ee56703fc21852c63334c979a authored by Yong He on 03 April 2024, 18:46:52 UTC
Merge branch 'master' into csyonghe-patch-8
Tip revision: 61fc9fe
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