https://github.com/shader-slang/slang
Raw File
Tip revision: 352a460fc866998da5f45a8c117d891c51ab5a47 authored by Yong He on 13 April 2023, 16:04:18 UTC
Fix stack overflow in lookupWitness lowering pass. (#2798)
Tip revision: 352a460
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