Re: [llvm-commits] [llvm] r47220 - in /llvm/trunk: lib/Transforms/IPO/GlobalOpt.cpp test/Transforms/GlobalOpt/2008-02-16-NestAttr.ll

2008-02-18 Thread Duncan Sands
Hi Chris, Nice. Out of curiousity, how does nest do to codegen? 'nest' causes a specific register to be grabbed for the parameter in calls. So removing it doesn't do much :) Ok. if you want me to remove the transform, just ask :) I mostly did it because seeing all those useless

[llvm-commits] [llvm] r47273 - in /llvm/trunk: include/llvm/Support/CallSite.h lib/Transforms/IPO/GlobalOpt.cpp lib/VMCore/Instructions.cpp

2008-02-18 Thread Duncan Sands
Author: baldrick Date: Mon Feb 18 11:32:13 2008 New Revision: 47273 URL: http://llvm.org/viewvc/llvm-project?rev=47273view=rev Log: Simplify caller updating using a CallSite, as requested by Chris. While there, do the same for an existing function committed by someone called lattner :)

Re: [llvm-commits] [llvm] r47265 - in /llvm/trunk: lib/Transforms/Scalar/GVN.cpp test/Transforms/GVN/sret.ll

2008-02-18 Thread Duncan Sands
Hi Owen, nice transform! + // Check that we're copying to an argument... + Value* cpyDest = cpy-getDest(); + if (!isaArgument(cpyDest)) +return false; + + // And that the argument is the return slot + Argument* sretArg = castArgument(cpyDest); + if

[llvm-commits] [llvm] r47256 - /llvm/trunk/docs/LangRef.html

2008-02-17 Thread Duncan Sands
Author: baldrick Date: Sun Feb 17 22:19:38 2008 New Revision: 47256 URL: http://llvm.org/viewvc/llvm-project?rev=47256view=rev Log: Clarify that 'sret' only applies to pointers, and only applies to the first parameter. Modified: llvm/trunk/docs/LangRef.html Modified:

Re: [llvm-commits] [llvm] r47247 - /llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp

