Update comments to make it clear that the function alignment is the Log2 of the

bytes and not bytes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74624 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bill Wendling 2009-07-01 18:50:55 +00:00
parent 342a343a57
commit b4202b84d7
23 changed files with 24 additions and 24 deletions

View File

@ -151,11 +151,11 @@ public:
MachineConstantPool *getConstantPool() { return ConstantPool; }
const MachineConstantPool *getConstantPool() const { return ConstantPool; }
/// getAlignment - Return the alignment of the function.
/// getAlignment - Return the alignment (log2, not bytes) of the function.
///
unsigned getAlignment() const { return Alignment; }
/// setAlignment - Set the alignment of the function.
/// setAlignment - Set the alignment (log2, not bytes) of the function.
///
void setAlignment(unsigned A) { Alignment = A; }

View File

@ -736,7 +736,7 @@ public:
/// PIC relocation models.
virtual bool isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const;
/// getFunctionAlignment - Return the alignment of this function.
/// getFunctionAlignment - Return the Log2 alignment of this function.
virtual unsigned getFunctionAlignment(const Function *) const = 0;
//===--------------------------------------------------------------------===//

View File

@ -455,7 +455,7 @@ const char *ARMTargetLowering::getTargetNodeName(unsigned Opcode) const {
}
}
/// getFunctionAlignment - Return the alignment of this function.
/// getFunctionAlignment - Return the Log2 alignment of this function.
unsigned ARMTargetLowering::getFunctionAlignment(const Function *F) const {
return getTargetMachine().getSubtarget<ARMSubtarget>().isThumb() ? 1 : 2;
}

View File

@ -197,7 +197,7 @@ namespace llvm {
return Subtarget;
}
/// getFunctionAlignment - Return the alignment of this function.
/// getFunctionAlignment - Return the Log2 alignment of this function.
virtual unsigned getFunctionAlignment(const Function *F) const;
private:

View File

@ -181,7 +181,7 @@ const char *AlphaTargetLowering::getTargetNodeName(unsigned Opcode) const {
}
}
/// getFunctionAlignment - Return the function alignment.
/// getFunctionAlignment - Return the Log2 alignment of this function.
unsigned AlphaTargetLowering::getFunctionAlignment(const Function *F) const {
return 4;
}

View File

@ -103,7 +103,7 @@ namespace llvm {
virtual bool isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const;
/// getFunctionAlignment - Return the function alignment.
/// getFunctionAlignment - Return the Log2 alignment of this function.
virtual unsigned getFunctionAlignment(const Function *F) const;
private:

View File

@ -481,7 +481,7 @@ SPUTargetLowering::getTargetNodeName(unsigned Opcode) const
return ((i != node_names.end()) ? i->second : 0);
}
/// getFunctionAlignment - Return the function alignment.
/// getFunctionAlignment - Return the Log2 alignment of this function.
unsigned SPUTargetLowering::getFunctionAlignment(const Function *) const {
return 3;
}

View File

@ -149,7 +149,7 @@ namespace llvm {
virtual bool isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const;
/// getFunctionAlignment - Return the function alignment.
/// getFunctionAlignment - Return the Log2 alignment of this function.
virtual unsigned getFunctionAlignment(const Function *F) const;
};
}

View File

@ -148,7 +148,7 @@ MVT IA64TargetLowering::getSetCCResultType(MVT VT) const {
return MVT::i1;
}
/// getFunctionAlignment - Return the function alignment.
/// getFunctionAlignment - Return the Log2 alignment of this function.
unsigned IA64TargetLowering::getFunctionAlignment(const Function *) const {
return 5;
}

View File

@ -70,7 +70,7 @@ namespace llvm {
/// (currently, only "ret void")
virtual SDValue LowerOperation(SDValue Op, SelectionDAG &DAG);
/// getFunctionAlignment - Return the function alignment.
/// getFunctionAlignment - Return the Log2 alignment of this function.
virtual unsigned getFunctionAlignment(const Function *F) const;
};
}

View File

@ -127,7 +127,7 @@ SDValue MSP430TargetLowering::LowerOperation(SDValue Op, SelectionDAG &DAG) {
}
}
/// getFunctionAlignment - Return the alignment of this function.
/// getFunctionAlignment - Return the Log2 alignment of this function.
unsigned MSP430TargetLowering::getFunctionAlignment(const Function *F) const {
return F->hasFnAttr(Attribute::OptimizeForSize) ? 1 : 4;
}

View File

