Skip to content

Conversation

@vedantk
Copy link

@vedantk vedantk commented Feb 10, 2020

If the return block is unreachable, clang removes it in
CodeGenFunction::FinishFunction(). This removal can leave dangling
references to values defined in the return block if the return block has
successors, which it /would/ if UBSan's return value check is emitted.

In this case, as the UBSan check wouldn't be reachable, it's better to
simply not emit it.

rdar://59196131
(cherry picked from commit 65f0785)

If the return block is unreachable, clang removes it in
CodeGenFunction::FinishFunction(). This removal can leave dangling
references to values defined in the return block if the return block has
successors, which it /would/ if UBSan's return value check is emitted.

In this case, as the UBSan check wouldn't be reachable, it's better to
simply not emit it.

rdar://59196131
(cherry picked from commit 65f0785)
@vedantk vedantk requested a review from epilk February 10, 2020 21:40
Copy link

@epilk epilk left a comment

Choose a reason for hiding this comment

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

LGTM!

@vedantk
Copy link
Author

vedantk commented Feb 10, 2020

@swift-ci test macOS

@vedantk
Copy link
Author

vedantk commented Feb 10, 2020

@shahmishal I noticed this was aborted. Is it safe to re-request testing now?

@shahmishal
Copy link
Member

Yes, sorry I had to restart Jenkins.

@vedantk
Copy link
Author

vedantk commented Feb 10, 2020

Np, thanks.

@swift-ci test macOS

@vedantk vedantk merged commit 10caba1 into swiftlang:apple/stable/20190619 Feb 11, 2020
swift-ci pushed a commit that referenced this pull request Jul 20, 2022
This patch adds a new function mlirDenseElementsAttrFloat16Get(),
which accepts the shaped type, the number of Float16 values, and a
pointer to an array of Float16 values, each of which is a uint16_t
value.

This commit is repeating https://reviews.llvm.org/D123981 + #761 but for Float16

Differential Revision: https://reviews.llvm.org/D130069
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.

3 participants