[all-commits] [llvm/llvm-project] 3cf7ef: [TableGen] Allow mnemonics with uppercase letters ...
Nicolas Guillemot via All-commits
all-commits at lists.llvm.org
Fri Aug 14 14:48:20 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 3cf7efec986da0e2e8812f83eb7507512475687d
https://github.com/llvm/llvm-project/commit/3cf7efec986da0e2e8812f83eb7507512475687d
Author: Nicolas Guillemot <nguillemot at apple.com>
Date: 2020-08-14 (Fri, 14 Aug 2020)
Changed paths:
A llvm/test/TableGen/MixedCasedMnemonic.td
M llvm/utils/TableGen/AsmMatcherEmitter.cpp
Log Message:
-----------
[TableGen] Allow mnemonics with uppercase letters to be matched
The assembly parser "canonicalizes" the mnemonics it processes at an
early level by making them lowercase. The goal of this is presumably to
allow assembly to be case-insensitive. However, if one declares an
instruction with a mnemonic using uppercase letters, then it will
never get matched, since the generated lookup tables for the
AsmMatcherEmitter didn't lower() their inputs. This made it difficult to
have instructions that get printed using a mnemonic that includes
uppercase letters, since they could not be parsed.
To fix this problem, this patch adds a few calls to lower() to make the
lookup tables used in AsmMatcherEmitter be case-insensitive. This allows
instruction mnemonics with uppercase letters to be parsed.
Differential Revision: https://reviews.llvm.org/D85858
More information about the All-commits
mailing list