Re: Branch Prediction - Thy New Enemy?



xmath wrote:
BTW, this is also perhaps a good moment to mention something I find out
when looking through some of gcc's output: on PowerPC, at least the
gcc I got here produces branching code-sequences for x > 0 and x <= 0
for signed x, when using the result numerically. Same for the
equivalent x >= 1 and x < 1. It seems it produces branch-free
sequences for all other comparisons of word-size arguments, signed or
unsigned, constant or variable.

gcc version 4.0.0 (Apple Computer, Inc. build 5026)

Part of my job involves hacking large code like DB2 and I've seen GCC
4.1.0 use the CMOV* series of opcodes [whereas ICC v9 doesn't hahahaha]
to avoid branches.

Like I've always said, GCC is smart, it knows things.

:-)

Tom

.



Relevant Pages

  • PowerPC, uCOS-II, GCC port
    ... layer with GCC; it seems less happy with Cygwin although I would ... MinGW if we can. ... So, first of all, does anyone know of an available PowerPC GCC port ... further and see what plans have been made for board bring-up and BSP ...
    (comp.arch.embedded)
  • PowerPC, uCOS-II, GCC port
    ... I'm just getting started on a new project consisting of a PowerPC 405 ... layer with GCC; it seems less happy with Cygwin although I would ... MinGW if we can. ... further and see what plans have been made for board bring-up and BSP ...
    (comp.sys.powerpc.tech)
  • OT: C perfomance
    ... > PowerPC or the older Mac CPU family, ... > true that the PowerPC has an unusual instruction set, ... > apparently many versions of gcc do not use it very effectively. ... > actual run time of various C source code constructs, ...
    (comp.lang.c)
  • How select toolsets in Eclipse (was Re: PowerPC, uCOS-II, GCC port)
    ... I installed the PowerPC port for GCC, which the installer put in ... Then I tried one of Macraigor's demo projects and it worked fine. ... compile PowerPC assembly code. ...
    (comp.arch.embedded)
  • Re: examining the C compilers output (Ex: ( picoVerse-:( I want to generate machine code ) ))
    ... | Thanks for reminding me. ... Yes, "gcc -S" is also helpful, but it ... | doesn't tell you which byte sequences are generated from the assembly ... Our programs do not have bugs; it is just that the users' expectations ...
    (comp.lang.lisp)