Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

Preserve nonnull metadata on Loads through SROA & mem2reg. #68

Merged

Conversation

luqmana
Copy link
Member

@luqmana luqmana commented Mar 28, 2017

LLVM patch for rust-lang/rust#37945

Cherry pick https://reviews.llvm.org/D27114 (llvm-mirror/llvm@2b66aee).

I had to include a previous commit (llvm-mirror/llvm@ee836b9) since I used a method not in our fork. Though, slightly modified since it didn't cleanly apply to our fork.

The only difference between it and the original is updating the fallthrough comment to LLVM_FALLTHROUGH (https://gist.github.com/luqmana/2715c077a8a91158a74f1fb9ece40eb0)

david-xl and others added 2 commits March 28, 2017 11:21
Summary:
https://llvm.org/bugs/show_bug.cgi?id=31142 :

SROA was dropping the nonnull metadata on loads from allocas that got optimized out. This patch simply preserves nonnull metadata on loads through SROA and mem2reg.

Reviewers: chandlerc, efriedma

Reviewed By: efriedma

Subscribers: hfinkel, spatel, efriedma, arielb1, davide, llvm-commits

Differential Revision: https://reviews.llvm.org/D27114

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298540 91177308-0d34-0410-b5e6-96231b3b80d8
@alexcrichton alexcrichton merged commit 2e83dcc into rust-lang:rust-llvm-2016-10-29 Mar 29, 2017
@TimNN TimNN mentioned this pull request Apr 17, 2017
5 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants