[llvm-commits] Support VIEW_CONVERT_EXPR in TreeConstantToLLVM::Convert

2007-01-15 Thread Duncan Sands
Ignore the type change - constants don't care. Index: gcc/llvm-convert.cpp === --- gcc/llvm-convert.cpp(revision 248) +++ gcc/llvm-convert.cpp(working copy) @@ -4260,6 +4380,7 @@ case PLUS_EXPR: case MINUS_EXPR:

[llvm-commits] llvm-convert.cpp compile fix

2007-01-15 Thread Duncan Sands
Something like this is needed to get current llvm-gcc4 to compile. Index: gcc/llvm-convert.cpp === --- gcc/llvm-convert.cpp(revision 248) +++ gcc/llvm-convert.cpp(working copy) @@ -221,7 +221,7 @@ // If

[llvm-commits] llvm-gcc: sign matters for EXACT_DIV_EXPR

2007-01-15 Thread Duncan Sands
EXACT_DIV_EXPR can be used on signed operands, so it is wrong to always turn it into UDiv. Since EXACT_DIV_EXPR always gives the same result as TRUNC_DIV_EXPR (it exists in gcc because it might give that result faster on some targets, not because it gives a different result), it is pointless to

[llvm-commits] llvm-gcc4: use langhooks rather than front-end calls in i386.c

2007-01-17 Thread Duncan Sands
The section of code marked APPLE LOCAL CW asm blocks contains calls to routines that only exist in the C-like front-ends (C, C++, ObjC). Some of them are equivalent to langhook calls - so use langhooks for those. This reduces the number of stubs needed to get non C-like languages compiling.

[llvm-commits] llvm-gcc4: stubs for non C-like languages

2007-01-17 Thread Duncan Sands
Apple's gcc modifications require the existence of routines like iasm_addr and build_modify_expr (see the patch for an exhaustive list) that are only defined by the C-like front-ends (C, C++, ObjC). Trying to build other language front-ends fails at link-time because of the lack of these routines.

[llvm-commits] llvm-gcc4: resurrect fortran

2007-01-17 Thread Duncan Sands
Link with the common stub routines, and remove the partial set of stubs that were defined in the front-end. With this, the fortran compiler builds, but dies when compiling libgfortran: llvm-convert.cpp:4243: static llvm::Constant* TreeConstantToLLVM::Convert(tree_node*): Assertion

[llvm-commits] llvm-gcc4: resurrect java

2007-01-17 Thread Duncan Sands
Link with the common stub routines, and remove the partial set of stubs that were defined in the front-end. With this, a java build gets quite far, but dies at libffi/src/x86/ffi.c: In function 'ffi_prep_cif_machdep': libffi/src/x86/ffi.c:130: error: duplicate case value

[llvm-commits] llvm-gcc4: gimplifier fixes

2007-01-17 Thread Duncan Sands
Backported from gcc-4.3. These should only effect the Ada front-end. Index: gcc.llvm.master/gcc/tree.c === --- gcc.llvm.master.orig/gcc/tree.c 2007-01-17 21:40:30.0 +0100 +++ gcc.llvm.master/gcc/tree.c 2007-01-17

[llvm-commits] llvm-gcc4: implement FLOOR_MOD_EXPR and ROUND_DIV_EXPR

2007-01-19 Thread Duncan Sands
FLOOR_MOD_EXPR is generated by the Ada and Fortran front-ends. ROUND_DIV_EXPR is only generated by the Ada front-end. Tested by taking all possible combinations of 8 bit signed and unsigned input operands, and checking that the results coincide with those produced by mainline gcc. I also checked

Re: [llvm-commits] llvm-gcc4: use langhooks rather t han front-end calls in i386.c

2007-01-20 Thread Duncan Sands
Hi Devang, thanks for reviewing these patches. Applied, after adding APPLE LOCAL llvm markers. This hasn't turned up in the llvm-gcc4 svn repository yet. Did you apply it there or to some other tree? (I'm waiting for it to turn up, so I can see how the APPLE markers should be done). Thanks

Re: [llvm-commits] llvm-gcc4: resurrect fortran

2007-01-21 Thread Duncan Sands
+ $(F95_OBJS) $(F95_BACKEND) $(F95_LIBS) $(C_STUBS) I don't see C_STUBS anywhere. Indeed - well spotted. Would it be possible for you to resend this patch with appropriate APPLE LOCAL llvm markers ? This time without C_STUBS and with markers. Best wishes, Duncan. Index:

Re: [llvm-commits] llvm-gcc4: use langhooks rather t han front-end calls in i386.c

2007-01-22 Thread Duncan Sands
On Monday 22 January 2007 21:06, Devang Patel wrote: On Jan 20, 2007, at 6:43 AM, Duncan Sands wrote: Hi Devang, thanks for reviewing these patches. Applied, after adding APPLE LOCAL llvm markers. This hasn't turned up in the llvm-gcc4 svn repository yet. Did you apply

Re: [llvm-commits] llvm-gcc4: gimplifier fixes

2007-01-23 Thread Duncan Sands
Backported from gcc-4.3. These should only effect the Ada front-end. ... This was part of bigger C++ patch. I am hesitated to bring in partial patch without further testing. Please bring in test case and also add APPLE LOCAL llvm markers appropriately. Please let us know how you have

