This is an archive of the discontinued LLVM Phabricator instance.

Better fix for PR27903.
ClosedPublic

Authored by thanm on May 27 2016, 11:06 AM.

Details

Summary

Re-enable lifetime-start-on-first-use for stack coloring,
but explicitly disable it for slots with more than one start
lifetime marker.

Bug: 27903

Diff Detail

Repository
rL LLVM

Event Timeline

thanm updated this revision to Diff 58814.May 27 2016, 11:06 AM
thanm retitled this revision from to Better fix for PR27903..
thanm updated this object.
thanm added reviewers: wmi, tejohnson, qcolombet, gbiv.
thanm added a subscriber: llvm-commits.
wmi added inline comments.May 27 2016, 1:22 PM
lib/CodeGen/StackColoring.cpp
563 ↗(On Diff #58814)

It may be a stupid question. I am wondering is it possible for one slot to have one Lifetime_start and two Livetime_end? Could it be more safe to use NumEndLifetimes[] > 1 as the condition to fall back?

thanm added inline comments.Jun 1 2016, 9:40 AM
lib/CodeGen/StackColoring.cpp
563 ↗(On Diff #58814)

I think you're right, this could come up. I will post a revised patch that checks both start and end counts.

I experimented a bit with trying to assert in cases where there is a mismatch (end with no start, for example) but eventually gave up (there are number of tests written with imbalanced lifetime markers already).

thanm updated this revision to Diff 59239.Jun 1 2016, 9:41 AM

Incorporate code review suggestions from Wei.

wmi accepted this revision.Jun 1 2016, 10:28 AM
wmi edited edge metadata.
This revision is now accepted and ready to land.Jun 1 2016, 10:28 AM
This revision was automatically updated to reflect the committed changes.