12.07.2015 Views

PGI User's Guide

PGI User's Guide

PGI User's Guide

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Invoking Function Inlining50except:funcInlines all eligible functions except func, a function in the source text. you can use a comma-separatedlist to specify multiple functions.[name:]funcInlines all functions in the source text whose name matches func. you can use a comma-separated list tospecify multiple functions.[size:]nInlines functions with a statement count less than or equal to n, the specified size.NoteThe size n may not exactly equal the number of statements in a selected function; the sizeparameter is merely a rough gauge.levels:nInlines n level of function calling levels. The default number is one (1). Using a level greater than oneindicates that function calls within inlined functions may be replaced with inlined code. This approachallows the function inliner to automatically perform a sequence of inline and extract processes.[lib:]file.extInstructs the inliner to inline the functions within the library file file.ext. If no inline library isspecified, functions are extracted from a temporary library created during an extract prepass.TipCreate the library file using the -Mextract option.If you specify both a function name and a size n, the compiler inlines functions that match the function nameor have n or fewer statements.If a name is used without a keyword, then a name with a period is assumed to be an inline library and a namewithout a period is assumed to be a function name. If a number is used without a keyword, the number isassumed to be a size.In the following example, the compiler inlines functions with fewer than approximately 100 statements in thesource file myprog.f and writes the executable code in the default output file a.out.$ pgfortran -Minline=size:100 myprog.fRefer to “–M Options by Category” in the <strong>PGI</strong> Compiler Reference Manual.For more information on the -Minline options, refer to “–M Options by Category” chapter of the <strong>PGI</strong>Compiler Reference Manual.Using an Inline LibraryIf you specify one or more inline libraries on the command line with the -Minline option, the compiler doesnot perform an initial extract pass. The compiler selects functions to inline from the specified inline library.If you also specify a size or function name, all functions in the inline library meeting the selection criteria areselected for inline expansion at points in the source text where they are called.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!