This is an archive of the discontinued LLVM Phabricator instance.

Add branch flag on branch instructions
ClosedPublic

Authored by lbianc on Dec 5 2017, 11:00 AM.

Details

Summary

Some branch patterns of PPC64 was missing the branch flag, impacting on LLDB execution.
The test case is the "next" command, which should stop on the next line, but without
this change, it continue executing as the "continue" command.

Diff Detail

Repository
rL LLVM

Event Timeline

lbianc created this revision.Dec 5 2017, 11:00 AM
nemanjai edited edge metadata.

I think it's fine to set the flag on the asm parser defs. They certainly are branches.

lib/Target/PowerPC/PPCInstrInfo.td
1291 ↗(On Diff #125578)

Why is this needed? This flag is set on line 1261.

4282 ↗(On Diff #125578)

Why not just set the isBranch flag here rather than repeating it in a number of places within this scope?

lbianc added inline comments.Dec 6 2017, 2:22 AM
lib/Target/PowerPC/PPCInstrInfo.td
1291 ↗(On Diff #125578)

Not needed here, didn't realize that parent was setting it. Will be removed.

4282 ↗(On Diff #125578)

Ok, moving I will move it to the parent, thanks!

lbianc updated this revision to Diff 125697.Dec 6 2017, 4:02 AM

Moving flag set to parent

Add the branch flat in the parent list, as all children need it.

nemanjai accepted this revision.Dec 8 2017, 1:49 PM

LGTM.

This revision is now accepted and ready to land.Dec 8 2017, 1:49 PM
lbianc marked an inline comment as done.Dec 11 2017, 2:16 AM

@nemanjai, I still don't have permissions for committing, so could you commit this?
Thanks!

@nemanjai, I still don't have permissions for committing, so could you commit this?
Thanks!

OK. I'm just in the middle of something until the end of the day. I'll commit it first thing tomorrow morning.

This revision was automatically updated to reflect the committed changes.
This comment was removed by lbianc.