summaryrefslogtreecommitdiff
path: root/source/slang/slang-lower-to-ir.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2023-07-18 08:08:11 -0700
committerGitHub <noreply@github.com>2023-07-18 15:08:11 +0000
commit4cb3eeb832b5fb29a61f2934b3daa5e42a3d6cde (patch)
tree89713b5d83b4fee0dad6aa52b72d5ca695f4e8f1 /source/slang/slang-lower-to-ir.cpp
parent138a44ef272841cb555fa0eb5c49cc889bf1d64a (diff)
Simplify Lookup and improve compiler performance. (#2996)
* Simplify lookup. * Various bug fixes. * Report type dictionary size in perf benchmark. * Remove type duplication. * increase initial dict size. * Bug fix. * Fix bugs. * Fixup. * Revert type legalization looping. * Fix specialization pass. --------- Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-lower-to-ir.cpp')
-rw-r--r--source/slang/slang-lower-to-ir.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/slang/slang-lower-to-ir.cpp b/source/slang/slang-lower-to-ir.cpp
index 4ff14fba7..0dcea9a14 100644
--- a/source/slang/slang-lower-to-ir.cpp
+++ b/source/slang/slang-lower-to-ir.cpp
@@ -2034,7 +2034,7 @@ struct ValLoweringVisitor : ValVisitor<ValLoweringVisitor, LoweredValInfo, Lower
void _collectSubstitutionArgs(List<IRInst*>& operands, Substitutions* subst)
{
if (!subst) return;
- _collectSubstitutionArgs(operands, subst->outer);
+ _collectSubstitutionArgs(operands, subst->getOuter());
if (auto genSubst = as<GenericSubstitution>(subst))
{
for (auto arg : genSubst->getArgs())
@@ -3931,11 +3931,11 @@ struct ExprLoweringVisitorBase : ExprVisitor<Derived, LoweredValInfo>
void _lowerSubstitutionEnv(IRGenContext* subContext, Substitutions* subst)
{
if(!subst) return;
- _lowerSubstitutionEnv(subContext, subst->outer);
+ _lowerSubstitutionEnv(subContext, subst->getOuter());
if (auto genSubst = as<GenericSubstitution>(subst))
{
- auto genDecl = genSubst->genericDecl;
+ auto genDecl = genSubst->getGenericDecl();
Index argCounter = 0;
for( auto memberDecl: genDecl->members )
@@ -9415,7 +9415,7 @@ LoweredValInfo emitDeclRef(
if(!canDeclLowerToAGeneric(decl))
{
while(auto genericSubst = as<GenericSubstitution>(subst))
- subst = genericSubst->outer;
+ subst = genericSubst->getOuter();
}
// In the simplest case, there is no specialization going
@@ -9444,7 +9444,7 @@ LoweredValInfo emitDeclRef(
LoweredValInfo genericVal = emitDeclRef(
context,
decl,
- genericSubst->outer,
+ genericSubst->getOuter(),
context->irBuilder->getGenericKind());
// There's no reason to specialize something that maps to a NULL pointer.
@@ -9542,7 +9542,7 @@ LoweredValInfo emitDeclRef(
// are lowered as generics, where the generic parameter represents
// the `ThisType`.
//
- auto genericVal = emitDeclRef(context, decl, thisTypeSubst->outer, context->irBuilder->getGenericKind());
+ auto genericVal = emitDeclRef(context, decl, thisTypeSubst->getOuter(), context->irBuilder->getGenericKind());
auto irGenericVal = getSimpleVal(context, genericVal);
// In order to reference the member for a particular type, we