LLVM: lib/Target/AMDGPU/SIShrinkInstructions.cpp File Reference (original) (raw)
Go to the source code of this file.
| Macros | |
|---|---|
| #define | DEBUG_TYPE "si-shrink-instructions" |
| The pass tries to use the 32-bit encoding for instructions when possible. |
| Functions | |
|---|---|
| STATISTIC (NumInstructionsShrunk, "Number of 64-bit instruction reduced to 32-bit.") | |
| STATISTIC (NumLiteralConstantsFolded, "Number of literal constants folded into 32-bit instructions.") | |
| static unsigned | canModifyToInlineImmOp32 (const SIInstrInfo *TII, const MachineOperand &Src, int32_t &ModifiedImm, bool Scalar) |
◆ DEBUG_TYPE
#define DEBUG_TYPE "si-shrink-instructions"
◆ canModifyToInlineImmOp32()
Returns
the opcode of an instruction a move immediate of the constant Src can be replaced with if the constant is replaced with ModifiedImm. i.e.
If the bitreverse of a constant is an inline immediate, reverse the immediate and return the bitreverse opcode.
If the bitwise negation of a constant is an inline immediate, reverse the immediate and return the bitwise not opcode.
Definition at line 205 of file SIShrinkInstructions.cpp.
References llvm::reverseBits(), and TII.
◆ STATISTIC() [1/2]
| STATISTIC | ( | NumInstructionsShrunk | , |
|---|---|---|---|
| "Number of 64-bit instruction reduced to 32-bit." | ) |
◆ STATISTIC() [2/2]
| STATISTIC | ( | NumLiteralConstantsFolded | , |
|---|---|---|---|
| "Number of literal constants folded into 32-bit instructions." | ) |