#include "ARM.h"
#include "ARMMachineFunctionInfo.h"
#include "ARMSubtarget.h"
#include "MCTargetDesc/ARMBaseInfo.h"
#include "Thumb2InstrInfo.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Statistic.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/MachineInstrBundle.h"
#include "llvm/CodeGen/MachineOperand.h"
#include "llvm/IR/DebugLoc.h"
#include "llvm/MC/MCInstrDesc.h"
#include "llvm/MC/MCRegisterInfo.h"
#include "llvm/Support/Debug.h"
#include <cassert>
#include <new>
usingnamespacellvm;
#define DEBUG_TYPE …
namespace {
class MVEVPTBlock : public MachineFunctionPass { … };
char MVEVPTBlock::ID = …;
}
INITIALIZE_PASS(…)
static MachineInstr *findVCMPToFoldIntoVPST(MachineBasicBlock::iterator MI,
const TargetRegisterInfo *TRI,
unsigned &NewOpcode) { … }
static bool StepOverPredicatedInstrs(MachineBasicBlock::instr_iterator &Iter,
MachineBasicBlock::instr_iterator EndIter,
unsigned MaxSteps,
unsigned &NumInstrsSteppedOver) { … }
static bool IsVPRDefinedOrKilledByBlock(MachineBasicBlock::iterator Iter,
MachineBasicBlock::iterator End) { … }
static ARM::PredBlockMask GetInitialBlockMask(unsigned BlockSize) { … }
static ARM::PredBlockMask
CreateVPTBlock(MachineBasicBlock::instr_iterator &Iter,
MachineBasicBlock::instr_iterator EndIter,
SmallVectorImpl<MachineInstr *> &DeadInstructions) { … }
bool MVEVPTBlock::InsertVPTBlocks(MachineBasicBlock &Block) { … }
bool MVEVPTBlock::runOnMachineFunction(MachineFunction &Fn) { … }
FunctionPass *llvm::createMVEVPTBlockPass() { … }