diff options
author | Vikram S. Adve <vadve@cs.uiuc.edu> | 2001-09-18 12:58:33 +0000 |
---|---|---|
committer | Vikram S. Adve <vadve@cs.uiuc.edu> | 2001-09-18 12:58:33 +0000 |
commit | 6cefc7072daa3c5a5544a9bb0dfae4e1911f605a (patch) | |
tree | acd6807b45d8e73a4b9874320f8737a75cfa0fd8 /llvm/lib/Target/TargetMachine.cpp | |
parent | 82d1e14e7f867738c3116100f12465efedaa12b7 (diff) | |
download | bcm5719-llvm-6cefc7072daa3c5a5544a9bb0dfae4e1911f605a.tar.gz bcm5719-llvm-6cefc7072daa3c5a5544a9bb0dfae4e1911f605a.zip |
Renamed files to match the main classes they provide.
Some other minor changes.
llvm-svn: 615
Diffstat (limited to 'llvm/lib/Target/TargetMachine.cpp')
-rw-r--r-- | llvm/lib/Target/TargetMachine.cpp | 44 |
1 files changed, 25 insertions, 19 deletions
diff --git a/llvm/lib/Target/TargetMachine.cpp b/llvm/lib/Target/TargetMachine.cpp index aecc8855670..d508b32a399 100644 --- a/llvm/lib/Target/TargetMachine.cpp +++ b/llvm/lib/Target/TargetMachine.cpp @@ -5,7 +5,7 @@ // //===----------------------------------------------------------------------===// -#include "llvm/Target/InstInfo.h" +#include "llvm/Target/MachineInstrInfo.h" #include "llvm/DerivedTypes.h" //--------------------------------------------------------------------------- @@ -16,6 +16,7 @@ // //--------------------------------------------------------------------------- + // function TargetMachine::findOptimalStorageSize // // Purpose: @@ -23,18 +24,21 @@ // space equal to optSizeForSubWordData, and all other primitive data // items use space according to the type. // -unsigned int TargetMachine::findOptimalStorageSize(const Type* ty) const { - switch(ty->getPrimitiveID()) { - case Type::BoolTyID: - case Type::UByteTyID: - case Type::SByteTyID: - case Type::UShortTyID: - case Type::ShortTyID: - return optSizeForSubWordData; +unsigned int +TargetMachine::findOptimalStorageSize(const Type* ty) const +{ + switch(ty->getPrimitiveID()) + { + case Type::BoolTyID: + case Type::UByteTyID: + case Type::SByteTyID: + case Type::UShortTyID: + case Type::ShortTyID: + return optSizeForSubWordData; - default: - return DataLayout.getTypeSize(ty); - } + default: + return DataLayout.getTypeSize(ty); + } } @@ -56,7 +60,8 @@ MachineInstrInfo::MachineInstrInfo(const MachineInstrDescriptor* _desc, } -MachineInstrInfo::~MachineInstrInfo() { +MachineInstrInfo::~MachineInstrInfo() +{ TargetInstrDescriptors = NULL; // reset global variable } @@ -68,12 +73,13 @@ MachineInstrInfo::constantFitsInImmedField(MachineOpCode opCode, // First, check if opCode has an immed field. bool isSignExtended; uint64_t maxImmedValue = maxImmedConstant(opCode, isSignExtended); - if (maxImmedValue != 0) { - // Now check if the constant fits - if (intValue <= (int64_t) maxImmedValue && - intValue >= -((int64_t) maxImmedValue+1)) - return true; - } + if (maxImmedValue != 0) + { + // Now check if the constant fits + if (intValue <= (int64_t) maxImmedValue && + intValue >= -((int64_t) maxImmedValue+1)) + return true; + } return false; } |