LLVM 20.0.0git
|
The FAKE_USE instruction is used to preserve certain values through optimizations for the sake of debugging. More...
#include "llvm/ADT/PostOrderIterator.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/CodeGen/LiveRegUnits.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/TargetSubtargetInfo.h"
#include "llvm/IR/Function.h"
#include "llvm/InitializePasses.h"
#include "llvm/Support/Debug.h"
Go to the source code of this file.
Classes | |
class | RemoveLoadsIntoFakeUses |
Macros | |
#define | DEBUG_TYPE "remove-loads-into-fake-uses" |
Functions | |
STATISTIC (NumLoadsDeleted, "Number of dead load instructions deleted") | |
STATISTIC (NumFakeUsesDeleted, "Number of FAKE_USE instructions deleted") | |
INITIALIZE_PASS_BEGIN (RemoveLoadsIntoFakeUses, DEBUG_TYPE, "Remove Loads Into Fake Uses", false, false) INITIALIZE_PASS_END(RemoveLoadsIntoFakeUses | |
Variables | |
DEBUG_TYPE | |
Remove Loads Into Fake | Uses |
Remove Loads Into Fake | false |
The FAKE_USE instruction is used to preserve certain values through optimizations for the sake of debugging.
This may result in spilled values being loaded into registers that are only used by FAKE_USEs; this is not necessary for debugging purposes, because at that point the value must be on the stack and hence available for debugging. Therefore, this pass removes loads that are only used by FAKE_USEs.
This pass should run very late, to ensure that we don't inadvertently shorten stack lifetimes by removing these loads, since the FAKE_USEs will also no longer be in effect. Running immediately before LiveDebugValues ensures that LDV will have accurate information of the machine location of debug values.
Definition in file RemoveLoadsIntoFakeUses.cpp.
#define DEBUG_TYPE "remove-loads-into-fake-uses" |
Definition at line 38 of file RemoveLoadsIntoFakeUses.cpp.
INITIALIZE_PASS_BEGIN | ( | RemoveLoadsIntoFakeUses | , |
DEBUG_TYPE | , | ||
"Remove Loads Into Fake Uses" | , | ||
false | , | ||
false | |||
) |
STATISTIC | ( | NumFakeUsesDeleted | , |
"Number of FAKE_USE instructions deleted" | |||
) |
STATISTIC | ( | NumLoadsDeleted | , |
"Number of dead load instructions deleted" | |||
) |
DEBUG_TYPE |
Definition at line 73 of file RemoveLoadsIntoFakeUses.cpp.
Remove Loads Into Fake false |
Definition at line 74 of file RemoveLoadsIntoFakeUses.cpp.
Remove Loads Into Fake Uses |
Definition at line 74 of file RemoveLoadsIntoFakeUses.cpp.
Referenced by addArgumentAttrs(), allUsesOfLoadAndStores(), llvm::CombinerHelper::applyCombineExtendingLoads(), llvm::Attributor::checkForAllCallSites(), ClearKillFlags(), collectAllocaUses(), llvm::ReachingDefAnalysis::collectKilledOperands(), computeLiveOuts(), llvm::rdf::Liveness::computePhiInfo(), llvm::PeelingModuloScheduleExpander::CreateLCSSAExitingBlock(), llvm::OpenMPIRBuilder::createParallel(), llvm::HexagonRegisterInfo::eliminateFrameIndex(), llvm::LegalizerHelper::fewerElementsVectorMultiEltType(), llvm::X86RegisterInfo::findDeadCallerSavedReg(), findDeadCallerSavedReg(), findHoistingInsertPosAndDeps(), findUses(), llvm::rdf::Liveness::getAllReachedUses(), llvm::ReachingDefAnalysis::getGlobalUses(), llvm::ReachingDefAnalysis::getLiveInUses(), llvm::ReachingDefAnalysis::getReachingLocalUses(), llvm::mca::InstructionBase::getUses(), llvm::ReachingDefAnalysis::isSafeToDefRegAt(), parseOperands(), llvm::PeelSingleBlockLoop(), propagateLocalCopies(), relocationViaAlloca(), llvm::removeAllNonTerminatorAndEHPadInstructions(), llvm::SelectionDAG::ReplaceAllUsesOfValuesWith(), llvm::ReplaceableMetadataImpl::replaceAllUsesWith(), llvm::ReplaceableMetadataImpl::resolveAllUses(), llvm::coro::BaseCloner::salvageDebugInfo(), llvm::ReplaceableMetadataImpl::SalvageDebugInfo(), TrackDefUses(), and UpdateSSA().