Bug 193443

Summary: clang-tidy: Fix unnecessary copy of for loop variables in ANGLE
Product: WebKit Reporter: David Kilzer (:ddkilzer) <ddkilzer>
Component: ANGLEAssignee: David Kilzer (:ddkilzer) <ddkilzer>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, commit-queue, dino, ews-watchlist, graouts, kondapallykalyan, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.chromium.org/p/angleproject/issues/detail?id=3075
Attachments:
Description Flags
Patch v1 none

David Kilzer (:ddkilzer)
Reported 2019-01-15 05:04:52 PST
Running clang-tidy on ANGLE resulted in these potential performance improvements to prevent object copies in for loops: Source/ThirdParty/ANGLE/src/compiler/translator/Compiler.cpp:1070:15: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy] for (auto block : uniformBlocks) ^ const & Source/ThirdParty/ANGLE/src/compiler/translator/Compiler.cpp:1087:19: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy] for (auto var : outputVaryings) ^ const & Source/ThirdParty/ANGLE/src/compiler/translator/Compiler.cpp:1100:19: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy] for (auto var : outputVariables) ^ const & Source/ThirdParty/ANGLE/src/compiler/preprocessor/MacroExpander.cpp:73:15: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy] for (auto macro : mExpander->mMacrosToReenable) ^ const & Source/ThirdParty/ANGLE/src/libANGLE/Program.cpp:195:15: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy] for (auto nameInSet : nameSet) ^ const &
Attachments
Patch v1 (4.33 KB, patch)
2019-01-15 05:17 PST, David Kilzer (:ddkilzer)
no flags
David Kilzer (:ddkilzer)
Comment 1 2019-01-15 05:17:23 PST
Created attachment 359156 [details] Patch v1
EWS Watchlist
Comment 2 2019-01-15 05:20:42 PST
Note that there are important steps to take when updating ANGLE. See http://trac.webkit.org/wiki/UpdatingANGLE
WebKit Commit Bot
Comment 3 2019-01-15 13:47:57 PST
Comment on attachment 359156 [details] Patch v1 Clearing flags on attachment: 359156 Committed r240001: <https://trac.webkit.org/changeset/240001>
WebKit Commit Bot
Comment 4 2019-01-15 13:47:59 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 5 2019-01-15 13:48:38 PST
Note You need to log in before you can comment on or make changes to this bug.