avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [avr-gcc-list] Stack usage under heavy inlining


From: John Regehr
Subject: RE: [avr-gcc-list] Stack usage under heavy inlining
Date: Mon, 8 Sep 2008 11:11:02 -0600 (MDT)

Couple responses:

I have a student who has hacked gcc so that stack slots are reused, when possible, eliminating the "stack bloat under inlining" problem. He has also increased the precision of the live range analysis. All of this is towards the goal of greatly reducing stack memory usage (we can already substantially reduce stack usage vs. default avr-gcc, at least for some applications). He's integrating with IRA now, not sure when this'll all be ready to share. We hope to publish something in the Fall but there's a big gap between publishability and usability.

My original stack analysis tool for AVR was too complicated and had to be abandoned. I have a newer, simpler one that needs a bit more work before it can be deployed. It is (in most cases) not hard to compute a stack bound for a single C function. It is also (in most cases) not hard to compute a callgraph for an embedded application. The hard part, which cannot be automated, is turning these parts into a sound and precise global stack bound. To see why this is hard, consider that there may be threads, there may be coroutines, there may be reentrant and/or nested interrupts, etc.

John Regehr




reply via email to

[Prev in Thread] Current Thread [Next in Thread]