Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • This project
    • Loading...
  • Sign in / Register
S
swiftshader
  • 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
  • swiftshader
  • Repository

Switch branch/tag
  • swiftshader
  • src
  • Reactor
  • SubzeroReactor.cpp
Find file
BlameHistoryPermalink
  • Antonio Maiorano's avatar
    Subzero: fix CoroutineBegin generation · 22d73d15
    Antonio Maiorano authored Mar 20, 2020
    Rework how instructions are injected at the top of the CoroutineBegin
    function by getting rid of replaceEntryNode, which attempted to replace
    the entry node with a non-entry one. This seemed to work on all targets,
    except for Windows x86-32 (Win32) when passing enough arguments to
    Coroutines. In this case, it would crash in the code generated right
    after this injected code. It looks like the code in replaceEntryNode is
    not quite right, resulting in Subzero creating needless stack allocs per
    argument, and ultimately generating invalid offsets from the stack
    pointer.
    
    Instead of fixing replaceEntryNode, I now simply remember the entryNode
    for CoroutineBegin to use, adding the rest to a separate node for
    basicBlock, and when finalizing the function, I connect entryNode to the
    initial basicBlock node via a branch. This way, there is not messing
    around with function's node list.
    
    This not only fixes the crash, but gets rid of the needless stack
    allocs per arg.
    
    Bug: angleproject:4482
    Change-Id: I13f9c8c43ee07f35302208d9876e6fbdf0b1ad26
    Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/42608
    Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
    Tested-by: 's avatarAntonio Maiorano <amaiorano@google.com>
    Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
    22d73d15
SubzeroReactor.cpp 141 KB
EditWeb IDE
×

Replace SubzeroReactor.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.