This is an archive of the discontinued LLVM Phabricator instance.

Fix PR33028
ClosedPublic

Authored by hliao on May 14 2017, 2:24 AM.

Details

Summary
  • '-verify-machineinstrs' complains allocatable live-in on MBB which is not entry or landing-pad.
  • Previous implementation relies on the live-in to model the hardware behavior updating EAX when fallback code path is taken in the following CFG:
thisMBB
 |   \
 |   mainMBB
 |   /
sinkMBB
The new implementation needs to create an explicit MBB and a pseudo
instruction to model that behavior in the following CFG so that we won't have
EAX as live-in:
    thisMBB
     /   \
fallMBB  mainMBB
     \   /
     sinkMBB

Diff Detail

Repository
rL LLVM

Event Timeline

hliao created this revision.May 14 2017, 2:24 AM
hliao edited the summary of this revision. (Show Details)
RKSimon edited edge metadata.May 14 2017, 3:27 AM

Thank you for looking at this.

Please can you regenerate the diff with context?

Also, please add -verify-machineinstrs to the test cmds in rtm.ll

hliao updated this revision to Diff 98915.May 14 2017, 3:30 AM

new patch is updated

hliao removed a reviewer: llvm-commits.
hliao added a subscriber: llvm-commits.

Please can you regenerate the diff with context?

hliao updated this revision to Diff 99243.May 16 2017, 9:53 PM
hliao updated this revision to Diff 99244.May 16 2017, 9:57 PM
hliao updated this revision to Diff 99245.May 16 2017, 10:02 PM

patch is updated following review page by running 'svn diff --diff-cmd=diff -x -U999999'

I think this is sound, but I'm not an expert on any of this. Any other comments?

lib/Target/X86/X86ISelLowering.cpp
24758 ↗(On Diff #99245)

Isn't this comment for fallMBB now?

hliao updated this revision to Diff 99320.May 17 2017, 9:22 AM

I updated the comment following the fix made by this change. If there's no other comments, I will commit it. If any one has objection, please let me know ASAP.

hliao marked an inline comment as done.May 17 2017, 9:23 AM
hliao added inline comments.
lib/Target/X86/X86ISelLowering.cpp
24758 ↗(On Diff #99245)

comment is revised

This revision is now accepted and ready to land.May 17 2017, 10:41 AM
This revision was automatically updated to reflect the committed changes.
hliao marked an inline comment as done.