Page MenuHomePhabricator

[X86][RTM] _xabort() should not have "noreturn" attribute
ClosedPublic

Authored by AsafBadouh on May 23 2016, 12:18 AM.

Details

Summary

calling to _xabort() outside RTM execution section should be "nop".

Simplify CFG check call with noreturn attribute and mark the rest of the block as "unreachable".

Diff Detail

Repository
rL LLVM

Event Timeline

AsafBadouh retitled this revision from to [X86][RTM] _xabort() should not have "noreturn" attribute.
AsafBadouh updated this object.
AsafBadouh added reviewers: aaboud, DavidKreitzer, igorb.
AsafBadouh set the repository for this revision to rL LLVM.
AsafBadouh added a subscriber: llvm-commits.
aaboud edited edge metadata.EditedMay 23 2016, 1:20 AM

Can you add a LIT test?
Like this one:

void f1();
void f2() {
  _xbegin();
  _xabort();
  f1();
}

And check that we are generating the call to f1;

AsafBadouh updated this revision to Diff 58075.May 23 2016, 1:37 AM
AsafBadouh edited edge metadata.

test added

DavidKreitzer edited edge metadata.May 23 2016, 5:51 AM

lgtm, Asaf.

This revision was automatically updated to reflect the committed changes.