HomePhabricator

[CodeGen] Fix order of PHINode and MA Write generation.

Authored by Meinersbur on May 20 2019, 3:31 PM.

Description

[CodeGen] Fix order of PHINode and MA Write generation.

At the end of a region statement, the PHINode must be generated
while the current IRBuilder's block is the region's exit node. For
obvious reasons: The PHINode references the region's exiting block.
A partial write would insert new control flow, i.e. insert new basic
blocks between the exiting blocks and the current block.

We fix this by generating the PHI nodes (region exit values) before
generating any MemoryAccess's stores.

This should fix the AOSP buildbot.

Reported-by: Eli Friedman <efriedma@quicinc.com>
llvm-svn: 361204

Details

Committed
MeinersburMay 20 2019, 3:31 PM
Parents
rG28e351af2ad2: [ORC] fix use-after-move. NFC
Branches
Unknown
Tags
Unknown