From 93817770ab31e50d0f9b79ffacc02041047327bf Mon Sep 17 00:00:00 2001 From: Egor Bogatov Date: Sat, 9 Oct 2021 23:07:35 +0300 Subject: [PATCH] Add ISMETHOD and ISMETHODHASH macros (#59993) Co-authored-by: Andy Ayers --- src/coreclr/jit/gentree.h | 10 ++++------ src/coreclr/jit/jit.h | 3 +++ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/coreclr/jit/gentree.h b/src/coreclr/jit/gentree.h index 52844499e134b..7fc867aef130a 100644 --- a/src/coreclr/jit/gentree.h +++ b/src/coreclr/jit/gentree.h @@ -4774,12 +4774,10 @@ struct GenTreeCall final : public GenTree void ResetArgInfo(); - GenTreeCallFlags gtCallMoreFlags; // in addition to gtFlags - - unsigned char gtCallType : 3; // value from the gtCallTypes enumeration - unsigned char gtReturnType : 5; // exact return type - - CORINFO_CLASS_HANDLE gtRetClsHnd; // The return type handle of the call if it is a struct; always available + GenTreeCallFlags gtCallMoreFlags; // in addition to gtFlags + gtCallTypes gtCallType : 3; // value from the gtCallTypes enumeration + var_types gtReturnType : 5; // exact return type + CORINFO_CLASS_HANDLE gtRetClsHnd; // The return type handle of the call if it is a struct; always available union { // only used for CALLI unmanaged calls (CT_INDIRECT) diff --git a/src/coreclr/jit/jit.h b/src/coreclr/jit/jit.h index e212226851c7c..218871e154fc5 100644 --- a/src/coreclr/jit/jit.h +++ b/src/coreclr/jit/jit.h @@ -529,6 +529,9 @@ const bool dspGCtbls = true; if (JitTls::GetCompiler()->verbose) \ JitTls::GetCompiler()->fgTableDispBasicBlock(b); #define VERBOSE JitTls::GetCompiler()->verbose +// Development-time only macros, simplify guards for specified IL methods one wants to debug/add log messages for +#define ISMETHOD(name) (strcmp(JitTls::GetCompiler()->impInlineRoot()->info.compMethodName, name) == 0) +#define ISMETHODHASH(hash) (JitTls::GetCompiler()->impInlineRoot()->info.compMethodHash() == hash) #else // !DEBUG #define JITDUMP(...) #define JITDUMPEXEC(x)