This is an archive of the discontinued LLVM Phabricator instance.

[WinEH] Add a funclet layout pass
ClosedPublic

Authored by majnemer on Sep 17 2015, 1:30 PM.

Details

Summary

Windows EH funclets need to be contiguous. The FuncletLayout pass will
ensure that the funclets are together and begin with a funclet entry MBB.

Diff Detail

Event Timeline

majnemer updated this revision to Diff 35030.Sep 17 2015, 1:30 PM
majnemer retitled this revision from to [WinEH] Add a funclet layout pass.
majnemer updated this object.
majnemer added a reviewer: rnk.
majnemer added a subscriber: llvm-commits.
rnk accepted this revision.Sep 17 2015, 1:35 PM
rnk edited edge metadata.

lgtm

lib/CodeGen/FuncletLayout.cpp
69

You can do:

if (!F.getMMI().hasEHFunclets())
  return false;
72

MBB.isEHFuncletEntry()

76

Now you can assert !empty

test/CodeGen/X86/funclet-layout.ll
31

s/is contains/contains/

32

Maybe throw in

CHECK-LABEL: _f:
34
CHECK: retl
35

ditto

This revision is now accepted and ready to land.Sep 17 2015, 1:35 PM
This revision was automatically updated to reflect the committed changes.