Re: RFC: extend cprop_hardreg into a global pass

2012-07-25 Thread Steven Bosscher
On Wed, Jul 25, 2012 at 3:35 AM, Bin.Cheng wrote: > On Wed, Jul 25, 2012 at 2:14 AM, Steven Bosscher > wrote: >> Bin Cheng wrote: >>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44025 >> >> You could foster-parent and fix the attached patch to address this issue. >> (I'm not interested in pursui

Integer promotion for register based arguments

2012-07-25 Thread Jon Beniston
Hi, I've tried compiling the following program targeting both MIPS, LM32 and ARM. long a, b; void func(short p) { b = (long)p; } int main() { if(a < 2) func((short)a); return 0; } For MIPS and LM32, truncation is performed in the calling function and sig

Re: Integer promotion for register based arguments

2012-07-25 Thread Andrew Haley
On 07/25/2012 12:15 PM, Jon Beniston wrote: > For MIPS and LM32, truncation is performed in the calling function > and sign extension in the called function. One of these operations > seems redundant. For ARM, truncation is performed in the caller, > but sign-extension isn't performed in the calle

RE: Integer promotion for register based arguments

2012-07-25 Thread Jon Beniston
Hi Andrew, > On 07/25/2012 12:15 PM, Jon Beniston wrote: > > For MIPS and LM32, truncation is performed in the calling function and > > sign extension in the called function. One of these operations seems > > redundant. For ARM, truncation is performed in the caller, but > > sign-extension isn't

Problems with pragma and attribute optimize.

2012-07-25 Thread Allan Sandfeld Jensen
Hi, I have been experimenting with marking specific functions to be auto- vectorized in GCC, but have had problems getting it to work. It seems the optimize attribute works sometimes, but only if the function it is used on is not static, but pragma optimize never seems to work. See the attached

Re: Problems with pragma and attribute optimize.

2012-07-25 Thread Richard Guenther
On Wed, Jul 25, 2012 at 2:23 PM, Allan Sandfeld Jensen wrote: > Hi, > > I have been experimenting with marking specific functions to be auto- > vectorized in GCC, but have had problems getting it to work. > > It seems the optimize attribute works sometimes, but only if the function it > is used on

Optimize attribute and inlining

2012-07-25 Thread Selvaraj, Senthil_Kumar
Declaring a function with __attribute__((optimize("O0")) turns off inlining for the translation unit (atleast) containing the function (see output at the end). Is this expected behavior? I tracked this down to the fact that when processing the optimize attribute with O0, flag_no_inline is set t

Re: Problems with pragma and attribute optimize.

2012-07-25 Thread Allan Sandfeld Jensen
On Wednesday 25 July 2012, Richard Guenther wrote: > On Wed, Jul 25, 2012 at 2:23 PM, Allan Sandfeld Jensen > > wrote: > > Hi, > > > > I have been experimenting with marking specific functions to be auto- > > vectorized in GCC, but have had problems getting it to work. > > > > It seems the opti

Re: Optimize attribute and inlining

2012-07-25 Thread Richard Guenther
On Wed, Jul 25, 2012 at 4:07 PM, Selvaraj, Senthil_Kumar wrote: > Declaring a function with __attribute__((optimize("O0")) turns off inlining > for the translation unit (atleast) containing the function (see output at the > end). Is this expected behavior? Not really. The optimize attribute pr

Re: Problems with pragma and attribute optimize.

2012-07-25 Thread Richard Guenther
On Wed, Jul 25, 2012 at 4:25 PM, Allan Sandfeld Jensen wrote: > On Wednesday 25 July 2012, Richard Guenther wrote: >> On Wed, Jul 25, 2012 at 2:23 PM, Allan Sandfeld Jensen >> >> wrote: >> > Hi, >> > >> > I have been experimenting with marking specific functions to be auto- >> > vectorized in GCC

Re: Integer promotion for register based arguments

2012-07-25 Thread Eric Botcazou
> I guess my question is what would I need to change to make it work like the > ARM port? I can't see how this is being controlled. Try TARGET_PROMOTE_PROTOTYPES. -- Eric Botcazou

RE: Integer promotion for register based arguments

2012-07-25 Thread Jon Beniston
Hi Eric, > > I guess my question is what would I need to change to make it work > > like the ARM port? I can't see how this is being controlled. > > Try TARGET_PROMOTE_PROTOTYPES. For all 3 targets I believe this returns true (Both MIPS and LM32 use hook_bool_const_tree_true), so I presume it m

Re: Integer promotion for register based arguments

2012-07-25 Thread Andrew Haley
On 07/25/2012 04:52 PM, Jon Beniston wrote: > Hi Eric, > >>> > > I guess my question is what would I need to change to make it work >>> > > like the ARM port? I can't see how this is being controlled. >> > >> > Try TARGET_PROMOTE_PROTOTYPES. > For all 3 targets I believe this returns true (Both

RE: Identifying Compiler Options to Minimize Energy Consumption by Embedded Programs

2012-07-25 Thread Jon Beniston
Hi James, > - Which set of benchmarks are suitable for embedded applications and representative of possible applications? Have a look at CoreMark: http://www.coremark.org/ EEMBC also have EnergyBench: http://www.eembc.org/benchmark/power_sl.php although I think that might be commercial, but it

Re: Optimize attribute and inlining

2012-07-25 Thread David Brown
On 25/07/12 17:30, Richard Guenther wrote: On Wed, Jul 25, 2012 at 4:07 PM, Selvaraj, Senthil_Kumar wrote: Declaring a function with __attribute__((optimize("O0")) turns off inlining for the translation unit (atleast) containing the function (see output at the end). Is this expected behavior?

Re: Reserving a bit in ELF segment flags for huge page mappings

2012-07-25 Thread Sriraman Tallam
On Tue, Jul 24, 2012 at 1:40 PM, Cary Coutant wrote: >> To do this, I would like to reserve a bit in the segment flags to >> indicate that this segment is to be mapped to huge pages if possible. >> Can I reserve something like a PF_LARGE_PAGE bit? > > HP-UX has a PF_HP_PAGE_SIZE (0x0010) bit