@ -74,7 +74,7 @@ namespace llvm {
/// DAG node.
virtual const char *getTargetNodeName(unsigned Opcode) const;
/// getFunctionAlignment - Return the alignment of this function.
/// getFunctionAlignment - Return the Log2 alignment of this function.
virtual unsigned getFunctionAlignment(const Function *F) const;
SDValue LowerFORMAL_ARGUMENTS(SDValue Op, SelectionDAG &DAG);

View File

@ -158,7 +158,7 @@ MVT MipsTargetLowering::getSetCCResultType(MVT VT) const {
return MVT::i32;
}
/// getFunctionAlignment - Return the function alignment.
/// getFunctionAlignment - Return the Log2 alignment of this function.
unsigned MipsTargetLowering::getFunctionAlignment(const Function *) const {
return 2;
}

View File

@ -84,7 +84,7 @@ namespace llvm {
/// getSetCCResultType - get the ISD::SETCC result ValueType
MVT getSetCCResultType(MVT VT) const;
/// getFunctionAlignment - Return the function alignment.
/// getFunctionAlignment - Return the Log2 alignment of this function.
virtual unsigned getFunctionAlignment(const Function *F) const;
private:
// Subtarget Info

View File

@ -145,7 +145,7 @@ namespace llvm {
unsigned GetTmpSize() { return TmpSize; }
void SetTmpSize(unsigned Size) { TmpSize = Size; }
/// getFunctionAlignment - Return the function alignment.
/// getFunctionAlignment - Return the Log2 alignment of this function.
virtual unsigned getFunctionAlignment(const Function *) const {
// FIXME: The function never seems to be aligned.
return 1;

View File

@ -432,7 +432,7 @@ MVT PPCTargetLowering::getSetCCResultType(MVT VT) const {
return MVT::i32;
}
/// getFunctionAlignment - Return the function alignment.
/// getFunctionAlignment - Return the Log2 alignment of this function.
unsigned PPCTargetLowering::getFunctionAlignment(const Function *F) const {
if (getTargetMachine().getSubtarget<PPCSubtarget>().isDarwin())
return F->hasFnAttr(Attribute::OptimizeForSize) ? 2 : 4;

View File

@ -337,7 +337,7 @@ namespace llvm {
virtual bool isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const;
/// getFunctionAlignment - Return the function alignment.
/// getFunctionAlignment - Return the Log2 alignment of this function.
virtual unsigned getFunctionAlignment(const Function *F) const;
private:

View File

@ -1048,7 +1048,7 @@ SparcTargetLowering::isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const {
return false;
}
/// getFunctionAlignment - Return the function alignment.
/// getFunctionAlignment - Return the Log2 alignment of this function.
unsigned SparcTargetLowering::getFunctionAlignment(const Function *) const {
return 4;
}

View File

@ -74,7 +74,7 @@ namespace llvm {
virtual bool isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const;
/// getFunctionAlignment - Return the function alignment.
/// getFunctionAlignment - Return the Log2 alignment of this function.
virtual unsigned getFunctionAlignment(const Function *F) const;
};
} // end namespace llvm

View File

@ -1027,7 +1027,7 @@ SDValue X86TargetLowering::getPICJumpTableRelocBase(SDValue Table,
return Table;
}
/// getFunctionAlignment - Return the alignment of this function.
/// getFunctionAlignment - Return the Log2 alignment of this function.
unsigned X86TargetLowering::getFunctionAlignment(const Function *F) const {
return F->hasFnAttr(Attribute::OptimizeForSize) ? 1 : 4;
}

View File

@ -534,7 +534,7 @@ namespace llvm {
#endif
);
/// getFunctionAlignment - Return the alignment of this function.
/// getFunctionAlignment - Return the Log2 alignment of this function.
virtual unsigned getFunctionAlignment(const Function *F) const;
private:

View File

@ -187,7 +187,7 @@ void XCoreTargetLowering::ReplaceNodeResults(SDNode *N,
}
}
/// getFunctionAlignment - Return the alignment of this function.
/// getFunctionAlignment - Return the Log2 alignment of this function.
unsigned XCoreTargetLowering::
getFunctionAlignment(const Function *) const {
return 1;

View File

@ -84,7 +84,7 @@ namespace llvm {
virtual bool isLegalAddressingMode(const AddrMode &AM,
const Type *Ty) const;
/// getFunctionAlignment - Return the alignment of this function.
/// getFunctionAlignment - Return the Log2 alignment of this function.
virtual unsigned getFunctionAlignment(const Function *F) const;
private: