The recent D154183 and D154195 have introduced a simpler way to specify instruction mnemonics: by leveraging TableGen's `NAME` and string processing features, the mnemonics can be automatically derived from the respective TableGen record names. LoongArch instructions don't have "strange" characters in their names, so this approach can be applied to all the other instructions. A `deriveInsnMnemonic` helper class, modeled after the LSX/LASX mnemonic derivation logic, has been added, and all non-pseudo instruction formats are converted to use it, losing their `opstr/opcstr` arguments in the process. There are minor differences that are worth mentioning though: * The atomic instructions with implicit data barriers have an underscore (`_`) in their mnemonics, that will get converted to a period (`.`) if not specially handled. Double-underscore (`__`) in record names are converted to a single underscore in the resulting mnemonic; the definitions are tweaked accordingly. * Various duplicated FP instructions need special handling, mainly because of the need to handle both FPR32 and FPR64 classes for a single hardware instruction. The substrings `_xS`, `_xD` and `_64` are additionally dropped before deriving FP instructions' mnemonics. All of these are pure refactoring, no functional change. Reviewed By: SixWeining Differential Revision: https://reviews.llvm.org/D154916
The LLVM Compiler Infrastructure
Welcome to the LLVM project!
This repository contains the source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.
The LLVM project has multiple components. The core of the project is itself called "LLVM". This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer.
C-like languages use the Clang frontend. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.
Other components include: the libc++ C++ standard library, the LLD linker, and more.
Getting the Source Code and Building LLVM
Consult the Getting Started with LLVM page for information on building and running LLVM.
For information on how to contribute to the LLVM project, please take a look at the Contributing to LLVM guide.
Getting in touch
Join the LLVM Discourse forums, Discord chat, or #llvm IRC channel on OFTC.
The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.