diff --git a/src/backends/llvm/llvm_charset.c b/src/backends/llvm/llvm_charset.c index 87dea54d12cd3bfdf133739777ea3c3e4341878a..16b0550d422ee61413f79f6efc6556c252491058 100644 --- a/src/backends/llvm/llvm_charset.c +++ b/src/backends/llvm/llvm_charset.c @@ -1001,6 +1001,18 @@ bool h_llvm_make_charset_membership_test(HAllocator* mm__, } #endif /* defined(HAMMER_LLVM_CHARSET_DEBUG) */ + /* + * XXX Note on memoization: + * + * How common is it for this to occur multiple times in a parser with the + * same charset? If so, we will end up emitting code which differs only in + * its yes and no output basic blocks each time. Does LLVM IR have an + * equivalent of MIPS jr? Is there a significant performance penalty vs. + * LLVMBuildBr()? If yes and no respectively, we should consider memoizing + * by charset using it and building a wrapper around it that just varies + * the output blocks to reduce emitted code size. + */ + /* Create input block */ LLVMBasicBlockRef start = LLVMAppendBasicBlock(func, "cs_start"); /*