florian
cbefdcf887
* patch by Martin Friebe to avoid wrong debugger output, resolves #25584
...
git-svn-id: trunk@26794 -
2014-02-16 10:11:20 +00:00
nickysn
1de847c754
* fixed error in comment
...
git-svn-id: trunk@26507 -
2014-01-18 17:00:10 +00:00
florian
4d5119bf1c
* fixes several issues which cause warnings by the dfa code when using it to detect uninitialized variables
...
git-svn-id: trunk@26161 -
2013-12-01 17:02:08 +00:00
Jonas Maebe
0302453912
* disabled the lea->add transformation added in r25907 because it breaks
...
webtbs/tw15694.pp. Such transformation require liveness analysis of
the flags
git-svn-id: trunk@26001 -
2013-11-09 18:42:23 +00:00
florian
1843ed59b5
* set p to a valid instruction
...
git-svn-id: trunk@25912 -
2013-11-01 20:09:28 +00:00
florian
a16ceb6cdf
* replace lea by add if possible
...
git-svn-id: trunk@25907 -
2013-11-01 19:01:33 +00:00
florian
80f8f66c6e
* set file positions correctly in PeepHoleOptPass1
...
git-svn-id: trunk@25906 -
2013-11-01 19:01:31 +00:00
florian
4148637c8c
* fold mov/lea/mov as well if possible
...
git-svn-id: trunk@25905 -
2013-11-01 19:01:29 +00:00
florian
524cde8140
+ MatchReference
...
* refactored some code
git-svn-id: trunk@25904 -
2013-11-01 19:01:26 +00:00
florian
440cb33e80
* continue to use lea to adjust the stack pointer, it is the recommended way
...
git-svn-id: trunk@25903 -
2013-11-01 19:01:24 +00:00
florian
5eb578a44c
* generate sub instead of add from lea if appropriate
...
git-svn-id: trunk@25902 -
2013-11-01 19:01:22 +00:00
florian
d575a435c3
* some debugging infrastructure
...
git-svn-id: trunk@25900 -
2013-11-01 19:01:17 +00:00
florian
bfbb0c5b9d
* optimize mov/lea
...
git-svn-id: trunk@25899 -
2013-11-01 19:01:14 +00:00
nickysn
f288859fba
* i386 optimization - remove the test/or %y, %y instruction in the sequence:
...
shl/sal/shr/sar $x, %y
test/or %y, %y
jz/jnz/setz/setnz/cmovz/cmovnz ...
git-svn-id: trunk@25881 -
2013-10-29 17:34:32 +00:00
florian
507edb16de
* use add/sub instead of inc/dec on modern CPUs when optimizing for speed
...
git-svn-id: trunk@25057 -
2013-07-07 19:50:13 +00:00
florian
2ea6979277
* handle Movzl/Op/Mov optimization correctly, resolves #23431
...
git-svn-id: trunk@23128 -
2012-12-09 21:27:05 +00:00
florian
df01717c38
* mov x, %treg; mov %treg, y might be only optimized if y does not use treg
...
git-svn-id: trunk@22015 -
2012-08-05 17:48:28 +00:00
Jonas Maebe
dd03bc3e66
* i386 version of fix from r21113
...
git-svn-id: trunk@21127 -
2012-04-29 22:27:00 +00:00
florian
a6b2fcfe22
* fixes breakage of r17766, should resolve #19598
...
git-svn-id: trunk@17814 -
2011-06-23 21:30:40 +00:00
florian
b00a610aec
* optimize andb/w const,reg andw/l const,reg sequences as well
...
git-svn-id: trunk@17766 -
2011-06-18 15:22:09 +00:00
Jonas Maebe
d10f46ec59
* skip instructions containing a reference with a segment prefix (fixes
...
mantis #18113 )
git-svn-id: trunk@16619 -
2010-12-23 15:24:29 +00:00
Jonas Maebe
8f22a5d224
* perform simple imul->lea transformations also for Pentium 3-class target
...
cpus (default target, and should actually be faster there too;
mantis #18056 )
git-svn-id: trunk@16441 -
2010-11-26 10:30:46 +00:00
Jonas Maebe
ffc9e07275
* only don't perform the complex mul->lea optimizations for the Pentium3
...
git-svn-id: trunk@15344 -
2010-05-30 12:57:52 +00:00
Jonas Maebe
7d459cf12a
* the compiler now explicitly keeps track of the minimally guaranteed
...
alignment for each memory reference (mantis #12137 , and
test/packages/fcl-registry/tregistry1.pp on sparc). This also
enables better code generation for packed records in many cases.
o several changes were made to the compiler to minimise the chances
of accidentally forgetting to set the alignment of memory references
in the future:
- reference_reset*() now has an extra alignment parameter
- location_reset() can now only be used for non LOC_(C)REFERENCE,
use location_reset_ref() for those (split the tloc enum so the
compiler can catch errors using range checking)
git-svn-id: trunk@12719 -
2009-02-08 13:00:24 +00:00
Jonas Maebe
7bfe1f7865
* fixed indentation
...
* fixed use of instruction instance after it has been freed
git-svn-id: trunk@11761 -
2008-09-13 12:20:01 +00:00
florian
e27937106f
- removed obsolete USECMOV define
...
git-svn-id: trunk@11645 -
2008-08-24 12:46:42 +00:00
yury
491f0fa1d8
* Replaced all user defined warnings by TODO comments to reduce compiler noise.
...
git-svn-id: trunk@11443 -
2008-07-23 11:00:03 +00:00
yury
fd0ed50331
* Removed/commented more unused variables.
...
* Fixed some uninitialized variable warnings.
git-svn-id: trunk@11442 -
2008-07-23 10:48:53 +00:00
Jonas Maebe
3b72bf98b0
* fixed short/smallint add/sub peephole in case of operations with
...
only one operand + documented it by example (mantis #11223 )
git-svn-id: trunk@10828 -
2008-04-27 21:01:52 +00:00
Jonas Maebe
a3b877247c
* don't perform call/jmp into push/jmp in case we're generating
...
pic, as that optimization is invalid in that case
git-svn-id: trunk@10655 -
2008-04-13 17:03:07 +00:00
daniel
459382faa8
+ Teach peephole optimizer the cmc/adc trick I used in int_str.
...
git-svn-id: trunk@9799 -
2008-01-19 21:47:37 +00:00
peter
cbac667753
* check for eax,edx,ecx,ebx that support 8,16 bit registers in shortint add/sub peephole
...
and update register size of substructor
git-svn-id: trunk@9351 -
2007-11-29 21:16:32 +00:00
peter
fcb37c4fa4
* peephole added for non-longint:=non-longint+X
...
git-svn-id: trunk@9329 -
2007-11-25 14:32:59 +00:00
florian
c219b1f753
* fixed/enabled andl/addl/... xx,reg1 orl reg1,reg1 setxx/jxx/cmovxx optimization
...
git-svn-id: trunk@8902 -
2007-10-21 19:54:09 +00:00
Jonas Maebe
20206500aa
* don't change a sequence of shifts and sub/adds into a lea() in case
...
the flags are read afterwards (broke shldl/sub/sbb sequence generated
for 64 bit "*2", which appears in bitpacked size calculation)
git-svn-id: trunk@7336 -
2007-05-14 20:37:42 +00:00
daniel
c23bbe24bf
+ Add peoplehole optimization to optimize "smallset+[x]" and "smallset-[x]".
...
git-svn-id: trunk@7188 -
2007-04-29 10:32:18 +00:00
florian
85d63d9fa9
* settings refactored
...
git-svn-id: trunk@5094 -
2006-10-30 18:02:58 +00:00
Jonas Maebe
01cf70d354
* don't change "mov const,ref; mov ref,reg" into "mov const,reg; mov reg,ref"
...
if ref depends on reg
git-svn-id: trunk@3002 -
2006-03-21 15:25:16 +00:00
peter
b7fe6797bf
Merged revisions 2921-2922,2925 via svnmerge from
...
http://svn.freepascal.org/svn/fpc/branches/linker/compiler
........
r2921 | peter | 2006-03-15 08:35:00 +0100 (Wed, 15 Mar 2006) | 2 lines
* pass ObjectWriter to ObjectOuput
........
r2922 | peter | 2006-03-15 12:40:30 +0100 (Wed, 15 Mar 2006) | 2 lines
* refactor asmdata
........
r2925 | peter | 2006-03-15 16:09:39 +0100 (Wed, 15 Mar 2006) | 3 lines
* add cfi to asmdata
* move asmlist, asmcfi, asmdata to own unit
........
git-svn-id: trunk@2932 -
2006-03-16 08:52:22 +00:00
peter
d8dc5679e3
* aktcputype and aktoptimizecputype was missing in the previous optimization commits
...
git-svn-id: trunk@2907 -
2006-03-13 12:29:56 +00:00
peter
b6e35a200e
* rewrite of optimizer options
...
git-svn-id: trunk@2901 -
2006-03-13 09:05:50 +00:00
peter
785550d7e3
Merged revisions 2669,2673,2677,2683,2696,2699-2702,2704,2708,2712-2715,2718,2722-2723,2728-2730,2740,2769 via svnmerge from
...
svn+ssh://peter@www.freepascal.org/FPC/svn/fpc/branches/linker/compiler
........
r2669 | peter | 2006-02-23 09:31:21 +0100 (Thu, 23 Feb 2006) | 2 lines
* add compiler dir
........
r2673 | peter | 2006-02-23 17:08:56 +0100 (Thu, 23 Feb 2006) | 2 lines
* enabled more code
........
r2677 | peter | 2006-02-24 17:46:29 +0100 (Fri, 24 Feb 2006) | 2 lines
* pe stub and headers
........
r2683 | peter | 2006-02-25 23:13:24 +0100 (Sat, 25 Feb 2006) | 2 lines
* section options cleanup
........
r2696 | peter | 2006-02-26 20:27:41 +0100 (Sun, 26 Feb 2006) | 2 lines
* fixed typecasts
........
r2699 | peter | 2006-02-26 23:04:32 +0100 (Sun, 26 Feb 2006) | 2 lines
* simple linking works
........
r2700 | peter | 2006-02-27 09:44:50 +0100 (Mon, 27 Feb 2006) | 2 lines
* internal linker script
........
r2701 | peter | 2006-02-27 12:05:12 +0100 (Mon, 27 Feb 2006) | 2 lines
* make elf working again
........
r2702 | peter | 2006-02-27 14:04:43 +0100 (Mon, 27 Feb 2006) | 3 lines
* disable dwarf for smartlinking with .a
* fix section start in new .a file
........
r2704 | peter | 2006-02-27 18:30:43 +0100 (Mon, 27 Feb 2006) | 2 lines
* stab section fixes
........
r2708 | peter | 2006-02-28 19:29:17 +0100 (Tue, 28 Feb 2006) | 2 lines
* basic work to merge stabs sections
........
r2712 | peter | 2006-02-28 23:17:48 +0100 (Tue, 28 Feb 2006) | 2 lines
* unload tmodules before linking
........
r2713 | peter | 2006-02-28 23:18:51 +0100 (Tue, 28 Feb 2006) | 2 lines
* fixed stabs linking
........
r2714 | peter | 2006-02-28 23:19:19 +0100 (Tue, 28 Feb 2006) | 2 lines
* show code and data size
........
r2715 | peter | 2006-02-28 23:25:35 +0100 (Tue, 28 Feb 2006) | 2 lines
* unload .stabs from objdata after it is merged
........
r2718 | peter | 2006-03-01 12:24:38 +0100 (Wed, 01 Mar 2006) | 3 lines
* memsize/datasize cleanup
* check for exports/resources when adding module to linker
........
r2722 | peter | 2006-03-03 09:12:20 +0100 (Fri, 03 Mar 2006) | 2 lines
* new TObjSymbol splitted from TAsmSymbol
........
r2723 | peter | 2006-03-03 14:08:55 +0100 (Fri, 03 Mar 2006) | 2 lines
* coff fixes after recent objsymbol changes
........
r2728 | peter | 2006-03-03 22:43:04 +0100 (Fri, 03 Mar 2006) | 2 lines
* fixed coff writer
........
r2729 | peter | 2006-03-04 01:10:32 +0100 (Sat, 04 Mar 2006) | 2 lines
* fix read-only opening
........
r2730 | peter | 2006-03-04 01:11:16 +0100 (Sat, 04 Mar 2006) | 2 lines
* Read edata from DLLs, basic work
........
r2740 | peter | 2006-03-04 21:13:43 +0100 (Sat, 04 Mar 2006) | 3 lines
* deletedef added
* don't remove defs from index when we are already clearing everything
........
r2769 | peter | 2006-03-05 21:42:33 +0100 (Sun, 05 Mar 2006) | 4 lines
* moved TObj classes to ogbase
* ObjSection.SymbolRefs and SymbolDefines list
* DLL importing
........
git-svn-id: trunk@2771 -
2006-03-05 21:10:37 +00:00
peter
5ac78d1ec3
* fix range error
...
git-svn-id: trunk@2640 -
2006-02-20 06:59:14 +00:00
daniel
e138c9c081
+ Add nice little peephole trick
...
+ Add a comment to another
git-svn-id: trunk@2602 -
2006-02-15 22:03:07 +00:00
Jonas Maebe
a68ca7eb2a
* fixed web bug #4768 + test
...
git-svn-id: trunk@2479 -
2006-02-08 19:22:26 +00:00
florian
e43a1223ff
* fixed refs book keeping
...
git-svn-id: trunk@2211 -
2006-01-07 21:10:39 +00:00
florian
8b01dce70a
* cmov ref,reg disabled because ref might be never nil
...
git-svn-id: trunk@1407 -
2005-10-16 12:25:58 +00:00
peter
a3ab2053c9
* support multiple asmlabel types, renamed getlabel to
...
getjumplabel and added type para to getlabel for specific types
* moved lineinfo generation from assemble and aggas to dbgstabs
git-svn-id: trunk@1120 -
2005-09-18 21:16:10 +00:00
fpc
790a4fe2d3
* log and id tags removed
...
git-svn-id: trunk@42 -
2005-05-21 09:42:41 +00:00
fpc
50778076c3
initial import
...
git-svn-id: trunk@1 -
2005-05-16 18:37:41 +00:00