util/llpcPipelineShaders.cpp
bool PipelineShaders::runOnModule(
    Module& module)  // [in,out] LLVM module to be run on
{
    LLVM_DEBUG(dbgs() << "Run the pass Pipeline-Shaders\n");

    m_entryPointMap.clear();
    for (auto& pEntryPoint : m_entryPoints)
    {
        pEntryPoint = nullptr;
    }

    for (auto& func : module)
    {
        if ((func.empty() == false) && (func.getLinkage() != GlobalValue::InternalLinkage))
        {
            auto shaderStage = GetShaderStageFromFunction(&func);

            if (shaderStage != ShaderStageInvalid)
            {
                m_entryPoints[shaderStage] = &func;
                m_entryPointMap[&func] = shaderStage;
            }
        }
    }
    return false;
}
// =====================================================================================================================
// Run the pass on the specified LLVM module.
//
// This populates the shader array. In the pipeline module, a shader entrypoint is a non-internal function definition,
// and it has metadata giving the SPIR-V execution model.
Run the pass on the specified LLVM module.
This populates the shader array. In the pipeline module, a shader entrypoint is a non-internal function definition,
and it has metadata giving the SPIR-V execution model.
Run the pass on the specified LLVM module . This populates the shader array . In the pipeline module a shader entrypoint is a non - internal function definition and it has metadata giving the SPIR - V execution model .
bool PipelineShaders::runOnModule(
    Module& module)  
{
    LLVM_DEBUG(dbgs() << "Run the pass Pipeline-Shaders\n");
    m_entryPointMap.clear();
    for (auto& pEntryPoint : m_entryPoints)
    {
        pEntryPoint = nullptr;
    }
    for (auto& func : module)
    {
        if ((func.empty() == false) && (func.getLinkage() != GlobalValue::InternalLinkage))
        {
            auto shaderStage = GetShaderStageFromFunction(&func);
            if (shaderStage != ShaderStageInvalid)
            {
                m_entryPoints[shaderStage] = &func;
                m_entryPointMap[&func] = shaderStage;
            }
        }
    }
    return false;
}
bool PipelineShaders :: runOnModule ( Module & module ) { LLVM_DEBUG ( dbgs ( ) << " \n " ) ; m_entryPointMap . clear ( ) ; for ( auto & pEntryPoint : m_entryPoints ) { pEntryPoint = nullptr ; } for ( auto & func : module ) { if ( ( func . empty ( ) == false ) && ( func . getLinkage ( ) != GlobalValue :: InternalLinkage ) ) { auto shaderStage = GetShaderStageFromFunction ( & func ) ; if ( shaderStage != ShaderStageInvalid ) { m_entryPoints [ shaderStage ] = & func ; m_entryPointMap [ & func ] = shaderStage ; } } } return false ; }
Run the pass on the specified LLVM module.
Run the pass on the specified LLVM module .
// [in,out] LLVM module to be run on