Re: [llvm-commits] PR1146 patch for llvm-gcc-4.0

2007-08-18 Thread Reid Spencer
On Thu, 2007-08-16 at 17:56 +0200, Duncan Sands wrote: > Hi Reid, > > > - Attrs.push_back(ParamAttrsWithIndex::get(ArgTypes.size(), > > Attributes)); > > + Client.addAttributes(ArgTypes.size(), Attributes); > > all users of addAttributes seem to be adding a new attribute at > the back.

Re: [llvm-commits] PR1146 patch for llvm-gcc-4.0

2007-08-18 Thread Reid Spencer
On Thu, 2007-08-16 at 16:32 +0200, Duncan Sands wrote: > Hi Reid, > > in ConvertFunctionType: > > > + PAL = 0; > > so there is no need for callers to set PAL = 0 before > calling ConvertFunctionType, as they all do right now. > For that matter, it's not clear that this assignment is > needed si

Re: [llvm-commits] PR1146 patch for llvm-gcc-4.0

2007-08-18 Thread Reid Spencer
On Thu, 2007-08-16 at 16:27 +0200, Duncan Sands wrote: > Hi Reid, > > > + bool extend = false; > > it looks like extend is never assigned another value. This doesn't exist in the current patch. > > Ciao, > > Duncan. ___ llvm-commits mailing li

Re: [llvm-commits] PR1146 patch for llvm-gcc-4.0

2007-08-18 Thread Duncan Sands
Hi Reid, in ConvertFunctionType: > + PAL = 0; so there is no need for callers to set PAL = 0 before calling ConvertFunctionType, as they all do right now. For that matter, it's not clear that this assignment is needed since it looks like PAL is always assigned elsewhere before ConvertFunctionTy

Re: [llvm-commits] PR1146 patch for llvm-gcc-4.0

2007-08-18 Thread Duncan Sands
Hi Reid, > - Attrs.push_back(ParamAttrsWithIndex::get(ArgTypes.size(), Attributes)); > + Client.addAttributes(ArgTypes.size(), Attributes); all users of addAttributes seem to be adding a new attribute at the back. Given this, your implementation of addAttributes looks inefficient. Als

Re: [llvm-commits] PR1146 patch for llvm-gcc-4.0

2007-08-18 Thread Duncan Sands
Hi Reid, > + bool extend = false; it looks like extend is never assigned another value. Ciao, Duncan. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

[llvm-commits] PR1146 patch for llvm-gcc-4.0

2007-07-29 Thread Reid Spencer
All, Attached is my patch for llvm-gcc-4.0. This rearranges the attribute processing a bit and centralizes the K&R stuff in the FunctionTypeConverter. The methods to convert a function type now take an extra ParamAttrsList parameter that is generated for use with Functions and call sites. This goe