commit | b9f1de04f65b062559d01c83dfd3948601924ee1 | [log] [tgz] |
---|---|---|
author | Craig Topper <craig.topper@sifive.com> | Wed Apr 16 15:47:16 2025 -0700 |
committer | GitHub <noreply@github.com> | Wed Apr 16 15:47:16 2025 -0700 |
tree | d1b94e210c7ee752b783b74cc949a6a450efad18 | |
parent | d35bf17e8a0cf37959149257c0eda7b9f912390e [diff] |
[TableGen] Combine the two separate OperandMapping loops in PseudoLoweringEmitter. (#136007) Previously we had one loop over the DAG for immediates and registers and another loop over the destination operands for mapping from the source. Now we have a single loop over the destination operands that handles immediates, registers, and named operands. A helper method is added so we can handle operands and sub-operands specified by a sub-dag. My goal is to allow a named operand to appear in a sub-dag which wasn't supported before. This will allow the destination instruction to have an operand with sub-operands when the source does not have sub operands. For RISC-V, I'm looking into using an operand with sub-operands to represent an reg+offset memory address. I need to be able to lower a pseudo instruction that only has a register operand to an instruction that has a reg+offset operand. The offset will be filled in with 0 during expansion and the register will be copied from the source. The expansion would look like this: def PseudoCALLIndirect : Pseudo<(outs), (ins GPRJALR:$rs1), [(riscv_call GPRJALR:$rs1)]>, PseudoInstExpansion<(JALR X1, (ops GPR:$rs1, 0))>;
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.
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.
Join the LLVM Discourse forums, Discord chat, LLVM Office Hours or Regular sync-ups.
The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.