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

Should I be able to pass nullptr for ExitBlocks into CloneIntoFunction() and CreateHelper()? #14

Closed
VictorYing opened this issue Aug 31, 2017 · 1 comment

Comments

@VictorYing
Copy link
Contributor

VictorYing commented Aug 31, 2017

I'm in the process of merging all the changes that have been made in Tapir's master since March into my Swarm compiler project, and I notice special handling of exit blocks that might have something to do with C++ exceptions was added in late April. In particular, I notice CloneIntoFunction() and CreateHelper() now have an ExitBlocks argument, which defaults to nullptr in the declaration in include/llvm/Transforms/Tapir/Outline.h. However, CloneIntoFunction() always tries to dereference it at the start of the function, without checking if it is null:
https://github.com/wsmoses/Parallel-IR/blob/ce8d1893a0e20842b28ab7561b8e8c6c3e1a051c/lib/Transforms/Tapir/Outline.cpp#L95
so using the default value of nullptr just causes errors. It seems to me that either:
1.) CloneIntoFunction() should check if ExitBlocks is null before dereferencing it, or
2.) The ExitBlocks argument must be non-null, so the default value of nullptr should be removed, perhaps replaced with defaulting to an empty set instead.

I have implemented option 1 in my repo, and would be interested in seeing a similar change in Tapir's master to keep the diff between my repo and Tapir small.

VictorYing added a commit to VictorYing/Tapir-LLVM that referenced this issue Aug 31, 2017
Solving more of the same problem as in issue wsmoses#14.
wsmoses pushed a commit that referenced this issue Sep 3, 2017
wsmoses pushed a commit that referenced this issue Sep 3, 2017
Solving more of the same problem as in issue #14.
wsmoses pushed a commit that referenced this issue Sep 3, 2017
wsmoses pushed a commit that referenced this issue Sep 3, 2017
Solving more of the same problem as in issue #14.
neboat pushed a commit that referenced this issue Mar 24, 2018
neboat pushed a commit that referenced this issue Mar 24, 2018
Solving more of the same problem as in issue #14.
stelleg pushed a commit to stelleg/Tapir-LLVM that referenced this issue Dec 19, 2018
stelleg pushed a commit to stelleg/Tapir-LLVM that referenced this issue Dec 19, 2018
Solving more of the same problem as in issue wsmoses#14.
stelleg pushed a commit to stelleg/Tapir-LLVM that referenced this issue Dec 20, 2018
stelleg pushed a commit to stelleg/Tapir-LLVM that referenced this issue Dec 20, 2018
Solving more of the same problem as in issue wsmoses#14.
stelleg pushed a commit to stelleg/Tapir-LLVM that referenced this issue Dec 20, 2018
stelleg pushed a commit to stelleg/Tapir-LLVM that referenced this issue Dec 20, 2018
Solving more of the same problem as in issue wsmoses#14.
stelleg pushed a commit to stelleg/Tapir-LLVM that referenced this issue Jan 12, 2019
stelleg pushed a commit to stelleg/Tapir-LLVM that referenced this issue Jan 12, 2019
Solving more of the same problem as in issue wsmoses#14.
This was referenced Jan 31, 2019
stelleg pushed a commit to stelleg/Tapir-LLVM that referenced this issue Mar 14, 2019
stelleg pushed a commit to stelleg/Tapir-LLVM that referenced this issue Mar 14, 2019
Solving more of the same problem as in issue wsmoses#14.
stelleg pushed a commit to stelleg/Tapir-LLVM that referenced this issue May 9, 2019
stelleg pushed a commit to stelleg/Tapir-LLVM that referenced this issue May 9, 2019
Solving more of the same problem as in issue wsmoses#14.
stelleg pushed a commit to stelleg/Tapir-LLVM that referenced this issue May 17, 2019
stelleg pushed a commit to stelleg/Tapir-LLVM that referenced this issue May 17, 2019
Solving more of the same problem as in issue wsmoses#14.
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

No branches or pull requests

2 participants