[llvm-commits] llvm-gcc4: small cleanup

2007-01-26 Thread Duncan Sands
Index: gcc.llvm.master/gcc/llvm-convert.cpp === --- gcc.llvm.master.orig/gcc/llvm-convert.cpp 2007-01-26 19:11:47.0 +0100 +++ gcc.llvm.master/gcc/llvm-convert.cpp2007-01-26 19:14:23.0 +0100 @@ -4075,8

[llvm-commits] llvm-gcc4: isAggregateType - isAggregateTreeType

2007-01-26 Thread Duncan Sands
isAggregateType, defined in llvm-convert, is identical to isAggregateTreeType, defined in llvm-abi.h. Even the comment is the same. Index: gcc.llvm.master/gcc/llvm-convert.cpp === --- gcc.llvm.master.orig/gcc/llvm-convert.cpp

[llvm-commits] llvm-gcc4: nested function support (w/o trampolines)

2007-02-05 Thread Duncan Sands
This patch adds support for nested subroutines, but not for trampolines (used for taking pointers to nested subroutines; implementing support for trampolines is more tricky since it needs help from the code generators). There are no changes to LLVM itself. The patch is quite simple because gcc

Re: [llvm-commits] llvm-gcc4: nested function support (w/o trampolines)

2007-02-06 Thread Duncan Sands
A better testcase. This doesn't mean it's good, just better :) The gcc testsuite contains more comprehensive tests. I thought of importing some of them into the LLVM testsuite, but I've decided to wait until there is some kind of consensus as to what should be done about the gcc testsuite in

[llvm-commits] llvm-gcc4: compile fix due to ParseBytecodeFile changes

2007-02-08 Thread Duncan Sands
Read bytecodes from PCH file, http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070205/044159.html, and Push bytecode decompressor out through APIs, http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070205/044106.html, passed each other in the night. The attached patch

[llvm-commits] Micro llvm-gcc4 cleanups

2007-02-10 Thread Duncan Sands
(1) Add a FIXME about COMPOUND_LITERAL_EXPR (2) Remove duplicated #include Duncan. Index: gcc.llvm.master/gcc/llvm-convert.cpp === --- gcc.llvm.master.orig/gcc/llvm-convert.cpp 2007-02-10 19:06:54.0 +0100 +++

[llvm-commits] llvm-gcc4: compile fixes

2007-02-13 Thread Duncan Sands
Breakage caused by eliminate instruction ctors that take vectors: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070212/044423.html No idea if this is the right approach, but it compiles! Ciao, Duncan. Index: gcc.llvm.master/gcc/llvm-convert.cpp

[llvm-commits] llvm-gcc4: display the LLVM type when printing type trees

2007-02-15 Thread Duncan Sands
For example: (gdb) call debug_tree(type) void_type 0xb7bd6ac8 void sizes-gimplified visited VOID align 8 symtab 152957560 alias set -1 LLVM: void pointer_to_this pointer_type 0xb7bd6b40 Enjoy! Duncan. Index: gcc.llvm.master/gcc/print-tree.c

Re: [llvm-commits] llvm-gcc4: display the LLVM type when printing type trees

2007-02-19 Thread Duncan Sands
Very cool. However, it doesn't apply to CVS right. GET_TYPE_LLVM needs to go through the LTypes vector now, can you plz update the patch? Here you go. I put GET_TYPE_LLVM back into tree.h (it was moved into llvm-types.cpp recently) so that print-tree.c can get at it. I only made a C

Re: [llvm-commits] CVS: llvm/docs/DeveloperPolicy.html

2007-02-22 Thread Duncan Sands
+ the GPL). This is not a problem for the main LLVM distribution (which is already licensed under a more liberal license), but may be a problem if you intend to base commercial development on llvm-gcc without redistributing your source code./p Maybe you should make explicit

[llvm-commits] llvm-gcc: check that fields are laid out in ConvertRecordCONSTRUCTOR

2007-02-28 Thread Duncan Sands
Die obviously, rather than obscurely deep down in make_decl_llvm. I hit this with the Ada f-e: it was replacing fields in a record type without updating constructors, with the result that the constructor element fields did not belong to the constructor type, and thus were not laid out when the

[llvm-commits] llvm-gcc: only call rest_of_decl_compilation on VAR_DECLs in EmitBIND_EXPR

2007-02-28 Thread Duncan Sands
The variable expansion part of EmitBIND_EXPR is clearly based on expand_var in expr.c, however unlike expand_var it doesn't check for VAR_DECL before calling rest_of_decl_compilation. This patch adds the check. Without it, the Ada run-time fails to build due to rest_of_decl_compilation getting

[llvm-commits] llvm-gcc: support arrays with non-zero lower bound

2007-02-28 Thread Duncan Sands
Ada arrays need not be indexed from zero: the indexing can start from any number, positive or negative. While some parts of llvm-gcc had support for non-zero lower bounds, not everywhere did. This patch adds consistent support everywhere. Also, it considers an array to have dynamic size if the

[llvm-commits] llvm-gcc: support for NON_LVALUE_EXPR

