From 4cb3eeb832b5fb29a61f2934b3daa5e42a3d6cde Mon Sep 17 00:00:00 2001 From: Yong He Date: Tue, 18 Jul 2023 08:08:11 -0700 Subject: 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 --- source/slang/slang-stdlib.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/slang/slang-stdlib.cpp') diff --git a/source/slang/slang-stdlib.cpp b/source/slang/slang-stdlib.cpp index 3ef510990..f3f8f325e 100644 --- a/source/slang/slang-stdlib.cpp +++ b/source/slang/slang-stdlib.cpp @@ -135,6 +135,10 @@ namespace Slang else return kConversionCost_GeneralConversion; } + else if (fromInfo.tag == BaseType::Bool && toInfo.tag == BaseType::Int) + { + return kConversionCost_BoolToInt; + } // If we are converting from an unsigned integer type to // a signed integer type that is guaranteed to be larger, -- cgit v1.2.3