user1941126
user1941126

Reputation: 427

Prevent unrolling for a specific loop

So there is already a question on how to tell the compiler to unroll a specific loop.

I have a project that uses too many templates and I run out of memory when I try to iterate over a specific place in the code. (This happens also for the non-iterated code when I have a browser window open for example.)

My best guess is that the compiler tries to unroll this loop and compilation fails due to memory exhaustion. How would I tell the compiler not to try to unroll that loop?

I'm using g++-4.7.

Upvotes: 2

Views: 476

Answers (1)

Cruentus_Nex
Cruentus_Nex

Reputation: 104

There is a similar question here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56746. Apparently using -save-temps options helps.

Upvotes: 2

Related Questions