|
LLVM 23.0.0git
|
#include "HexagonLiveVariables.h"#include "HexagonTargetMachine.h"#include "llvm/CodeGen/MachineDominators.h"#include "llvm/CodeGen/MachinePostDominators.h"#include "llvm/CodeGen/MachineRegisterInfo.h"#include "llvm/CodeGen/Passes.h"#include "llvm/InitializePasses.h"#include "llvm/Support/Debug.h"#include "llvm/Support/ErrorHandling.h"Go to the source code of this file.
Macros | |
| #define | DEBUG_TYPE "hexagon_live_vars" |
Functions | |
| INITIALIZE_PASS (HexagonLiveVariables, "hexagon-live-vars", "Hexagon Live Variable Analysis", false, false) class HexagonLiveVariablesImpl | |
| static void | gatherBlocksDF (MachineFunction &Fn, SmallVectorImpl< MachineBasicBlock * > *Blocks) |
| #define DEBUG_TYPE "hexagon_live_vars" |
Definition at line 14 of file HexagonLiveVariables.cpp.
|
static |
Definition at line 561 of file HexagonLiveVariables.cpp.
References B(), llvm::SmallVectorTemplateCommon< T, typename >::back(), llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::SmallVectorImpl< T >::clear(), llvm::dbgs(), E(), llvm::SmallVectorTemplateCommon< T, typename >::empty(), llvm::SmallVectorTemplateCommon< T, typename >::end(), llvm::MachineFunction::front(), llvm::MachineBasicBlock::getNumber(), I, LLVM_DEBUG, llvm::SmallVectorTemplateBase< T, bool >::pop_back(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::SmallVectorImpl< T >::reserve(), and llvm::MachineFunction::size().
| INITIALIZE_PASS | ( | HexagonLiveVariables | , |
| "hexagon-live-vars" | , | ||
| "Hexagon Live Variable Analysis" | , | ||
| false | , | ||
| false | ) |
PhysRegInfo - Keep track of which instruction was the last def of a physical register (possibly after a use). This is purely local to a BB.
PhysRegInfo - Keep track of which instruction was the last use of a physical register (before any def). This is purely local property to a BB.
MBB -> (Uses, Defs) Uses - use before any def in that MBB. Defs - def before any uses in that MBB.
MI -> (Uses, Defs)
Live-out data for each MBB => U LiveIns (For all Successors of a MBB).
Each MachineBasicBlock is assigned a Distance which is an approximation of MBB->size()*INSTR_SIZE+Some offsets. This is helpful in quickly finding distance between a branch and its target.
Constructs use-defs of MBB by analyzing each MachineOperand. Collects relevant information so that global liveness can be updated.
Collects used-before-define set of registers. A register is considered to be completely defined if
updateGlobalLiveness - updates liveness based on livein and liveout entries.
update live-ins when live-out has been calculated
updateLocalLiveness - update only kill flags of operands.
updateLocalLiveness - update only kill flags of operands.
incrementalUpdate - update the liveness when MIDelta is moved from From to To.
To do not use Defs of MIDelta. It deletes the live-in of the From MBB.addNewMBB - inform the LiveVariable Analysis that new MBB has been added. update the liveness of this new MBB.
Computes DistanceMap.
Definition at line 31 of file HexagonLiveVariables.cpp.
References llvm::HexagonLiveVariables::addNewMBB(), llvm::HexagonLiveVariables::addNewMI(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::clear(), llvm::HexagonLiveVariables::constructUseDef(), llvm::HexagonLiveVariables::incrementalUpdate(), MBB, MI, MRI, llvm::HexagonLiveVariables::runOnMachineFunction(), TRI, UpdateBundle(), llvm::HexagonLiveVariables::updateLocalLiveness(), Uses, X, and Y.