Article View: gnu.gcc.help
Article #51029optimization of volatile functions
From: Richard Draves
Date: Tue, 13 Jul 1993 23:44
Date: Tue, 13 Jul 1993 23:44
14 lines
1265 bytes
1265 bytes
I have an important code path which uses functions that don't return. I'd hoped that by declaring the functions volatile gcc would optimize away unnecessary register saves & restores. I'd like to avoid saving callee-saved registers in the prologue of a volatile function and avoid saving caller-saved registers before a call to a volatile function. However, a quick test (gcc 2.3.3, mips) seemed to indicate that gcc doesn't have this optimization. 1) Can gcc perform this optimization for volatile functions? 2) If not, how hard would it be to add this optimization? Thanks, Rich
Technical Details
Message-ID:
<CA4n9z.84J.1@cs.cmu.edu>Path:
arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!noc.near.net!das-news.harvard.edu!cantaloupe.srv.cs.cmu.edu!crabapple.srv.cs.cmu.edu!rpdShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,cbd07c117297e09d,start X-Google-Attributes: gid11318c,public X-Google-ArrivalTime: 1993-07-13 17:26:00 PST Newsgroups: gnu.gcc.help Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!noc.near.net!das-news.harvard.edu!cantaloupe.srv.cs.cmu.edu!crabapple.srv.cs.cmu.edu!rpd From: rpd+@cs.cmu.edu (Richard Draves) Subject: optimization of volatile functions Message-ID: <CA4n9z.84J.1@cs.cmu.edu> Sender: news@cs.cmu.edu (Usenet News System) Nntp-Posting-Host: ernst.mach.cs.cmu.edu Organization: School of Computer Science, Carnegie Mellon Date: Tue, 13 Jul 1993 23:44:20 GMT Lines: 14