digitalmars.D.bugs - [Issue 5563] New: Failed/succeeded inlining listing
- d-bugmail puremagic.com (57/57) Feb 11 2011 http://d.puremagic.com/issues/show_bug.cgi?id=5563
http://d.puremagic.com/issues/show_bug.cgi?id=5563 Summary: Failed/succeeded inlining listing Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: bearophile_hugs eml.cc --- Comment #0 from bearophile_hugs eml.cc 2011-02-11 03:25:22 PST --- Inlining is one of the most important performance optimizations, so an useful information for the programmer is a list of failed/succeeded inlining points. See: http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=129206 Taking a look at the produced asm is often enough to see where inlining has happened or not, but a list shown by the compiler is simpler and quicker to read and understand, for external automatic tools too. When you compile CommonLisp with max optimization levels the compiler gives many comments that explain why it isn't optimizing something, including some forms of inlining, see for example: http://shootout.alioth.debian.org/u32/program.php?test=fasta&lang=sbcl&id=3 Example of the comments: ; file: /home/dunham/shootout/bench/fasta/fasta.sbcl-3.sbcl ; in: DEFUN CUMSUM ; (CEILING (* +IM+ (INCF C X))) ; --> CEILING MULTIPLE-VALUE-BIND MULTIPLE-VALUE-CALL TRUNCATE LET ; ==> ; (SB-KERNEL:%UNARY-TRUNCATE/SINGLE-FLOAT SB-C::X) ; ; note: forced to do full call ; unable to do inline float truncate (cost 5) because: ; The result is a (VALUES INTEGER &OPTIONAL), not a (VALUES ; (SIGNED-BYTE 32) &REST ; T). ; unable to do inline float truncate (cost 5) because: ; The result is a (VALUES INTEGER &OPTIONAL), not a (VALUES ; (UNSIGNED-BYTE 32) ; &REST T). ; --> CEILING MULTIPLE-VALUE-BIND MULTIPLE-VALUE-CALL TRUNCATE LET VALUES - ; ==> ; (SB-KERNEL:%SINGLE-FLOAT SB-C::RES) ; ; note: forced to do full call ; unable to do inline float coercion (cost 5) because: ; The first argument is a INTEGER, not a (SIGNED-BYTE 32). ; unable to do inline float coercion (cost 6) because: ; The first argument is a INTEGER, not a (UNSIGNED-BYTE 32). ... Another similar kind of useful notes from the compiler: http://d.puremagic.com/issues/show_bug.cgi?id=5070 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 11 2011