Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CoreCLR personality function and EH table emission #43

Merged
merged 2 commits into from
Jun 8, 2015

Conversation

JosephTremoulet
Copy link
Contributor

This is a PR for changes going into the newly-created EH branch. The purpose is to park the changes-so-far based on the soon-to-be-abandoned WinEH approach of using Itanium-style IR paired with funclet outlining in WinEHPrepare. Support will be reworked when the new IR representation lands. I'm going to shift focus to aspects of EH that are independent of the impending rewrite (e.g. filter function outlining). Putting these changes here lets anyone curious see where things are/were heading and provide feedback, and lets me park similar changes dependent on this in the EH branch of LLILC.

For callers that have the name of the personality routine but not a
corresponding Value.
@JosephTremoulet JosephTremoulet force-pushed the EmitCatch branch 2 times, most recently from 1fe215b to a90e211 Compare June 5, 2015 20:47
@JosephTremoulet
Copy link
Contributor Author

Something along the lines of emitCLRExceptionTable (which emits the extra xdata after unwind infos consumed by dotnet/llilc#606) is likely to stick, as is adding the CLR entry in classifyEHPersonality. The rest (most of which reconstructs the handler tree from the eh.actions left behind by outlining) will likely be redone when the IR is changed and the outliner removed.

assert(isa<CleanupHandler>(Action));
Current->CatchType = 0;
} else {
assert(isa<Operator>(TheCatchHandler->getSelector()) && "Expected IntToPtr(handkerToken)");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

handker --> handler

@AndyAyersMS
Copy link
Member

LGTM, just a few small notes.

Processing happens in two stages (as for other WinEH personalities):
 - FunctionLoweringInfo::set computes the parent relation on handler
   actions.  ClrEHFuncInfo is added to MachineModuleInfo to facilitate
   this.
 - WinException::endFunction reports funclet begin/end offsets in .xdata
   after unwind info, and reports EH clauses after the final funclet's
   unwind info.

Note: this is a provisional change to facilitate exploring exception
handling in LLILC, and will need to be reworked when LLVM's EH
representation is changed for Windows-style targets  -- see
http://thread.gmane.org/gmane.comp.compilers.llvm.devel/85783
@JosephTremoulet
Copy link
Contributor Author

Updated as suggested; merging into EH branch.

JosephTremoulet added a commit that referenced this pull request Jun 8, 2015
Add CoreCLR personality function and EH table emission
@JosephTremoulet JosephTremoulet merged commit 598ecbd into microsoft:EH Jun 8, 2015
@JosephTremoulet JosephTremoulet deleted the EmitCatch branch June 8, 2015 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants