|
LLVM 24.0.0git
|
#include "SystemZ.h"#include "SystemZInstrInfo.h"#include "SystemZTargetMachine.h"#include "llvm/ADT/SmallVector.h"#include "llvm/ADT/Statistic.h"#include "llvm/ADT/StringRef.h"#include "llvm/CodeGen/LiveRegUnits.h"#include "llvm/CodeGen/MachineBasicBlock.h"#include "llvm/CodeGen/MachineFunction.h"#include "llvm/CodeGen/MachineFunctionAnalysisManager.h"#include "llvm/CodeGen/MachineFunctionPass.h"#include "llvm/CodeGen/MachineInstr.h"#include "llvm/CodeGen/MachineInstrBuilder.h"#include "llvm/CodeGen/MachineOperand.h"#include "llvm/CodeGen/MachinePassManager.h"#include "llvm/CodeGen/TargetRegisterInfo.h"#include "llvm/CodeGen/TargetSubtargetInfo.h"#include "llvm/IR/Analysis.h"#include "llvm/MC/MCInstrDesc.h"#include "llvm/Pass.h"#include <cassert>#include <cstdint>Go to the source code of this file.
Macros | |
| #define | DEBUG_TYPE "systemz-elim-compare" |
Variables | |
| unsigned | Reg |
| #define DEBUG_TYPE "systemz-elim-compare" |
Definition at line 40 of file SystemZElimCompare.cpp.
|
static |
Definition at line 267 of file SystemZElimCompare.cpp.
References assert(), llvm::SystemZII::CCIfNoSignedWrap, llvm::SystemZ::CCMASK_ARITH_OVERFLOW, llvm::SystemZ::CCMASK_CMP_EQ, llvm::SystemZ::CCMASK_CMP_GT, llvm::SystemZ::CCMASK_CMP_LT, llvm::SystemZ::CCMASK_LOGICAL_NONZERO, llvm::SystemZ::CCMASK_LOGICAL_ZERO, llvm::SystemZII::CCMaskFirst, llvm::SystemZII::CCMaskLast, contains(), E(), llvm::SystemZII::getCCValues(), llvm::SystemZII::getCompareZeroCCMask(), I, isAddWithImmediate(), llvm::SystemZII::IsLogical, MBBI, MI, llvm::MachineInstr::NoSWrap, llvm::SmallVectorTemplateBase< T, bool >::push_back(), RHS, llvm::SmallVectorTemplateCommon< T, typename >::size(), TII, and TRI.
Referenced by convertToLoadAndTest(), convertToLogical(), and optimizeCompareZero().
|
static |
Definition at line 144 of file SystemZElimCompare.cpp.
References llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addReg(), llvm::SystemZ::CCMASK_CMP_NE, llvm::SystemZ::CCMASK_ICMP, llvm::Dead, getRegReferences(), llvm::ImplicitDefine, MBBI, MI, llvm::SmallVectorTemplateCommon< T, typename >::size(), TII, and TRI.
Referenced by optimizeCompareZero().
|
static |
Definition at line 407 of file SystemZElimCompare.cpp.
References adjustCCMasksForInstr(), llvm::BuildMI(), MI, llvm::MachineInstr::NoFPExcept, TII, and TRI.
Referenced by optimizeCompareZero().
|
static |
Definition at line 202 of file SystemZElimCompare.cpp.
References llvm::MachineInstrBuilder::add(), llvm::SystemZ::CCMASK_CMP_EQ, llvm::SystemZ::CCMASK_ICMP, getRegReferences(), MBBI, MI, llvm::SmallVectorTemplateCommon< T, typename >::size(), TII, and TRI.
Referenced by optimizeCompareZero().
|
static |
Definition at line 439 of file SystemZElimCompare.cpp.
References adjustCCMasksForInstr(), MI, TII, and TRI.
Referenced by optimizeCompareZero().
|
static |
Definition at line 562 of file SystemZElimCompare.cpp.
References llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addReg(), llvm::MachineInstrBuilder::addRegMask(), assert(), llvm::SystemZ::CCMASK_ICMP, llvm::SystemZII::CompareAndBranch, llvm::SystemZII::CompareAndReturn, llvm::SystemZII::CompareAndSibcall, llvm::SystemZII::CompareAndTrap, llvm::Dead, llvm::MachineOperand::getImm(), I, llvm::ImplicitDefine, MBBI, Register, llvm::SmallVectorTemplateCommon< T, typename >::size(), TII, and TRI.
Referenced by processBlock().
|
static |
Definition at line 120 of file SystemZElimCompare.cpp.
References MI, llvm::Ref, Reg, and TRI.
Referenced by convertToBRCT(), convertToLoadAndTrap(), and optimizeCompareZero().
| INITIALIZE_PASS | ( | SystemZElimCompareLegacy | , |
| DEBUG_TYPE | , | ||
| "SystemZ Comparison Elimination" | , | ||
| false | , | ||
| false | ) & |
References DEBUG_TYPE.
Definition at line 245 of file SystemZElimCompare.cpp.
Referenced by adjustCCMasksForInstr().
|
static |
Definition at line 485 of file SystemZElimCompare.cpp.
References adjustCCMasksForInstr(), convertToBRCT(), convertToLoadAndTest(), convertToLoadAndTrap(), convertToLogical(), getRegReferences(), llvm::make_early_inc_range(), llvm::make_range(), MBB, MBBI, MI, resultTests(), TII, and TRI.
Referenced by processBlock().
|
static |
Definition at line 671 of file SystemZElimCompare.cpp.
References Changed, llvm::SmallVectorImpl< T >::clear(), fuseCompareOperations(), MBB, MBBI, MI, optimizeCompareZero(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), TII, and TRI.
Referenced by runElimCompareOnMF().
|
static |
Definition at line 111 of file SystemZElimCompare.cpp.
Referenced by optimizeCompareZero().
|
static |
Definition at line 705 of file SystemZElimCompare.cpp.
References Changed, F, MBB, processBlock(), TII, and TRI.
Referenced by llvm::SystemZElimComparePass::run().
| STATISTIC | ( | BranchOnCounts | , |
| "Number of branch-on-count instructions" | ) |
| STATISTIC | ( | EliminatedComparisons | , |
| "Number of eliminated comparisons" | ) |
| STATISTIC | ( | FusedComparisons | , |
| "Number of fused compare-and-branch instructions" | ) |
References llvm::Other.
| STATISTIC | ( | LoadAndTraps | , |
| "Number of load-and-trap instructions" | ) |
| unsigned Reg |
Definition at line 94 of file SystemZElimCompare.cpp.