LLVM: lib/Target/AArch64/AArch64RedundantCondBranchPass.cpp Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
22
23using namespace llvm;
24
25#define DEBUG_TYPE "aarch64-redundantcondbranch"
26
27namespace {
29public:
30 static char ID;
32
34
37 }
38 StringRef getPassName() const override {
39 return "AArch64 Redundant Conditional Branch Elimination";
40 }
41};
42char AArch64RedundantCondBranch::ID = 0;
43}
44
45INITIALIZE_PASS(AArch64RedundantCondBranch, "aarch64-redundantcondbranch",
46 "AArch64 Redundant Conditional Branch Elimination pass", false,
47 false)
48
49bool AArch64RedundantCondBranch::runOnMachineFunction(MachineFunction &MF) {
50 if (skipFunction(MF.getFunction()))
51 return false;
52
54
59}
60
62 return new AArch64RedundantCondBranch();
63}
for(const MachineOperand &MO :llvm::drop_begin(OldMI.operands(), Desc.getNumOperands()))
const HexagonInstrInfo * TII
#define INITIALIZE_PASS(passName, arg, name, cfg, analysis)
FunctionPass class - This class is used to implement most global optimizations.
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
Properties which a MachineFunction may have at a given point in time.
StringRef - Represent a constant reference to a string, i.e.
TargetInstrInfo - Interface to description of machine instruction set.
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
This is an optimization pass for GlobalISel generic memory operations.
bool optimizeTerminators(MachineBasicBlock *MBB, const TargetInstrInfo &TII)
FunctionPass * createAArch64RedundantCondBranchPass()
Definition AArch64RedundantCondBranchPass.cpp:61