2007-02-28 Thread Duncan Sands
According to the docs: NON_LVALUE_EXPR These nodes indicate that their one and only operand is not an lvalue. A back end can treat these identically to the single operand. And that is what this patch does. Ciao, Duncan. Index: gcc.llvm.master/gcc/llvm-convert.cpp

Re: [llvm-commits] llvm-gcc: check that fields are laid out in ConvertRecordCONSTRUCTOR

2007-03-02 Thread Duncan Sands
Testcase triggering this. Index: llvm/test/AdaFrontend/fat_fields.adb === --- /dev/null 1970-01-01 00:00:00.0 + +++ llvm/test/AdaFrontend/fat_fields.adb 2007-03-02 12:50:25.0 +0100 @@ -0,0 +1,10 @@ +-- RUN:

Re: [llvm-commits] llvm-gcc: only call rest_of_decl_compilation on VAR_DECLs in EmitBIND_EXPR

2007-03-02 Thread Duncan Sands
Ada testcase triggering this. Index: llvm/test/AdaFrontend/emit_var.ads === --- /dev/null 1970-01-01 00:00:00.0 + +++ llvm/test/AdaFrontend/emit_var.ads 2007-03-02 12:50:25.0 +0100 @@ -0,0 +1,5 @@ +-- RUN: %llvmgcc

Re: [llvm-commits] llvm-gcc: support for NON_LVALUE_EXPR

2007-03-02 Thread Duncan Sands
Ada testcase triggering this. Index: llvm/test/AdaFrontend/non_lvalue.adb === --- /dev/null 1970-01-01 00:00:00.0 + +++ llvm/test/AdaFrontend/non_lvalue.adb 2007-03-02 12:50:25.0 +0100 @@ -0,0 +1,7 @@ +-- RUN:

Re: [llvm-commits] llvm-gcc: support arrays with non-zero lower bound

2007-03-02 Thread Duncan Sands
Additional Ada testcase. Index: llvm/test/AdaFrontend/array_size.adb === --- /dev/null 1970-01-01 00:00:00.0 + +++ llvm/test/AdaFrontend/array_size.adb 2007-03-02 12:50:25.0 +0100 @@ -0,0 +1,10 @@ +-- RUN: %llvmgcc

Re: [llvm-commits] llvm-gcc: check that fields are laid out in ConvertRecordCONSTRUCTOR

2007-03-02 Thread Duncan Sands
Testcase triggering this. An Ada testcase, so currently unusable except by me, since I'm the only person on the planet who has a working llvm-gcc Ada compiler. Hopefully this will not be the case for much longer. ___ llvm-commits mailing list

Re: [llvm-commits] llvm-gcc: support arrays with non-zero lower bound

2007-03-02 Thread Duncan Sands
Refreshed patch after Chris's array indexing changes. Both Ada testcases attached. Index: gcc.llvm/gcc/llvm-abi.h === --- gcc.llvm.orig/gcc/llvm-abi.h 2007-02-18 19:21:10.0 +0100 +++ gcc.llvm/gcc/llvm-abi.h 2007-03-02

[llvm-commits] llvm-gcc: use component_ref_field_offset in component references

2007-03-02 Thread Duncan Sands
The third operand of a COMPONENT_REF represents the byte offset of the field; it is accessed using component_ref_field_offset. Most of the time you can get away with extracting the offset from the type, using DECL_FIELD_OFFSET, which is what is done currently, but this can fail if

Re: [llvm-commits] llvm-gcc: support arrays with non-zero lower bound

