Re: insn length attribute and code size optimization

2010-02-10 Thread Daniel Jacobowitz
On Wed, Feb 10, 2010 at 09:55:25AM -0600, Quentin Neill wrote: > GAS knows this information for each insn. That's not the problem. GCC knows the lengths by the time it's a whole instruction. The problem is figuring out what instruction (plus (reg) (reg)) will expand to - before you even know wha

Re: insn length attribute and code size optimization

2010-02-10 Thread Quentin Neill
On Tue, Feb 9, 2010 at 5:02 PM, Richard Sandiford wrote: > Daniel Jacobowitz writes: >> On Wed, Feb 03, 2010 at 06:23:19AM -0800, Ian Lance Taylor wrote: >>> fanqifei writes: >>> >>> > According to the internal manual, insn length attribute can be used to >>> > to calculate the length of emitted

Re: insn length attribute and code size optimization

2010-02-09 Thread Richard Sandiford
Daniel Jacobowitz writes: > On Wed, Feb 03, 2010 at 06:23:19AM -0800, Ian Lance Taylor wrote: >> fanqifei writes: >> >> > According to the internal manual, insn length attribute can be used to >> > to calculate the length of emitted code chunks when verifying branch >> > distances. >> > Can it b

Re: insn length attribute and code size optimization

2010-02-03 Thread Daniel Jacobowitz
On Wed, Feb 03, 2010 at 06:23:19AM -0800, Ian Lance Taylor wrote: > fanqifei writes: > > > According to the internal manual, insn length attribute can be used to > > to calculate the length of emitted code chunks when verifying branch > > distances. > > Can it be used in code size optimization? >

Re: insn length attribute and code size optimization

2010-02-03 Thread Ian Lance Taylor
fanqifei writes: > According to the internal manual, insn length attribute can be used to > to calculate the length of emitted code chunks when verifying branch > distances. > Can it be used in code size optimization? I suppose it could, but it isn't. Instead of asking the backend for the lengt