This is an archive of the discontinued LLVM Phabricator instance.

[CodeExtractor] Fix sinking of allocas with multiple bitcast uses (PR42451)
ClosedPublic

Authored by vsk on Jul 9 2019, 6:21 PM.

Details

Summary

An alloca which can be sunk into the extraction region may have more
than one bitcast use. Move these uses along with the alloca to prevent
use-before-def.

Testing: check-llvm, stage2 build of clang

Fixes llvm.org/PR42451.

Diff Detail

Repository
rL LLVM

Event Timeline

vsk created this revision.Jul 9 2019, 6:21 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 9 2019, 6:21 PM
Herald added a subscriber: hiraditya. · View Herald Transcript

Is it possible to split the patch into a NFC refactoring and one functional change?

llvm/lib/Transforms/Utils/CodeExtractor.cpp
413 ↗(On Diff #208858)

Add a comment for the function.

vsk updated this revision to Diff 208868.Jul 9 2019, 7:43 PM
vsk edited the summary of this revision. (Show Details)
  • Rebase on an NFC refactoring: D64467
davidxl accepted this revision.Jul 10 2019, 8:42 AM

lgtm

This revision is now accepted and ready to land.Jul 10 2019, 8:42 AM
This revision was automatically updated to reflect the committed changes.