LLVM 20.0.0git
|
#include "SIShrinkInstructions.h"
#include "AMDGPU.h"
#include "GCNSubtarget.h"
#include "MCTargetDesc/AMDGPUMCTargetDesc.h"
#include "Utils/AMDGPUBaseInfo.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
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) |
#define DEBUG_TYPE "si-shrink-instructions" |
The pass tries to use the 32-bit encoding for instructions when possible.
Definition at line 19 of file SIShrinkInstructions.cpp.
|
static |
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 204 of file SIShrinkInstructions.cpp.
References TII.
STATISTIC | ( | NumInstructionsShrunk | , |
"Number of 64-bit instruction reduced to 32-bit." | |||
) |