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

llc -enable-eh moves invoke calls out of the eh region #1782

Closed
llvmbot opened this issue May 10, 2007 · 7 comments
Closed

llc -enable-eh moves invoke calls out of the eh region #1782

llvmbot opened this issue May 10, 2007 · 7 comments
Assignees
Labels
bugzilla Issues migrated from bugzilla

Comments

@llvmbot
Copy link
Collaborator

llvmbot commented May 10, 2007

Bugzilla Link 1410
Resolution FIXED
Resolved on Feb 22, 2010 12:45
Version unspecified
OS Linux
Blocks #1242
Attachments testcase
Reporter LLVM Bugzilla Contributor
CC @asl

Extended Description

$ llvm-as eh5.ll
$ llc -enable-eh eh5.bc

Inspect eh5.s to see that the first two invokes
of @​__gnat_rcheck_07 have been moved out of line,
and out of any eh region!

@llvmbot
Copy link
Collaborator Author

llvmbot commented May 10, 2007

assigned to @asl

@asl
Copy link
Collaborator

asl commented May 10, 2007

The reason of such "bad" thing is that current EH implementation doesn't support
landing pads with multiple predecessors! :)

@asl
Copy link
Collaborator

asl commented May 11, 2007

I hope this fixes the bug:

http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070507/049489.html
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070507/049488.html

Duncan, could you plase verify? And if everything is ok, close the bug.

@llvmbot
Copy link
Collaborator Author

llvmbot commented May 11, 2007

Additional fix
The code currently wrongly assumes that "TType base offset" and
"Call-site table length" take up one byte. This patch fixes that.
The trickiest bit is that the amount of alignment to insert before
the ttypes depends on the size of TType base offset, while
TType base offset depends on the amount of alignment. Oops!
Gcc's except.c does a loop in which the offset is updated based on
the alignment, the alignment is recalculated, rinse and repeat, until
it stabilizes the offset and alignment stop changing their values.
I hope they proved that this always converges! I've taken a different
approach which is much simpler: rather than placing alignment padding
between the actions and the ttypes, I add some padding at the start of
the table instead, before LPStart format. This avoids the mutual
dependence problem altogether.

@llvmbot
Copy link
Collaborator Author

llvmbot commented May 13, 2007

The original failing code now works, so let's consider this fixed.

@lattner
Copy link
Collaborator

lattner commented Nov 27, 2021

mentioned in issue #1242

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 3, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla
Projects
None yet
Development

No branches or pull requests

3 participants