Skip to content
This repository was archived by the owner on Jun 20, 2019. It is now read-only.

Comments

Update frontend to 2.066#87

Merged
jpf91 merged 6 commits intoD-Programming-GDC:masterfrom
ibuclaw:2.066
Jan 22, 2015
Merged

Update frontend to 2.066#87
jpf91 merged 6 commits intoD-Programming-GDC:masterfrom
ibuclaw:2.066

Conversation

@ibuclaw
Copy link
Member

@ibuclaw ibuclaw commented Sep 28, 2014

TODO:

  • Visitor conversions. Delaying until after 2.067, where separation between front and backend has been been completed: [cleanup] Finish moving glue functions out of classes dlang/dmd#4291
  • Move toArgTypes visitor to glue where it belongs. Delaying this until can think of a more arch agnostic way to do this.
  • C++ support (cppmangle.c) - to glue or not to glue. cppmangle.c changes have been left out of this merge due to blocking breakages.
  • Update Testsuite.
  • Maybe update to 2.066.1
  • Regression testings on ARM, etc.

@ibuclaw
Copy link
Member Author

ibuclaw commented Sep 28, 2014

Getting an ICE on X32 only, with -O2:

std/complex.d: In function ‘gencode’:
std/complex.d:52: internal compiler error: in maybe_record_trace_start, at dwarf2cfi.c:2237

There is very little chance of finding what front-end/glue change is causing this. May have to do incremental merges against dmd master, (eek!).

@ibuclaw
Copy link
Member Author

ibuclaw commented Sep 28, 2014

git format-patch to the rescue... there are 944 commits between 2.065 and 2.066.

@timosi
Copy link
Contributor

timosi commented Sep 30, 2014

I can build the compiler and my minimum runtime for arm.
When I try to link my application I get the error below. Only TypeInfo_Struct seems to have xtoHash, the others do not have
Am I doing something wrong?

