mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-01 00:02:39 +02:00
- No longer insert BlockStart markers into asmlists. The presence of these markers disrupts peephole optimizations and require additional checks all over the place, causing various workarounds/hacks (like TAsmList.Create_without_marker) to start building up.
A more radical approach is to remove them altogether. Tested with i386-win32 (the oldest peephole optimizer), mips-linux (the newest one) and arm-linux (the most complex one) targets. The fallout was limited to two minor issues fixed in r28629 and r28708, respectively. git-svn-id: trunk@28711 -
This commit is contained in:
parent
a10c200090
commit
a3c439c60f
@ -122,8 +122,6 @@ interface
|
||||
type
|
||||
TAsmList = class(tlinkedlist)
|
||||
constructor create;
|
||||
constructor create_without_marker;
|
||||
function empty : boolean;
|
||||
function getlasttaifilepos : pfileposinfo;
|
||||
end;
|
||||
|
||||
@ -284,20 +282,6 @@ implementation
|
||||
constructor TAsmList.create;
|
||||
begin
|
||||
inherited create;
|
||||
{ make sure the optimizer won't remove the first tai of this list}
|
||||
insert(tai_marker.create(mark_BlockStart));
|
||||
end;
|
||||
|
||||
constructor TAsmList.create_without_marker;
|
||||
begin
|
||||
inherited create;
|
||||
end;
|
||||
|
||||
function TAsmList.empty : boolean;
|
||||
begin
|
||||
{ there is always a mark_BlockStart available,
|
||||
see TAsmList.create }
|
||||
result:=(count<=1);
|
||||
end;
|
||||
|
||||
|
||||
|
@ -2418,7 +2418,7 @@ Implementation
|
||||
begin
|
||||
result:=true;
|
||||
|
||||
list:=TAsmList.create_without_marker;
|
||||
list:=TAsmList.create;
|
||||
p:=BlockStart;
|
||||
while p<>BlockEnd Do
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user