|
LLVM
5.0.0
|
This file implements a pass that converts X86 cmov instructions into branch when profitable. More...
#include "X86.h"#include "X86InstrInfo.h"#include "X86Subtarget.h"#include "llvm/ADT/Statistic.h"#include "llvm/CodeGen/MachineFunctionPass.h"#include "llvm/CodeGen/MachineInstrBuilder.h"#include "llvm/CodeGen/MachineLoopInfo.h"#include "llvm/CodeGen/MachineRegisterInfo.h"#include "llvm/CodeGen/Passes.h"#include "llvm/CodeGen/TargetSchedule.h"#include "llvm/IR/InstIterator.h"#include "llvm/Support/Debug.h"#include "llvm/Support/raw_ostream.h"Go to the source code of this file.
Macros | |
| #define | DEBUG_TYPE "x86-cmov-converter" |
Functions | |
| STATISTIC (NumOfSkippedCmovGroups,"Number of unsupported CMOV-groups") | |
| STATISTIC (NumOfCmovGroupCandidate,"Number of CMOV-group candidates") | |
| STATISTIC (NumOfLoopCandidate,"Number of CMOV-conversion profitable loops") | |
| STATISTIC (NumOfOptimizedCmovGroups,"Number of optimized CMOV-groups") | |
This file implements a pass that converts X86 cmov instructions into branch when profitable.
This pass is conservative, i.e., it applies transformation if and only if it can gaurantee a gain with high confidence.
Thus, the optimization applies under the following conditions:
Note: This pass is assumed to run on SSA machine code.
Definition in file X86CmovConversion.cpp.
| #define DEBUG_TYPE "x86-cmov-converter" |
Definition at line 56 of file X86CmovConversion.cpp.
| STATISTIC | ( | NumOfSkippedCmovGroups | , |
| "Number of unsupported CMOV-groups" | |||
| ) |
| STATISTIC | ( | NumOfCmovGroupCandidate | , |
| "Number of CMOV-group candidates" | |||
| ) |
| STATISTIC | ( | NumOfLoopCandidate | , |
| "Number of CMOV-conversion profitable loops" | |||
| ) |
| STATISTIC | ( | NumOfOptimizedCmovGroups | , |
| "Number of optimized CMOV-groups" | |||
| ) |
1.8.6