summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* * increase ppu version (was no longer different from trunk due to merging)wpojonas2008-12-111-1/+1
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/branches/wpo@12340 3ad0048d-3df7-0310-abae-a5850022a9f2
* + comments for newly added fields to tobjectdef for devirtualisationjonas2008-12-111-0/+9
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/branches/wpo@12339 3ad0048d-3df7-0310-abae-a5850022a9f2
* - removed unused local variablejonas2008-12-101-2/+1
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/branches/wpo@12334 3ad0048d-3df7-0310-abae-a5850022a9f2
* + whole program optimisation testsjonas2008-12-105-0/+253
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/branches/wpo@12332 3ad0048d-3df7-0310-abae-a5850022a9f2
* + support for testing whole program optimisation tests (multiplejonas2008-12-103-41/+75
| | | | | | | compilations using successively generated feedback files) git-svn-id: http://svn.freepascal.org/svn/fpc/branches/wpo@12331 3ad0048d-3df7-0310-abae-a5850022a9f2
* * use sysutils instead of dos to avoid command line length limitsjonas2008-12-101-3/+51
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/branches/wpo@12330 3ad0048d-3df7-0310-abae-a5850022a9f2
* * fixed error in fix committed r11894 (we don't write out the last newjonas2008-12-081-2/+2
| | | | | | | line, but we have to reserve memory for the terminating #0) git-svn-id: http://svn.freepascal.org/svn/fpc/branches/wpo@12317 3ad0048d-3df7-0310-abae-a5850022a9f2
* * document the format of the sections of the wpo feedback file inside thejonas2008-12-082-0/+49
| | | | | | | feedback file itself git-svn-id: http://svn.freepascal.org/svn/fpc/branches/wpo@12316 3ad0048d-3df7-0310-abae-a5850022a9f2
* * don't let the used wpo feedback file influence the interface crc (there'sjonas2008-12-061-7/+6
| | | | | | | a separate check for such changes) git-svn-id: http://svn.freepascal.org/svn/fpc/branches/wpo@12310 3ad0048d-3df7-0310-abae-a5850022a9f2
* * give an error message instead of crashing with an io exception if thejonas2008-12-064-110/+123
| | | | | | | compiler is unable to create the wpo feedback file specified using -FW git-svn-id: http://svn.freepascal.org/svn/fpc/branches/wpo@12309 3ad0048d-3df7-0310-abae-a5850022a9f2
* * abort compilation if an error occurred during wpo initialisationjonas2008-12-061-0/+5
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/branches/wpo@12308 3ad0048d-3df7-0310-abae-a5850022a9f2
* Merged revisions 12210-12306 via svnmerge from jonas2008-12-0664-2534/+3627
| | | | | | | svn+ssh://jonas@svn.freepascal.org/FPC/svn/fpc/trunk git-svn-id: http://svn.freepascal.org/svn/fpc/branches/wpo@12307 3ad0048d-3df7-0310-abae-a5850022a9f2
* * check whether the correct wpo feedback file is used in the currentjonas2008-12-055-128/+173
| | | | | | | | compilation when using units that were compiled using wpo information during a previous compilation run git-svn-id: http://svn.freepascal.org/svn/fpc/branches/wpo@12304 3ad0048d-3df7-0310-abae-a5850022a9f2
* * fixed to work with the new vmtentries that are always available andjonas2008-11-235-347/+318
| | | | | | | removed previously added code to save/load vmtentries to ppu files git-svn-id: http://svn.freepascal.org/svn/fpc/branches/wpo@12212 3ad0048d-3df7-0310-abae-a5850022a9f2
* Merged revisions ↵jonas2008-11-23848-8318/+41502
| | | | | | | | | 11879-11880,11884-11888,11890,11896-11898,11903-11919,11926-11930,11933-11934,11936-11937,11939-11940,11942-11985,11987-11991,11993-12013,12015-12017,12019-12040,12043,12045,12047-12050,12054,12056-12057,12059-12062,12064-12066,12073,12075,12077-12078,12082,12085,12087-12088,12092-12094,12099,12106-12110,12114,12117-12122,12125,12128-12131,12138,12141-12143,12152-12160,12162-12163,12166-12171,12173-12176,12196,12198-12205 via svnmerge from svn+ssh://jonas@svn.freepascal.org/FPC/svn/fpc/trunk git-svn-id: http://svn.freepascal.org/svn/fpc/branches/wpo@12210 3ad0048d-3df7-0310-abae-a5850022a9f2
* * removed svnmerge-integrated properties for non-trunkjonas2008-11-230-0/+0
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/branches/wpo@12209 3ad0048d-3df7-0310-abae-a5850022a9f2
* Initialized merge tracking via "svnmerge" with revisions "1-11877" from jonas2008-11-230-0/+0
| | | | | | | svn+ssh://jonas@svn.freepascal.org/FPC/svn/fpc/trunk git-svn-id: http://svn.freepascal.org/svn/fpc/branches/wpo@12208 3ad0048d-3df7-0310-abae-a5850022a9f2
* * record all classrefdefs/objdefs for which a loadvmtaddrnode is generated,jonas2008-10-195-24/+96
| | | | | | | | | | | and instead of marking all classes that derive from instantiated classrefdefs as instantiated, only mark those classes from the above collection that derive from instantiated classrefdefs as instantiated (since to instantiate a class, you have to load its vmt somehow -- this may be broken by using assembler code though) git-svn-id: http://svn.freepascal.org/svn/fpc/branches/wpo@11938 3ad0048d-3df7-0310-abae-a5850022a9f2
* * set the vmt entries of non-class virtual methods of not instantiatedjonas2008-10-193-46/+128
| | | | | | | | objects/classes to FPC_ABSTRACTERROR so the code they refer to can be thrown away if it is not referred to in any other way either git-svn-id: http://svn.freepascal.org/svn/fpc/branches/wpo@11935 3ad0048d-3df7-0310-abae-a5850022a9f2
* * store vmt procdefs in the ppu files so we don't have to use a hack tojonas2008-10-155-70/+90
| | | | | | | | | regenerate them for whole-program optimisation * fixed crash when performing devirtualisation optimisation on programs that do not construct any classes/objects with optimisable vmts git-svn-id: http://svn.freepascal.org/svn/fpc/branches/wpo@11902 3ad0048d-3df7-0310-abae-a5850022a9f2
* * various additional comments and comment fixesjonas2008-10-142-18/+50
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/branches/wpo@11901 3ad0048d-3df7-0310-abae-a5850022a9f2
* * reset wpofeedbackinput and wpofeedbackoutput in wpodonejonas2008-10-141-0/+2
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/branches/wpo@11900 3ad0048d-3df7-0310-abae-a5850022a9f2
* * replaced hardcoded string with objdumpsearchstr constantjonas2008-10-141-1/+1
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/branches/wpo@11899 3ad0048d-3df7-0310-abae-a5850022a9f2
* + documented -OW<x>, -Ow<x>, -FW<x> and -Fw<x> wpo parametersjonas2008-10-123-68/+83
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/branches/wpo@11895 3ad0048d-3df7-0310-abae-a5850022a9f2
* * fixed error that only really caused progblems if the total sizejonas2008-10-121-0/+2
| | | | | | | of the messages text is a multiple of 240 git-svn-id: http://svn.freepascal.org/svn/fpc/branches/wpo@11894 3ad0048d-3df7-0310-abae-a5850022a9f2
* * fixed comment error (twpodeadcodeinfo keeps a list of live,jonas2008-10-121-1/+1
| | | | | | | not dead symbols) git-svn-id: http://svn.freepascal.org/svn/fpc/branches/wpo@11893 3ad0048d-3df7-0310-abae-a5850022a9f2
* + symbol liveness wpo information extracted from smartlinked programsjonas2008-10-1212-202/+746
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (-OW/-Owsymbolliveness) + use symbol liveness information to improve devirtualisation (don't consider classes created in code that has been dead code stripped). This requires at least two passes of using wpo (first uses dead code info to locate classes that are constructed only in dead code, second pass uses this info to potentially further devirtualise). I.e.: 1) generate initial liveness and devirtualisation feedback fpc -FWtt.wpo -OWall tt.pp -Xs- -CX -XX 2) use previously generated feedback, and regenerate new feedback based on this (i.e., disregard classes created in dead code) fpc -FWtt-1.wpo -OWall -Fwtt.wo -Owall tt.pp -Xs- -CX -XX 3) use the newly generated feedback (in theory, it is possible that even more opportunities pop up afterwards; you can continue until the program does not get smaller anymore) fpc -Fwtt-1.wpo -Owall tt.pp -CX -XX * changed all message() to cgmessage() calls so the set codegenerror * changed static fsectionhandlers field to a regular field called fwpocomponents * changed registration of wpocomponents: no longer happens in the initialization section of their unit, but in the InitWpo routine (which has been moved from the woinfo to the wpo unit). This way you can register different classes based on the target/parameters. + added static method to twpocomponentbase for checking whether the command line parameters don't conflict with the requested optimisations (e.g. generating liveness info requires that smartlinking is turned on) + added static method to twpocomponentbase to request the section name git-svn-id: http://svn.freepascal.org/svn/fpc/branches/wpo@11892 3ad0048d-3df7-0310-abae-a5850022a9f2
* * fixed twpofilereader.getnextnoncommentline() when reusing a previouslyjonas2008-10-121-2/+7
| | | | | | | | read line * fixed skipping of unnecessary wpo feedback file sections git-svn-id: http://svn.freepascal.org/svn/fpc/branches/wpo@11891 3ad0048d-3df7-0310-abae-a5850022a9f2
* * some comment fixesjonas2008-10-121-4/+4
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/branches/wpo@11889 3ad0048d-3df7-0310-abae-a5850022a9f2
* + -Owoptvmts whole program optimisation which replaces vmt entriesjonas2008-10-115-7/+29
| | | | | | | | | | | with method names of child classes in case the current class' method can never be called (e.g., because this class is never instantiated). As a result, such methods can then be removed by dead code removal/smart linking (not much effect for either the compiler, lazarus or a trivial lazarus app though). git-svn-id: http://svn.freepascal.org/svn/fpc/branches/wpo@11882 3ad0048d-3df7-0310-abae-a5850022a9f2
* * extracted code to detect constructed class/object types fromjonas2008-10-116-88/+240
| | | | | | | | | | | | | | | | | tcallnode.gen_vmt_tree into its own method to avoid clutter * detect x.classtype.create constructs (with classtype = the system.tobject.classtype method), and treat them as if a "class of x" has been instantiated rather than a "class of tobject". this required storing the instantiated classrefs in their own array though, because at such a point we don't have a "class of x" tdef available (so now "x", and all other defs instantiated via a classref, are now stored as tobjectdefs in a separate array) + support for devirtualising class methods (including constructors) git-svn-id: http://svn.freepascal.org/svn/fpc/branches/wpo@11881 3ad0048d-3df7-0310-abae-a5850022a9f2
* + initial implementation of whole-program optimisation frameworkjonas2008-10-1123-195/+2311
| | | | | | | | | | | | | | | | | | | | | | | + implementation of whole-program devirtualisation o use: a) generate whole-program optimisation information (no need to completely compile the program and all of its units with -OW/-FW, only the main program is sufficient) fpc -OWdevirtcalls -FWmyprog.wpo myprog b) use it to optimise the program fpc -B -Owdevirtcalls -Fwmyprog.wpo myprog (the -B is not required, but only sources recompiled during the second pass will actually be optimised -- if you want, you can even rebuild the rtl devirtualised for a particular program; and these options can obviously also be used together with regular optimisation switches) o warning: - there are no checks yet to ensure that you do not use units optimised for a particular program with another program (or with a changed version of the same program) git-svn-id: http://svn.freepascal.org/svn/fpc/branches/wpo@11878 3ad0048d-3df7-0310-abae-a5850022a9f2
* + branch for initial whole program optimization infrastructurejonas2008-10-100-0/+0
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/branches/wpo@11877 3ad0048d-3df7-0310-abae-a5850022a9f2
* * don't crash when someone uses an integer value to declare a wide/unicodejonas2008-10-102-2/+25
| | | | | | | string (mantis #12329) git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@11875 3ad0048d-3df7-0310-abae-a5850022a9f2
* * don't warn that a unit won't be smartlinked in case no .a file isjonas2008-10-101-1/+5
| | | | | | | | available when smart linking happens using the plain object files (mantis #12316) git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@11874 3ad0048d-3df7-0310-abae-a5850022a9f2
* * another attempt to properly fix the fix for 8391karoly2008-10-101-2/+7
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@11873 3ad0048d-3df7-0310-abae-a5850022a9f2
* * fix bug 8391 only for arm-wince, because otherwise it breaks other ↵karoly2008-10-091-2/+7
| | | | | | platforms (incl. i386-win32) git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@11871 3ad0048d-3df7-0310-abae-a5850022a9f2
* * Fixed bug 12323. Bug is in getting default value of string parameters, ↵michael2008-10-091-1/+7
| | | | | | unterminated memory copy git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@11870 3ad0048d-3df7-0310-abae-a5850022a9f2
* * Large patch from Sergei Gorelkin:michael2008-10-086-448/+500
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | xmlutils.pp, names.inc: * exclude colon from the NameChar bitmap and handle it in code. dom.pp: + TDOMText.IsElementContentWhitespace now implemented completely. * Attributes created by TDOMElement.SetAttribute get their OwnerElement property assigned properly * Attribute replaced by TDOMNamedNodeMap.SetNamedItem get their OwnerElement reset to nil * TDOMElement.SetAttributeNode does not destroy the attribute when it is being replaced by itself * Most node boolean properties collected into a single FFlags field to reduce memory requirements. xmlread.pp: + Syntax-level support of namespaces: handle colons in names, check correct qualified name syntax, prohibit colons in entity/notation/PI names and ID/IDREF attribute values (all this only happens when Options.Namespaces is set to True - not by default). * Reaching end of input while parsing the Ignore Section is a fatal error because parameter entities are not recognized there. * Reaching end of input while parsing entity value literal that was started in a parameter entity aborts immediately instead of hopelessly scanning the whole document up to its end. * Fixed parsing duplicate Element declarations. The content models of subsequent declarations are now discarded as they should - not appended to the existing model. * Fixed parsing duplicate Attlist declarations. In addition to dropping the attribute declaration itself, do not modify the corresponding element declaration and suppress 'Duplicate ID attribute' and 'Duplicate NOTATION attribute' validation errors. * Fixed error position in cases when attribute value lacks the closing quote. * Some refactoring in order to reduce number of WideString vars and code size (some SkipX and ExpectX merged into SkipX(required: Boolean)). * TXMLCharSource.FLocation record replaced by single integer FLineNo because LinePosition is always calculated. * TXMLCharSource.FCursor replaced by local var. * TXMLReader.NameIs changed to a more general BufEquals(), it eliminates TXMLReader.GetString and some WideString variables. tests/xmlts.pp: * Ignored tests do not change suite conformance state. tests/testgen.pp * Added a forgotten semicolon. git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@11869 3ad0048d-3df7-0310-abae-a5850022a9f2
* + re-enable smartlinking for MorphOSkaroly2008-10-071-1/+1
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@11868 3ad0048d-3df7-0310-abae-a5850022a9f2
* + fixed Sysutils' ExecuteProcess() to allow longer ComLine than 256 chars ↵karoly2008-10-071-4/+29
| | | | | | (smartlinking needs this badly) git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@11867 3ad0048d-3df7-0310-abae-a5850022a9f2
* * fixed int64 to boolean conversion for loc_(c)reference based on ppc codejonas2008-10-071-10/+25
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@11866 3ad0048d-3df7-0310-abae-a5850022a9f2
* * Initial check-inmichael2008-10-051-0/+633
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@11865 3ad0048d-3df7-0310-abae-a5850022a9f2
* * cleanup on shootout maintainers requestvincents2008-10-041-2/+0
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@11864 3ad0048d-3df7-0310-abae-a5850022a9f2
* + VFP instructions for armflorian2008-10-044-2/+320
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@11863 3ad0048d-3df7-0310-abae-a5850022a9f2
* + support for generating non-pic darwin/arm call stubsjonas2008-10-042-6/+61
| | | | | | | | | + write the header for non-pic darwin/arm call stubs properly in aggas * r9 is not available for general use on darwin/arm according to the llvm code generator git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@11862 3ad0048d-3df7-0310-abae-a5850022a9f2
* * changed abi for darwin/arm from eabi to default, as it appears to bejonas2008-10-042-2/+2
| | | | | | | | more closely related to the old abi * make sure softfloat is still default for darwin/arm after this change git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@11861 3ad0048d-3df7-0310-abae-a5850022a9f2
* * removed accidentally committed changevincents2008-10-031-1/+1
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@11860 3ad0048d-3df7-0310-abae-a5850022a9f2
* + expected output for meteor benchmarkvincents2008-10-031-0/+24
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@11859 3ad0048d-3df7-0310-abae-a5850022a9f2
* * fixed compilation on x86_64vincents2008-10-031-2/+2
| | | | git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@11858 3ad0048d-3df7-0310-abae-a5850022a9f2