Commit Graph

68 Commits

Author SHA1 Message Date
Jonas Maebe
f72f5c636a * refined previous fix a bit, some instructions weren't being removed
while they could (merged from fixes branch)
  * made checksequence a bit faster
2000-08-25 19:40:45 +00:00
Jonas Maebe
bd928ecf72 * fix for web bug #1112 and a bit of clean up in csopt386 (merged from
fixes branch)
2000-08-23 12:55:10 +00:00
Jonas Maebe
5d7597c09f * improved detection of range of instructions which use a register
(merged from fixes branch)
2000-08-04 20:08:03 +00:00
Jonas Maebe
ce46621762 * daopt386: changes to getnextinstruction/getlastinstruction so they
ignore labels who have is_addr set
  + daopt386/csopt386: remove loads of registers which are overwritten
     before their contents are used (especially usefull for removing superfluous
    maybe_loadesi outputs and push/pops transformed by below optimization
  + popt386: transform pop/pop/pop/.../push/push/push to sequences of
    'movl x(%esp),%reg' (only active when compiling a go32v2 compiler
    currently because I don't know whether it's safe to do this under Win32/
    Linux (because of problems we had when using esp as frame pointer on
    those os'es)
2000-07-21 15:19:54 +00:00
michael
2949824a69 + Patch to 1.1 2000-07-14 05:11:48 +00:00
michael
650fbb86aa + removed logs 2000-07-13 11:32:24 +00:00
michael
e7aca136a1 + Initial import 2000-07-13 06:29:38 +00:00
peter
1b53fa6f8a * removed unused var 2000-06-18 18:13:12 +00:00
Jonas Maebe
e360abb77b * fixed web bug #972, test for the bug in tests/testopt/testcse3.pp 2000-06-03 09:41:37 +00:00
peter
e60344ccf7 * removed notes 2000-06-01 11:01:20 +00:00
Jonas Maebe
6e83066171 * fixed incompatibility with range chcking code, -O2 and higher
now work correctly together with -Cr
2000-04-29 16:57:44 +00:00
Jonas Maebe
e4ceb46242 * fixed a serious bug in the CSE which (I think) only showed with
-dnewoptimizations when using multi-dimensional arrays with
    elements of a size different from 1, 2 or 4 (especially strings).
  * made the DFA/CSE more robust (much less dependent on specifics of the
    code generator)
2000-04-10 12:45:56 +00:00
Jonas Maebe
3ec9514966 * fixed some things for -Or. Make cycle now works with -OG2p3r if
you use -Aas. There still a bug in popt386.pas that causes a
    problem with the binary writer, but I haven't found it yet
2000-03-25 19:05:47 +00:00
Jonas Maebe
34dd37729c * fix for -dnewoptimizations and -Or (never remove stores to regvars)
but make cycle with -OG2p3r still fails :(
2000-03-24 15:54:49 +00:00
peter
2ba0ebe607 * removed warnings/notes 2000-02-24 18:41:38 +00:00
Jonas Maebe
fb5ac39a26 * fixed bug in -dnewoptizations (showed itself only if -Or was
used as well I think)
2000-02-19 13:50:29 +00:00
Jonas Maebe
aafacbb44b * -dreplacereg no logner tries to optimize "movl %reg1,%reg1" (which are
always marked as CanBeRemoved)
  + some comments in -dreplacereg code
  * small fix which could cause crash when optimizer is compiler with -dTP
2000-02-17 07:46:49 +00:00
Jonas Maebe
958d6dacef * fix for imul optimization in popt386 (exclude top_ref as first
argument)
  * in csopt386: change "mov reg1,reg2; <several operations on reg2>;
    mov reg2,reg1" to "<several operations on reg1>" (-dnewopt...)
2000-02-12 19:28:56 +00:00
Jonas Maebe
0cbad4fe45 + change "mov reg1,reg2;imul x,reg2" to "imul x,reg1,reg2" in popt386
(-dnewoptimizations)
  * shl(d) and shr(d) are considered to have a hardcoded register if
    they use cl as shift count (since you can't replace them with
    another register) in csopt386 (also for -dnewoptimizations)
2000-02-12 14:10:14 +00:00
Jonas Maebe
bee612f94a * fixed edi allocation in allocRegBetween
* fixed bug I introduced yesterday, added comment to prevent it from
    happening again in the future
2000-02-12 10:54:18 +00:00
Jonas Maebe
89abe234d9 * fixed crashing bug under Dos with -dnewoptimizations (found it,
John!). Don't understand why it didn't crash under Linux :(
2000-02-11 23:50:03 +00:00
Jonas Maebe
9e85007190 * fixed stupid typo! 2000-02-10 16:04:43 +00:00
Jonas Maebe
e558713f0c * fixed small bug introduced with my previous fix 2000-02-10 15:07:41 +00:00
Jonas Maebe
8a40388de3 * fixed bug due to lack of support for top_symbol operands 2000-02-10 14:57:13 +00:00
peter
4a4a24b6e8 * log truncated 2000-02-09 13:22:42 +00:00
Jonas Maebe
4e361ef71f * better support for regvars (still needs a move of the call to the optimize
procedure to a place where resetusableregisters is not yet called to work)
  * small regallocation fixes for -dnewoptimizations
2000-02-04 13:52:17 +00:00
Jonas Maebe
38b993f7dc * moved skipinstr from daopt386 to aasm
* fixed crashing bug with -dreplacereg in csopt386.pas
2000-01-28 15:15:31 +00:00
michael
587a967353 + Fixes from Jonas. 2000-01-23 11:11:36 +00:00
Jonas Maebe
02381105d6 + all code generator generated "mov reg1,reg2" instructions are now
attempted to be removed using the replacereg code
    (-dnewoptimizations)
  * small fixes to -dreplacereg code
2000-01-22 16:10:06 +00:00
Jonas Maebe
5910b48cbe * released -dalignreg
* some small fixes to -dnewOptimizations helper procedures
2000-01-13 13:07:05 +00:00
peter
e525797c51 * updated copyright to 2000 2000-01-07 01:14:18 +00:00
Jonas Maebe
ace77883c8 * fixed bug with -dreplacereg 2000-01-03 17:11:17 +00:00
Jonas Maebe
8272526892 * CSE of constant loading in regs works properly again
+ if a constant is stored into memory using "mov const, ref" and
    there is a reg that contains this const, it is changed into
    "mov reg, ref"
1999-12-05 16:48:43 +00:00
peter
ad2b1fb278 * newoptimizations define added 1999-12-02 11:26:41 +00:00
Jonas Maebe
7d1b3066d9 * fixed some missed optimizations because 8bit regs were not always
taken into account
1999-11-21 13:09:41 +00:00
Jonas Maebe
1a761b3881 * make cycle works with -dreplacereg (register renaming)! I have not
tested it yet together with -darithopt, but I don't expect problems
1999-11-20 11:37:03 +00:00
Jonas Maebe
404ca4568d + basic register renaming (not yet working completely, between
-dreplacereg/-dreplaceregdebug)
1999-11-14 11:26:53 +00:00
Jonas Maebe
d70b3211a4 + search optimial register to use in alignment code (compile with
-dalignreg, -dalignregdebug to see chosen register in
    assembler code). Still needs support in ag386bin.
1999-11-06 16:21:57 +00:00
peter
0887060ff2 * truncated log to 20 revs 1999-11-06 14:34:16 +00:00
Jonas Maebe
2688bfd9ec + first implementation of choosing least used register for alignment code
(not yet working, between ifdef alignreg)
1999-11-05 16:01:45 +00:00
Jonas Maebe
9a8ecfc76b * fixed bug which sometimes caused a crash when optimizing blocks of code with
assembler blocks (didn't notice before because of lack of zero page protection
    under Win9x :( )
1999-10-11 11:11:31 +00:00
Jonas Maebe
6ca2b6e276 * CSE now updates the RegAlloc's 1999-10-01 13:51:40 +00:00
Jonas Maebe
47b0fcf922 * fixed small efficiency which caused some missed optimizations (saves 1
assembler instruction on the whole compiler/RTL source tree! :)
1999-09-30 14:43:13 +00:00
peter
6b1ab5eb31 * procinfo is now a pointer
* support for result setting in sub procedure
1999-09-27 23:44:46 +00:00
Jonas Maebe
5fc1435036 * changed pai386, paippc and paiapha (same for tai*) to paicpu (taicpu) 1999-08-25 11:59:32 +00:00
florian
ca53eee67e * renamed i386asm and i386base to cpuasm and cpubase 1999-08-04 00:22:34 +00:00
Jonas Maebe
7e4f903a9e * sequences are now checked only once (previously, some long ones were
checked once completely and then several times partially)
1999-06-03 15:45:08 +00:00
Jonas Maebe
460464ff24 * seperate OPTimizer INFO pointer field in tai object 1999-05-08 20:38:02 +00:00
peter
611da2d24e * merged nasm compiler
* old asm moved to oldasm/
1999-05-01 13:23:57 +00:00
peter
a17c03cca3 * assembler writers fixed for ag386bin 1999-02-26 00:48:13 +00:00