OrangeC icon indicating copy to clipboard operation
OrangeC copied to clipboard

occopt out of memory

Open LADSoft opened this issue 8 months ago • 5 comments

two of the tests in libcob stress the optimizer and run it out of memory when it is being run through the test harness (1306 and 1329).

At some point this should be investigated.

LADSoft avatar May 04 '25 03:05 LADSoft

If the optimization options make a potential difference, you may want to also run a test with

make checkall COBOL_FLAGS="-O3"

to have that option enabled for all tests (generated modules) or even pass CFLAGS=-O3 as part of the configure invocation.

GitMensch avatar May 04 '25 09:05 GitMensch

the issue probably is that programs like those result in a lot of intermediate temporaries, and a lot of intermediate temporaries really bothers the GCSE optimizer... I have to see if I can bring the number of temporaries down but that seems like a big projecte :smile:

LADSoft avatar May 05 '25 20:05 LADSoft

Can we disable the GCSE optimizer (or part of it)? In any case you may want to move that to milestone 5 if you see no low-hanging fruit.

GitMensch avatar May 06 '25 20:05 GitMensch

yeah it is going to be in milestone 5. The GCSE optimizer can be disabled though if someone needed to (with -fopt-nogcse).

LADSoft avatar May 07 '25 02:05 LADSoft

so there was a lot of work done with libcob, in issue #168. This issue is a result of later testing with it... in that issue @GitMensch wrote:

 Note: if you want to add that to OrangeC's testsuite use make check TESTSUITEFLAGS=1306 COBOL_FLAGS=-g (running only that single test, leaving C intermediates around that you can add to your tests).

LADSoft avatar May 10 '25 01:05 LADSoft