LLVM/project f333841llvm/lib/Target/RISCV RISCVRegisterInfo.td

[RISCV] Add nf argument to VReg class instead overriding with a let. NFC (#131235)

This treats nf consistently with LMul.
DeltaFile
+11-12llvm/lib/Target/RISCV/RISCVRegisterInfo.td
+11-121 files

LLVM/project 2ee7ba4llvm/lib/Target/RISCV RISCVRegisterInfo.td

[RISCV] Move Size and CopyCost overrides for vector register to the VReg class. NFC (#131222)

Instead using the IsVRegClass to calculate in the base class, just
override directly.

This will scale better if we need to do different types of overrides for
other register types in the future.
DeltaFile
+3-3llvm/lib/Target/RISCV/RISCVRegisterInfo.td
+3-31 files

LLVM/project b936ef1llvm/lib/Target/RISCV RISCVInstrInfo.td RISCVInstrInfoC.td

[RISCV] Reorder include of RISCVInstrInfoZi* before C and Zc*. NFC (#131274)

Zclsd needs to reference Zilsd in CompressPats so put Zi before Zc.

The one issue I encountered is that RISCVInstrFormatsC.td needs to be
included before RISCVInstrInfoZicfiss. To fix this I moved the include
of RISCVInstrFormatsC.td from RISCVInstrInfoC.td to RISCVInstrInfo.td
where we include RISCVInstrFormats.td. I moved RISCVInstrFormatsV.td for
consistency.
DeltaFile
+7-5llvm/lib/Target/RISCV/RISCVInstrInfo.td
+0-2llvm/lib/Target/RISCV/RISCVInstrInfoC.td
+0-2llvm/lib/Target/RISCV/RISCVInstrInfoV.td
+7-93 files

LLVM/project 6b7daf2llvm/include/llvm/CodeGen TargetInstrInfo.h, llvm/lib/CodeGen MachineCombiner.cpp TargetInstrInfo.cpp

[MachineCombiner][Targets] Use Register in TII genAlternativeCodeSequence interface. NFC (#131272)

DeltaFile
+10-11llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
+7-7llvm/lib/CodeGen/MachineCombiner.cpp
+2-2llvm/lib/CodeGen/TargetInstrInfo.cpp
+2-2llvm/include/llvm/CodeGen/TargetInstrInfo.h
+2-2llvm/lib/Target/PowerPC/PPCInstrInfo.h
+2-2llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
+25-265 files not shown
+32-3311 files

LLVM/project 2a48995llvm/lib/Target/ARM ARMLoadStoreOptimizer.cpp

[ARM] Pass ArrayRef by value instead of const reference. NFC
DeltaFile
+1-1llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
+1-11 files

LLVM/project a6463f4llvm/lib/Target/RISCV RISCVRegisterInfo.h RISCVRegisterInfo.td

[RISCV] Shrink the size of the VLMul field in RegisterClass target flags. Use uint8_t for TSFlags. NFC (#131227)

There are only 4 possible LMULs corresponding to log2 of 1, 2, 4, and 8.
Those fit in 2 bits.

Use uint8_t for the flag bits to match the size in TargetRegisterClass.
DeltaFile
+6-6llvm/lib/Target/RISCV/RISCVRegisterInfo.h
+2-2llvm/lib/Target/RISCV/RISCVRegisterInfo.td
+8-82 files

LLVM/project 55e5e74llvm/lib/Target/RISCV RISCVInstrInfoVPseudos.td

[RISCV] Remove some unnecessary hasSideEffects = 0 and sink some to their base class. NFC (#131044)

Some of these were already present in their base class and therefore
redundant. Others were missing from their base classes. Maybe leftover
from when VXRM was modeled with side effects?
DeltaFile
+11-23llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
+11-231 files

LLVM/project 62e37a8llvm/lib/Target/RISCV/Disassembler RISCVDisassembler.cpp

[RISCV][Disassembler] Use a table to store all the decoder tables and their associated features. NFC (#130883)

Replace the macros with a table that we can iterate over. Use a
different table for each possible instruction bitwidth.
DeltaFile
+97-67llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp
+97-671 files

LLVM/project 90a8322llvm/lib/TargetParser RISCVISAInfo.cpp, llvm/unittests/TargetParser RISCVISAInfoTest.cpp

[RISCV] Add an error that Xqccmp, Xqciac, and Xqcicm are not compatible with C+D or Zcd. (#130816)

I was reviewing encodings to put the disassembling of vendor
instructions after after standard instructions and found that these
overlap with c.fldsp and c.fsdsp.
DeltaFile
+11-8llvm/lib/TargetParser/RISCVISAInfo.cpp
+8-0llvm/unittests/TargetParser/RISCVISAInfoTest.cpp
+19-82 files

LLVM/project d71b3dellvm/lib/Target/X86/GISel X86InstructionSelector.cpp X86CallLowering.cpp

[X86][GISel] Use Register and MCRegister. NFC (#130907)

DeltaFile
+12-12llvm/lib/Target/X86/GISel/X86InstructionSelector.cpp
+4-4llvm/lib/Target/X86/GISel/X86CallLowering.cpp
+16-162 files

LLVM/project 7a25c72llvm/lib/Target/X86 X86SpeculativeLoadHardening.cpp

[X86] Use Register in X86SpeculativeLoadHardening.cpp. NFC (#130905)

DeltaFile
+35-35llvm/lib/Target/X86/X86SpeculativeLoadHardening.cpp
+35-351 files

LLVM/project d898761llvm/lib/Target/RISCV RISCVFeatures.td, llvm/test/CodeGen/RISCV attributes.ll

[RISCV] FeatureVendorXwchc should imply FeatureStdExtZca. (#130817)

If we don't do this the binary emission won't set the compressed flag in
the ELF header and won't emit alignment NOPs for R_RISCV_ALIGN correctly
to support the existence of 2 byte instructions in the stream.
DeltaFile
+2-1llvm/lib/Target/RISCV/RISCVFeatures.td
+1-1llvm/test/CodeGen/RISCV/attributes.ll
+3-22 files

LLVM/project da70881llvm/lib/Target/RISCV RISCVInstrInfoXCV.td

[RISCV] Move DecoderNamespace in RISCVInstrInfoXCV.td to the Instruction defs. NFC (#130800)

This puts them in the same place as the Predicates. I'd like to have a
single DecoderNamespace scope for all the instruction defs, but we need
to reorder the classes and InstAliases away from the defs to do that.
DeltaFile
+14-29llvm/lib/Target/RISCV/RISCVInstrInfoXCV.td
+14-291 files

LLVM/project 2bf7018llvm/lib/Target/RISCV RISCVInstrInfo.td

[RISCV] Move let statement for hasSideEffects, mayLoad, mayStore into BranchCC_rri. NFC (#130721)

This is consistent with the isBranch and isTerminator flags already in
the class.

Addresses feedback given on #130714 where I copied the inconsistent
split into RISCVInstrInfoXCV.td.
DeltaFile
+3-1llvm/lib/Target/RISCV/RISCVInstrInfo.td
+3-11 files

LLVM/project 3464766llvm/lib/Target/RISCV RISCVInstrInfoXCV.td

[RISCV] Sink hasSideEffects, mayLoad, mayStore from defs to classes in RISCVInstrInfoXCV.td. NFC (#130714)

This is consistent with how RISCVInstrInfo.td is generally structured.
DeltaFile
+38-30llvm/lib/Target/RISCV/RISCVInstrInfoXCV.td
+38-301 files

LLVM/project 146ef7allvm/utils/TableGen/Common CodeGenDAGPatterns.cpp

[TableGen] Remove unnecessary const_cast and use range-based for loops. NFC (#130717)

In order to use a range-based loop, I reduced a needed const_cast to
only the one line that needed it.
DeltaFile
+3-7llvm/utils/TableGen/Common/CodeGenDAGPatterns.cpp
+3-71 files

LLVM/project 1e83d97llvm/lib/Target/RISCV RISCVInstrInfoXCV.td

[RISCV] Use inheritance to reduce duplicated code in RISCVInstrInfoXCV.td. NFC (#130703)

CVSIMDRU and CVSIMDRI were the same except for immediate type. Make it a
default argument of CVSIMDRI so that CVSIMDRU can inherit from it and
override the argument.

Similar for CVSIMDRUWb.
DeltaFile
+11-17llvm/lib/Target/RISCV/RISCVInstrInfoXCV.td
+11-171 files

LLVM/project fd21d35llvm/utils/TableGen DecoderEmitter.cpp

[TableGen] Reduce the number of vectors passed to getIslands. NFC (#130402)

Combine the StartBits, EndBits, and FieldVals vectors into a single
vector of a struct that contains all 3 pieces of information.

Instead of storing EndBits, we store NumBits since that's what the users
want.

I've removed the BitNo variable as it was easy to construct calculate
from StartBit. I've also removed Num in favor of Islands.size().
DeltaFile
+26-42llvm/utils/TableGen/DecoderEmitter.cpp
+26-421 files

LLVM/project 256bde4llvm/lib/Target/X86 X86InstrBuilder.h

[X86] Use Register in X86InstrBuilder.h. NFC (#130514)

I had to give the X86AddressMode Base union a name and a constructor so
it would default to Register. This means the Base.Reg = 0 in the
X86AddressMode constructor is no longer needed.
DeltaFile
+17-24llvm/lib/Target/X86/X86InstrBuilder.h
+17-241 files

LLVM/project a5a33d8llvm/lib/Target/RISCV RISCVInstrInfoXCV.td

[RISCV] Move let Constraints closer to where outs/ins are declared in RISCVInstrInfoXCV.td. NFC

The Constraint refers to the ins/outs register names so should be
as close as they can be.
DeltaFile
+9-6llvm/lib/Target/RISCV/RISCVInstrInfoXCV.td
+9-61 files

LLVM/project 4a76c20llvm/lib/Target/RISCV RISCVInstrInfoXCV.td

[RISCV] Reduce arguments for CVStore_rr_inc and CVStore_rr clases in RISCVInstrInfoXCV.td. NFC

The ins, outs, and argstr for all instantiations of the classes
are the same so just make them part of the class.
DeltaFile
+19-37llvm/lib/Target/RISCV/RISCVInstrInfoXCV.td
+19-371 files

LLVM/project 9b066f0llvm/lib/Target/RISCV RISCVInstrInfoXCV.td, llvm/lib/Target/RISCV/Disassembler RISCVDisassembler.cpp

[RISCV] Merge DecoderNamespace for CORE-V extensions. NFC

Similar to Qualcomm, Sifive, T-Head, and Rivos extensions.
DeltaFile
+16-16llvm/lib/Target/RISCV/RISCVInstrInfoXCV.td
+8-14llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp
+24-302 files

LLVM/project 68e3c02llvm/lib/Target/RISCV RISCVInstrInfoXCV.td

[RISCV] Move CV_INSERTR into the XCVbitmanip DecoderNamespace instead of the default.

This uses RVInstR, while other XCVbitmanip instructions use classes
that set the DecoderNamespace.
DeltaFile
+1-0llvm/lib/Target/RISCV/RISCVInstrInfoXCV.td
+1-01 files

LLVM/project d72f620llvm/lib/Target/RISCV RISCVInstrInfoXTHead.td, llvm/lib/Target/RISCV/Disassembler RISCVDisassembler.cpp

[RISCV] Merge DecoderNamespace for T-Head extensions. NFC (#130555)

Consistent with what has been done for Rivos, SiFive, and Qualcomm
extensions.
DeltaFile
+17-24llvm/lib/Target/RISCV/RISCVInstrInfoXTHead.td
+10-22llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp
+27-462 files

LLVM/project 58fc4b1llvm/lib/Target/RISCV RISCVInstrInfoXTHead.td

[RISCV] Remove Predicates from classes in RISCVInstrInfoXTHead.td. NFC

All of instantiations of these classes also specify Predicates
making the base class redundant or unnecessary. The Predicates on the
instantiations aren't always the same as the base class so those
are needed.

Also move the DecoderNamespace to the instantiations for consistency
with the Predicates.
DeltaFile
+19-19llvm/lib/Target/RISCV/RISCVInstrInfoXTHead.td
+19-191 files

LLVM/project 74ca579llvm/lib/Target/X86 X86FastISel.cpp

[X86] Use Register in FastISel. NFC

Replace 'Reg == 0' with '!Reg'
DeltaFile
+92-87llvm/lib/Target/X86/X86FastISel.cpp
+92-871 files

LLVM/project bd64f31llvm/lib/Target/ARM ARMFastISel.cpp

Recommit "[ARM] Change FastISel Address from a struct to a class. NFC"

With clang-format this time.

Original message:
This allows us to use Register in the interface, but store an
unsigned internally in a union.
DeltaFile
+92-56llvm/lib/Target/ARM/ARMFastISel.cpp
+92-561 files

LLVM/project bc02802llvm/lib/Target/ARM ARMFastISel.cpp

Revert "[ARM] Change FastISel Address from a struct to a class. NFC"

This reverts commit d47bc6fd93f9f439a54fd7cf55cdcb2e2ca0cfcb.

I forgot to commit clang-format cleanup before I pushed this.
DeltaFile
+41-73llvm/lib/Target/ARM/ARMFastISel.cpp
+41-731 files

LLVM/project d47bc6fllvm/lib/Target/ARM ARMFastISel.cpp

[ARM] Change FastISel Address from a struct to a class. NFC

This allows us to use Register in the interface, but store an
unsigned internally in a union.
DeltaFile
+73-41llvm/lib/Target/ARM/ARMFastISel.cpp
+73-411 files

LLVM/project 0f646fcllvm/lib/Target/AArch64 AArch64ISelLowering.cpp

[AArch64] Remove unused DenseMap variable. NFC
DeltaFile
+0-1llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+0-11 files