This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: CASE_VECTOR_SHORTEN_MODE


Tal Agmon wrote:
I have a question regarding the optimization given by
CASE_VECTOR_SHORTEN_MODE.
The documentation says: "To make this work, you also have to define
INSN_ALIGN and make the alignment for addr_diff_vec explicit."

I see only one port using CASE_VECTOR_SHORTEN_MODE. That is a danger sign. It may not be completely portable. Also, the fact that the documentation is uselessly wrong is a danger sign. There may be some work needed before you can use it.


It isn't obvious what INSN_ALIGN refers to, but I think it refers partly to instruction lengths, and the various *_ALIGN macros, such as LABEL_ALIGN. You need these defined accurately in order to compute the address range spanned by the case labels. Instruction lengths are normally specified via length attributes in the md file. If you already have branch shortening, then you probably already have length attributes.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]