mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-13 14:47:00 +00:00
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:
parent
342a343a57
commit
b4202b84d7
@ -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; }
|
||||
|
||||
|
@ -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;
|
||||
|
||||
//===--------------------------------------------------------------------===//
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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:
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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:
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
};
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
};
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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:
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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:
|
||||
|
@ -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;
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user