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 rdsandif...@googlemail.com wrote: Daniel Jacobowitz d...@codesourcery.com writes: On Wed, Feb 03, 2010 at 06:23:19AM -0800, Ian Lance Taylor wrote: fanqifei fanqi...@gmail.com writes: According to the internal manual, insn length attribute

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

Re: insn length attribute and code size optimization

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

insn length attribute and code size optimization

2010-02-03 Thread fanqifei
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 may change TARGET_RTX_COSTS in my gcc port and return costs regarding the ins lengths. I can see code

Re: insn length attribute and code size optimization

2010-02-03 Thread Ian Lance Taylor
fanqifei fanqi...@gmail.com 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

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 fanqi...@gmail.com 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