aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineFunctionAnalysis.cpp
diff options
context:
space:
mode:
authorJessica Clarke <jrtc27@jrtc27.com>2024-10-30 03:12:23 +0000
committerGitHub <noreply@github.com>2024-10-30 03:12:23 +0000
commitef455e6b16334128c008fc57a4d8ace701934e80 (patch)
tree8be89e46de17ea03934b93e55c99335461961d48 /llvm/lib/CodeGen/MachineFunctionAnalysis.cpp
parent3c02fea737d774bbf174c6b763593ad3e7f56221 (diff)
downloadllvm-ef455e6b16334128c008fc57a4d8ace701934e80.zip
llvm-ef455e6b16334128c008fc57a4d8ace701934e80.tar.gz
llvm-ef455e6b16334128c008fc57a4d8ace701934e80.tar.bz2
[TableGen] Replace all lingering uses of getName with getEnumName
The former is a wrapper for the latter with two differences: Other is mapped to "UNKNOWN" (rather than "MVT::Other"), and iPTR(Any) are mapped to "TLI.getPointerTy()" rather than "MVT::iPTR(Any)". The only uses are in FastISelMap::printFunctionDefinitions. Most of these uses are just a form of name mangling to ensure uniqueness, so the actual string isn't important (and, in the case of MVT::iPTR(Any), were both to be used, they would clash). Two uses are for a case statement, which requires the expression to be a constant (of the right type), but neither UNKNOWN nor TLI.getPointerTy() are constants, so would not work there. The remaining uses are where an expression is needed, so UNKNOWN similarly doesn't work, though TLI.getPointerTy() could in this case. However, neither iPTR nor iPTRAny are supposed to make it this far through TableGen, and should instead have been replaced with concrete types, so this case should not be hit. Moreover, for almost all of these uses, the name is passed to getLegalCName, which will strip an MVT:: prefix but will leave TLI.getPointerTy() unchanged, which is not a valid C identifier, nor component thereof. Thus, delete this unnecessary, and mostly-broken, wrapper and just use the underlying getEnumName. This has been verified to have no effect on the generated files for any in-tree target, including experimental ones. Reviewers: arsenm Reviewed By: arsenm Pull Request: https://github.com/llvm/llvm-project/pull/113731
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunctionAnalysis.cpp')
0 files changed, 0 insertions, 0 deletions