diff --git a/compiler/aoptobj.pas b/compiler/aoptobj.pas index 792906d44d..9cc84c212d 100644 --- a/compiler/aoptobj.pas +++ b/compiler/aoptobj.pas @@ -1182,12 +1182,10 @@ Unit AoptObj; removedSomething := false; firstRemovedWasAlloc := false; {$ifdef allocregdebug} - hp := tai_comment.Create(strpnew('allocating '+std_regname(newreg(R_INTREGISTER,supreg,R_SUBWHOLE))+ - ' from here...')); - insertllitem(asml,p1.previous,p1,hp); - hp := tai_comment.Create(strpnew('allocated '+std_regname(newreg(R_INTREGISTER,supreg,R_SUBWHOLE))+ - ' till here...')); - insertllitem(asml,p2,p2.next,hp); + hp := tai_comment.Create(strpnew('allocating '+std_regname(reg)+' from here...')); + insertllitem(p1.previous,p1,hp); + hp := tai_comment.Create(strpnew('allocated '+std_regname(reg)+' till here...')); + insertllitem(p2,p2.next,hp); {$endif allocregdebug} { do it the safe way: always allocate the full super register, as we do no register re-allocation in the peephole optimizer, diff --git a/compiler/fpcdefs.inc b/compiler/fpcdefs.inc index c7ca6c5a5e..b4ec8a6dbc 100644 --- a/compiler/fpcdefs.inc +++ b/compiler/fpcdefs.inc @@ -32,6 +32,31 @@ {$define USEINLINE} {$endif EXTDEBUG} +{$ifdef DEBUG_ALL_OPT} + { for aopt unit } + {$define DEBUG_OPTALLOC} + {$define DEBUG_INSTRUCTIONREGISTERDEPENDENCIES} + {for CPU/aoptcpu unit } + {$define DEBUG_AOPTCPU} + {$define DEBUG_PREREGSCHEDULER (arm specific) } + { for aoptobj unit } + {$define DEBUG_AOPTOBJ} + {$define ALLOCREGDEBUG} + { for optconstprop unit } + {$define DEBUG_CONSTPROP} + { for optcse unit } + {$define CSEDEBUG} + { for optdeadstore unit } + {$define DEBUG_DEADSTORE} + { for optdfa unit } + {$define DEBUG_DFA} + { for optloop unit } + {$define DEBUG_OPTFORLOOP} + {$define DEBUG_OPTSTRENGTH} + { for optvirt unit } + {$define DEBUG_DEVIRT} +{$endif} + {$define USEEXCEPT} { This fake CPU is used to allow incorporation of globtype unit