Log On
Embarcadero Home
Watch, Follow, &
Connect with Us
Share This
QualityCentral
Communities
Articles
Blogs
Resources
Downloads
Help
QualityCentral
Delphi-BCB
Compiler
Delphi
Anonymous Methods
BASM
Code Generation/Optimization
Error Recovery
Errors - Warnings
Exceptions
Execution
Finalization
Generics
Header Generation
Interaction with UI
Interfaces
Language
Linker
Make Logic
Memory Manager
OBJ Generation
OBJ Support
Other Compiler
Packages
RTTI
String Resources
TD Debug Info
Thread Local Storage
Version resilience
You are not logged in.
Help
Print
Public Report
Report From:
Delphi-BCB/Compiler/Delphi/Code Generation/Optimization
[ Add a report in this area ]
Report #:
105561
Status:
Open
Not complete optimization: constant propagation.
Project:
Delphi
Build #:
16.0.4429.46931
Version:
16.4
Submitted By:
Denis Volodarsky
Report Type:
Suggestion / Enhancement Request
Date Reported:
5/12/2012 11:17:07 PM
Severity:
Infrequently encountered problem
Last Updated:
8/6/2012 12:47:57 PM
Platform:
All versions
Internal Tracking #:
Resolution:
None
(Resolution Comments)
Resolved in Build:
:
None
Duplicate of:
None
Voting and Rating
Overall Rating:
No Ratings Yet
0.00 out of 5
Total Votes:
None
Description
Example function:
function test: integer;
begin
result := 10;
result := result + 1 + 2 + 3;
result := result + 1 + 2 + 3;
result := result + 1 + 2 + 3;
end;
This example generates such asm code (release mode):
mov eax, 10
add eax, 6
add eax, 6
add eax, 6
i.e. it's obviously folds constants at lines, but not propagates result futrher.
final code should be just
mov eax, 28
Steps to Reproduce:
None
Workarounds
None
Attachment
None
Comments
None
View Your Reports
Search
Server Response from: ETNACODE01
Developer Tools
Blackfish SQL
C++Builder
Delphi
FireMonkey
Prism
InterBase
JBuilder
J Optimizer
HTML5 Builder
3rdRail & TurboRuby
Database Tools
Change Manager
DBArtisan
DB Optimizer
ER/Studio
Performance Center
Rapid SQL
Technical Articles
Tutorials
White Papers
Press Releases
Newsletters
Add Content (GetPublished)
Audio
Audio & Video
Video
Bugs & Suggestions (QualityCentral)
Discussion Forums
Examples (CodeCentral)
Tags
Technology Partners
Downloads
Free Trials
Registered User Downloads
Beta Programs
Add Content (GetPublished)
Articles
Blogs
Bugs & Suggestions (QualityCentral)
Discussion Forums
Examples (CodeCentral)
Member Services
About
Connect with Us