2008-02-17 Thread Duncan Sands
Hi Owen, - (isaArgument(Object) castArgument(Object)-hasByValAttr( { - // Okay, the pointer is to a stack allocated object. If we can prove that + (isaArgument(Object) + (castArgument(Object)-hasByValAttr() || +

Re: [llvm-commits] [llvm-gcc-4.2] r47180 - in /llvm-gcc-4.2/trunk/gcc: llvm-convert.cpp llvm-internal.h llvm-types.cpp

2008-02-16 Thread Duncan Sands
Hi Dale, Put back fixed version of code to avoid copying padding within structs (sometimes). if this means that ConvertUNION doesn't have to muck around with fixing up padding elements anymore, can you please remove that code. Thanks! Duncan. ___

Re: [llvm-commits] [llvm] r47204 - in /llvm/trunk: docs/ include/llvm/ include/llvm/CodeGen/ lib/CodeGen/SelectionDAG/ lib/Target/ lib/Target/Alpha/ lib/Target/X86/ test/CodeGen/Alpha/ test/CodeGen/X8

2008-02-16 Thread Duncan Sands
Hi Andrew, +handling llvm.memory.barrier on pre SSE2 cpus + +should generate: +lock ; mov %esp, %esp the linux kernel uses lock; addl $0,0(%esp) I don't know which is better (if any). Ciao, Duncan. ___ llvm-commits mailing list

[llvm-commits] [llvm] r47211 - /llvm/trunk/docs/GCCFEBuildInstrs.html

2008-02-16 Thread Duncan Sands
Author: baldrick Date: Sat Feb 16 03:47:41 2008 New Revision: 47211 URL: http://llvm.org/viewvc/llvm-project?rev=47211view=rev Log: Try to clarify which compilers can be used for the build. Modified: llvm/trunk/docs/GCCFEBuildInstrs.html Modified: llvm/trunk/docs/GCCFEBuildInstrs.html URL:

[llvm-commits] [llvm] r47212 - in /llvm/trunk/lib/CodeGen/SelectionDAG: LegalizeTypes.h LegalizeTypesExpand.cpp

2008-02-16 Thread Duncan Sands
Author: baldrick Date: Sat Feb 16 04:29:26 2008 New Revision: 47212 URL: http://llvm.org/viewvc/llvm-project?rev=47212view=rev Log: Teach LegalizeTypes how to expand the operands of br_cc. This fixes 5 make check failures. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.h

[llvm-commits] [llvm] r47219 - /llvm/trunk/lib/VMCore/ParameterAttributes.cpp

2008-02-16 Thread Duncan Sands
Author: baldrick Date: Sat Feb 16 14:53:06 2008 New Revision: 47219 URL: http://llvm.org/viewvc/llvm-project?rev=47219view=rev Log: Some micro-optimizations. Modified: llvm/trunk/lib/VMCore/ParameterAttributes.cpp Modified: llvm/trunk/lib/VMCore/ParameterAttributes.cpp URL:

[llvm-commits] [llvm] r47220 - in /llvm/trunk: lib/Transforms/IPO/GlobalOpt.cpp test/Transforms/GlobalOpt/2008-02-16-NestAttr.ll

2008-02-16 Thread Duncan Sands
Author: baldrick Date: Sat Feb 16 14:56:04 2008 New Revision: 47220 URL: http://llvm.org/viewvc/llvm-project?rev=47220view=rev Log: Remove any 'nest' parameter attributes if the function is not passed as an argument to a trampoline intrinsic. Added:

[llvm-commits] [llvm-gcc-4.2] r47221 - /llvm-gcc-4.2/trunk/gcc/llvm-types.cpp

2008-02-16 Thread Duncan Sands
Author: baldrick Date: Sat Feb 16 14:59:48 2008 New Revision: 47221 URL: http://llvm.org/viewvc/llvm-project?rev=47221view=rev Log: For a nested function, the parent's variables are like global variables for a normal function. In particular a 'const' nested function can reasonably return the

[llvm-commits] [llvm-gcc-4.2] r47222 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp

2008-02-16 Thread Duncan Sands
Author: baldrick Date: Sat Feb 16 15:01:53 2008 New Revision: 47222 URL: http://llvm.org/viewvc/llvm-project?rev=47222view=rev Log: Remove some code originally inspired by expand_assignment in expr.c. I don't think this is needed, and I suspect it's not needed in expand_assignment either and is

Re: [llvm-commits] [llvm] r47220 - in /llvm/trunk: lib/Transforms/IPO/GlobalOpt.cpp test/Transforms/GlobalOpt/2008-02-16-NestAttr.ll

2008-02-16 Thread Duncan Sands
Hi Chris, Remove any 'nest' parameter attributes if the function is not passed as an argument to a trampoline intrinsic. Nice. Out of curiousity, how does nest do to codegen? 'nest' causes a specific register to be grabbed for the parameter in calls. So removing it doesn't do much :)

Re: [llvm-commits] CVS: llvm-www/releases/download.html

2008-02-15 Thread Duncan Sands
Thanks Chris! Can you please also update the 2.2 release notes, and where it says (about Ada and Fortran) they need to be built from source, make that a link to GCCFEBuildIntrs. We typically don't change the 2.2 release notes after it ships. Do you mean the mainline release notes

[llvm-commits] [llvm] r47172 - in /llvm/trunk/lib/CodeGen/SelectionDAG: LegalizeTypes.h LegalizeTypesPromote.cpp

2008-02-15 Thread Duncan Sands
Author: baldrick Date: Fri Feb 15 13:34:17 2008 New Revision: 47172 URL: http://llvm.org/viewvc/llvm-project?rev=47172view=rev Log: Teach LegalizeTypes how to promote the flags in a ret node. These are created as i32 constants but on some platforms i32 is not legal. This fixes 26 make check

Re: [llvm-commits] test/C++Frontend/2008-02-13-sret.cpp

2008-02-15 Thread Duncan Sands
On Thursday 14 February 2008 19:02:26 Dale Johannesen wrote: On Feb 14, 2008, at 6:52 AM, Duncan Sands wrote: Hi Dale, this test is failing for me (x86-32 linux): there is nothing called retval. // RUN: %llvmgxx -S -O0 -emit-llvm %s -o - | grep retval | grep S242 | grep {i32 1

Re: [llvm-commits] [llvm] r47161 - /llvm/trunk/lib/System/Unix/Signals.inc

2008-02-15 Thread Duncan Sands
It is not safe to call fork in PrintStackTrace. Sometimes it freezes the program. Is this in a signal handler? There are tight restrictions on what is allowed in a signal handler, not just no forking :) Ciao, Duncan. ___ llvm-commits mailing list

[llvm-commits] [llvm] r47173 - /llvm/trunk/test/C++Frontend/2008-02-13-sret.cpp

2008-02-15 Thread Duncan Sands
Author: baldrick Date: Fri Feb 15 13:42:13 2008 New Revision: 47173 URL: http://llvm.org/viewvc/llvm-project?rev=47173view=rev Log: Fix this test on linux, which returns S242 using sret. Modified: llvm/trunk/test/C++Frontend/2008-02-13-sret.cpp Modified:

[llvm-commits] test/C++Frontend/2008-02-13-sret.cpp

2008-02-14 Thread Duncan Sands
Hi Dale, this test is failing for me (x86-32 linux): there is nothing called retval. // RUN: %llvmgxx -S -O0 -emit-llvm %s -o - | grep retval | grep S242 | grep {i32 1} | count 2 Ciao, Duncan. ; ModuleID = '2008-02-13-sret.cpp' target datalayout =

[llvm-commits] [llvm] r47122 - in /llvm/trunk: include/llvm/Target/TargetLowering.h lib/CodeGen/SelectionDAG/LegalizeDAG.cpp lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp lib/CodeGen/SelectionDAG/Targ

2008-02-14 Thread Duncan Sands
Author: baldrick Date: Thu Feb 14 11:28:50 2008 New Revision: 47122 URL: http://llvm.org/viewvc/llvm-project?rev=47122view=rev Log: In TargetLowering::LowerCallTo, don't assert that the return value is zero-extended if it isn't sign-extended. It may also be any-extended. Also, if a floating

[llvm-commits] [llvm] r47124 - in /llvm/trunk: Xcode/LLVM.xcodeproj/project.pbxproj docs/CFEBuildInstrs.html docs/GCCFEBuildInstrs.html docs/GettingStarted.html docs/index.html

2008-02-14 Thread Duncan Sands
Author: baldrick Date: Thu Feb 14 11:53:22 2008 New Revision: 47124 URL: http://llvm.org/viewvc/llvm-project?rev=47124view=rev Log: Rename CFEBuildInstrs.html to GCCFEBuildInstrs.html. Update all references to it and place a redirection page at the old address. Added:

Re: [llvm-commits] CVS: llvm-www/releases/download.html

2008-02-14 Thread Duncan Sands
update the one reference to CFEBuildInstrs.html that I see. Thanks Chris! Can you please also update the 2.2 release notes, and where it says (about Ada and Fortran) they need to be built from source, make that a link to GCCFEBuildIntrs. Ciao, Duncan.

Re: [llvm-commits] [llvm] r47122 - in /llvm/trunk: include/llvm/Target/TargetLowering.h lib/CodeGen/SelectionDAG/LegalizeDAG.cpp lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp lib/CodeGen/SelectionDAG/

2008-02-14 Thread Duncan Sands
Hi Evan, Finally, when doing libcalls, set isZExt on a parameter if it is unsigned. Currently isSExt is set when signed, and nothing is set otherwise. This should be right for all calls to standard library routines. I am not sure I totally understand the reason for this. Is it

Re: [llvm-commits] [test-suite] r47145 - /test-suite/trunk/RunSafely.sh

2008-02-14 Thread Duncan Sands
+# stack size: 100 MB should be enough for anybody. ;) +ULIMITCMD=$ULIMITCMD ulimit -s 10; What about over-all virtual memory (-v)? D. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu

Re: [llvm-commits] [llvm] r47061 - /llvm/trunk/lib/Analysis/ScalarEvolution.cpp

2008-02-13 Thread Duncan Sands
+// treat m-n as signed nor unsinged due to overflow possibility. unsinged - unsigned Ciao, D. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

[llvm-commits] [llvm] r47063 - /llvm/trunk/docs/CFEBuildInstrs.html

2008-02-13 Thread Duncan Sands
Author: baldrick Date: Wed Feb 13 10:46:10 2008 New Revision: 47063 URL: http://llvm.org/viewvc/llvm-project?rev=47063view=rev Log: Add notes on Ada compilers that can be used for the build. Put all items that the user should specify in bold. Make it a debug build. Modified:

[llvm-commits] [llvm] r47075 - in /llvm/trunk: lib/CodeGen/SelectionDAG/LegalizeTypes.h lib/CodeGen/SelectionDAG/LegalizeTypesExpand.cpp lib/CodeGen/SelectionDAG/LegalizeTypesPromote.cpp test/CodeGen/

2008-02-13 Thread Duncan Sands
Author: baldrick Date: Wed Feb 13 12:01:53 2008 New Revision: 47075 URL: http://llvm.org/viewvc/llvm-project?rev=47075view=rev Log: Teach LegalizeTypes how to expand and promote CTLZ, CTTZ and CTPOP. The expansion code differs from that in LegalizeDAG in that it chooses to take the CTLZ/CTTZ

Re: [llvm-commits] [llvm-gcc-4.2] r47080 - in /llvm-gcc-4.2/trunk/gcc: common.opt llvm-backend.cpp

2008-02-13 Thread Duncan Sands
Hi Devang, nice idea. +  // Emit intermediate .bc file before module level optimization passes are run. +  if (emit_llvm_bc flag_debug_llvm_module_opt) { Why condition this on emit_llvm_bc? +static PassManager *IntermediatePM = new PassManager(); +IntermediatePM-add(new

[llvm-commits] [llvm] r47028 - /llvm/trunk/docs/CFEBuildInstrs.html

2008-02-12 Thread Duncan Sands
Author: baldrick Date: Tue Feb 12 15:28:39 2008 New Revision: 47028 URL: http://llvm.org/viewvc/llvm-project?rev=47028view=rev Log: Add more spacing. Modified: llvm/trunk/docs/CFEBuildInstrs.html Modified: llvm/trunk/docs/CFEBuildInstrs.html URL:

[llvm-commits] [llvm] r47027 - /llvm/trunk/docs/CFEBuildInstrs.html

2008-02-12 Thread Duncan Sands
Author: baldrick Date: Tue Feb 12 15:22:58 2008 New Revision: 47027 URL: http://llvm.org/viewvc/llvm-project?rev=47027view=rev Log: Add instructions for building Ada and Fortran. Adjust mentions of gcc4 to be 4.0/4.2 agnostic. This file should probably be renamed tor GCCFEBuildInstrs.html...

[llvm-commits] [llvm] r47031 - /llvm/trunk/docs/CFEBuildInstrs.html

2008-02-12 Thread Duncan Sands
Author: baldrick Date: Tue Feb 12 15:40:21 2008 New Revision: 47031 URL: http://llvm.org/viewvc/llvm-project?rev=47031view=rev Log: Note that these instructions are for x86-32 linux (the only platform on which the Ada compiler even builds). Modified: llvm/trunk/docs/CFEBuildInstrs.html

Re: [llvm-commits] [llvm-gcc-4.2] r46966 - in /llvm-gcc-4.2/trunk/gcc: config/i386/i386.h config/rs6000/rs6000.h llvm-abi.h

2008-02-12 Thread Duncan Sands
Hi Dale, Treat struct { long long: 29; }; as int sized and aligned, rather than long long. ABI issue. if you look at the DECL_SIZE of the bitfield, rather than the type size, I think it gives you 29. If so, DECL_SIZE should simplify things for you. In fact as far as I can see you

[llvm-commits] [llvm] r46967 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

2008-02-11 Thread Duncan Sands
Author: baldrick Date: Mon Feb 11 14:58:28 2008 New Revision: 46967 URL: http://llvm.org/viewvc/llvm-project?rev=46967view=rev Log: Generalize the handling of call and return arguments, in preparation for apint support. These changes are intended to have no functional effect. Modified:

Re: [llvm-commits] [llvm-gcc-4.2] r46966 - in /llvm-gcc-4.2/trunk/gcc: config/i386/i386.h config/rs6000/rs6000.h llvm-abi.h

2008-02-11 Thread Duncan Sands
Hi Dale, Treat struct { long long: 29; }; as int sized and aligned, rather than long long. ABI issue. if you look at the DECL_SIZE of the bitfield, rather than the type size, I think it gives you 29. If so, DECL_SIZE should simplify things for you. In fact as far as I can see you should

[llvm-commits] [llvm] r46956 - /llvm/trunk/include/llvm/Target/TargetLowering.h

2008-02-11 Thread Duncan Sands
Author: baldrick Date: Mon Feb 11 05:09:23 2008 New Revision: 46956 URL: http://llvm.org/viewvc/llvm-project?rev=46956view=rev Log: Add arbitrary integer support to getRegisterType and getNumRegisters. This is needed for calling functions with apint parameters or return values. Modified:

Re: [llvm-commits] [llvm-gcc-4.2] r46726 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp

2008-02-11 Thread Duncan Sands
the current LLVM implementation means that anyone using threading needs to not do bitfield accesses, since the compiler generated code could cause trouble. This is not handled by LLVM, this is handled by FE that is translating source code into LLVM IR. Unless all front-ends enforce

[llvm-commits] [llvm] r46954 - in /llvm/trunk: include/llvm/Target/TargetLowering.h lib/CodeGen/SelectionDAG/DAGCombiner.cpp lib/CodeGen/SelectionDAG/LegalizeDAG.cpp lib/CodeGen/SelectionDAG/LegalizeT

2008-02-11 Thread Duncan Sands
Author: baldrick Date: Mon Feb 11 04:37:04 2008 New Revision: 46954 URL: http://llvm.org/viewvc/llvm-project?rev=46954view=rev Log: Add a isBigEndian method to complement isLittleEndian. Modified: llvm/trunk/include/llvm/Target/TargetLowering.h

[llvm-commits] [llvm] r46928 - /llvm/trunk/docs/ReleaseNotes.html

2008-02-10 Thread Duncan Sands
Author: baldrick Date: Sun Feb 10 07:40:55 2008 New Revision: 46928 URL: http://llvm.org/viewvc/llvm-project?rev=46928view=rev Log: Add some Ada info and correct a few buglets. Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL:

Re: [llvm-commits] [llvm] r46108 - in /llvm/trunk: lib/Transforms/IPO/ArgumentPromotion.cpp test/Transforms/ArgumentPromotion/attrs.ll

2008-02-10 Thread Duncan Sands
you forgot about attributes on the function return value. I've lost the context for this, do you remember what this was about? I fixed it for you already :) D. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu

Re: [llvm-commits] [llvm] r46934 - /llvm/trunk/docs/ReleaseNotes.html

2008-02-10 Thread Duncan Sands
maybe c380004 can be hyperlinked too? There's not really much point: this is not an llvm-gcc problem. I don't plan to open a PR for it, so there's nothing to link to. Ciao, Duncan. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu

Re: [llvm-commits] [llvm-gcc-4.2] r46726 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp

2008-02-09 Thread Duncan Sands
Hi Devang, I can't help feeling that a bitfield load or store should touch the minimum amount of bytes possible: only those that contain some part of the bitfield.  In some situations touching other bytes could be fatal, for example if the type is overlaid on some memory mapped io

Re: [llvm-commits] [llvm-gcc-4.2] r46726 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp

2008-02-07 Thread Duncan Sands
Hi Devang, Use appropriate alignment while handling packed struct member. the reason I asked for a testcase is that I thought all objects created by the IR we generate (whether locals, globals or on the heap) were supposed to be aligned at least as much as the gcc alignment. If so, the fact

Re: [llvm-commits] [llvm-gcc-4.2] r46726 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp

2008-02-07 Thread Duncan Sands
Hi Devang, It is possible that I'm not solving the real problem here. struct { char a; char b; int c:8; int d:20; } S; When this struct is packed and S is aligned at 4 byte, what alignment   should be specified on load instruction to load 'd' ? since

Re: [llvm-commits] [llvm-gcc-4.2] r46726 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp

2008-02-05 Thread Duncan Sands
Hi Devang, Use appropriate alignment while handling packed struct member. do you have a testcase for this? Thanks, Duncan. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

[llvm-commits] [llvm] r46713 - /llvm/trunk/test/CodeGen/Generic/2008-02-04-Ctlz.ll

2008-02-04 Thread Duncan Sands
Author: baldrick Date: Mon Feb 4 12:07:02 2008 New Revision: 46713 URL: http://llvm.org/viewvc/llvm-project?rev=46713view=rev Log: Crashes LegalizeTypes with Do not know how to expand the result of this operator! (node: ctlz). Added: llvm/trunk/test/CodeGen/Generic/2008-02-04-Ctlz.ll

[llvm-commits] [llvm] r46712 - /llvm/trunk/test/CodeGen/Generic/2008-02-04-ExtractSubvector.ll

2008-02-04 Thread Duncan Sands
Author: baldrick Date: Mon Feb 4 12:05:42 2008 New Revision: 46712 URL: http://llvm.org/viewvc/llvm-project?rev=46712view=rev Log: Crashes LegalizeTypes with Do not know how to split this operator's operand (node: extract_subvector). Added:

Re: [llvm-commits] [llvm-gcc-4.2] r46670 - in /llvm-gcc-4.2/trunk/gcc: llvm-backend.cpp llvm-convert.cpp

2008-02-04 Thread Duncan Sands
On Monday 4 February 2008 22:50:23 Devang Patel wrote: Please update associated comments also. Sorry about that - done now. Ciao, Duncan. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

[llvm-commits] [llvm-gcc-4.2] r46728 - in /llvm-gcc-4.2/trunk/gcc: llvm-backend.cpp llvm-convert.cpp

2008-02-04 Thread Duncan Sands
Author: baldrick Date: Mon Feb 4 18:06:31 2008 New Revision: 46728 URL: http://llvm.org/viewvc/llvm-project?rev=46728view=rev Log: Update comments. Modified: llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Modified:

[llvm-commits] [llvm] r46645 - in /llvm/trunk: lib/Transforms/IPO/ArgumentPromotion.cpp test/Transforms/ArgumentPromotion/2008-02-01-ReturnAttrs.ll

2008-02-01 Thread Duncan Sands
Author: baldrick Date: Fri Feb 1 14:37:16 2008 New Revision: 46645 URL: http://llvm.org/viewvc/llvm-project?rev=46645view=rev Log: Don't drop function/call return attributes like 'nounwind'. Added: llvm/trunk/test/Transforms/ArgumentPromotion/2008-02-01-ReturnAttrs.ll Modified:

Re: [llvm-commits] [llvm] r46565 - in /llvm/trunk: lib/CodeGen/MachineModuleInfo.cpp test/DebugInfo/globalGetElementPtr.ll

2008-01-31 Thread Duncan Sands
Hi Dale, maybe you could use IntrinsicInst::StripPointerCasts instead? Didn't know about this, thanks. It recurses and I don't think that's what I want in this case. I did, however, steal its looping code:) Are you sure you don't want it to be recursive? I can take a global variable,

Re: [llvm-commits] [llvm] r46565 - in /llvm/trunk: lib/CodeGen/MachineModuleInfo.cpp test/DebugInfo/globalGetElementPtr.ll

2008-01-31 Thread Duncan Sands
Hi Dale, maybe you could use IntrinsicInst::StripPointerCasts instead? Didn't know about this, thanks. It recurses and I don't think that's what I want in this case. I did, however, steal its looping code:) Are you sure you don't want it to be recursive? I can take a global

Re: [llvm-commits] [llvm] r46565 - in /llvm/trunk: lib/CodeGen/MachineModuleInfo.cpp test/DebugInfo/globalGetElementPtr.ll

2008-01-30 Thread Duncan Sands
Hi Dale, maybe you could use IntrinsicInst::StripPointerCasts instead? Best wishes, Duncan. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

[llvm-commits] [llvm] r46525 - /llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypesExpand.cpp

2008-01-29 Thread Duncan Sands
Author: baldrick Date: Tue Jan 29 13:29:08 2008 New Revision: 46525 URL: http://llvm.org/viewvc/llvm-project?rev=46525view=rev Log: When expanding an operand, it's not the result value type that matters but the operand type. This fixes 2008-01-08-IllegalCMP.ll which crashed with the new legalize

Re: [llvm-commits] [llvm-gcc-4.2] r46450 - in /llvm-gcc-4.2/trunk/gcc: llvm-abi.h llvm-internal.h llvm-types.cpp

2008-01-28 Thread Duncan Sands
Hi Evan, thanks for doing this. +static bool isZeroSizedStructOrUnion(tree type) { + if (TREE_CODE(type) != RECORD_TYPE TREE_CODE(type) != UNION_TYPE) You should let QUAL_UNION through here as well. And what about size-zero arrays? Or for that matter, zero size anything? +// Skip

[llvm-commits] [llvm] r46451 - /llvm/trunk/test/CFrontend/2008-01-26-ReadOnlyByVal.c

2008-01-28 Thread Duncan Sands
Author: baldrick Date: Mon Jan 28 04:35:11 2008 New Revision: 46451 URL: http://llvm.org/viewvc/llvm-project?rev=46451view=rev Log: Make this more likely to be passed byval. Modified: llvm/trunk/test/CFrontend/2008-01-26-ReadOnlyByVal.c Modified:

Re: [llvm-commits] [llvm] r46432 - /llvm/trunk/Makefile.rules

2008-01-28 Thread Duncan Sands
Author: lattner Date: Sun Jan 27 22:18:41 2008 New Revision: 46432 URL: http://llvm.org/viewvc/llvm-project?rev=46432view=rev Log: reduce duplicate -I flags passed to the compiler, cleaning up the VERBOSE output. Patch contributed by Sam Bishop! This breaks the build when the objects

Re: [llvm-commits] [llvm] r46372 - /llvm/trunk/test/CFrontend/2008-01-25-ByValReadNone.c

2008-01-28 Thread Duncan Sands
Hi Tanya, This test is failing for me. llvm-gcc-4.0, x86 darwin8. it should be better now. It needed tweaking for a policy change on byval+const/pure. Also, a patch had not been backported from 4.2 to 4.0. Ciao, Duncan. ___ llvm-commits mailing

[llvm-commits] [llvm-gcc-4.0] r46457 - /llvm-gcc-4.0/trunk/gcc/llvm-types.cpp

2008-01-28 Thread Duncan Sands
Author: baldrick Date: Mon Jan 28 13:57:01 2008 New Revision: 46457 URL: http://llvm.org/viewvc/llvm-project?rev=46457view=rev Log: Backport the patch turning off readnone/readonly when there is a byval parameter from 4.2. Modified: llvm-gcc-4.0/trunk/gcc/llvm-types.cpp Modified:

Re: [llvm-commits] [llvm] r46382 - /llvm/trunk/test/CFrontend/2008-01-25-ZeroSizedAggregate.c

2008-01-28 Thread Duncan Sands
How long should we continue to support 4.0? I thought 2.2 was the last release for it? Does 4.0 do anything better than 4.2? I'm all for dropping it like a hot potato if not. Ciao, Duncan. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu

Re: [llvm-commits] [llvm-gcc-4.2] r46450 - in /llvm-gcc-4.2/trunk/gcc: llvm-abi.h llvm-internal.h llvm-types.cpp

2008-01-28 Thread Duncan Sands
Hi Evan, This is probably safe (not completely clear), but why do you need to do it at all? Because they are skipped earlier when we did the type translation. I see - this was orthogonal to the rest of your patch. I have a different fix for this issue which I like better, but that's my

Re: [llvm-commits] [llvm] r46432 - /llvm/trunk/Makefile.rules

2008-01-28 Thread Duncan Sands
This breaks the build when the objects directory is different to the source directory. I'm very sorry about this. The attached patch will fix it. Indeed it does, so I've applied it. Thanks for the quick fix! Best wishes, Duncan. ___

[llvm-commits] [llvm] r46456 - /llvm/trunk/test/CFrontend/2008-01-25-ByValReadNone.c

2008-01-28 Thread Duncan Sands
Author: baldrick Date: Mon Jan 28 13:25:47 2008 New Revision: 46456 URL: http://llvm.org/viewvc/llvm-project?rev=46456view=rev Log: Pure/const functions with ByVal parameters cannot be marked readonly either. Modified: llvm/trunk/test/CFrontend/2008-01-25-ByValReadNone.c Modified:

[llvm-commits] [llvm-gcc-4.2] r46460 - in /llvm-gcc-4.2/trunk/gcc: llvm-convert.cpp llvm-internal.h

2008-01-28 Thread Duncan Sands
Author: baldrick Date: Mon Jan 28 14:57:24 2008 New Revision: 46460 URL: http://llvm.org/viewvc/llvm-project?rev=46460view=rev Log: Fix PR1942 differently, by having the caller take care of making a copy of the aggregate return value rather than the callee (the previous fix). This is better

[llvm-commits] [llvm] r46453 - /llvm/trunk/Makefile.rules

2008-01-28 Thread Duncan Sands
Author: baldrick Date: Mon Jan 28 11:38:30 2008 New Revision: 46453 URL: http://llvm.org/viewvc/llvm-project?rev=46453view=rev Log: Unbreak builds with differing object and source directories. Patch by Sam Bishop. Modified: llvm/trunk/Makefile.rules Modified: llvm/trunk/Makefile.rules URL:

[llvm-commits] [llvm] r46492 - /llvm/trunk/test/CFrontend/2008-01-26-ReadOnlyByVal.c

2008-01-28 Thread Duncan Sands
Author: baldrick Date: Mon Jan 28 23:57:23 2008 New Revision: 46492 URL: http://llvm.org/viewvc/llvm-project?rev=46492view=rev Log: After recent changes we fail to optimize this test sufficiently to have it pass. I'm removing it from the testsuite and adding it to PR452 instead. Removed:

[llvm-commits] [llvm] r46495 - in /llvm/trunk: include/llvm/Target/TargetData.h lib/CodeGen/ELFWriter.cpp lib/CodeGen/MachOWriter.cpp lib/ExecutionEngine/JIT/JIT.cpp lib/Target/IA64/IA64AsmPrinter.cpp

2008-01-28 Thread Duncan Sands
Author: baldrick Date: Tue Jan 29 00:23:44 2008 New Revision: 46495 URL: http://llvm.org/viewvc/llvm-project?rev=46495view=rev Log: Use getPreferredAlignmentLog or getPreferredAlignment to get the alignment of global variables, rather than using hand-made versions. Modified:

[llvm-commits] [llvm] r46493 - /llvm/trunk/test/C++Frontend/2008-01-25-ResultIsParam.cpp

2008-01-28 Thread Duncan Sands
Author: baldrick Date: Tue Jan 29 00:04:54 2008 New Revision: 46493 URL: http://llvm.org/viewvc/llvm-project?rev=46493view=rev Log: This would be better done as an executable test. Removed: llvm/trunk/test/C++Frontend/2008-01-25-ResultIsParam.cpp Removed:

Re: [llvm-commits] [llvm] r46451 - /llvm/trunk/test/CFrontend/2008-01-26-ReadOnlyByVal.c

2008-01-28 Thread Duncan Sands
This fails with 4.0 on darwin x86. I've removed it. With recent changes needed for byval correctness, it became too hard for the optimizers. I've added it to PR452 instead. Ciao, Duncan. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu

[llvm-commits] [test-suite] r46498 - /test-suite/trunk/SingleSource/Regression/C++/2008-01-29-ParamAliasesReturn.cpp

2008-01-28 Thread Duncan Sands
Author: baldrick Date: Tue Jan 29 00:46:44 2008 New Revision: 46498 URL: http://llvm.org/viewvc/llvm-project?rev=46498view=rev Log: Test for PR1942. Added: test-suite/trunk/SingleSource/Regression/C++/2008-01-29-ParamAliasesReturn.cpp Added:

Re: [llvm-commits] [llvm-gcc-4.2] r46381 - in /llvm-gcc-4.2/trunk/gcc: llvm-abi.h llvm-internal.h llvm-types.cpp

2008-01-27 Thread Duncan Sands
Hi Evan, Can you get me a test case? I need to see what gcc is doing. Thanks, Sure. Zero sized fields in structs may not be very useful, but it is still legal to use them, in particular you can take their address, like this: struct Z {}; struct Y { int i; struct Z z; }; void

Re: [llvm-commits] [llvm-gcc-4.2] r46381 - in /llvm-gcc-4.2/trunk/gcc: llvm-abi.h llvm-internal.h llvm-types.cpp

2008-01-27 Thread Duncan Sands
I'm running into this problem as well -- it crashing while compiling gcov.c on my PPC G4. While r46381 seems the obvious culprit, to tell the truth I didn't check whether reverting this patch fixes the problem - so I could be wrong. Ciao, Duncan.

[llvm-commits] [llvm-gcc-4.2] r46415 - /llvm-gcc-4.2/trunk/gcc/llvm-types.cpp

2008-01-27 Thread Duncan Sands
Author: baldrick Date: Sun Jan 27 12:11:13 2008 New Revision: 46415 URL: http://llvm.org/viewvc/llvm-project?rev=46415view=rev Log: Do not mark a function readnone or readonly if it has a byval parameter. Modified: llvm-gcc-4.2/trunk/gcc/llvm-types.cpp Modified:

Re: [llvm-commits] [llvm-gcc-4.2] r46373 - /llvm-gcc-4.2/trunk/gcc/llvm-types.cpp

2008-01-26 Thread Duncan Sands
No problem, thanks for pointing out that it needed to be done. It would be nice if globalsmodref inferred that functions which only store to their byval args are really readnone. I guess you mean readonly, since readnone+byval doesn't really work. D.

Re: [llvm-commits] [llvm] r46393 - in /llvm/trunk: lib/Transforms/Utils/InlineFunction.cpp test/CFrontend/2008-01-26-ReadOnlyByVal.c

2008-01-26 Thread Duncan Sands
Create an explicit copy for byval parameters even when inlining a readonly function. Are you sure this is correct? There is a difference between 'const', 'pure' and readnone/readonly. Further, isn't it always safe to elide the copy for readnone functions? A readnone function could

[llvm-commits] [llvm] r46399 - /llvm/trunk/test/Transforms/Inline/byval2.ll

2008-01-26 Thread Duncan Sands
Author: baldrick Date: Sat Jan 26 06:33:01 2008 New Revision: 46399 URL: http://llvm.org/viewvc/llvm-project?rev=46399view=rev Log: Invert this test, because it is wrong if we allow readonly functions to use byval parameters as local storage (how much do we want this?). Modified:

Re: [llvm-commits] [llvm] r46349 - /llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

2008-01-25 Thread Duncan Sands
Add skeletal code to increase the alignment of loads and stores when we can infer it. This will eventually help stuff, though it doesn't do much right now because all fixed FI's have an alignment of 1. By the way, I've always assumed that alignment 0 is not used by the code generators, i.e.

Re: [llvm-commits] [llvm] r46333 - /llvm/trunk/test/CFrontend/2008-01-24-StructAlignAndBitFields.c

2008-01-25 Thread Duncan Sands
Hi Devang, what is this test testing? A compiler crash? It doesn't crash here without your fix. +// RUN: %llvmgcc %s -S -o - + +// This struct is not 4 byte aligned becaues bit-field +// type does not influence struct alignment. +struct U { char a; short b; int c:25; char d; } u; Ciao,

[llvm-commits] [llvm] r46352 - /llvm/trunk/include/llvm/Target/TargetLowering.h

2008-01-25 Thread Duncan Sands
Author: baldrick Date: Fri Jan 25 04:20:53 2008 New Revision: 46352 URL: http://llvm.org/viewvc/llvm-project?rev=46352view=rev Log: Add more assertions to catch accesses outside of arrays. Also, as a convenience, don't barf, just return false, if someone calls isTruncStoreLegal or isLoadXLegal

Re: [llvm-commits] [llvm] r46349 - /llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

2008-01-25 Thread Duncan Sands
PS: Does an alignment of 0 mean the ABI alignment or the preferred alignment? I'm guessing that it means ABI for globals and preferred for allocas. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu

[llvm-commits] [llvm-gcc-4.0] r46359 - in /llvm-gcc-4.0/trunk/gcc: llvm-convert.cpp llvm-internal.h

2008-01-25 Thread Duncan Sands
Author: baldrick Date: Fri Jan 25 11:45:31 2008 New Revision: 46359 URL: http://llvm.org/viewvc/llvm-project?rev=46359view=rev Log: Fix PR1942. When returning an aggregate result, create a temporary to hold the result, and copy it out when returning. Modified:

[llvm-commits] [llvm-gcc-4.2] r46391 - /llvm-gcc-4.2/trunk/gcc/llvm-abi.h

2008-01-25 Thread Duncan Sands
Author: baldrick Date: Fri Jan 25 23:33:48 2008 New Revision: 46391 URL: http://llvm.org/viewvc/llvm-project?rev=46391view=rev Log: Correct spelling. Modified: llvm-gcc-4.2/trunk/gcc/llvm-abi.h Modified: llvm-gcc-4.2/trunk/gcc/llvm-abi.h URL:

Re: [llvm-commits] [llvm-gcc-4.2] r46373 - /llvm-gcc-4.2/trunk/gcc/llvm-types.cpp

2008-01-25 Thread Duncan Sands
If a function takes a byval parameter, it can't be readnone, we have to mark it readonly instead. This fixes test/CFrontend/2008-01-25-ByValReadNone.c Thanks for doing this! Duncan. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu

[llvm-commits] [llvm-gcc-4.2] r46392 - /llvm-gcc-4.2/trunk/gcc/llvm-types.cpp

2008-01-25 Thread Duncan Sands
Author: baldrick Date: Sat Jan 26 00:03:12 2008 New Revision: 46392 URL: http://llvm.org/viewvc/llvm-project?rev=46392view=rev Log: Silence a warning. Modified: llvm-gcc-4.2/trunk/gcc/llvm-types.cpp Modified: llvm-gcc-4.2/trunk/gcc/llvm-types.cpp URL:

[llvm-commits] [llvm] r46369 - /llvm/trunk/lib/Transforms/Utils/InlineFunction.cpp

2008-01-25 Thread Duncan Sands
Author: baldrick Date: Fri Jan 25 16:06:51 2008 New Revision: 46369 URL: http://llvm.org/viewvc/llvm-project?rev=46369view=rev Log: Do this more neatly. Modified: llvm/trunk/lib/Transforms/Utils/InlineFunction.cpp Modified: llvm/trunk/lib/Transforms/Utils/InlineFunction.cpp URL:

[llvm-commits] [llvm] r46357 - /llvm/trunk/test/C++Frontend/2008-01-25-ResultIsParam.cpp

2008-01-25 Thread Duncan Sands
Author: baldrick Date: Fri Jan 25 11:36:44 2008 New Revision: 46357 URL: http://llvm.org/viewvc/llvm-project?rev=46357view=rev Log: Test for PR1942. Added: llvm/trunk/test/C++Frontend/2008-01-25-ResultIsParam.cpp Added: llvm/trunk/test/C++Frontend/2008-01-25-ResultIsParam.cpp URL:

[llvm-commits] [llvm] r46393 - in /llvm/trunk: lib/Transforms/Utils/InlineFunction.cpp test/CFrontend/2008-01-26-ReadOnlyByVal.c

2008-01-25 Thread Duncan Sands
Author: baldrick Date: Sat Jan 26 00:41:49 2008 New Revision: 46393 URL: http://llvm.org/viewvc/llvm-project?rev=46393view=rev Log: Create an explicit copy for byval parameters even when inlining a readonly function. Added: llvm/trunk/test/CFrontend/2008-01-26-ReadOnlyByVal.c Modified:

Re: [llvm-commits] [llvm] r46333 - /llvm/trunk/test/CFrontend/2008-01-24-StructAlignAndBitFields.c

2008-01-25 Thread Duncan Sands
Hi Devang, this patch causes: llvm-types.cpp: In member function ‘bool TypeConverter::DecodeStructFields(tree_node*, StructTypeConversionInfo)’: llvm-types.cpp:1777: warning: comparison between signed and unsigned integer expressions Ciao, Duncan.

Re: [llvm-commits] [llvm] r46349 - /llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

2008-01-25 Thread Duncan Sands
PS: Does an alignment of 0 mean the ABI alignment or the preferred alignment? I'm guessing that it means ABI for globals and preferred for allocas. In what context? In any context :) Basically I'm asking what it means if you pass an alignment of 0 for an alloca (or a global). For

[llvm-commits] [llvm-gcc-4.2] r46356 - in /llvm-gcc-4.2/trunk/gcc: llvm-convert.cpp llvm-internal.h

2008-01-25 Thread Duncan Sands
Author: baldrick Date: Fri Jan 25 11:36:35 2008 New Revision: 46356 URL: http://llvm.org/viewvc/llvm-project?rev=46356view=rev Log: Fix PR1942. When returning an aggregate result, create a temporary to hold the result, and copy it out when returning. Modified:

[llvm-commits] [llvm-gcc-4.2] r46390 - /llvm-gcc-4.2/trunk/gcc/llvm-types.cpp

2008-01-25 Thread Duncan Sands
Author: baldrick Date: Fri Jan 25 23:27:18 2008 New Revision: 46390 URL: http://llvm.org/viewvc/llvm-project?rev=46390view=rev Log: Correct comment. Modified: llvm-gcc-4.2/trunk/gcc/llvm-types.cpp Modified: llvm-gcc-4.2/trunk/gcc/llvm-types.cpp URL:

Re: [llvm-commits] [llvm] r46305 - /llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

2008-01-24 Thread Duncan Sands
Hi Chris, +// Add any uses of the old node to the worklist if they have a single +// use. They may be dead after this node is deleted. +for (unsigned i = 0, e = N-getNumOperands(); i != e; ++i) + AddToWorkList(N-getOperand(i).Val); the comment says if they

[llvm-commits] [llvm] r46280 - in /llvm/trunk/lib: CodeGen/SelectionDAG/LegalizeDAG.cpp Target/ARM/ARMISelLowering.cpp Target/IA64/IA64ISelLowering.cpp Target/PowerPC/PPCISelLowering.cpp Target/Sparc/

2008-01-23 Thread Duncan Sands
Author: baldrick Date: Wed Jan 23 14:39:46 2008 New Revision: 46280 URL: http://llvm.org/viewvc/llvm-project?rev=46280view=rev Log: The last pieces needed for loading arbitrary precision integers. This won't actually work (and most of the code is dead) unless the new legalization machinery is

Re: [llvm-commits] [llvm-gcc-4.2] r46281 - in /llvm-gcc-4.2/trunk/gcc: config/darwin.h objc/objc-act.c

2008-01-23 Thread Duncan Sands
Hi Bill, GCC barfs this to the .s file directly: .objc_class_name_CrashTestPlugin=0 .globl .objc_class_name_CrashTestPlugin it looks like you write this directly to a file containing LLVM IR. I guess this is OK as long as no-one is using the global in the IR (otherwise the verifier

Re: [llvm-commits] [llvm-gcc-4.2] r46164 - in /l lvm-gcc-4.2/trunk/gcc/config/i386: llvm-i386-ta rget.h llvm-i386.cpp

2008-01-22 Thread Duncan Sands
What about integer arrays? This is an optimization, not a correctness issue. Can you give an example that you mean? According to the x86-64 ABI, arrays of integers that are not more than 8 bytes long are passed in integer registers. Likewise for structs. So it looks like a correctness

Re: [llvm-commits] [llvm-gcc-4.2] r46164 - in /l lvm-gcc-4.2/trunk/gcc/config/i386: llvm-i386-ta rget.h llvm-i386.cpp

2008-01-22 Thread Duncan Sands
Okay, well we already get many other x86-64 issues wrong already, but Evan is chipping away at it. How do you pass an array by value in C? Example please, I find the x86-64 ABI hard to interpret, but it seems to say that aggregates are classified recursively, so it looks like a struct

[llvm-commits] [llvm-gcc-4.2] r46205 - /llvm-gcc-4.2/trunk/gcc/llvm-abi.h

2008-01-21 Thread Duncan Sands
Author: baldrick Date: Mon Jan 21 02:39:31 2008 New Revision: 46205 URL: http://llvm.org/viewvc/llvm-project?rev=46205view=rev Log: Remove extra tokens at end of #ifndef directive. Modified: llvm-gcc-4.2/trunk/gcc/llvm-abi.h Modified: llvm-gcc-4.2/trunk/gcc/llvm-abi.h URL:

[llvm-commits] [llvm] r46206 - /llvm/trunk/lib/VMCore/Instructions.cpp

2008-01-21 Thread Duncan Sands
Author: baldrick Date: Mon Jan 21 05:27:55 2008 New Revision: 46206 URL: http://llvm.org/viewvc/llvm-project?rev=46206view=rev Log: Be consistent with other attribute methods, and check the callee also if it is known. Modified: llvm/trunk/lib/VMCore/Instructions.cpp Modified:

[llvm-commits] [llvm] r46207 - /llvm/trunk/lib/VMCore/ParameterAttributes.cpp

2008-01-21 Thread Duncan Sands
Author: baldrick Date: Mon Jan 21 05:28:49 2008 New Revision: 46207 URL: http://llvm.org/viewvc/llvm-project?rev=46207view=rev Log: Check that sret is only used on pointers to types with a size, like byval. Modified: llvm/trunk/lib/VMCore/ParameterAttributes.cpp Modified:

[llvm-commits] [llvm] r46216 - /llvm/trunk/lib/VMCore/ParameterAttributes.cpp

2008-01-21 Thread Duncan Sands
Author: baldrick Date: Mon Jan 21 15:37:41 2008 New Revision: 46216 URL: http://llvm.org/viewvc/llvm-project?rev=46216view=rev Log: It turns out that in C++ it is legal to declare functions that return an opaque type by value, as long as you don't call it or provide a body (you can take the

  1   2   3   4   5   6   7   8   >