Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • This project
    • Loading...
  • Sign in / Register
A
angle
  • Project
    • Overview
    • Details
    • Activity
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Chen Yisong
  • angle
  • Repository

Switch branch/tag
  • angle
  • src
  • compiler
  • translator
  • UnfoldShortCircuitToIf.cpp
Find file
BlameHistoryPermalink
  • Olli Etuaho's avatar
    Unfold short-circuiting operators in loop conditions correctly · 3fed4306
    Olli Etuaho authored Nov 02, 2015
    Sometimes short-circuiting operators need to be unfolded to if
    statements. If the unfolded operator is inside a loop condition or
    expression, it needs to be evaluated repeatedly inside the loop. Add
    logic to UnfoldShortCircuitToIf that can move or copy the unfolded part
    of loop conditions or expressions to inside the loop.
    
    The exact changes that need to be done depend on the type of the loop.
    For loops may require also moving the initializer to outside the loop.
    
    The unfolded expression inside a loop condition or expression is moved
    or copied to inside the loop on the first traversal of the loop node,
    and unfolding to if is deferred until a second traversal. This keeps the
    code relatively simple.
    
    BUG=angleproject:1167
    TEST=WebGL 2 conformance tests,
         dEQP-GLES2.functional.shaders.*select_iteration_count*
    
    Change-Id: Ieffc0ea858186054378d387dca9aa64a5fa95137
    Reviewed-on: https://chromium-review.googlesource.com/310230Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org>
    Reviewed-by: 's avatarZhenyao Mo <zmo@chromium.org>
    Tested-by: 's avatarOlli Etuaho <oetuaho@nvidia.com>
    3fed4306
UnfoldShortCircuitToIf.cpp 13.6 KB
EditWeb IDE
×

Replace UnfoldShortCircuitToIf.cpp

Attach a file by drag & drop or click to upload


Cancel
A new branch will be created in your fork and a new merge request will be started.