Commit Graph

409 Commits

Author SHA1 Message Date
florian
d511f8d84e * year of copyright updated
git-svn-id: trunk@12789 -
2009-02-25 15:44:20 +00:00
florian
acb06dac1b + Wp<Controllertype> support for arm and avr
git-svn-id: trunk@12664 -
2009-02-02 20:16:25 +00:00
florian
3430f90b2c * updated german message files from Karl-Michael Schindler
git-svn-id: trunk@12547 -
2009-01-13 21:39:42 +00:00
Jonas Maebe
b73ed1587a * added warning to stack checking option
* clarified that -Cs only guarantees setting the stack *checking*
    size, not necessarily the stack size

git-svn-id: trunk@12528 -
2009-01-08 18:42:24 +00:00
Jonas Maebe
423ee926c2 * verify during parameter parsing that -gc and -pg are implemented/
supported for the chosen target platform

git-svn-id: trunk@12451 -
2008-12-28 15:53:15 +00:00
Jonas Maebe
e54aed98a4 * fixed some small errors/inconsistencies in the wpo messages
git-svn-id: trunk@12450 -
2008-12-28 10:10:16 +00:00
florian
7d849d312b + added missing LaTeX statement for wpo error messages
git-svn-id: trunk@12449 -
2008-12-28 09:51:27 +00:00
Jonas Maebe
3216e8c7bc * mark produced object files as "does not require executable stack" by
default for Linux (overridable using -WX switch) (mantis #11563)

git-svn-id: trunk@12356 -
2008-12-12 16:26:25 +00:00
Jonas Maebe
1597aac6d2 * first search for gnm and only then for nm
* fixed error message in case the output of (g)nm/objdump can't be parsed

git-svn-id: trunk@12349 -
2008-12-12 13:03:27 +00:00
Jonas Maebe
060d81b8fa Merged revisions 11878,11881-11882,11889,11891-11893,11895,11899-11902,11935,11938,12212,12304,12308-12310,12316,12330-12332,12334,12339-12340 via svnmerge from
svn+ssh://jonas@svn.freepascal.org/FPC/svn/fpc/branches/wpo

........
r11878 | jonas | 2008-10-11 02:25:18 +0200 (Sat, 11 Oct 2008) | 19 lines

  + initial implementation of whole-program optimisation framework
  + 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)

........
r11881 | jonas | 2008-10-11 19:35:52 +0200 (Sat, 11 Oct 2008) | 13 lines

  * extracted code to detect constructed class/object types from
    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)

........
r11882 | jonas | 2008-10-11 20:44:02 +0200 (Sat, 11 Oct 2008) | 7 lines

  + -Owoptvmts whole program optimisation which replaces vmt entries
    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).

........
r11889 | jonas | 2008-10-12 14:29:54 +0200 (Sun, 12 Oct 2008) | 2 lines

  * some comment fixes

........
r11891 | jonas | 2008-10-12 18:49:13 +0200 (Sun, 12 Oct 2008) | 4 lines

  * fixed twpofilereader.getnextnoncommentline() when reusing a previously
    read line
  * fixed skipping of unnecessary wpo feedback file sections

........
r11892 | jonas | 2008-10-12 23:42:43 +0200 (Sun, 12 Oct 2008) | 31 lines

  + symbol liveness wpo information extracted from smartlinked programs
    (-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

........
r11893 | jonas | 2008-10-12 23:53:57 +0200 (Sun, 12 Oct 2008) | 3 lines

  * fixed comment error (twpodeadcodeinfo keeps a list of live,
    not dead symbols)

........
r11895 | jonas | 2008-10-13 00:13:59 +0200 (Mon, 13 Oct 2008) | 2 lines

  + documented -OW<x>, -Ow<x>, -FW<x> and -Fw<x> wpo parameters

........
r11899 | jonas | 2008-10-14 22:14:56 +0200 (Tue, 14 Oct 2008) | 2 lines

  * replaced hardcoded string with objdumpsearchstr constant

........
r11900 | jonas | 2008-10-14 22:15:25 +0200 (Tue, 14 Oct 2008) | 2 lines

  * reset wpofeedbackinput and wpofeedbackoutput in wpodone

........
r11901 | jonas | 2008-10-14 22:16:07 +0200 (Tue, 14 Oct 2008) | 2 lines

  * various additional comments and comment fixes

........
r11902 | jonas | 2008-10-15 18:09:42 +0200 (Wed, 15 Oct 2008) | 5 lines

  * store vmt procdefs in the ppu files so we don't have to use a hack to
    regenerate them for whole-program optimisation
  * fixed crash when performing devirtualisation optimisation on programs
    that do not construct any classes/objects with optimisable vmts

........
r11935 | jonas | 2008-10-19 12:24:26 +0200 (Sun, 19 Oct 2008) | 4 lines

  * set the vmt entries of non-class virtual methods of not instantiated
    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

........
r11938 | jonas | 2008-10-19 20:55:02 +0200 (Sun, 19 Oct 2008) | 7 lines

  * record all classrefdefs/objdefs for which a loadvmtaddrnode is generated,
    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)

