------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-13 22:02 ------- -O1 -DBUG vs -O1 on "GCC: (GNU) 3.4.1 20040619 (prerelease)" is the same. Now with -fno-inline we do get different asm but the asm is correct as current_thread_info is marked as const so we only call it once.
Also smp_processor_id is not called at all at -O1 or -fno-inline -O1 because smp_processor_id is pure since pure means it does not have any side effects. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17972