diff options
| author | hariharans <hariharans@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-01-30 10:25:54 +0000 |
|---|---|---|
| committer | hariharans <hariharans@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-01-30 10:25:54 +0000 |
| commit | 3b31ea78b2f2d2de177d1ce418afadcfb0c0d1ca (patch) | |
| tree | 8239064a5f039dd58adc19e087aca9d4d9e48c53 | |
| parent | c45dd88a0fa1fbab7a1f455c3652bf0c6ff8989c (diff) | |
| download | ppe42-gcc-3b31ea78b2f2d2de177d1ce418afadcfb0c0d1ca.tar.gz ppe42-gcc-3b31ea78b2f2d2de177d1ce418afadcfb0c0d1ca.zip | |
* config/picochip/picochip.c (flag_conserve_stack): set
PARAM_LARGE_STACK_FRAME and PARAM_STACK_FRAME_GROWTH to zero under
fconserve-stack. Reduce call-overhead used by inliner.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@143785 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/ChangeLog | 6 | ||||
| -rw-r--r-- | gcc/config/picochip/picochip.c | 11 |
2 files changed, 17 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 120b50eae09..6dc807bb4ca 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ Hariharan Sandanagobalane <hariharan@picochip.com> + * config/picochip/picochip.c (flag_conserve_stack): set + PARAM_LARGE_STACK_FRAME and PARAM_STACK_FRAME_GROWTH to zero under + fconserve-stack. Reduce call-overhead used by inliner. + +Hariharan Sandanagobalane <hariharan@picochip.com> + PR/38157 * common.opt (flag_conserve_stack): Initialised to zero. diff --git a/gcc/config/picochip/picochip.c b/gcc/config/picochip/picochip.c index 36170421d19..a0686bdb262 100644 --- a/gcc/config/picochip/picochip.c +++ b/gcc/config/picochip/picochip.c @@ -50,6 +50,7 @@ along with GCC; see the file COPYING3. If not, see #include "target-def.h" #include "langhooks.h" #include "reload.h" +#include "params.h" #include "picochip-protos.h" @@ -303,6 +304,16 @@ picochip_return_in_memory(const_tree type, const_tree fntype ATTRIBUTE_UNUSED) void picochip_override_options (void) { + /* If we are optimizing for stack, dont let inliner to inline functions + that could potentially increase stack size.*/ + if (flag_conserve_stack) + { + PARAM_VALUE (PARAM_LARGE_STACK_FRAME) = 0; + PARAM_VALUE (PARAM_STACK_FRAME_GROWTH) = 0; + } + /* The function call overhead on picochip is not very high. Let the + inliner know so its heuristics become more reasonable. */ + PARAM_VALUE (PARAM_INLINE_CALL_COST) = 2; /* Turn off the elimination of unused types. The elaborator generates various interesting types to represent constants, |

