178:, and the code requests the result of F(6) and then later, F(6) again. This second evaluation is almost certainly unnecessary: the result could have instead been saved and referred to later. This simple optimization is foiled the moment that the implementation of F(x) becomes impure; that is, its execution involves references to parameters other than the explicit argument 6 that has been changed between the invocations, or side effects such as printing some message to a log, counting the number of evaluations, accumulating the
1236:
read only, be written to, be both read and written to, or be ignored altogether giving rise to opportunities such as constants not needing protection via temporary variables, but what happens in any given invocation may well depend on a complex web of considerations. Other procedures, especially function-like procedures will have certain behaviors that in specific invocations may enable some work to be avoided: for instance, the
36:
1223:
are) lest subsequent usages of that constant (made via reference to its memory location) go awry, a common technique is for the compiler to generate code copying the constant's value into a temporary variable whose address is passed to the procedure, and if its value is modified, no matter; it is never copied back to the location of the constant.
1207:
passed over as being not relevant to the immediate task and long forgotten by the time a problem arises. If (as is likely) temporary values are provided via a stack storage scheme, then it is likely that the copy-back process will be in the reverse order to the copy-in, which in this example would mean that
1226:
Put another way, a carefully written test program can report on whether parameters are passed by value or reference, and if used, what sort of copy-in and copy-out scheme. However, variation is endless: simple parameters might be passed by copy whereas large aggregates such as arrays might be passed
1206:
Such differences in behavior are likely to cause puzzlement, exacerbated by questions as to the order in which the parameters are copied: will it be left to right on exit as well as entry? These details are probably not carefully explained in the compiler manual, and if they are, they will likely be
291:
does naturally lend to the concept of LTO, but it only works with library archives that contain IR objects as opposed to machine-code only object files. Due to performance concerns, not even the entire unit is always directly used—a program could be partitioned in a divide-and-conquer style LTO such
1260:
In cases where a program reads no input (as in the example), one could imagine the compiler's analysis being carried forward so that the result will be no more than a series of print statements, or possibly some loops expediently generating such values. Would it then recognize a program to generate
1235:
This example is extremely simple, although complications are already apparent. More likely it will be a case of many procedures, having a variety of deducible or programmer-declared properties that may enable the compiler's optimizations to find some advantage. Any parameter to a procedure might be
1495:
Link-time optimizations do not require the presence of the whole program to operate. If the program does not require any symbols to be exported, it is possible to combine -flto and -fwhole-program to allow the interprocedural optimizers to use more aggressive assumptions which may lead to improved
1365:
have a "linker plugin" interface that allows the compiler to convert the object files into a machine code form when needed. This plugin also helps drive the LTO process in general. Alternatively, a "fat LTO" object can be produced to contain both machine code and the IR, but this takes more space.
1222:
expansions) because syntax errors may arise as when parameters are modified and the particular invocation uses constants as parameters. Because it is important to be sure that any constants supplied as parameters will not have their value changed (constants can be held in memory just as variables
303:
of the entire program, so that every other function in it is not externally used and can be safely optimized away. Since it only applies to a single module, it cannot truly encompass the whole program. It can be combined with LTO in the one-big-module sense, which is useful when the linker is not
1256:
is a month number? And are all violations worthy of immediate termination? Even if all that could be handled, what benefit might follow? And at what cost? Full specifications would amount to a re-statement of the program's function in another form and quite aside from the time the compiler would
170:
For various reasons, including readability, programs are frequently broken up into a number of procedures that handle a few general cases. However, the generality of each procedure may result in wasted effort in specific usages. Interprocedural optimization represents an attempt at reducing this
1243:
Some computer languages enable (or even require) assertions as to the usage of parameters, and might further offer the opportunity to declare that variables have their values restricted to some set (for instance, 6 < x ≤ 28) thus providing further grist for the optimization process to grind
275:
bytecode or LLVM bitcode, respectively, so that all the different compilation units that will go to make up a single executable can be optimized as a single module when the link finally happens. This expands the scope of interprocedural optimizations to encompass the whole program (or, rather,
186:
More generally, aside from optimization, the second reason to use procedures is to avoid duplication of code that would produce the same results, or almost the same results, each time the procedure is performed. A general approach to optimization would therefore be to reverse this: some or all
127:(DCE), which removes code that is never executed. IPO also tries to ensure better use of constants. Modern compilers offer IPO as an option at compile-time. The actual IPO process may occur at any step between the human-readable source code and producing a finished executable binary program.
1244:
through, and also providing worthwhile checks on the coherence of the source code to detect blunders. But this is never enough - only some variables can be given simple constraints, while others would require complex specifications: how might it be specified that variable
1227:
by reference; simple constants such as zero might be generated by special machine codes (such as Clear, or LoadZ) while more complex constants might be stored in memory tagged as read-only with any attempt at modifying it resulting in immediate program termination, etc.
276:
everything that is visible at link time). With link-time optimization, the compiler can apply various forms of interprocedural optimization to the whole program, allowing for deeper analysis, more optimization, and ultimately better program performance.
613:
does indeed affect the originals. This is usually done by passing the machine address of the parameters to the procedure so that the procedure's adjustments are to the original storage area. Thus in the case of pass by reference, procedure
1305:). These compilers demonstrated that the technologies could be made sufficiently fast to be acceptable in a commercial compiler; subsequently interprocedural techniques have appeared in a number of commercial and non-commercial systems.
1369:
Since both GCC and LLVM (clang) are able produce an IR from a variety of programming languages, link-time IPO can happen even across language boundaries. This is most commonly demonstrated with C and C++, but LLVM makes it possible for
1043:
whereby the procedure works on a local copy of the parameters whose values are copied back to the originals on exit from the procedure. If the procedure has access to the same parameter but in different ways as in invocations such as
111:
IPO seeks to reduce or eliminate duplicate calculations and inefficient use of memory and to simplify iterative sequences such as loops. If a call to another routine occurs within a loop, IPO analysis may determine that it is best to
182:
time consumed, preparing internal tables so that subsequent invocations for related parameters will be facilitated, and so forth. Losing these side effects via non-evaluation a second time may be acceptable, or they may not.
1296:
The techniques of interprocedural analysis and optimization were the subject of academic research in the 1980s and 1990s. They re-emerged into the commercial compiler world in the early 1990s with compilers from both
292:
as GCC's WHOPR. And of course, when the program being built is itself a library, the optimization would keep every externally-available (exported) symbol, without trying too hard at removing them as a part of DCE.
210:; but this approach, while easier to write and test and less demanding of resources during the compilation itself, does not allow certainty about the safety of a number of optimizations such as aggressive
158:
The objective of any optimization for speed is to have the program run as swiftly as possible; the problem is that it is not possible for a compiler to correctly analyze a program and determine what it
167:
for it to do. By contrast, human programmers start at the other end with a purpose and attempt to produce a program that will achieve it, preferably without expending a lot of thought in the process.
1401:
in GCC and Clang). By placing each function into its own section in the object file, the linker can perform dead code removal without an IR by removing unreferenced sections (using the linker option
1382:
GCC and Clang perform IPO by default at optimization level 2. However, the degree of optimization is limited when LTO is disabled, as IPO can only happen within an object file and non-
1285:
Optimizing
Compiler performed interprocedural analysis to understand the side effects of both procedure calls and exceptions (cast, in PL/I terms as "on conditions") and in papers by
1751:
1261:
prime numbers, and convert to the best-known method for doing so, or, present instead a reference to a library? Unlikely! In general, arbitrarily complex considerations arise (the
838:
The compiler could then in this rather small example follow the constants along the logic (such as it is) and find that the predicates of the if-statements are constant and so...
187:
invocations of a certain procedure are replaced by the respective code, with the parameters appropriately substituted. The compiler will then try to optimize the result.
1778:
1925:
232:. Link time optimization is relevant in programming languages that compile programs on a file-by-file basis, and then link those files together (such as
1670:
1257:
consume in processing them, they would thus be subject to bugs. Instead, only simple specifications are allowed with run-time range checking provided.
1694:
1547:
Frances E. Allen, and Jack
Schwartz, "Determining the Data Flow Relationships in a Collection of Procedures", IBM Research Report RC 4989, Aug. 1974.
1959:
1248:
is to be a prime number, and if so, is or is not the value 1 included? Complications are immediate: what are the valid ranges for a day-of-month
977:
deliver nothing to the outside world - they do not appear in output statements, nor as input to subsequent calculations (whose results in turn
1771:
54:
46:
2131:
618:
does have an effect. Suppose that its invocations are expanded in place, with parameters identified by address: the code amounts to
72:
2008:
1909:
2157:
2050:
1764:
207:
131:
1945:
1496:
optimization opportunities. Use of -fwhole-program is not needed when linker plugin is active (see -fuse-linker-plugin).
2080:
2045:
1452:
1371:
1354:
1298:
268:
241:
101:
1706:
1969:
1844:
1290:
1281:, interprocedural analysis and optimization appear to have entered commercial practice in the early 1970s. IBM's
1824:
1731:
214:
and thus cannot perform them even if they would actually turn out to be efficiency gains that do not change the
1568:
Terrence C. Miller, "Tentative
Compilation: A Design for an APL Compiler", Ph.D. Thesis, Yale University, 1978.
1219:
1218:
The process of expanding a procedure in-line should not be regarded as a variant of textual replacement (as in
245:
233:
1052:, discrepancies can arise. So, if the parameters were passed by copy-in, copy-out in left-to-right order then
1829:
1695:
Intel Visual
Fortran Compiler 9.1, Standard and Professional Editions, for Windows* - Intel Software Network
1674:
1458:
1319:
260:
179:
1616:
1559:, "An APL Machine", Stanford University Computer Science Department, Report STAN-CS-70-158, February, 1970.
1429:
981:
lead to output, else they also are needless) - there is no point in this code either, and so the result is
1977:
1954:
1930:
1859:
1240:, if invoked with an integer parameter, could be converted to a calculation involving integer factorials.
105:
2106:
2101:
2055:
1982:
1806:
1801:
124:
1414:
2136:
2060:
1904:
1435:
A compiler-independent interface for enabling whole-program interprocedural optimizations is via the
1262:
287:
shared objects, are intentionally kept out to avoid excessive duplication and to allow for updating.
203:
97:
2116:
1987:
1879:
1787:
1274:
1040:
606:
280:
123:
IPO may also include typical compiler optimizations applied on a whole-program level, for example,
1432:, integrated into Visual Studio, also supports interprocedural optimization on the whole program.
2111:
2075:
1894:
1884:
1834:
1417:
allow whole-program IPO. The flag to enable interprocedural optimizations for a single file is
1265:) to preclude this, and there is no option but to run the code with limited improvements only.
1992:
1816:
1405:). A similar option is available for variables, but it causes much worse code to be produced.
1578:
2126:
2065:
1935:
1914:
1874:
1854:
1556:
1383:
1358:
1286:
211:
113:
1634:
1486:
594:, etc.) its code plus all invocations may be optimized away entirely, leaving the value of
2121:
1508:
587:
117:
1346:'s command-line interface is similar to that of GCC, with the exception that there is no
304:
communicating back to GCC about what entry points or symbols are being used externally.
2096:
2070:
1869:
1864:
1849:
1237:
295:
A much more limited form of WPO is still possible without LTO, as exemplified by GCC's
288:
284:
116:
that routine. Additionally, IPO may re-order the routines for better memory layout and
17:
2151:
1421:, the flag to enable interprocedural optimization across all files in the program is
1301:(the "Application Compiler" for the Convex C4) and from Ardent (the compiler for the
579:
175:
1177:, which value has not been modified within the procedure from its original value of
255:, traditionally, a compiler links (merges) the object files into a single file, the
1338:). By default this is a single-file-only behavior, but with link-time optimization
1302:
582:, the actions of the procedure have no effect on the original variables, and since
1386:
functions can never be eliminated. The latter problem has a non-LTO solution: the
108:
by analyzing the entire program as opposed to a single function or block of code.
134:(module files) requires knowledge of the "entry points" of the program so that a
1839:
1538:
Frances E. Allen, "Interprocedural Data Flow
Analysis", IFIPS Proceedings, 1974.
300:
252:
299:
switch. This mode makes GCC assume that the module being compiled contains the
1919:
1525:
Thomas C. Spillman, "Exposing side effects in a PL/I optimizing compiler", in
1362:
256:
410:{Reference to b, not a parameter, makes Silly "impure" in general.}
2013:
1039:
A variant method for passing parameters that appear to be "by reference" is
229:
228:) is a type of program optimization performed by a compiler to a program at
215:
202:) is the compiler optimization of a program using information about all the
586:
does nothing to its environment (read from a file, write to a file, modify
1756:
1357:(IR) that is interpreted at link-time. To make sure this plays well with
130:
For languages that compile on a file-by-file basis, effective IPO across
93:
1652:
1597:
237:
1160:{Copy out. In left-to-right order, the value from p1 is overwritten.}
272:
1173:
is pointless, because it is immediately overwritten by the value of
100:
to improve performance in programs containing many frequently used
1440:
1343:
1278:
174:
Suppose there is a procedure that evaluates F(x), and that F is a
1282:
264:
1760:
894:{b is not referenced, so this usage remains "pure".}
29:
833:{Two versions of variable b in Silly, plus the global usage.}
279:
In practice, LTO does not always optimize the entire program—
1617:"Closing the gap: cross-language LTO between Rust and C/C++"
1598:"Can LTO for gcc or clang optimize across C and C++ methods"
150:) pass, because the whole program is visible to the linker.
1752:
How to trick C/C++ compilers into generating terrible code?
206:
in the program. Normally, optimizations are performed on a
428:{These variables are visible to Silly only if parameters.}
1353:
Object files produced by LTO contain a compiler-specific
332:{A variable "global" to the procedure Silly.}
1293:
programming language was necessarily interprocedural.
142:) can be run. In many cases, this is implemented as a
1322:
has function inlining at all optimization levels. At
602:
statements remain, simply printing constant values.
2089:
2038:
2022:
2001:
1968:
1944:
1893:
1815:
1794:
1436:
1422:
1418:
1402:
1398:
1391:
1387:
1347:
1339:
1335:
1331:
1327:
1323:
599:
296:
1529:, North-Holland Publishing Company, pages 376-381.
1397:Another non-LTO technique is "function sections" (
598:undefined (which doesn't matter) so that just the
251:Once all files have been compiled separately into
104:of small or medium length. IPO differs from other
960:{b is modified via its parameter manifestation.}
1085:{Copy in. Local variables p1 and p2 are equal.}
1926:Induction variable recognition and elimination
1394:is non-static, i.e. visible from the outside.
1772:
1326:this only applies to those only called once (
8:
1779:
1765:
1757:
1481:
1479:
1477:
1475:
1473:
73:Learn how and when to remove this message
1615:Woerister, Michael (19 September 2019).
1374:and all other LLVM-based compilers too.
259:. However, in LTO as implemented by the
1960:Sparse conditional constant propagation
1639:Using the GNU Compiler Collection (GCC)
1579:"Clang command line argument reference"
1513:GNU Compiler Collection (GCC) Internals
1491:Using the GNU Compiler Collection (GCC)
1469:
1390:switch can be used to assume that only
1165:And in this case, copying the value of
1181:, and so the third statement becomes
770:{Because the parameters are swapped.}
7:
1211:would be the last value returned to
240:), rather than all at once (such as
27:Computer program optimization method
267:, the compiler is able to dump its
1707:"/GL (Whole Program Optimization)"
163:do, much less what the programmer
45:tone or style may not reflect the
25:
1133:{Thus p1 may no longer equal p2.}
1910:Common subexpression elimination
1671:"Intel compiler 8 documentation"
55:guide to writing better articles
34:
2051:Compile-time function execution
1732:"INTERPROCEDURAL_OPTIMIZATION"
605:If instead the parameters are
208:per module, "compiland", basis
1:
1289:. Work on compilation of the
965:And since the assignments to
609:, then action on them within
2030:Interprocedural optimization
1437:INTERPROCEDURAL_OPTIMIZATION
1334:this constraint is relaxed (
1169:(which has been changed) to
218:of the emitted object code.
86:Interprocedural optimization
2081:Profile-guided optimization
2046:Bounds-checking elimination
1453:Profile-guided optimization
1355:intermediate representation
1299:Convex Computer Corporation
269:intermediate representation
2174:
1845:Loop-invariant code motion
1736:CMake 3.17.2 Documentation
1342:it becomes whole program.
196:Whole program optimization
136:whole program optimization
1825:Automatic parallelization
1527:Proceedings of IFIPS 1971
1309:Flags and implementation
1183:
1058:
983:
840:
620:
311:
246:just-in-time compilation
1830:Automatic vectorization
1459:Single compilation unit
1328:-finline-functions-once
1320:GNU Compiler Collection
261:GNU Compiler Collection
49:used on Knowledge (XXG)
2158:Compiler optimizations
1978:Instruction scheduling
1955:Global value numbering
1931:Live-variable analysis
1860:Loop nest optimization
1788:Compiler optimizations
1583:Clang 11 documentation
222:Link-time optimization
144:link-time optimization
106:compiler optimizations
53:See Knowledge (XXG)'s
18:Link-time optimization
2107:Control-flow analysis
2102:Array-access analysis
2056:Dead-code elimination
2014:Tail-call elimination
1983:Instruction selection
1807:Local value numbering
1802:Peephole optimization
1415:Intel C/C++ compilers
574:If the parameters to
125:dead code elimination
92:) is a collection of
2137:Value range analysis
2061:Expression templates
1905:Available expression
1596:Reinhart, Jonathan.
1275:procedural languages
1263:Entscheidungsproblem
927:{b is referenced...}
98:computer programming
2117:Dependence analysis
1988:Register allocation
1880:Software pipelining
1653:"Function sections"
1399:-ffunction-sections
607:passed by reference
96:techniques used in
2112:Data-flow analysis
2076:Partial evaluation
1885:Strength reduction
1835:Induction variable
1635:"Optimize Options"
1487:"Optimize Options"
1336:-finline-functions
1056:would expand into
285:dynamically linked
2145:
2144:
1993:Rematerialization
1041:copy-in, copy-out
281:library functions
132:translation units
83:
82:
75:
47:encyclopedic tone
16:(Redirected from
2165:
2127:Pointer analysis
2066:Inline expansion
1936:Use-define chain
1915:Constant folding
1875:Loop unswitching
1855:Loop interchange
1781:
1774:
1767:
1758:
1740:
1739:
1728:
1722:
1721:
1719:
1718:
1703:
1697:
1692:
1686:
1685:
1683:
1682:
1673:. Archived from
1667:
1661:
1660:
1649:
1643:
1642:
1631:
1625:
1624:
1612:
1606:
1605:
1593:
1587:
1586:
1575:
1569:
1566:
1560:
1554:
1548:
1545:
1539:
1536:
1530:
1523:
1517:
1516:
1505:
1499:
1498:
1483:
1438:
1424:
1420:
1404:
1400:
1393:
1389:
1359:static libraries
1349:
1341:
1337:
1333:
1329:
1325:
1202:
1199:
1196:
1193:
1190:
1187:
1161:
1158:
1155:
1152:
1149:
1146:
1143:
1140:
1137:
1134:
1131:
1128:
1125:
1122:
1119:
1116:
1113:
1110:
1107:
1104:
1101:
1098:
1095:
1092:
1089:
1086:
1083:
1080:
1077:
1074:
1071:
1068:
1065:
1062:
1035:
1032:
1029:
1026:
1023:
1020:
1017:
1014:
1011:
1008:
1005:
1002:
999:
996:
993:
990:
987:
961:
958:
955:
952:
949:
946:
943:
940:
937:
934:
931:
928:
925:
922:
919:
916:
913:
910:
907:
904:
901:
898:
895:
892:
889:
886:
883:
880:
877:
874:
871:
868:
865:
862:
859:
856:
853:
850:
847:
844:
834:
831:
828:
825:
822:
819:
816:
813:
810:
807:
804:
801:
798:
795:
792:
789:
786:
783:
780:
777:
774:
771:
768:
765:
762:
759:
756:
753:
750:
747:
744:
741:
738:
735:
732:
729:
726:
723:
720:
717:
714:
711:
708:
705:
702:
699:
696:
693:
690:
687:
684:
681:
678:
675:
672:
669:
666:
663:
660:
657:
654:
651:
648:
645:
642:
639:
636:
633:
630:
627:
624:
601:
588:global variables
570:
567:
564:
561:
558:
555:
552:
549:
546:
543:
540:
537:
534:
531:
528:
525:
522:
519:
516:
513:
510:
507:
504:
501:
498:
495:
492:
489:
486:
483:
480:
477:
474:
471:
468:
465:
462:
459:
456:
453:
450:
447:
444:
441:
438:
435:
432:
429:
426:
423:
420:
417:
414:
411:
408:
405:
402:
399:
396:
393:
390:
387:
384:
381:
378:
375:
372:
369:
366:
363:
360:
357:
354:
351:
348:
345:
342:
339:
336:
333:
330:
327:
324:
321:
318:
315:
298:
78:
71:
67:
64:
58:
57:for suggestions.
38:
37:
30:
21:
2173:
2172:
2168:
2167:
2166:
2164:
2163:
2162:
2148:
2147:
2146:
2141:
2122:Escape analysis
2090:Static analysis
2085:
2034:
2018:
1997:
1970:Code generation
1964:
1940:
1896:
1889:
1811:
1790:
1785:
1748:
1743:
1730:
1729:
1725:
1716:
1714:
1705:
1704:
1700:
1693:
1689:
1680:
1678:
1669:
1668:
1664:
1651:
1650:
1646:
1633:
1632:
1628:
1614:
1613:
1609:
1595:
1594:
1590:
1577:
1576:
1572:
1567:
1563:
1555:
1551:
1546:
1542:
1537:
1533:
1524:
1520:
1507:
1506:
1502:
1485:
1484:
1471:
1467:
1449:
1411:
1388:-fwhole-program
1380:
1378:Non-LTO options
1348:-fwhole-program
1316:
1311:
1271:
1233:
1204:
1203:
1200:
1197:
1194:
1191:
1188:
1185:
1163:
1162:
1159:
1156:
1153:
1150:
1147:
1144:
1141:
1138:
1135:
1132:
1129:
1126:
1123:
1120:
1117:
1114:
1111:
1108:
1105:
1102:
1099:
1096:
1093:
1090:
1087:
1084:
1081:
1078:
1075:
1072:
1069:
1066:
1063:
1060:
1037:
1036:
1033:
1030:
1027:
1024:
1021:
1018:
1015:
1012:
1009:
1006:
1003:
1000:
997:
994:
991:
988:
985:
963:
962:
959:
956:
953:
950:
947:
944:
941:
938:
935:
932:
929:
926:
923:
920:
917:
914:
911:
908:
905:
902:
899:
896:
893:
890:
887:
884:
881:
878:
875:
872:
869:
866:
863:
860:
857:
854:
851:
848:
845:
842:
836:
835:
832:
829:
826:
823:
820:
817:
814:
811:
808:
805:
802:
799:
796:
793:
790:
787:
784:
781:
778:
775:
772:
769:
766:
763:
760:
757:
754:
751:
748:
745:
742:
739:
736:
733:
730:
727:
724:
721:
718:
715:
712:
709:
707:{a is changed.}
706:
703:
700:
697:
694:
691:
688:
685:
682:
679:
676:
673:
670:
667:
664:
661:
658:
655:
652:
649:
646:
643:
640:
637:
634:
631:
628:
625:
622:
580:passed by value
572:
571:
568:
565:
562:
559:
556:
553:
550:
547:
544:
541:
538:
535:
532:
529:
526:
523:
520:
517:
514:
511:
508:
505:
502:
499:
496:
493:
490:
487:
484:
481:
478:
475:
472:
469:
466:
463:
460:
457:
454:
451:
448:
445:
442:
439:
436:
433:
430:
427:
424:
421:
418:
415:
412:
409:
406:
403:
400:
397:
394:
391:
388:
385:
382:
379:
376:
373:
370:
367:
364:
361:
358:
355:
352:
349:
346:
343:
340:
337:
334:
331:
328:
325:
322:
319:
316:
313:
310:
297:-fwhole-program
193:
156:
79:
68:
62:
59:
52:
43:This article's
39:
35:
28:
23:
22:
15:
12:
11:
5:
2171:
2169:
2161:
2160:
2150:
2149:
2143:
2142:
2140:
2139:
2134:
2132:Shape analysis
2129:
2124:
2119:
2114:
2109:
2104:
2099:
2097:Alias analysis
2093:
2091:
2087:
2086:
2084:
2083:
2078:
2073:
2071:Jump threading
2068:
2063:
2058:
2053:
2048:
2042:
2040:
2036:
2035:
2033:
2032:
2026:
2024:
2020:
2019:
2017:
2016:
2011:
2005:
2003:
1999:
1998:
1996:
1995:
1990:
1985:
1980:
1974:
1972:
1966:
1965:
1963:
1962:
1957:
1951:
1949:
1942:
1941:
1939:
1938:
1933:
1928:
1923:
1917:
1912:
1907:
1901:
1899:
1891:
1890:
1888:
1887:
1882:
1877:
1872:
1870:Loop unrolling
1867:
1865:Loop splitting
1862:
1857:
1852:
1850:Loop inversion
1847:
1842:
1837:
1832:
1827:
1821:
1819:
1813:
1812:
1810:
1809:
1804:
1798:
1796:
1792:
1791:
1786:
1784:
1783:
1776:
1769:
1761:
1755:
1754:
1747:
1746:External links
1744:
1742:
1741:
1723:
1711:Microsoft Docs
1698:
1687:
1662:
1644:
1626:
1607:
1602:Stack Overflow
1588:
1570:
1561:
1549:
1540:
1531:
1518:
1509:"LTO Overview"
1500:
1468:
1466:
1463:
1462:
1461:
1456:
1448:
1445:
1410:
1407:
1379:
1376:
1315:
1312:
1310:
1307:
1270:
1267:
1238:Gamma function
1232:
1229:
1184:
1059:
984:
841:
621:
312:
309:
306:
289:Static linking
192:
189:
155:
152:
81:
80:
42:
40:
33:
26:
24:
14:
13:
10:
9:
6:
4:
3:
2:
2170:
2159:
2156:
2155:
2153:
2138:
2135:
2133:
2130:
2128:
2125:
2123:
2120:
2118:
2115:
2113:
2110:
2108:
2105:
2103:
2100:
2098:
2095:
2094:
2092:
2088:
2082:
2079:
2077:
2074:
2072:
2069:
2067:
2064:
2062:
2059:
2057:
2054:
2052:
2049:
2047:
2044:
2043:
2041:
2037:
2031:
2028:
2027:
2025:
2021:
2015:
2012:
2010:
2009:Deforestation
2007:
2006:
2004:
2000:
1994:
1991:
1989:
1986:
1984:
1981:
1979:
1976:
1975:
1973:
1971:
1967:
1961:
1958:
1956:
1953:
1952:
1950:
1947:
1943:
1937:
1934:
1932:
1929:
1927:
1924:
1921:
1918:
1916:
1913:
1911:
1908:
1906:
1903:
1902:
1900:
1898:
1892:
1886:
1883:
1881:
1878:
1876:
1873:
1871:
1868:
1866:
1863:
1861:
1858:
1856:
1853:
1851:
1848:
1846:
1843:
1841:
1838:
1836:
1833:
1831:
1828:
1826:
1823:
1822:
1820:
1818:
1814:
1808:
1805:
1803:
1800:
1799:
1797:
1793:
1789:
1782:
1777:
1775:
1770:
1768:
1763:
1762:
1759:
1753:
1750:
1749:
1745:
1737:
1733:
1727:
1724:
1712:
1708:
1702:
1699:
1696:
1691:
1688:
1677:on 2006-09-21
1676:
1672:
1666:
1663:
1658:
1654:
1648:
1645:
1640:
1636:
1630:
1627:
1622:
1621:LLVM Dev Blog
1618:
1611:
1608:
1603:
1599:
1592:
1589:
1584:
1580:
1574:
1571:
1565:
1562:
1558:
1557:Philip Abrams
1553:
1550:
1544:
1541:
1535:
1532:
1528:
1522:
1519:
1514:
1510:
1504:
1501:
1497:
1492:
1488:
1482:
1480:
1478:
1476:
1474:
1470:
1464:
1460:
1457:
1454:
1451:
1450:
1446:
1444:
1442:
1433:
1431:
1430:MSVC compiler
1426:
1416:
1408:
1406:
1403:--gc-sections
1395:
1385:
1377:
1375:
1373:
1367:
1364:
1360:
1356:
1351:
1345:
1321:
1313:
1308:
1306:
1304:
1300:
1294:
1292:
1288:
1284:
1280:
1276:
1268:
1266:
1264:
1258:
1255:
1251:
1247:
1241:
1239:
1230:
1228:
1224:
1221:
1216:
1214:
1210:
1182:
1180:
1176:
1172:
1168:
1057:
1055:
1051:
1047:
1042:
982:
980:
976:
972:
968:
839:
619:
617:
612:
608:
603:
597:
593:
589:
585:
581:
577:
307:
305:
302:
293:
290:
286:
283:, especially
282:
277:
274:
270:
266:
262:
258:
254:
249:
247:
243:
239:
235:
231:
227:
223:
219:
217:
213:
209:
205:
201:
197:
190:
188:
184:
181:
177:
176:pure function
172:
168:
166:
162:
153:
151:
149:
145:
141:
137:
133:
128:
126:
121:
119:
115:
109:
107:
103:
99:
95:
91:
87:
77:
74:
66:
56:
50:
48:
41:
32:
31:
19:
2029:
1735:
1726:
1715:. Retrieved
1713:. 2019-03-12
1710:
1701:
1690:
1679:. Retrieved
1675:the original
1665:
1656:
1647:
1638:
1629:
1620:
1610:
1601:
1591:
1582:
1573:
1564:
1552:
1543:
1534:
1526:
1521:
1512:
1503:
1494:
1490:
1439:property in
1434:
1427:
1412:
1396:
1381:
1368:
1352:
1317:
1303:Ardent Titan
1295:
1272:
1259:
1253:
1249:
1245:
1242:
1234:
1225:
1217:
1212:
1208:
1205:
1178:
1174:
1170:
1166:
1164:
1053:
1049:
1045:
1038:
978:
974:
970:
966:
964:
837:
615:
610:
604:
595:
591:
583:
575:
573:
294:
278:
253:object files
250:
225:
221:
220:
199:
195:
194:
185:
173:
169:
164:
160:
157:
147:
143:
139:
135:
129:
122:
110:
89:
85:
84:
69:
60:
44:
1922:elimination
1840:Loop fusion
1795:Basic block
1363:GNU linkers
1252:given that
301:entry point
271:(IR), i.e.
191:WPO and LTO
2002:Functional
1920:Dead store
1717:2020-01-26
1681:2007-02-13
1657:elinux.org
1465:References
1287:Fran Allen
1231:In general
1054:Silly(b,b)
1050:Silly(a,b)
1046:Silly(a,a)
263:(GCC) and
257:executable
1895:Data-flow
1314:Unix-like
1215:instead.
335:Procedure
230:link time
216:semantics
102:functions
2152:Category
1897:analysis
1447:See also
1361:, newer
1350:option.
1201:{Not -6}
590:such as
248:(JIT)).
212:inlining
165:intended
154:Analysis
118:locality
94:compiler
63:May 2022
1269:History
566:example
413:integer
323:integer
317:example
314:Program
308:Example
238:Fortran
204:modules
171:waste.
2023:Global
1948:-based
1392:main()
1384:static
1330:), at
273:GIMPLE
114:inline
2039:Other
1455:(PGO)
1441:CMake
1409:Other
1344:Clang
1340:-flto
1279:ALGOL
1277:like
1220:macro
1186:write
1019:write
1001:write
986:write
942:write
909:write
879:write
818:write
755:write
692:write
616:Silly
611:Silly
600:write
584:Silly
576:Silly
548:write
527:Silly
512:write
491:Silly
476:write
455:Silly
404:Silly
338:Silly
1817:Loop
1428:The
1423:-ipo
1413:The
1372:Rust
1318:The
1283:PL/I
1273:For
1118:else
1100:then
1094:<
973:and
803:else
785:then
779:<
740:else
722:then
716:<
677:else
659:then
653:<
578:are
386:else
368:then
362:<
265:LLVM
242:Java
236:and
161:will
1946:SSA
1419:-ip
1332:-O2
1324:-O1
1291:APL
1124::=-
1048:or
933::=-
900::=-
870::=-
809::=-
746::=-
683::=-
563:End
401:End
392::=-
244:'s
226:LTO
200:WPO
180:CPU
148:LTO
140:WPO
90:IPO
2154::
1734:.
1709:.
1655:.
1637:.
1619:.
1600:.
1581:.
1511:.
1493:.
1489:.
1472:^
1443:.
1425:.
1209:p1
1175:p2
1167:p1
1154:p2
1151::=
1142:p1
1139::=
1121:p1
1109:p2
1106::=
1103:p1
1091:p2
1088:if
1076::=
1073:p2
1064::=
1061:p1
979:do
969:,
858::=
846::=
791::=
773:if
728::=
710:if
665::=
647:if
638::=
626::=
446::=
434::=
374::=
356:if
120:.
1780:e
1773:t
1766:v
1738:.
1720:.
1684:.
1659:.
1641:.
1623:.
1604:.
1585:.
1515:.
1254:M
1250:D
1246:P
1213:b
1198:;
1195:)
1192:5
1189:(
1179:b
1171:b
1157:;
1148:b
1145:;
1136:b
1130:;
1127:6
1115:b
1112:+
1097:0
1082:;
1079:b
1070:;
1067:b
1034:;
1031:)
1028:6
1025:-
1022:(
1016:;
1013:)
1010:1
1007:-
1004:(
998:;
995:)
992:7
989:(
975:x
971:b
967:a
957:;
954:)
951:6
948:-
945:(
939:;
936:6
930:b
924:;
921:)
918:1
915:-
912:(
906:;
903:1
897:x
891:;
888:)
885:7
882:(
876:;
873:6
867:a
864:;
861:5
855:b
852:;
849:7
843:x
830:;
827:)
824:b
821:(
815:;
812:6
806:b
800:b
797:+
794:b
788:b
782:0
776:b
767:;
764:)
761:x
758:(
752:;
749:6
743:x
737:b
734:+
731:a
725:x
719:0
713:a
704:;
701:)
698:x
695:(
689:;
686:6
680:a
674:b
671:+
668:x
662:a
656:0
650:x
644:;
641:5
635:b
632:;
629:7
623:x
596:a
592:b
569:;
560:;
557:)
554:b
551:(
545:;
542:)
539:b
536:,
533:b
530:(
524:;
521:)
518:x
515:(
509:;
506:)
503:a
500:,
497:x
494:(
488:;
485:)
482:x
479:(
473:;
470:)
467:x
464:,
461:a
458:(
452:;
449:5
443:b
440:;
437:7
431:x
425:;
422:x
419:,
416:a
407:;
398:;
395:6
389:a
383:b
380:+
377:x
371:a
365:0
359:x
353:)
350:x
347:,
344:a
341:(
329:;
326:b
320:;
234:C
224:(
198:(
146:(
138:(
88:(
76:)
70:(
65:)
61:(
51:.
20:)
Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.