Branch Relaxation Support?

I think I have read that there are plans to generate object code (e.g. ELF) directly in addition to assembly language source. If so, are there plans to support branch relaxation for targets which support long/short branch displacements? This is typically done in assemblers.

thanks,
bagel

Yes, we are implementing a proper assembler on top of our existing
machine information. Work on the backend side will likely start this
week.

- Daniel

ARM has its own pass to do this (ARMConstantIslandPass.cpp). At some point of time we'd like to rip out the branch relaxation part and make it into a target independent pass.

Evan

ARM has its own pass to do this (ARMConstantIslandPass.cpp). At some
point of time we'd like to rip out the branch relaxation part and make
it into a target independent pass.

I don't know about ripping it out, the data structures of the parts are pretty much interleaved. However, on a target without constant islands, the constant islands part won't do anything; it should be feasible to make the entire pass target independent. Right now the recognition and handling of branch instructions is ARM-specific, however.