[Issue 9097] Value range propagation to disable some array bound tests
http://d.puremagic.com/issues/show_bug.cgi?id=9097 --- Comment #3 from bearophile_h...@eml.cc 2013-07-09 03:15:11 PDT --- In past dmd generated this with "dmd -O -inline -release -noboundscheck": __Dmain: sub ESP, 0330h mov ECX, 0C8h push EDI mov EAX, 0338h[ESP] add EAX, 01770h mov 4[ESP], EAX xor EAX, EAX lea EDI, 014h[ESP] rep stosd mov EAX, 4[ESP] mov ECX, 064h xor EDX, EDX div ECX xor EAX, EAX mov dword ptr 014h[EDX*4][ESP], 1 pop EDI add ESP, 0330h ret Now it generates this in both the optimized build and the less optimized build "dmd -O -inline" (beside removing the array bound tests, it also avoids the "div"): __Dmain: sub ESP, 0324h mov ECX, 0C8h push EDI mov EAX, 032Ch[ESP] add EAX, 01770h mov 0324h[ESP], EAX xor EAX, EAX lea EDI, 4[ESP] rep stosd mov ECX, 0324h[ESP] mov EAX, ECX mov EDX, 051EB851Fh mul EDX shr EDX, 5 imul EAX, EDX, 064h sub ECX, EAX xor EAX, EAX mov dword ptr 4[ECX*4][ESP], 1 pop EDI add ESP, 0324h ret -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9097] Value range propagation to disable some array bound tests
http://d.puremagic.com/issues/show_bug.cgi?id=9097 Walter Bright changed: What|Removed |Added Status|NEW |RESOLVED CC||bugzi...@digitalmars.com Resolution||FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9097] Value range propagation to disable some array bound tests
http://d.puremagic.com/issues/show_bug.cgi?id=9097 --- Comment #2 from github-bugzi...@puremagic.com 2013-07-08 22:57:46 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/186acf411866c1950b215f58fd57c08e903f588c Fix Issue 9097 - Value range propagation to disable some array bound tests Do not emit bounds check code if the index is statically known to be within bounds https://github.com/D-Programming-Language/dmd/commit/fe9bb4aaad8b9aa132bd86d7a1168be12fec5981 Merge pull request #1493 from yebblies/issue9097 Fix Issue 9097 - Value range propagation to disable some array bound tests -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 9097] Value range propagation to disable some array bound tests
http://d.puremagic.com/issues/show_bug.cgi?id=9097 yebblies changed: What|Removed |Added Keywords||pull CC||yebbl...@gmail.com --- Comment #1 from yebblies 2013-01-16 23:23:26 EST --- https://github.com/D-Programming-Language/dmd/pull/1493 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---