2007-03-03 Thread Duncan Sands
...(3) having gcc add one. For C, (3) involves adding one to a constant, which does not involve any heavy operations like memory allocation, just a two word integer plus operation. This is wrong: adding one of course requires allocating a tree node in general (i.e. unless a previously

[llvm-commits] CVS: llvm/test/AdaFrontend/non_lvalue.adb non_lvalue.ads

2007-03-05 Thread Duncan Sands
Changes in directory llvm/test/AdaFrontend: non_lvalue.adb added (r1.1) non_lvalue.ads added (r1.1) --- Log message: New directory for Ada testcases. Test handling of NON_LVALUE_EXPR. --- Diffs of the changes: (+18 -0) non_lvalue.adb |7 +++ non_lvalue.ads | 11 +++ 2

[llvm-commits] CVS: llvm/test/AdaFrontend/fat_fields.adb fat_fields.ads

2007-03-05 Thread Duncan Sands
Changes in directory llvm/test/AdaFrontend: fat_fields.adb added (r1.1) fat_fields.ads added (r1.1) --- Log message: Testcase causing the Ada front-end to create bogus constructor fields. --- Diffs of the changes: (+16 -0) fat_fields.adb | 10 ++ fat_fields.ads |6 ++ 2

[llvm-commits] CVS: llvm/test/AdaFrontend/emit_var.ads

2007-03-05 Thread Duncan Sands
Changes in directory llvm/test/AdaFrontend: emit_var.ads added (r1.1) --- Log message: Testcase for handling of static constant declarations in EmitBIND_EXPR. --- Diffs of the changes: (+5 -0) emit_var.ads |5 + 1 files changed, 5 insertions(+) Index:

[llvm-commits] CVS: llvm/CREDITS.TXT

2007-03-05 Thread Duncan Sands
/CREDITS.TXT:1.70 Tue Feb 27 04:44:42 2007 +++ llvm/CREDITS.TXTMon Mar 5 03:21:11 2007 @@ -169,6 +169,10 @@ E: [EMAIL PROTECTED] D: Made inst_iterator behave like a proper iterator, LowerConstantExprs pass +N: Duncan Sands +E: [EMAIL PROTECTED] +D: Ada front-end + N: Ruchira Sasanka E

[llvm-commits] llvm-gcc: better support for variable size struct fields

2007-03-06 Thread Duncan Sands
This patch applies on top of the previously posted patch llvm-gcc: use component_ref_field_offset in component references, http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070226/045399.html. This fixes wrong handling of structs containing more than one variable sized field. Two C

[llvm-commits] llvm-gcc: take object size from target, not source, in VIEW_CONVERT_EXPR

2007-03-08 Thread Duncan Sands
VIEW_CONVERT_EXPR is sometimes used as a way of specifying the size of an object when the size would otherwise be unknown. In the (Ada) testcase an array, the type of which involves placeholder expressions, is view converted to an array type with length 2 (the compiler knows it has length 2, but

[llvm-commits] llvm-gcc: use array_ref_element_size when emitting an ARRAY_REF

2007-03-09 Thread Duncan Sands
The array element type doesn't always have a known size, which is why the ARRAY_REF supplies the size, extractable with array_ref_element_size. Fix and Ada testcase attached. Ciao, Duncan. Index: gcc.llvm.master/gcc/llvm-convert.cpp

[llvm-commits] llvm-gcc: support for update_setjmp_buf

2007-03-09 Thread Duncan Sands
The same level of support as for setjmp and longjmp ;) Duncan. Index: gcc.llvm.master/gcc/llvm-convert.cpp === --- gcc.llvm.master.orig/gcc/llvm-convert.cpp 2007-03-09 11:13:38.0 +0100 +++ gcc.llvm.master/gcc/llvm-convert.cpp

[llvm-commits] llvm-gcc: emit switch cases with a wide range as a conditional branch

2007-03-12 Thread Duncan Sands
In gcc, a switch case is a range of values that branch to a label, for example 1 .. 17 - label. These are emitted as individual LLVM switch cases: 1 - label, 2 - label, ..., 17 - label. This works well except, for example, when the range is INT_MIN .. 0 - label, in which case you can say goodbye

[llvm-commits] CVS: llvm/test/AdaFrontend/array_constructor.adb array_size.adb

2007-03-13 Thread Duncan Sands
Changes in directory llvm/test/AdaFrontend: array_constructor.adb added (r1.1) array_size.adb added (r1.1) --- Log message: Test support for arrays with non-zero first index. --- Diffs of the changes: (+16 -0) array_constructor.adb |6 ++ array_size.adb| 10 ++ 2

Re: [llvm-commits] llvm-gcc: emit switch cases with a wide range as a conditional branch

2007-03-14 Thread Duncan Sands
Hi Chris, thanks for looking at the patch. In gcc, a switch case is a range of values that branch to a label, for example 1 .. 17 - label. These are emitted as individual LLVM switch cases: 1 - label, 2 - label, ..., 17 - label. This works well except, for example, when the range is

Re: [llvm-commits] llvm-gcc: emit switch cases with a wide range as a conditional branch

2007-03-14 Thread Duncan Sands
Hi Reid, thanks for replying. Please use APInt's to do the subtraction, instead of constant folding. Reid should be able to help you with this. I don't understand why. If APInt's are much more efficient, then shouldn't ConstantExpr:getSub be improved to detect this case and

Re: [llvm-commits] llvm-gcc: emit switch cases with a wide range as a conditional branch

2007-03-14 Thread Duncan Sands
I am testing the following patch. While I was there, I made it agnostic as to the signedness of the switch expression and cases (in Ada they can be unsigned). Bootstraps (C, C++, Ada) and passes make check. Duncan. ___ llvm-commits mailing list

[llvm-commits] CVS: llvm/test/AdaFrontend/vce.adb

2007-03-14 Thread Duncan Sands
Changes in directory llvm/test/AdaFrontend: vce.adb added (r1.1) --- Log message: Test that the size of a view converted object is determined by the target type, not the source type. --- Diffs of the changes: (+7 -0) vce.adb |7 +++ 1 files changed, 7 insertions(+) Index:

[llvm-commits] llvm-gcc: return the correct type for ARRAY_RANGE_REF

2007-03-14 Thread Duncan Sands
An ARRAY_RANGE_REF is for extracting a range of elements from an array, for example elements 1 to 2 of an [3 x i32], while ARRAY_REF is for extracting a single element, say element 2. EmitLV_ARRAY_REF, which handles both expression types, should return a [2 x i32]* in the first case and an i32* in

[llvm-commits] llvm-gcc: fix type of VIEW_CONVERT_EXPR lvalue

2007-03-14 Thread Duncan Sands
The address of a VIEW_CONVERT_EXPR is the address of its operand, but the type is the type of the expression. The current code gets the address right but the type wrong. Fix and Ada testcase attached. Duncan. Index: gcc.llvm.master/gcc/llvm-convert.cpp

Re: [llvm-commits] llvm-gcc: emit switch cases with a wide range as a conditional branch

2007-03-16 Thread Duncan Sands
I am testing the following patch. While I was there, I made it agnostic as to the signedness of the switch expression and cases (in Ada they can be unsigned). I forgot to emit a new BB after the unconditional branch to the default label. Attached patch is otherwise the same as the previous

Re: [llvm-commits] CVS: llvm/include/llvm/ADT/APInt.h

2007-03-19 Thread Duncan Sands
Add isStrictPositive() to APInt to determine if this APInt Value 0. Shouldn't this be isStrictlyPositive? Duncan. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

[llvm-commits] CVS: llvm/include/llvm/Target/TargetData.h

2007-03-19 Thread Duncan Sands
Changes in directory llvm/include/llvm/Target: TargetData.h updated: 1.58 - 1.59 --- Log message: Fix obvious typo in comment. --- Diffs of the changes: (+1 -1) TargetData.h |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/include/llvm/Target/TargetData.h diff -u

Re: [llvm-commits] llvm-gcc: better support for vari able size struct fields

2007-03-20 Thread Duncan Sands
Cool, thanks for applying this Devang, Duncan, can you check in the testcases plz? I'm waiting for the patch to hit the subversion mirror. Ciao, Duncan. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu

[llvm-commits] CVS: llvm/test/AdaFrontend/array_range_ref.adb

2007-03-20 Thread Duncan Sands
Changes in directory llvm/test/AdaFrontend: array_range_ref.adb added (r1.1) --- Log message: Test that ARRAY_RANGE_REF returns an array not an element. --- Diffs of the changes: (+7 -0) array_range_ref.adb |7 +++ 1 files changed, 7 insertions(+) Index:

[llvm-commits] CVS: llvm/test/AdaFrontend/var_size.adb var_size.ads

2007-03-20 Thread Duncan Sands
Changes in directory llvm/test/AdaFrontend: var_size.adb added (r1.1) var_size.ads added (r1.1) --- Log message: Ada testcase for structs with multiple variable sized fields. --- Diffs of the changes: (+14 -0) var_size.adb |7 +++ var_size.ads |7 +++ 2 files changed, 14

[llvm-commits] CVS: llvm/test/CFrontend/2007-03-06-VarSizeInStruct1.c 2007-03-06-VarSizeInStruct2.c

2007-03-20 Thread Duncan Sands
Changes in directory llvm/test/CFrontend: 2007-03-06-VarSizeInStruct1.c added (r1.1) 2007-03-06-VarSizeInStruct2.c added (r1.1) --- Log message: Test handling of structs with multiple variable-sized fields. --- Diffs of the changes: (+16 -0) 2007-03-06-VarSizeInStruct1.c |8

[llvm-commits] llvm-gcc: raise an assert rather than converting 80 and 96 bit floating point types

2007-03-20 Thread Duncan Sands
Converting 80 and 96 bit floating point types to a 64 bit LLVM type breaks the invariant that gcc types of constant size map to LLVM types of the same size. Since it should not actually be possible to get 80 and 96 bit floating point types in llvm-gcc nowadays, remove the conversion of such

[llvm-commits] CVS: llvm/utils/findoptdiff

2007-03-22 Thread Duncan Sands
Changes in directory llvm/utils: findoptdiff updated: 1.2 - 1.3 --- Log message: The -funcresolve and -raise options no longer exist. --- Diffs of the changes: (+1 -1) findoptdiff |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/utils/findoptdiff diff -u

Re: [llvm-commits] CVS: llvm/test/Integer/a1.ll a1.ll.out a15.ll a15.ll.out a17.ll a17.ll.out a31.ll a31.ll.out a33.ll a33.ll.out a63.ll.out a7.ll.out a9.ll.out

2007-03-24 Thread Duncan Sands
Fix incorrect test cases for srem. The definition of srem is a remainder so that the sign of the result follows the sign of the divisor. In A rem B, I hope you mean A when you talk of the divisor! Because A rem B has the sign of A (unless B exactly divides A, in which case the sign is zero).

[llvm-commits] CVS: llvm/test/Transforms/InstCombine/apint-not.ll apint-sub.ll

2007-03-26 Thread Duncan Sands
Changes in directory llvm/test/Transforms/InstCombine: apint-not.ll updated: 1.1 - 1.2 apint-sub.ll updated: 1.1 - 1.2 --- Log message: Fix testsuite hang. --- Diffs of the changes: (+2 -2) apint-not.ll |2 +- apint-sub.ll |2 +- 2 files changed, 2 insertions(+), 2 deletions(-)

[llvm-commits] CVS: llvm/test/AdaFrontend/vce_lv.adb

2007-03-27 Thread Duncan Sands
Changes in directory llvm/test/AdaFrontend: vce_lv.adb added (r1.1) --- Log message: Test that a VIEW_CONVERT_EXPR used as an lvalue has the right type. --- Diffs of the changes: (+9 -0) vce_lv.adb |9 + 1 files changed, 9 insertions(+) Index:

[llvm-commits] llvm-gcc: correct handling of arrays of var-sized elements

2007-03-28 Thread Duncan Sands
In gcc, the length of an array may only be known at runtime, for example char X[n]; is legal; the same goes for array types: the length of the array type may depend on the value of a variable. This is a gcc C extension, so somewhat rare, but is widely used in languages like Ada. You can construct

[llvm-commits] CVS: llvm/include/llvm/ADT/APInt.h

2007-03-29 Thread Duncan Sands
Changes in directory llvm/include/llvm/ADT: APInt.h updated: 1.58 - 1.59 --- Log message: Correct typo. --- Diffs of the changes: (+1 -1) APInt.h |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/include/llvm/ADT/APInt.h diff -u llvm/include/llvm/ADT/APInt.h:1.58

[llvm-commits] CVS: llvm/docs/AliasAnalysis.html DeveloperPolicy.html ExceptionHandling.html GarbageCollection.html LangRef.html ProgrammersManual.html SystemLibrary.html

2007-03-30 Thread Duncan Sands
Changes in directory llvm/docs: AliasAnalysis.html updated: 1.27 - 1.28 DeveloperPolicy.html updated: 1.37 - 1.38 ExceptionHandling.html updated: 1.1 - 1.2 GarbageCollection.html updated: 1.8 - 1.9 LangRef.html updated: 1.217 - 1.218 ProgrammersManual.html updated: 1.130 - 1.131

Re: [llvm-commits] CVS: llvm/docs/AliasAnalysis.html DeveloperPolicy.html ExceptionHandling.html GarbageCollection.html LangRef.html ProgrammersManual.html SystemLibrary.html

2007-03-30 Thread Duncan Sands
Hi Reid, -possible, by a href=CommandGuide/html/bugpoint.htmlbugpoint/a or +possible, by a href=Bugpoint.htmlbugpoint/a or These aren't the same document. If the bugpoint.html document isn't there its an artifact of not generating the HTML version from the POD version. This

[llvm-commits] CVS: llvm/docs/LangRef.html

2007-03-30 Thread Duncan Sands
Changes in directory llvm/docs: LangRef.html updated: 1.218 - 1.219 --- Log message: Remove reference to checkpoint. --- Diffs of the changes: (+1 -11) LangRef.html | 12 +--- 1 files changed, 1 insertion(+), 11 deletions(-) Index: llvm/docs/LangRef.html diff -u

Re: [llvm-commits] CVS: llvm/docs/AliasAnalysis.html DeveloperPolicy.html ExceptionHandling.html GarbageCollection.html LangRef.html ProgrammersManual.html SystemLibrary.html

2007-03-30 Thread Duncan Sands
There is no checkpoints section, there is only Data Layout. However Data Layout talks only of checkpoints. Would you like me to delete it? ... Yes, delete that whole div class=doc_text and the doc_subsection too if that's the only paragraph in it. The checkpoint thing is not supported any

[llvm-commits] CVS: llvm/test/CFrontend/2007-03-26-ZeroWidthBitfield.c

2007-04-01 Thread Duncan Sands
Changes in directory llvm/test/CFrontend: 2007-03-26-ZeroWidthBitfield.c added (r1.1) --- Log message: Testcase for the problem worked around in http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070319/046204.html --- Diffs of the changes: (+2 -0)

[llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp

2007-04-04 Thread Duncan Sands
Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.728 - 1.729 --- Log message: Fix comment. --- Diffs of the changes: (+1 -1) InstructionCombining.cpp |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index:

[llvm-commits] CVS: llvm/docs/LinkTimeOptimization.html

2007-04-07 Thread Duncan Sands
Changes in directory llvm/docs: LinkTimeOptimization.html updated: 1.11 - 1.12 --- Log message: Rephrase linker explanation. --- Diffs of the changes: (+5 -5) LinkTimeOptimization.html | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) Index:

[llvm-commits] llvm-gcc: don't crash when emitting debug info for a field at a variable offset

2007-04-11 Thread Duncan Sands
If a field in a record is at a variable offset from the start of the record, then DebugInfo::getOrCreateType crashes at this line MemberDesc-setOffset(int_bit_position(Member)); since the bit-offset is not an integer constant. Fixed by using 0 for the offset in this case - which is a

Re: [llvm-commits] llvm-gcc: don't crash when emitting debug info for a field at a variable offset

2007-04-12 Thread Duncan Sands
If a field in a record is at a variable offset from the start of the record, then DebugInfo::getOrCreateType crashes at this line MemberDesc-setOffset(int_bit_position(Member)); since the bit-offset is not an integer constant. Fixed by using 0 for the offset in this case - which

[llvm-commits] llvm-gcc: fix bitfield-after-zero-width-struct crash

2007-04-12 Thread Duncan Sands
The assertion was off by one. I tweaked some comments while I was there. Ciao, Duncan. Index: gcc.llvm/gcc/llvm-types.cpp === --- gcc.llvm.orig/gcc/llvm-types.cpp 2007-04-12 20:00:58.0 +0200 +++ gcc.llvm/gcc/llvm-types.cpp

[llvm-commits] llvm-gcc: implement CEIL_DIV_EXPR

2007-04-13 Thread Duncan Sands
CEIL_DIV_EXPR performs integer division with rounding towards positive infinity, thus 3 cdiv 2 = 2 while -3 cdiv 2 = -1. Testing is tricky, because CEIL_DIV_EXPR is only generated in unusual circumstances, giving little coverage, so I modified the llvm- and mainline gcc compilers to output

[llvm-commits] CVS: llvm-www/Name.html

2007-04-13 Thread Duncan Sands
Changes in directory llvm-www: Name.html updated: 1.10 - 1.11 --- Log message: Yet another name suggestion. --- Diffs of the changes: (+3 -2) Name.html |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) Index: llvm-www/Name.html diff -u llvm-www/Name.html:1.10

