diff options
author | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2014-03-06 10:38:30 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2014-03-06 10:38:30 +0000 |
commit | 9a1cd05a3d7456f9cdd9f5f30f037fbeb3c0fb20 (patch) | |
tree | 891a0fc86ceae2a7c526e342d7a0f1de104b2556 /lib/Target/SystemZ/SystemZElimCompare.cpp | |
parent | b0a36274436188884108704ca71d687f140394b4 (diff) | |
download | llvm-9a1cd05a3d7456f9cdd9f5f30f037fbeb3c0fb20.tar.gz llvm-9a1cd05a3d7456f9cdd9f5f30f037fbeb3c0fb20.tar.bz2 llvm-9a1cd05a3d7456f9cdd9f5f30f037fbeb3c0fb20.tar.xz |
[SystemZ] Update namespace formatting to match current guidelines
No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203103 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/SystemZ/SystemZElimCompare.cpp')
-rw-r--r-- | lib/Target/SystemZ/SystemZElimCompare.cpp | 98 |
1 files changed, 49 insertions, 49 deletions
diff --git a/lib/Target/SystemZ/SystemZElimCompare.cpp b/lib/Target/SystemZ/SystemZElimCompare.cpp index b8a77db0f8..b161c0af84 100644 --- a/lib/Target/SystemZ/SystemZElimCompare.cpp +++ b/lib/Target/SystemZ/SystemZElimCompare.cpp @@ -33,64 +33,64 @@ STATISTIC(EliminatedComparisons, "Number of eliminated comparisons"); STATISTIC(FusedComparisons, "Number of fused compare-and-branch instructions"); namespace { - // Represents the references to a particular register in one or more - // instructions. - struct Reference { - Reference() - : Def(false), Use(false), IndirectDef(false), IndirectUse(false) {} - - Reference &operator|=(const Reference &Other) { - Def |= Other.Def; - IndirectDef |= Other.IndirectDef; - Use |= Other.Use; - IndirectUse |= Other.IndirectUse; - return *this; - } +// Represents the references to a particular register in one or more +// instructions. +struct Reference { + Reference() + : Def(false), Use(false), IndirectDef(false), IndirectUse(false) {} + + Reference &operator|=(const Reference &Other) { + Def |= Other.Def; + IndirectDef |= Other.IndirectDef; + Use |= Other.Use; + IndirectUse |= Other.IndirectUse; + return *this; + } - operator bool() const { return Def || Use; } + operator bool() const { return Def || Use; } - // True if the register is defined or used in some form, either directly or - // via a sub- or super-register. - bool Def; - bool Use; + // True if the register is defined or used in some form, either directly or + // via a sub- or super-register. + bool Def; + bool Use; - // True if the register is defined or used indirectly, by a sub- or - // super-register. - bool IndirectDef; - bool IndirectUse; - }; + // True if the register is defined or used indirectly, by a sub- or + // super-register. + bool IndirectDef; + bool IndirectUse; +}; - class SystemZElimCompare : public MachineFunctionPass { - public: - static char ID; - SystemZElimCompare(const SystemZTargetMachine &tm) - : MachineFunctionPass(ID), TII(0), TRI(0) {} +class SystemZElimCompare : public MachineFunctionPass { +public: + static char ID; + SystemZElimCompare(const SystemZTargetMachine &tm) + : MachineFunctionPass(ID), TII(0), TRI(0) {} - virtual const char *getPassName() const { - return "SystemZ Comparison Elimination"; - } + virtual const char *getPassName() const { + return "SystemZ Comparison Elimination"; + } + + bool processBlock(MachineBasicBlock *MBB); + bool runOnMachineFunction(MachineFunction &F); - bool processBlock(MachineBasicBlock *MBB); - bool runOnMachineFunction(MachineFunction &F); - - private: - Reference getRegReferences(MachineInstr *MI, unsigned Reg); - bool convertToBRCT(MachineInstr *MI, MachineInstr *Compare, - SmallVectorImpl<MachineInstr *> &CCUsers); - bool convertToLoadAndTest(MachineInstr *MI); - bool adjustCCMasksForInstr(MachineInstr *MI, MachineInstr *Compare, - SmallVectorImpl<MachineInstr *> &CCUsers); - bool optimizeCompareZero(MachineInstr *Compare, +private: + Reference getRegReferences(MachineInstr *MI, unsigned Reg); + bool convertToBRCT(MachineInstr *MI, MachineInstr *Compare, + SmallVectorImpl<MachineInstr *> &CCUsers); + bool convertToLoadAndTest(MachineInstr *MI); + bool adjustCCMasksForInstr(MachineInstr *MI, MachineInstr *Compare, SmallVectorImpl<MachineInstr *> &CCUsers); - bool fuseCompareAndBranch(MachineInstr *Compare, - SmallVectorImpl<MachineInstr *> &CCUsers); + bool optimizeCompareZero(MachineInstr *Compare, + SmallVectorImpl<MachineInstr *> &CCUsers); + bool fuseCompareAndBranch(MachineInstr *Compare, + SmallVectorImpl<MachineInstr *> &CCUsers); - const SystemZInstrInfo *TII; - const TargetRegisterInfo *TRI; - }; + const SystemZInstrInfo *TII; + const TargetRegisterInfo *TRI; +}; - char SystemZElimCompare::ID = 0; -} // end of anonymous namespace +char SystemZElimCompare::ID = 0; +} // end anonymous namespace FunctionPass *llvm::createSystemZElimComparePass(SystemZTargetMachine &TM) { return new SystemZElimCompare(TM); |