LLVM  8.0.1
Macros | Functions | Variables
SIInsertSkips.cpp File Reference

This pass inserts branches on the 0 exec mask over divergent branches branches when it's expected that jumping over the untaken control flow will be cheaper than having every workitem no-op through it. More...

#include "AMDGPU.h"
#include "AMDGPUSubtarget.h"
#include "SIInstrInfo.h"
#include "SIMachineFunctionInfo.h"
#include "MCTargetDesc/AMDGPUMCTargetDesc.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/IR/CallingConv.h"
#include "llvm/IR/DebugLoc.h"
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/Pass.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Target/TargetMachine.h"
#include <cassert>
#include <cstdint>
#include <iterator>
Include dependency graph for SIInsertSkips.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "si-insert-skips"
 

Functions

static INITIALIZE_PASS(SIInsertSkips, DEBUG_TYPE, "SI insert s_cbranch_execz instructions", false, false) char &llvm bool opcodeEmitsNoInsts (unsigned Opc)
 

Variables

static cl::opt< unsignedSkipThresholdFlag ("amdgpu-skip-threshold", cl::desc("Number of instructions before jumping over divergent control flow"), cl::init(12), cl::Hidden)
 

Detailed Description

This pass inserts branches on the 0 exec mask over divergent branches branches when it's expected that jumping over the untaken control flow will be cheaper than having every workitem no-op through it.

Definition in file SIInsertSkips.cpp.

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "si-insert-skips"

Definition at line 42 of file SIInsertSkips.cpp.

Function Documentation

◆ opcodeEmitsNoInsts()

static INITIALIZE_PASS (SIInsertSkips, DEBUG_TYPE, "SI insert s_cbranch_execz instructions", false, false) char &llvm bool opcodeEmitsNoInsts ( unsigned  Opc) &
static

Variable Documentation

◆ SkipThresholdFlag

cl::opt<unsigned> SkipThresholdFlag("amdgpu-skip-threshold", cl::desc("Number of instructions before jumping over divergent control flow"), cl::init(12), cl::Hidden)
static