[llvm-commits] CVS: llvm/docs/ExceptionHandling.html

2007-04-14 Thread Duncan Sands
Changes in directory llvm/docs: ExceptionHandling.html updated: 1.2 - 1.3 --- Log message: Correct typo. --- Diffs of the changes: (+2 -2) ExceptionHandling.html |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/docs/ExceptionHandling.html diff -u

[llvm-commits] Handle global variables in eh_selector lowering

2007-04-14 Thread Duncan Sands
The eh_selector intrinsic wants global variables for its extra arguments, but wasn't expecting to get... global variables! Only bitcasts of global variables. Discovered by the Ada f-e, fix attached. Maybe it can be done more neatly, but I don't know LLVM well enough to say. Ciao, Duncan.

Re: [llvm-commits] Handle global variables in eh_selector lowering

2007-04-14 Thread Duncan Sands
How about this instead? Duncan. Index: llvm.master/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp === --- llvm.master.orig/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp 2007-04-14 17:37:08.0 +0200 +++

[llvm-commits] CVS: llvm/docs/ExceptionHandling.html

2007-04-16 Thread Duncan Sands
Changes in directory llvm/docs: ExceptionHandling.html updated: 1.3 - 1.4 --- Log message: Fix typos. --- Diffs of the changes: (+4 -4) ExceptionHandling.html |8 1 files changed, 4 insertions(+), 4 deletions(-) Index: llvm/docs/ExceptionHandling.html diff -u