........
r12212 | jonas | 2008-11-23 12:26:34 +0100 (Sun, 23 Nov 2008) | 3 lines

  * fixed to work with the new vmtentries that are always available and
    removed previously added code to save/load vmtentries to ppu files

........
r12304 | jonas | 2008-12-05 22:23:30 +0100 (Fri, 05 Dec 2008) | 4 lines

  * check whether the correct wpo feedback file is used in the current
    compilation when using units that were compiled using wpo information
    during a previous compilation run

........
r12308 | jonas | 2008-12-06 18:03:39 +0100 (Sat, 06 Dec 2008) | 2 lines

  * abort compilation if an error occurred during wpo initialisation

........
r12309 | jonas | 2008-12-06 18:04:28 +0100 (Sat, 06 Dec 2008) | 3 lines

  * give an error message instead of crashing with an io exception if the
    compiler is unable to create the wpo feedback file specified using -FW

........
r12310 | jonas | 2008-12-06 18:12:43 +0100 (Sat, 06 Dec 2008) | 3 lines

  * don't let the used wpo feedback file influence the interface crc (there's
    a separate check for such changes)

........
r12316 | jonas | 2008-12-08 19:08:25 +0100 (Mon, 08 Dec 2008) | 3 lines

  * document the format of the sections of the wpo feedback file inside the
    feedback file itself

........
r12330 | jonas | 2008-12-10 22:26:47 +0100 (Wed, 10 Dec 2008) | 2 lines

  * use sysutils instead of dos to avoid command line length limits

........
r12331 | jonas | 2008-12-10 22:31:11 +0100 (Wed, 10 Dec 2008) | 3 lines

  + support for testing whole program optimisation tests (multiple
    compilations using successively generated feedback files)

........
r12332 | jonas | 2008-12-10 22:31:40 +0100 (Wed, 10 Dec 2008) | 2 lines

  + whole program optimisation tests

........
r12334 | jonas | 2008-12-10 22:38:07 +0100 (Wed, 10 Dec 2008) | 2 lines

  - removed unused local variable

........
r12339 | jonas | 2008-12-11 18:06:36 +0100 (Thu, 11 Dec 2008) | 2 lines

  + comments for newly added fields to tobjectdef for devirtualisation

........
r12340 | jonas | 2008-12-11 18:10:01 +0100 (Thu, 11 Dec 2008) | 2 lines

  * increase ppu version (was no longer different from trunk due to merging)

........

git-svn-id: trunk@12341 -
2008-12-11 17:40:18 +00:00
peter
2a952c89a5 * store vmt entries in ppu
* give a note if the visibility of a vmt entry is lower than
    the previous (parent) entry
  * refactor vmt method collection using the new always available
    vmt entries

git-svn-id: trunk@12159 -
2008-11-18 18:49:27 +00:00
Jonas Maebe
a00df1033f * changed "Mixing signed expressions and longwords gives a 64bit result"
from warning into a hint (it's not a potential error, but potential
    optimisation advice)

git-svn-id: trunk@12075 -
2008-11-13 19:49:46 +00:00
florian
937067e367 + check if forward definitions and real definitions have the same type, resolves #11970
git-svn-id: trunk@12017 -
2008-11-02 12:36:31 +00:00
Jonas Maebe
a23630260b + "weakexternal" support for imported procedures and variables.
the syntax is exactly the same as for "external", except for
    the keyword. It is currently only active for Darwin targets.
    It should also work at least for Linux targets, but only with
    the GNU assembler (which is why it is not activated there)
  + test for this functionality

