https://github.com/shader-slang/slang
Raw File
Tip revision: f7431f96e1cad2a68534bebc1f25cd6f65f87f82 authored by Yong He on 16 March 2023, 06:26:14 UTC
Fix `transcribeConstruct` for `makeStruct`. (#2703)
Tip revision: f7431f9
slang-ir-address-analysis.h
// slang-ir-address-analysis.h
#pragma once

#include "slang-ir.h"
#include "slang-ir-dominators.h"

namespace Slang
{
    struct AddressInfo : public RefObject
    {
        IRInst* addrInst = nullptr;
        AddressInfo* parentAddress = nullptr;
        bool isConstant = false;
        List<AddressInfo*> children;
    };

    struct AddressAccessInfo
    {
        OrderedDictionary<IRInst*, RefPtr<AddressInfo>> addressInfos;
    };

    // Gather info on all addresses used by `func`.
    AddressAccessInfo analyzeAddressUse(IRDominatorTree* domTree, IRGlobalValueWithCode* func);
}
back to top