llvm.org GIT mirror llvm / b4202b8
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 Bill Wendling 11 years ago
23 changed file(s) with 24 addition(s) and 24 deletion(s). Raw diff Collapse all Expand all
150150 MachineConstantPool *getConstantPool() { return ConstantPool; }
151151 const MachineConstantPool *getConstantPool() const { return ConstantPool; }
152152
153 /// getAlignment - Return the alignment of the function.
153 /// getAlignment - Return the alignment (log2, not bytes) of the function.
154154 ///
155155 unsigned getAlignment() const { return Alignment; }
156156
157 /// setAlignment - Set the alignment of the function.
157 /// setAlignment - Set the alignment (log2, not bytes) of the function.
158158 ///
159159 void setAlignment(unsigned A) { Alignment = A; }
160160
735735 /// PIC relocation models.
736736 virtual bool isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const;
737737
738 /// getFunctionAlignment - Return the alignment of this function.
738 /// getFunctionAlignment - Return the Log2 alignment of this function.
739739 virtual unsigned getFunctionAlignment(const Function *) const = 0;
740740
741741 //===--------------------------------------------------------------------===//
454454 }
455455 }
456456
457 /// getFunctionAlignment - Return the alignment of this function.
457 /// getFunctionAlignment - Return the Log2 alignment of this function.
458458 unsigned ARMTargetLowering::getFunctionAlignment(const Function *F) const {
459459 return getTargetMachine().getSubtarget().isThumb() ? 1 : 2;
460460 }
196196 return Subtarget;
197197 }
198198
199 /// getFunctionAlignment - Return the alignment of this function.
199 /// getFunctionAlignment - Return the Log2 alignment of this function.
200200 virtual unsigned getFunctionAlignment(const Function *F) const;
201201
202202 private:
180180 }
181181 }
182182
183 /// getFunctionAlignment - Return the function alignment.
183 /// getFunctionAlignment - Return the Log2 alignment of this function.
184184 unsigned AlphaTargetLowering::getFunctionAlignment(const Function *F) const {
185185 return 4;
186186 }
102102
103103 virtual bool isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const;
104104
105 /// getFunctionAlignment - Return the function alignment.
105 /// getFunctionAlignment - Return the Log2 alignment of this function.
106106 virtual unsigned getFunctionAlignment(const Function *F) const;
107107
108108 private:
480480 return ((i != node_names.end()) ? i->second : 0);
481481 }
482482
483 /// getFunctionAlignment - Return the function alignment.
483 /// getFunctionAlignment - Return the Log2 alignment of this function.
484484 unsigned SPUTargetLowering::getFunctionAlignment(const Function *) const {
485485 return 3;
486486 }
148148
149149 virtual bool isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const;
150150
151 /// getFunctionAlignment - Return the function alignment.
151 /// getFunctionAlignment - Return the Log2 alignment of this function.
152152 virtual unsigned getFunctionAlignment(const Function *F) const;
153153 };
154154 }
147147 return MVT::i1;
148148 }
149149
150 /// getFunctionAlignment - Return the function alignment.
150 /// getFunctionAlignment - Return the Log2 alignment of this function.
151151 unsigned IA64TargetLowering::getFunctionAlignment(const Function *) const {
152152 return 5;
153153 }
6969 /// (currently, only "ret void")
7070 virtual SDValue LowerOperation(SDValue Op, SelectionDAG &DAG);
7171
72 /// getFunctionAlignment - Return the function alignment.
72 /// getFunctionAlignment - Return the Log2 alignment of this function.
7373 virtual unsigned getFunctionAlignment(const Function *F) const;
7474 };
7575 }
126126 }
127127 }
128128
129 /// getFunctionAlignment - Return the alignment of this function.
129 /// getFunctionAlignment - Return the Log2 alignment of this function.
130130 unsigned MSP430TargetLowering::getFunctionAlignment(const Function *F) const {
131131 return F->hasFnAttr(Attribute::OptimizeForSize) ? 1 : 4;
132132 }
7373 /// DAG node.
7474 virtual const char *getTargetNodeName(unsigned Opcode) const;
7575
76 /// getFunctionAlignment - Return the alignment of this function.
76 /// getFunctionAlignment - Return the Log2 alignment of this function.
7777 virtual unsigned getFunctionAlignment(const Function *F) const;
7878
7979 SDValue LowerFORMAL_ARGUMENTS(SDValue Op, SelectionDAG &DAG);
157157 return MVT::i32;
158158 }
159159
160 /// getFunctionAlignment - Return the function alignment.
160 /// getFunctionAlignment - Return the Log2 alignment of this function.
161161 unsigned MipsTargetLowering::getFunctionAlignment(const Function *) const {
162162 return 2;
163163 }
8383 /// getSetCCResultType - get the ISD::SETCC result ValueType
8484 MVT getSetCCResultType(MVT VT) const;
8585
86 /// getFunctionAlignment - Return the function alignment.
86 /// getFunctionAlignment - Return the Log2 alignment of this function.
8787 virtual unsigned getFunctionAlignment(const Function *F) const;
8888 private:
8989 // Subtarget Info
144144 unsigned GetTmpSize() { return TmpSize; }
145145 void SetTmpSize(unsigned Size) { TmpSize = Size; }
146146
147 /// getFunctionAlignment - Return the function alignment.
147 /// getFunctionAlignment - Return the Log2 alignment of this function.
148148 virtual unsigned getFunctionAlignment(const Function *) const {
149149 // FIXME: The function never seems to be aligned.
150150 return 1;
431431 return MVT::i32;
432432 }
433433
434 /// getFunctionAlignment - Return the function alignment.
434 /// getFunctionAlignment - Return the Log2 alignment of this function.
435435 unsigned PPCTargetLowering::getFunctionAlignment(const Function *F) const {
436436 if (getTargetMachine().getSubtarget().isDarwin())
437437 return F->hasFnAttr(Attribute::OptimizeForSize) ? 2 : 4;
336336
337337 virtual bool isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const;
338338
339 /// getFunctionAlignment - Return the function alignment.
339 /// getFunctionAlignment - Return the Log2 alignment of this function.
340340 virtual unsigned getFunctionAlignment(const Function *F) const;
341341
342342 private:
10471047 return false;
10481048 }
10491049
1050 /// getFunctionAlignment - Return the function alignment.
1050 /// getFunctionAlignment - Return the Log2 alignment of this function.
10511051 unsigned SparcTargetLowering::getFunctionAlignment(const Function *) const {
10521052 return 4;
10531053 }
7373
7474 virtual bool isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const;
7575
76 /// getFunctionAlignment - Return the function alignment.
76 /// getFunctionAlignment - Return the Log2 alignment of this function.
7777 virtual unsigned getFunctionAlignment(const Function *F) const;
7878 };
7979 } // end namespace llvm
10261026 return Table;
10271027 }
10281028
1029 /// getFunctionAlignment - Return the alignment of this function.
1029 /// getFunctionAlignment - Return the Log2 alignment of this function.
10301030 unsigned X86TargetLowering::getFunctionAlignment(const Function *F) const {
10311031 return F->hasFnAttr(Attribute::OptimizeForSize) ? 1 : 4;
10321032 }
533533 #endif
534534 );
535535
536 /// getFunctionAlignment - Return the alignment of this function.
536 /// getFunctionAlignment - Return the Log2 alignment of this function.
537537 virtual unsigned getFunctionAlignment(const Function *F) const;
538538
539539 private:
186186 }
187187 }
188188
189 /// getFunctionAlignment - Return the alignment of this function.
189 /// getFunctionAlignment - Return the Log2 alignment of this function.
190190 unsigned XCoreTargetLowering::
191191 getFunctionAlignment(const Function *) const {
192192 return 1;
8383 virtual bool isLegalAddressingMode(const AddrMode &AM,
8484 const Type *Ty) const;
8585
86 /// getFunctionAlignment - Return the alignment of this function.
86 /// getFunctionAlignment - Return the Log2 alignment of this function.
8787 virtual unsigned getFunctionAlignment(const Function *F) const;
8888
8989 private: