|
LLVM
5.0.0
|
Insert wait instructions for memory reads and writes. More...
#include "AMDGPU.h"#include "AMDGPUSubtarget.h"#include "SIDefines.h"#include "SIInstrInfo.h"#include "SIMachineFunctionInfo.h"#include "SIRegisterInfo.h"#include "Utils/AMDGPUBaseInfo.h"#include "llvm/ADT/SmallVector.h"#include "llvm/ADT/StringRef.h"#include "llvm/CodeGen/MachineBasicBlock.h"#include "llvm/CodeGen/MachineFunction.h"#include "llvm/CodeGen/MachineFunctionPass.h"#include "llvm/CodeGen/MachineInstr.h"#include "llvm/CodeGen/MachineInstrBuilder.h"#include "llvm/CodeGen/MachineOperand.h"#include "llvm/CodeGen/MachineRegisterInfo.h"#include "llvm/IR/DebugLoc.h"#include "llvm/Pass.h"#include "llvm/Support/Debug.h"#include "llvm/Support/raw_ostream.h"#include "llvm/Target/TargetRegisterInfo.h"#include <algorithm>#include <cassert>#include <cstdint>#include <cstring>#include <new>#include <utility>Go to the source code of this file.
Macros | |
| #define | DEBUG_TYPE "si-insert-waits" |
Enumerations | |
| enum | InstType |
Functions | |
| INITIALIZE_PASS_BEGIN (SIInsertWaits, DEBUG_TYPE,"SI Insert Waits", false, false) INITIALIZE_PASS_END(SIInsertWaits | |
| static bool | readsVCCZ (const MachineInstr &MI) |
| static void | increaseCounters (Counters &Dst, const Counters &Src) |
| helper function for handleOperands More... | |
| static bool | countersNonZero (const Counters &Counter) |
| check whether any of the counters is non-zero More... | |
| static bool | hasTrivialSuccessor (const MachineBasicBlock &MBB) |
Return true if MBB has one successor immediately following, and is its only predecessor. More... | |
Variables | |
| DEBUG_TYPE | |
| SI Insert | Waits |
| SI Insert | false |
Insert wait instructions for memory reads and writes.
Memory reads and writes are issued asynchronously, so we need to insert S_WAITCNT instructions when we want to access any of their results or overwrite any register that's used asynchronously.
Definition in file SIInsertWaits.cpp.
| #define DEBUG_TYPE "si-insert-waits" |
Definition at line 47 of file SIInsertWaits.cpp.
| enum InstType |
Definition at line 63 of file SIInsertWaits.cpp.
check whether any of the counters is non-zero
Definition at line 447 of file SIInsertWaits.cpp.
|
static |
Return true if MBB has one successor immediately following, and is its only predecessor.
Definition at line 529 of file SIInsertWaits.cpp.
References llvm::MachineBasicBlock::isLayoutSuccessor(), llvm::MachineBasicBlock::pred_size(), llvm::MachineBasicBlock::succ_begin(), and llvm::MachineBasicBlock::succ_size().
helper function for handleOperands
Definition at line 441 of file SIInsertWaits.cpp.
References llvm::max().
| INITIALIZE_PASS_BEGIN | ( | SIInsertWaits | , |
| DEBUG_TYPE | , | ||
| "SI Insert Waits" | , | ||
| false | , | ||
| false | |||
| ) |
|
static |
Definition at line 189 of file SIInsertWaits.cpp.
References llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), and llvm::MachineOperand::isUndef().
| DEBUG_TYPE |
Definition at line 176 of file SIInsertWaits.cpp.
| SI Insert false |
Definition at line 176 of file SIInsertWaits.cpp.
| SI Insert Waits |
Definition at line 176 of file SIInsertWaits.cpp.
1.8.6