OpenCores
no use no use 1/1 no use no use
or32-elf-gcc with -O3
by yuanbo on Sep 13, 2011
yuanbo
Posts: 2
Joined: Feb 1, 2011
Last seen: Nov 11, 2011
Hi,

I am compiling a simple C program with or32-elf-gcc (4.2.2). When I add the optimization level, (-O3), the content inside the main function is omitted. Why is that?

Thanks.
Yuanbo
RE: or32-elf-gcc with -O3
by agentj on Sep 13, 2011
agentj
Posts: 3
Joined: Jun 10, 2008
Last seen: Nov 19, 2023
You're writing a code which evaluates either to nothing or a constant result after optimization phase.
RE: or32-elf-gcc with -O3
by yuanbo on Sep 13, 2011
yuanbo
Posts: 2
Joined: Feb 1, 2011
Last seen: Nov 11, 2011
You're writing a code which evaluates either to nothing or a constant result after optimization phase.
Thanks. Is there any way to store a variable in the register instead of memory? Does "register" keyword work for or32-elf-gcc?

Thanks again.
Yuanbo
RE: or32-elf-gcc with -O3
by firefalcon on Sep 13, 2011
firefalcon
Posts: 99
Joined: Jan 10, 2011
Last seen: Mar 26, 2024
You're writing a code which evaluates either to nothing or a constant result after optimization phase.
Thanks. Is there any way to store a variable in the register instead of memory? Does "register" keyword work for or32-elf-gcc?

Thanks again.
Yuanbo


register is treated as a suggestion by the compiler.
no use no use 1/1 no use no use
© copyright 1999-2026 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.