I don't mean compiler flags for pipelining. I would like to program in a way that helps the compiler do optimizations using pipelining. I mean I want to order instructions in C in such a way that GCC (or other compiler) can easily pipeline my instructions. For example, if I have:
a+=b c=a/b d+=b f+=b
Here, the last two 'add' operations would be pipelined, but not the first. I would turn it into:
a+=b d+=b f+=b c=a/b
Notice that the three 'add' operations can be pipelined, but the floating point division cannot.
I want to know, is there more cases in which I can help the compiler do pipelining optimizations? What operations are the ones that can be generally pipelined in modern processors, and that compilers can recognize in code?