diff options
| author | Roman Divacky <rdivacky@FreeBSD.org> | 2010-05-04 16:11:02 +0000 | 
|---|---|---|
| committer | Roman Divacky <rdivacky@FreeBSD.org> | 2010-05-04 16:11:02 +0000 | 
| commit | d7f7719e5e082c0b8ea2182dcbd2242b7834aa26 (patch) | |
| tree | 70fbd90da02177c8e6ef82adba9fa8ace285a5e3 /lib/CodeGen/MachineFunction.cpp | |
| parent | 9f4a1da9a0a56a0b0a7f8249f34b3cdea6179c41 (diff) | |
Notes
Diffstat (limited to 'lib/CodeGen/MachineFunction.cpp')
| -rw-r--r-- | lib/CodeGen/MachineFunction.cpp | 18 | 
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/CodeGen/MachineFunction.cpp b/lib/CodeGen/MachineFunction.cpp index e4ed7dbac4e7..3cf10b3ac65d 100644 --- a/lib/CodeGen/MachineFunction.cpp +++ b/lib/CodeGen/MachineFunction.cpp @@ -51,7 +51,7 @@ void ilist_traits<MachineBasicBlock>::deleteNode(MachineBasicBlock *MBB) {    MBB->getParent()->DeleteMachineBasicBlock(MBB);  } -MachineFunction::MachineFunction(Function *F, const TargetMachine &TM, +MachineFunction::MachineFunction(const Function *F, const TargetMachine &TM,                                   unsigned FunctionNum, MachineModuleInfo &mmi)    : Fn(F), Target(TM), Ctx(mmi.getContext()), MMI(mmi) {    if (TM.getRegisterInfo()) @@ -630,7 +630,7 @@ MachineConstantPool::~MachineConstantPool() {  /// CanShareConstantPoolEntry - Test whether the given two constants  /// can be allocated the same constant pool entry. -static bool CanShareConstantPoolEntry(Constant *A, Constant *B, +static bool CanShareConstantPoolEntry(const Constant *A, const Constant *B,                                        const TargetData *TD) {    // Handle the trivial case quickly.    if (A == B) return true; @@ -645,17 +645,17 @@ static bool CanShareConstantPoolEntry(Constant *A, Constant *B,    // If a floating-point value and an integer value have the same encoding,    // they can share a constant-pool entry. -  if (ConstantFP *AFP = dyn_cast<ConstantFP>(A)) -    if (ConstantInt *BI = dyn_cast<ConstantInt>(B)) +  if (const ConstantFP *AFP = dyn_cast<ConstantFP>(A)) +    if (const ConstantInt *BI = dyn_cast<ConstantInt>(B))        return AFP->getValueAPF().bitcastToAPInt() == BI->getValue(); -  if (ConstantFP *BFP = dyn_cast<ConstantFP>(B)) -    if (ConstantInt *AI = dyn_cast<ConstantInt>(A)) +  if (const ConstantFP *BFP = dyn_cast<ConstantFP>(B)) +    if (const ConstantInt *AI = dyn_cast<ConstantInt>(A))        return BFP->getValueAPF().bitcastToAPInt() == AI->getValue();    // Two vectors can share an entry if each pair of corresponding    // elements could. -  if (ConstantVector *AV = dyn_cast<ConstantVector>(A)) -    if (ConstantVector *BV = dyn_cast<ConstantVector>(B)) { +  if (const ConstantVector *AV = dyn_cast<ConstantVector>(A)) +    if (const ConstantVector *BV = dyn_cast<ConstantVector>(B)) {        if (AV->getType()->getNumElements() != BV->getType()->getNumElements())          return false;        for (unsigned i = 0, e = AV->getType()->getNumElements(); i != e; ++i) @@ -674,7 +674,7 @@ static bool CanShareConstantPoolEntry(Constant *A, Constant *B,  /// an existing one.  User must specify the log2 of the minimum required  /// alignment for the object.  /// -unsigned MachineConstantPool::getConstantPoolIndex(Constant *C,  +unsigned MachineConstantPool::getConstantPoolIndex(const Constant *C,                                                      unsigned Alignment) {    assert(Alignment && "Alignment must be specified!");    if (Alignment > PoolAlignment) PoolAlignment = Alignment;  | 