[llvm-commits] CVS: llvm/test/lib/llvm.exp

2007-04-16 Thread Duncan Sands
Changes in directory llvm/test/lib: llvm.exp updated: 1.13 - 1.14 --- Log message: Change ne into !=. --- Diffs of the changes: (+1 -1) llvm.exp |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/test/lib/llvm.exp diff -u llvm/test/lib/llvm.exp:1.13

[llvm-commits] CVS: llvm/test/CFrontend/2004-11-27-StaticFunctionRedeclare.c

2007-04-16 Thread Duncan Sands
Changes in directory llvm/test/CFrontend: 2004-11-27-StaticFunctionRedeclare.c updated: 1.2 - 1.3 --- Log message: Use %s, not explicit name. --- Diffs of the changes: (+1 -1) 2004-11-27-StaticFunctionRedeclare.c |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index:

[llvm-commits] CVS: llvm/test/Makefile

2007-04-16 Thread Duncan Sands
Changes in directory llvm/test: Makefile updated: 1.99 - 1.100 --- Log message: Look for site.exp in the build directory, not the source directory. --- Diffs of the changes: (+1 -1) Makefile |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/test/Makefile diff -u

[llvm-commits] CVS: llvm/test/FrontendAda/debug_var_size.ads

2007-04-16 Thread Duncan Sands
Changes in directory llvm/test/FrontendAda: debug_var_size.ads added (r1.1) --- Log message: Testcase for debug info emission for structure fields at variable offsets. --- Diffs of the changes: (+8 -0) debug_var_size.ads |8 1 files changed, 8 insertions(+) Index:

[llvm-commits] CVS: llvm/test/CFrontend/2007-03-26-BitfieldAfterZeroWidth.c

2007-04-16 Thread Duncan Sands
Changes in directory llvm/test/CFrontend: 2007-03-26-BitfieldAfterZeroWidth.c added (r1.1) --- Log message: Testcase for C front-end crash. --- Diffs of the changes: (+6 -0) 2007-03-26-BitfieldAfterZeroWidth.c |6 ++ 1 files changed, 6 insertions(+) Index:

[llvm-commits] CVS: llvm/test/CFrontend/2007-03-27-ArrayCompatible.c

2007-04-16 Thread Duncan Sands
Changes in directory llvm/test/CFrontend: 2007-03-27-ArrayCompatible.c added (r1.1) --- Log message: Check handling of arrays of variable sized components. --- Diffs of the changes: (+10 -0) 2007-03-27-ArrayCompatible.c | 10 ++ 1 files changed, 10 insertions(+) Index:

[llvm-commits] CVS: llvm/test/CFrontend/2007-03-27-VarLengthArray.c

2007-04-16 Thread Duncan Sands
Changes in directory llvm/test/CFrontend: 2007-03-27-VarLengthArray.c added (r1.1) --- Log message: Test code quality for variable length array references. --- Diffs of the changes: (+7 -0) 2007-03-27-VarLengthArray.c |7 +++ 1 files changed, 7 insertions(+) Index:

[llvm-commits] CVS: llvm/test/lib/llvm.exp

