This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Instruction cost question.
- From: Dmitry <diwil at mail dot ru>
- To: gcc at gcc dot gnu dot org
- Date: Fri, 28 Dec 2001 13:29:31 +0300
- Subject: Instruction cost question.
- Organization: eis.ru
Fellows,
I'm playing with the optimization.
So, now I faced with the problem, that the compiler decides to issue some silly shifts instead of jumps.
So, can anybody explain me the following:
I've got an insn which dumps as
(insn 10 32 11 (set (reg:SI 14 r14 [23])
(and:SI (reg/v:SI 14 r14 [22])
(const_int 131072 [0x20000]))) 102 {*andsi3_3} (insn_list 4 (nil))
(nil))
and another one:
(jump_insn 14 13 33 (set (pc)
(if_then_else (eq (cc0)
(const_int 0 [0x0]))
(label_ref 20)
(pc))) 194 {beq} (nil)
(nil))
The first one costs 9 and second one (branch) costs 26 albanian-dramalans-or-whatever :-)
Also, there are macros:
CONST_COSTS(x,CODE,OUTER_CODE)
DEFAULT_RTX_COSTS(x, code, outer_code)
Where in the insns above x, code, and outer_code ?
Thanks in advance,
Dmitry.
*********************************************************************
("`-''-/").___..--''"`-._ (\ Dimmy the Wild UA1ACZ
`6_ 6 ) `-. ( ).`-.__.`) Enterprise Information Sys
(_Y_.)' ._ ) `._ `. ``-..-' Nevsky prospekt, 20 / 44
_..`--'_..-_/ /--'_.' ,' Saint Petersburg, Russia
(il),-'' (li),' ((!.-' +7 (812) 314-8860, 5585314
*********************************************************************