- 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:
sergei 2014-09-22 21:33:50 +00:00
parent a10c200090
commit a3c439c60f
2 changed files with 1 additions and 17 deletions

View File

@ -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;

View File

@ -2418,7 +2418,7 @@ Implementation
begin
result:=true;
list:=TAsmList.create_without_marker;
list:=TAsmList.create;
p:=BlockStart;
while p<>BlockEnd Do
begin