2007-04-16 Thread Duncan Sands
Changes in directory llvm/test/lib: llvm.exp updated: 1.14 - 1.15 --- Log message: Spelling fix. --- Diffs of the changes: (+1 -1) llvm.exp |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/test/lib/llvm.exp diff -u llvm/test/lib/llvm.exp:1.14

[llvm-commits] llvm-gcc: use ConstantInt::getAllOnesValue to get -1

2007-04-17 Thread Duncan Sands
Use ConstantInt::getAllOnesValue to get hold of -1 in CEIL_DIV_EXPR. Ciao, Duncan. Index: gcc.llvm.master/gcc/llvm-convert.cpp === --- gcc.llvm.master.orig/gcc/llvm-convert.cpp 2007-04-17 18:06:16.0 +0200 +++

[llvm-commits] llvm-gcc: fix for PR1332

2007-04-17 Thread Duncan Sands
The testcase: struct Z { int :1; int :0; int :1; } z; The zero width field causes the second :1 field to start at bit 32. This requires inserting 24 bits of padding. For some obscure reason the padding logic subtracts the number of bits of padding from the new field size before adding it,

Re: [llvm-commits] [126245] Fix http://lists.cs.uiuc.edu/pipermail/llvm-commits/ Week-of-Mon-20070416/047943.html

2007-04-17 Thread Duncan Sands
Hi Devang, I just posted a fix which fixes some other issues too. A few lines earlier: if (StartOffsetFromByteBoundry != 0) { // New field does not start at byte boundry. PadBits = StartOffsetInBits - (FirstUnallocatedByte*8); PadBytes = PadBits/8 + 1; } PadBytes +=

[llvm-commits] CVS: llvm/test/CFrontend/2007-04-17-ZeroSizeBitFields.c

2007-04-17 Thread Duncan Sands
Changes in directory llvm/test/CFrontend: 2007-04-17-ZeroSizeBitFields.c updated: 1.1 - 1.2 --- Log message: Use // not ; since this is C. --- Diffs of the changes: (+2 -2) 2007-04-17-ZeroSizeBitFields.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index:

Re: [llvm-commits] [126245] Fix http://lists.cs.uiuc.edu/pipermail/llvm-commits/ Week-of-Mon-20070416/047943.html

2007-04-18 Thread Duncan Sands
Hi Devang, if (StartOffsetInBits FirstUnallocatedByte*8) is true then (StartOffsetFromByteBoundry == 0) is always true. If so, we could simply this even further. In other words, if we need pad bytes for a new field then it always starts at byte boundary. Can

Re: [llvm-commits] [126245] Fix http://lists.cs.uiuc.edu/pipermail/llvm-commits/ Week-of-Mon-20070416/047943.html

2007-04-19 Thread Duncan Sands
Hi Devang, yes, this need not be true in Ada, where bitfields can be placed wherever you like, Is it true for very first bitfield also ? yes, it is true for all bitfields including the first. for example type Second_Bitfield_Not_At_Bitoffset_Zero is record A : Character;

Re: [llvm-commits] CVS: llvm/test/lib/llvm.exp

2007-04-21 Thread Duncan Sands
+catch { set file_h [ open /tmp/llvm_obj_check.m w] } +set R [ catch { exec $llvmgcc -c /tmp/llvm_obj_check.m -o /dev/null /tmp/llvm_obj_check.out } ] Will using /tmp and /dev/null work properly under Windows? Ciao, Duncan. ___

[llvm-commits] CVS: llvm/test/lib/llvm.exp

2007-04-21 Thread Duncan Sands
Changes in directory llvm/test/lib: llvm.exp updated: 1.18 - 1.19 --- Log message: Test if the compiler supports Ada, and enable Ada tests if so. While I was there, delete a temporary file the objc test forgot to delete. --- Diffs of the changes: (+17 -0) llvm.exp | 17

[llvm-commits] CVS: llvm/test/FrontendAda/dg.exp

2007-04-21 Thread Duncan Sands
Changes in directory llvm/test/FrontendAda: dg.exp added (r1.1) --- Log message: Test if the compiler supports Ada, and enable Ada tests if so. While I was there, delete a temporary file the objc test forgot to delete. --- Diffs of the changes: (+6 -0) dg.exp |6 ++ 1 files

Re: [llvm-commits] CVS: llvm/test/lib/llvm.exp

2007-04-23 Thread Duncan Sands
Hi Reid, + if { [ string first $lang $llvmgcc_langs ] = 0 } { won't c match c,c++,objc and objc++; and c++ match both c++ and objc++, etc? Best wishes, Duncan. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu

Re: [llvm-commits] [126488] Fix PR1352 and CFrontend/2007-04-24-VolatileStructCopy.c

2007-04-25 Thread Duncan Sands
Hi Chris, // Non-bitfield aggregate value. -Emit(TREE_OPERAND(exp, 1), LV.Ptr); -if (DestLoc) +if (DestLoc) { + Emit(TREE_OPERAND(exp, 1), LV.Ptr); EmitAggregateCopy(DestLoc, LV.Ptr, TREE_TYPE(exp), isVolatile, false); why is this ^^^ right? Doesn't a non-null

  1   2   3   4   5   6   7   8   >