[llvm-commits] [llvm] r56511 - in /llvm/trunk: include/llvm/ lib/AsmParser/ lib/Bitcode/Reader/ lib/Bitcode/Writer/ lib/Target/X86/AsmPrinter/ lib/Transforms/IPO/ lib/Transforms/Scalar/ lib/Transforms/Utils/ lib/VMCore/
Chris Lattner
clattner at apple.com
Tue Sep 23 16:09:25 PDT 2008
On Sep 23, 2008, at 3:35 PM, Devang Patel wrote:
> URL: http://llvm.org/viewvc/llvm-project?rev=56511&view=rev
> Log:
> Use parameter attribute store (soon to be renamed) for
> Function Notes also. Function notes are stored at index ~0.
Yay for convergence :)
> + bool hasNote(ParameterAttributes N) const {
> + // Notes are stored at ~0 index in parameter attribute list
> + return (!isDeclaration() && paramHasAttr(~0, N));
> }
Is there a specific reason to check isDeclaration() here? That seems
somewhat strange. Clients should check this if they care.
>
>
> /// setNotes - Set notes for this function
> ///
> - void setNotes(const FunctionNotes P) { Notes = Notes | P;}
> + void setNotes(const ParameterAttributes N) {
> + // Notes are stored at ~0 index in parameter attribute list
> + addParamAttr(~0, N);
> + }
Tabs.
> +++ llvm/trunk/lib/AsmParser/llvmAsmParser.y Tue Sep 23 17:35:17 2008
> @@ -995,7 +995,7 @@
> llvm::GlobalValue::LinkageTypes Linkage;
> llvm::GlobalValue::VisibilityTypes Visibility;
> llvm::ParameterAttributes ParamAttrs;
> - llvm::FunctionNotes FunctionNotes;
> + llvm::ParameterAttributes FunctionNotes;
Why not just use the existing 'ParamAttrs' field?
Is the syntax of notes in .ll files going to change to follow
attributes?
-Chris
More information about the llvm-commits
mailing list