diff options
author | Akira Hatanaka <ahatanak@gmail.com> | 2011-08-18 20:07:42 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanak@gmail.com> | 2011-08-18 20:07:42 +0000 |
commit | 73d78b7ab1bcbc350f47c353295e83d7b2197f24 (patch) | |
tree | 380881c09ad4c79824f919a8683335ff5c907eba /llvm/lib | |
parent | 627021d7c0d1089bf0ac33048af66841c6439bdd (diff) | |
download | bcm5719-llvm-73d78b7ab1bcbc350f47c353295e83d7b2197f24.tar.gz bcm5719-llvm-73d78b7ab1bcbc350f47c353295e83d7b2197f24.zip |
Make IsShiftedMask a static function rather than defining it in an
anonymous namespace.
llvm-svn: 137975
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/Mips/MipsISelLowering.cpp | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/llvm/lib/Target/Mips/MipsISelLowering.cpp b/llvm/lib/Target/Mips/MipsISelLowering.cpp index cbd1f3edc75..97b5a145abf 100644 --- a/llvm/lib/Target/Mips/MipsISelLowering.cpp +++ b/llvm/lib/Target/Mips/MipsISelLowering.cpp @@ -35,22 +35,20 @@ #include "llvm/Support/ErrorHandling.h" using namespace llvm; -namespace { - // If I is a shifted mask, set the size (Size) and the first bit of the - // mask (Pos), and return true. - bool IsShiftedMask(uint64_t I, unsigned SizeInBits, uint64_t &Pos, - uint64_t &Size) { - assert(SizeInBits == 32 || SizeInBits == 64); - bool Is32Bits = (SizeInBits == 32); - - if ((Is32Bits == 32 && !isShiftedMask_32(I)) || - (!Is32Bits && !isShiftedMask_64(I))) - return false; - - Size = Is32Bits ? CountPopulation_32(I) : CountPopulation_64(I); - Pos = Is32Bits ? CountTrailingZeros_32(I) : CountTrailingZeros_64(I); - return true; - } +// If I is a shifted mask, set the size (Size) and the first bit of the +// mask (Pos), and return true. +static bool IsShiftedMask(uint64_t I, unsigned SizeInBits, uint64_t &Pos, + uint64_t &Size) { + assert(SizeInBits == 32 || SizeInBits == 64); + bool Is32Bits = (SizeInBits == 32); + + if ((Is32Bits == 32 && !isShiftedMask_32(I)) || + (!Is32Bits && !isShiftedMask_64(I))) + return false; + + Size = Is32Bits ? CountPopulation_32(I) : CountPopulation_64(I); + Pos = Is32Bits ? CountTrailingZeros_32(I) : CountTrailingZeros_64(I); + return true; } const char *MipsTargetLowering::getTargetNodeName(unsigned Opcode) const { |