LLVM 20.0.0git
|
Statepoint instruction in deopt parameters contains values which are meaningful to the runtime and should be able to be read at the moment the call returns. More...
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/StackMaps.h"
#include "llvm/CodeGen/TargetInstrInfo.h"
#include "llvm/IR/Statepoint.h"
#include "llvm/InitializePasses.h"
#include "llvm/Support/Debug.h"
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "fixup-statepoint-caller-saved" |
Functions | |
STATISTIC (NumSpilledRegisters, "Number of spilled register") | |
STATISTIC (NumSpillSlotsAllocated, "Number of spill slots allocated") | |
STATISTIC (NumSpillSlotsExtended, "Number of spill slots extended") | |
INITIALIZE_PASS_BEGIN (FixupStatepointCallerSaved, DEBUG_TYPE, "Fixup Statepoint Caller Saved", false, false) INITIALIZE_PASS_END(FixupStatepointCallerSaved | |
Fixup Statepoint Caller static false unsigned | getRegisterSize (const TargetRegisterInfo &TRI, Register Reg) |
static Register | performCopyPropagation (Register Reg, MachineBasicBlock::iterator &RI, bool &IsKill, const TargetInstrInfo &TII, const TargetRegisterInfo &TRI) |
Variables | |
static cl::opt< bool > | FixupSCSExtendSlotSize ("fixup-scs-extend-slot-size", cl::Hidden, cl::init(false), cl::desc("Allow spill in spill slot of greater size than register size"), cl::Hidden) |
static cl::opt< bool > | PassGCPtrInCSR ("fixup-allow-gcptr-in-csr", cl::Hidden, cl::init(false), cl::desc("Allow passing GC Pointer arguments in callee saved registers")) |
static cl::opt< bool > | EnableCopyProp ("fixup-scs-enable-copy-propagation", cl::Hidden, cl::init(true), cl::desc("Enable simple copy propagation during register reloading")) |
static cl::opt< unsigned > | MaxStatepointsWithRegs ("fixup-max-csr-statepoints", cl::Hidden, cl::desc("Max number of statepoints allowed to pass GC Ptrs in registers")) |
DEBUG_TYPE | |
Fixup Statepoint Caller | Saved |
Fixup Statepoint Caller | false |
Statepoint instruction in deopt parameters contains values which are meaningful to the runtime and should be able to be read at the moment the call returns.
So we can say that we need to encode the fact that these values are "late read" by runtime. If we could express this notion for register allocator it would produce the right form for us. The need to fixup (i.e this pass) is specifically handling the fact that we cannot describe such a late read for the register allocator. Register allocator may put the value on a register clobbered by the call. This pass forces the spill of such registers and replaces corresponding statepoint operands to added spill slots.
Definition in file FixupStatepointCallerSaved.cpp.
#define DEBUG_TYPE "fixup-statepoint-caller-saved" |
Definition at line 35 of file FixupStatepointCallerSaved.cpp.
|
static |
Definition at line 92 of file FixupStatepointCallerSaved.cpp.
References TRI.
Referenced by performCopyPropagation().
INITIALIZE_PASS_BEGIN | ( | FixupStatepointCallerSaved | , |
DEBUG_TYPE | , | ||
"Fixup Statepoint Caller Saved" | , | ||
false | , | ||
false | |||
) |
|
static |
Definition at line 110 of file FixupStatepointCallerSaved.cpp.
References llvm::dbgs(), EnableCopyProp, getRegisterSize(), llvm::MachineInstrBundleIterator< Ty, IsReverse >::getReverse(), Idx, LLVM_DEBUG, MBB, llvm::printReg(), llvm::MachineBasicBlock::rend(), TII, and TRI.
STATISTIC | ( | NumSpilledRegisters | , |
"Number of spilled register" | |||
) |
STATISTIC | ( | NumSpillSlotsAllocated | , |
"Number of spill slots allocated" | |||
) |
STATISTIC | ( | NumSpillSlotsExtended | , |
"Number of spill slots extended" | |||
) |
DEBUG_TYPE |
Definition at line 88 of file FixupStatepointCallerSaved.cpp.
|
static |
Referenced by performCopyPropagation().
Fixup Statepoint Caller false |
Definition at line 89 of file FixupStatepointCallerSaved.cpp.
|
static |
|
static |
|
static |
Fixup Statepoint Caller Saved |
Definition at line 89 of file FixupStatepointCallerSaved.cpp.
Referenced by llvm::X86::optimizeMOV(), and optimizeToFixedRegisterForm().