git-svn-id: trunk@12009 -
2008-11-01 18:38:32 +00:00
marco
cbbf7f4cfe * fixed a bunch of structural errors and missing escapes to get the docs building again.
git-svn-id: trunk@11910 -
2008-10-18 12:16:00 +00:00
florian
cb9e52826f * fix range check error in options handling, resolves #12365
+ better error output (print filename and line number) for config file directive errors

git-svn-id: trunk@11898 -
2008-10-14 17:06:55 +00:00
Jonas Maebe
64ddae4eff + -vq parameter to show message numbers
+ -vm<x>,<y> parameter to mask messages <x> and <y>
   (both based on a patch submitted by Petr Kristan)
  * alphabetically ordered -v<x> option processing code so it's easier
    to see which characters are still free (not many anymore)
  + some tests for the -vm functionality

git-svn-id: trunk@11888 -
2008-10-12 12:19:41 +00:00
Jonas Maebe
2b067a427d * give warning if a routine in the interface of a non-interface-only
macpas routine is not implemented and therefore considered to be
    external

git-svn-id: trunk@11703 -
2008-09-04 18:15:26 +00:00
yury
c84aa860bd * Added error message if resulting executable image size is too big to fit in memory. bug #11702.
git-svn-id: trunk@11481 -
2008-07-28 21:54:18 +00:00
yury
d5c0ba9a1e * Improved warning about constructing class instance with abstract methods. Warning is issued for each method and method name is specified in the message. It makes easy to find out which abstract methods still not overrode.
git-svn-id: trunk@11450 -
2008-07-23 12:24:25 +00:00
florian
c3605645ff + warn if someone still uses ppc386.cfg
git-svn-id: trunk@10992 -
2008-05-18 07:57:54 +00:00
michael
0167a576f0 * Fixed some typos
git-svn-id: trunk@10861 -
2008-05-02 16:00:48 +00:00
michael
5d1c98237b * Fixed all known errors
git-svn-id: trunk@10857 -
2008-05-02 09:36:38 +00:00
florian
427d35e816 * updated also 2006 copyright strings
git-svn-id: trunk@10734 -
2008-04-20 08:35:06 +00:00
tom_at_work
30cb2b088b * also updated compiler copyright date to 2008 in the translations that translated the affected string
git-svn-id: trunk@10731 -
2008-04-19 23:16:56 +00:00
florian
c83af469d0 * new translations from Karl-Michael Schindler
git-svn-id: trunk@10567 -
2008-03-27 10:37:34 +00:00
micha
b0838b13d7 * add armeb target to compiler/Makefiles
git-svn-id: trunk@10552 -
2008-03-24 17:48:11 +00:00
Jonas Maebe
150eda304b * factored unix exports handling from t_bsd and t_linux into expunix unit
(todo: at least solaris, maybe others)
  * changed the "exports" section handling:
    a) make everything private which is not exported (implemented for
       darwin and linux)
    b) for the exported symbols:
     - functions/procedures
      1) if no name or index is provided, and if the procedure has aliases
         defined via the public/export directives, then export the default
         mangled name and all defined aliases
      2) otherwise if no name is specified (but there is an index) then
        i) if the procedure is defined as cdecl/cppdecl/mwpascal, use the
           appropriately mangled version of the function name
       ii) otherwise export the name without any mangling(e.g. "exports
           proc1" -> proc1 is the exported name)
     - variables
      1) if no name is provided and the variable was specified as cvar,
         use the mangled name
      2) otherwise if no name is provided, export the name without any
         mangling
  -> initialization/finalization of shared libraries under Linux works
     again (mantis #7838)
  -> sharing symbols between shared library and main program works
     under Linux (mantis #9089)

git-svn-id: trunk@10551 -
2008-03-24 16:55:05 +00:00
michael
174de3eab1 Merged revisions 9693-10480 via svnmerge from
svn+ssh://svn.freepascal.org/FPC/svn/fpc/branches/resources

........
  r9694 | michael | 2008-01-09 21:31:18 +0100 (Wed, 09 Jan 2008) | 1 line
  
  * Initial check-in
........
  r9695 | michael | 2008-01-09 21:35:58 +0100 (Wed, 09 Jan 2008) | 1 line
  
  * New version from Giulio Bernardi
........
  r9697 | michael | 2008-01-09 21:41:54 +0100 (Wed, 09 Jan 2008) | 1 line
  
  * Patch from Giulio Bernardi with resource support
........
  r9698 | michael | 2008-01-09 21:46:33 +0100 (Wed, 09 Jan 2008) | 1 line
  
  * Patch from Giulio Bernardi to add more resource testing
........
  r9699 | michael | 2008-01-09 21:57:26 +0100 (Wed, 09 Jan 2008) | 1 line
  
  * New tool from Giulio Bernardi
........
  r9700 | michael | 2008-01-09 21:58:23 +0100 (Wed, 09 Jan 2008) | 1 line
  
  * New tool from Giulio Bernardi
........
  r9701 | michael | 2008-01-09 22:01:54 +0100 (Wed, 09 Jan 2008) | 1 line
  
  * Added fcl-res
........
  r9702 | michael | 2008-01-09 22:01:58 +0100 (Wed, 09 Jan 2008) | 1 line
  
  * Added fcl-res
........
  r9703 | michael | 2008-01-10 08:54:26 +0100 (Thu, 10 Jan 2008) | 1 line
  
  * Fixed double code
........
  r9704 | jonas | 2008-01-10 10:59:20 +0100 (Thu, 10 Jan 2008) | 2 lines
  
    - removed duplicate code
........
  r9705 | jonas | 2008-01-10 11:25:21 +0100 (Thu, 10 Jan 2008) | 2 lines
  
    + added missing fcl-res dependencies
........
  r9706 | jonas | 2008-01-10 11:58:30 +0100 (Thu, 10 Jan 2008) | 2 lines
  
    + dependencies for fpintres and fpextres
........
  r9707 | yury | 2008-01-10 12:47:51 +0100 (Thu, 10 Jan 2008) | 3 lines
  
  * Fixed compilation of resource, which is included in a unit located in different folder than main source.
  * .res files must be copied to units output folder, otherwise .res files will not be found when only compiled units path is available and compiler does not know anything about sources folder.
  * Improved resource related error messages.
........
  r9708 | michael | 2008-01-10 12:52:13 +0100 (Thu, 10 Jan 2008) | 1 line
  
  * Removed double source after end.
........
  r9709 | michael | 2008-01-10 12:52:48 +0100 (Thu, 10 Jan 2008) | 1 line
  
  * No longer needed
........
  r9710 | tom_at_work | 2008-01-10 22:09:08 +0100 (Thu, 10 Jan 2008) | 1 line
  
  * properly align FPC_RESLOCATION so that linking does not fail on some architectures (e.g. ppc64)
........
  r9711 | tom_at_work | 2008-01-10 23:53:12 +0100 (Thu, 10 Jan 2008) | 1 line
  
  * fix splitting of 64 bit load/stores from/to unaligned memory locations into multiple load/stores, which in some cases generated wrong code
........
  r9712 | michael | 2008-01-11 11:00:08 +0100 (Fri, 11 Jan 2008) | 1 line
  
  * Fixed bug in BSS section on 64-bit platforms
........
  r9720 | giulio | 2008-01-12 10:02:04 +0100 (Sat, 12 Jan 2008) | 1 line
  
  Updated fcl-res documentation: occurrences of reslib changed to fcl-res.
........
  r9740 | giulio | 2008-01-13 19:36:44 +0100 (Sun, 13 Jan 2008) | 3 lines
  
   - Don't try to compile resources on systems with a non windows-like resource support.
   - Don't add the .or file to the list of object files if resource compiling failed.
........
  r10201 | giulio | 2008-02-04 11:35:44 +0100 (Mon, 04 Feb 2008) | 5 lines
  
  * resource compiling supported on OS/2 via wrc
  * CompileResourceFiles and CollectResourceFiles don't do target-specific checks anymore
  * refactored a bit
........
  r10389 | giulio | 2008-02-25 21:32:52 +0100 (Mon, 25 Feb 2008) | 2 lines
  
  Deleted test file which was committed by mistake
........
  r10472 | giulio | 2008-03-10 12:22:18 +0100 (Mon, 10 Mar 2008) | 2 lines
  
  changed define FPC_HAS_RESOURCES to FPC_HAS_WINLIKERESOURCES
........

git-svn-id: trunk@10481 -
2008-03-12 21:33:48 +00:00
florian
00ae5d1d5d + correct parsing interface delegation through classes
git-svn-id: trunk@10466 -
2008-03-09 11:16:05 +00:00
florian
6dc34ae467 * updates of german error message file by Karl-Michael Schindler
git-svn-id: trunk@10457 -
2008-03-07 21:01:12 +00:00
micha
83b7f81f81 + add no-fpu support to compiler/rtl for powerpc-linux (-Cfnone)
git-svn-id: trunk@10422 -
2008-03-02 12:59:02 +00:00
Jonas Maebe
86f90d8ac1 + support for setting the name of "main" (-XM command line parameter) in
the code using {$pascalmainname x} + storing it in the ppu file
    (and give a warning if it's overridden multiple times + test)

git-svn-id: trunk@10406 -
2008-03-01 13:05:01 +00:00
florian
6c53785e3a * first part of implements clean up and fixing
git-svn-id: trunk@10382 -
2008-02-24 11:05:46 +00:00
florian
d8d96f14e6 + experimental directive, resolves #10833
git-svn-id: trunk@10331 -
2008-02-15 19:29:34 +00:00
peter
793fd8fc09 * Add -Xg to help pages
* -Xg now produces a .dbg file with debuginfo
    that can be used by gdb. The main executable gets
    a debuglink section that references the .dbg file.

git-svn-id: trunk@9778 -
2008-01-17 01:20:37 +00:00
florian
2dd91ca248 * updates from Karl-Michael Schindler
git-svn-id: trunk@9605 -
2008-01-01 11:03:55 +00:00
florian
8f17101039 * allow application of as operator only to interfaces having a guid, resolves #6797
git-svn-id: trunk@9436 -
2007-12-12 21:07:47 +00:00
Jonas Maebe
18eb495d0f * give a regular error message instead of an internal error on x86
when using non-PIC references in assembler code when the compiler
    is configured to generate PIC code (on ppc, sparc and arm, no
    error message is given at all currently)

git-svn-id: trunk@9364 -
2007-12-01 11:28:15 +00:00
florian
cfed70d698 * removed garbage at the end
git-svn-id: trunk@9207 -
2007-11-11 21:26:44 +00:00
florian
246ae7b446 o from Karl-Michael Schindler:
* brought german message file up-to-date

git-svn-id: trunk@9206 -
2007-11-11 21:24:55 +00:00
sekelsenmat
6569d491a1 Added symbian target to the compiler messages
git-svn-id: trunk@9149 -
2007-11-07 19:42:55 +00:00
florian
e3a0f3d303 * updates from Ido Kanner
git-svn-id: trunk@9016 -
2007-10-31 19:55:37 +00:00
florian
50cc61c8fd * ignore register list in pure assembler routines, resolves #9335
git-svn-id: trunk@8978 -
2007-10-28 20:41:19 +00:00
peter
bfca4e67fa * -CO option to check for possible integer overflows
git-svn-id: trunk@8842 -
2007-10-18 19:55:22 +00:00
peter
1e123d66ba * improved generics
git-svn-id: trunk@8838 -
2007-10-18 00:24:05 +00:00
peter
6434772c3c * error message when a goto label is optimized away
git-svn-id: trunk@8837 -
2007-10-17 21:52:25 +00:00
Jonas Maebe
83bab3b071 + documented -XR in the help pages
* specified OSes to which -Xr applies

git-svn-id: trunk@8834 -
2007-10-17 19:37:32 +00:00
florian
f290d5195d * line ending properties set
git-svn-id: trunk@8685 -
2007-09-29 22:28:27 +00:00
florian
0ebbbd5380 * spelling mistakes fixed
git-svn-id: trunk@8684 -
2007-09-29 22:26:33 +00:00