LLVM 20.0.0git
Macros | Functions
CSKYConstantIslandPass.cpp File Reference
#include "CSKY.h"
#include "CSKYConstantPoolValue.h"
#include "CSKYMachineFunctionInfo.h"
#include "CSKYSubtarget.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineConstantPool.h"
#include "llvm/CodeGen/MachineFrameInfo.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/Config/llvm-config.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/DebugLoc.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Type.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <cassert>
#include <cstdint>
#include <iterator>
#include <vector>

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "CSKY-constant-islands"
 

Functions

 STATISTIC (NumCPEs, "Number of constpool entries")
 
 STATISTIC (NumSplit, "Number of uncond branches inserted")
 
 STATISTIC (NumCBrFixed, "Number of cond branches fixed")
 
 STATISTIC (NumUBrFixed, "Number of uncond branches fixed")
 
static bool bbHasFallthrough (MachineBasicBlock *MBB)
 BBHasFallthrough - Return true if the specified basic block can fallthrough into the block immediately after it.
 
static bool compareMbbNumbers (const MachineBasicBlock *LHS, const MachineBasicBlock *RHS)
 CompareMBBNumbers - Little predicate function to sort the WaterList by MBB ID.
 
static bool bbIsJumpedOver (MachineBasicBlock *MBB)
 BBIsJumpedOver - Return true of the specified basic block's only predecessor unconditionally branches to its only successor.
 
static unsigned getUnconditionalBrDisp (int Opc)
 getUnconditionalBrDisp - Returns the maximum displacement that can fit in the specific unconditional branch instruction.
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "CSKY-constant-islands"

Definition at line 59 of file CSKYConstantIslandPass.cpp.

Function Documentation

◆ bbHasFallthrough()

static bool bbHasFallthrough ( MachineBasicBlock MBB)
static

BBHasFallthrough - Return true if the specified basic block can fallthrough into the block immediately after it.

Definition at line 426 of file CSKYConstantIslandPass.cpp.

References llvm::MachineFunction::end(), llvm::ilist_node_impl< OptionsT >::getIterator(), llvm::MachineBasicBlock::getParent(), I, MBB, MBBI, llvm::MachineBasicBlock::succ_begin(), and llvm::MachineBasicBlock::succ_end().

◆ bbIsJumpedOver()

static bool bbIsJumpedOver ( MachineBasicBlock MBB)
static

◆ compareMbbNumbers()

static bool compareMbbNumbers ( const MachineBasicBlock LHS,
const MachineBasicBlock RHS 
)
static

CompareMBBNumbers - Little predicate function to sort the WaterList by MBB ID.

Definition at line 606 of file CSKYConstantIslandPass.cpp.

References LHS, and RHS.

◆ getUnconditionalBrDisp()

static unsigned getUnconditionalBrDisp ( int  Opc)
inlinestatic

getUnconditionalBrDisp - Returns the maximum displacement that can fit in the specific unconditional branch instruction.

Definition at line 885 of file CSKYConstantIslandPass.cpp.

References llvm_unreachable.

◆ STATISTIC() [1/4]

STATISTIC ( NumCBrFixed  ,
"Number of cond branches fixed"   
)

◆ STATISTIC() [2/4]

STATISTIC ( NumCPEs  ,
"Number of constpool entries"   
)

◆ STATISTIC() [3/4]

STATISTIC ( NumSplit  ,
"Number of uncond branches inserted"   
)

◆ STATISTIC() [4/4]

STATISTIC ( NumUBrFixed  ,
"Number of uncond branches fixed"   
)