minlibd/libdruntime/libdruntime.a(object_.o):(.data._D33TypeInfo_S6object14OffsetTypeInfo6__initZ[_D33TypeInfo_S6object14OffsetTypeInfo6__initZ]+0x18): undefined reference to _D6object14OffsetTypeInfo9__xtoHashFNbNeKxS6object14OffsetTypeInfoZk' minlibd/libdruntime/libdruntime.a(object_.o):(.data._D27TypeInfo_S6object9Interface6__initZ[_D27TypeInfo_S6object9Interface6__initZ]+0x18): undefined reference to _D6object9Interface9__xtoHashFNbNeKxS6object9InterfaceZk'
minlibd/libdruntime/libdruntime.a(deh.o):(.data._D38TypeInfo_S3gcc3deh18d_exception_header6__initZ[_D38TypeInfo_S3gcc3deh18d_exception_header6__initZ]+0x18): undefined reference to`_D3gcc3deh18d_exception_header9__xtoHashFNbNeKxS3gcc3deh18d_exception_headerZk'

@ibuclaw
Copy link
Member Author

ibuclaw commented Oct 1, 2014

It is quite possible that I have missed some typeinfo change that needs to be reflected in the glue code. Unfortunately it is too difficult to tell what though. It seems that 2.065 was left in beta for 6 months, so what got applied to 2.066 and what got backported to 2.065 during that time is just a spaghetti mess.

@ibuclaw
Copy link
Member Author

ibuclaw commented Oct 17, 2014

Found the bug:
dlang/dmd#3581

@ibuclaw
Copy link
Member Author

ibuclaw commented Oct 18, 2014

PR actually exposed a bigger bug.

@ibuclaw
Copy link
Member Author

ibuclaw commented Oct 19, 2014

Changing ABI of CatExp's. Rather than passing the generated dynamic arrays directly over varargs (disallowed in normal D code), instead I've amended the codegen to instead split the fields as a separate parameter.

So: _d_arraycatnT(tid, 3, arr1, arr2, arr3)
Becomes: _d_arraycatnT(tid, 3, arr1.length, arr1.ptr, ...);

This works around the ICE in the X32 optimiser. But doing it in the former way was probably not a good idea in the first place.

@ibuclaw
Copy link
Member Author

ibuclaw commented Oct 19, 2014

@jpf91 - I think we're ready to start merging in the testsuite and regression testing.

@ibuclaw
Copy link
Member Author

ibuclaw commented Oct 19, 2014

@timosi - there actually turned out to be many many glue changes missed in the first merge. This time things should be better (I hope!)

@ibuclaw ibuclaw force-pushed the 2.066 branch 6 times, most recently from 62e739b to abe01e1 Compare October 20, 2014 06:45
@jpf91
Copy link
Contributor

jpf91 commented Oct 20, 2014

ARM build is running since yesterday but it'll probably take some time. Side note: gcc-5 no longer compiles on wheezy/arm which still uses gcc 4.6.

@jpf91
Copy link
Contributor

jpf91 commented Oct 21, 2014

Now binutils crashes. Seems like I can't test this on my always-running wheezy box. I'll have to test on the archlinux pandaboard, but that'll have to wait till the weekend.

@ibuclaw
Copy link
Member Author

ibuclaw commented Dec 14, 2014

New backported fix:
dlang/dmd#4212

@ibuclaw ibuclaw force-pushed the 2.066 branch 2 times, most recently from 540afdc to cfea229 Compare January 17, 2015 19:55
@ibuclaw
Copy link
Member Author

ibuclaw commented Jan 17, 2015

@jpf91 - any more things you wish to add to this before I call it a day and merge up?

@ibuclaw ibuclaw force-pushed the 2.066 branch 2 times, most recently from aac141e to 1aa7e51 Compare January 18, 2015 14:03
@ibuclaw ibuclaw self-assigned this Jan 18, 2015
@jpf91
Copy link
Contributor

jpf91 commented Jan 18, 2015

Looks great. I started an ARM build right now, but no need to wait for the result. I can pushes fixes later if necessary.

However, I see one test failure on X86-64:

Executing on host: /mnt/hdd/GDC/objdir/gcc/testsuite/gdc/../../gdc -B/mnt/hdd/GDC/objdir/gcc/testsuite/gdc/../../ runnable/cppa.d  -fno-diagnostics-show-caret -fdiagnostics-color=never  -I/mnt/hdd/GDC/objdir/x86_64-unknown-linux-gnu/./libphobos/libdruntime -I/mnt/hdd/GDC/objdir/x86_64-unknown-linux-gnu/./libphobos/libdruntime/import -I/mnt/hdd/GDC/objdir/x86_64-unknown-linux-gnu/./libphobos/libdruntime/x86_64-unknown-linux-gnu -I/mnt/hdd/GDC/gcc-5-20150111/gcc/testsuite/../../libphobos/src -I/mnt/hdd/GDC/gcc-5-20150111/gcc/testsuite/../../libphobos/libdruntime   -I/mnt/hdd/GDC/gcc-5-20150111/gcc/testsuite/gdc.test/runnable -I/mnt/hdd/GDC/gcc-5-20150111/gcc/testsuite/gdc.test/runnable/imports  runnable/extra-files/cppb.cpp  -L/mnt/hdd/GDC/objdir/x86_64-unknown-linux-gnu/./libphobos/src  -lm   -o ./cppa.exe    (timeout = 300)
spawn /mnt/hdd/GDC/objdir/gcc/testsuite/gdc/../../gdc -B/mnt/hdd/GDC/objdir/gcc/testsuite/gdc/../../ runnable/cppa.d -fno-diagnostics-show-caret -fdiagnostics-color=never -I/mnt/hdd/GDC/objdir/x86_64-unknown-linux-gnu/./libphobos/libdruntime -I/mnt/hdd/GDC/objdir/x86_64-unknown-linux-gnu/./libphobos/libdruntime/import -I/mnt/hdd/GDC/objdir/x86_64-unknown-linux-gnu/./libphobos/libdruntime/x86_64-unknown-linux-gnu -I/mnt/hdd/GDC/gcc-5-20150111/gcc/testsuite/../../libphobos/src -I/mnt/hdd/GDC/gcc-5-20150111/gcc/testsuite/../../libphobos/libdruntime -I/mnt/hdd/GDC/gcc-5-20150111/gcc/testsuite/gdc.test/runnable -I/mnt/hdd/GDC/gcc-5-20150111/gcc/testsuite/gdc.test/runnable/imports runnable/extra-files/cppb.cpp -L/mnt/hdd/GDC/objdir/x86_64-unknown-linux-gnu/./libphobos/src -lm -o ./cppa.exe
PASS: runnable/cppa.d (test for excess errors)
Setting LD_LIBRARY_PATH to .:/mnt/hdd/GDC/objdir/x86_64-unknown-linux-gnu/./libphobos/src:/mnt/hdd/GDC/objdir/gcc:/mnt/hdd/GDC/objdir/gcc/32:.:/mnt/hdd/GDC/objdir/x86_64-unknown-linux-gnu/./libphobos/src:/mnt/hdd/GDC/objdir/gcc:/mnt/hdd/GDC/objdir/gcc/32:
spawn [open ...]
FAIL: runnable/cppa.d execution test
D.bar: i = 9
D.bar: j = 10
D.bar: k = 11

Program received signal SIGSEGV, Segmentation fault.
0x000000000040386b in callE (e=0x0) at runnable/extra-files/cppb.cpp:63
63      return e->bar(11,12,13);
(gdb) bt
#0  0x000000000040386b in callE (e=0x0) at runnable/extra-files/cppb.cpp:63
#1  0x00000000004032c4 in cppa.test3() () at runnable/cppa.d:87
#2  0x0000000000403700 in D main () at runnable/cppa.d:252

Is this a known problem?

@ibuclaw
Copy link
Member Author

ibuclaw commented Jan 18, 2015

Heh, I forgot to update one piece of my build environment when I did a laptop move last month - this test has been coming up as "UNRESOLVED" in my logs and I didn't pick it up.

Needs sorting out, give me 15 minutes.

@ibuclaw
Copy link
Member Author

ibuclaw commented Jan 18, 2015

Got my cast from/to C++ class logic backwards. Should be ok now (rebased it in)

@ibuclaw
Copy link
Member Author

ibuclaw commented Jan 18, 2015

Running the testsuite (one last time) with -m32, -mx32 and -m64. I should get @braddr to set-up a VM for this. :)

@ibuclaw
Copy link
Member Author

ibuclaw commented Jan 18, 2015

        === gdc tests ===

Schedule of variations:
    unix
    unix/-m32
    unix/-mx32

        === gdc Summary for unix ===

# of expected passes        16918

        === gdc Summary for unix/-m32 ===

# of expected passes        16918

        === gdc Summary for unix/-mx32 ===

# of expected passes        16918

        === gdc Summary ===

# of expected passes        50754

@ibuclaw
Copy link
Member Author

ibuclaw commented Jan 18, 2015

@jpf91 - Is it ok to leave this in your hands to merge in?

@jpf91
Copy link
Contributor

jpf91 commented Jan 18, 2015

Great, tests now pass on X86-64. gcc-5-20150111 is broken on ARM but that should be fixed in the next snapshot.

@jpf91
Copy link
Contributor

jpf91 commented Jan 18, 2015

@ibuclaw OK. I'll see if an older gcc csnapshot builds on ARM. Otherwise I'll just merge this pull request and test ARM later.

@ibuclaw
Copy link
Member Author

ibuclaw commented Jan 19, 2015

@braddr - Awesome! Thanks.

@braddr
Copy link

braddr commented Jan 19, 2015

There's some very big problems with my auto-tester and the GDC project's behavior since it was set up. The biggest is that it looks like it's testing 4 different things but it's really testing x86/32 4 times. The second is a lot more minor but the order of builds isn't working right and GDC pull requests are building a lot later than they should. I'll have both fixed this week (hopefully today or tomorrow).

@jpf91
Copy link
Contributor

jpf91 commented Jan 20, 2015

I'm currently reducing the last ARM bug. Might take some more time.

@jpf91 jpf91 merged commit 9c4abb0 into D-Programming-GDC:master Jan 22, 2015
@jpf91
Copy link
Contributor

jpf91 commented Jan 22, 2015

Pushed directly. dustmite finished reducing the last ARM bug. Looks like wrong-code but I'll backport & test on 4.9.2 first as this could be a GCC bug.

@ibuclaw ibuclaw deleted the 2.066 branch January 30, 2015 19:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants