OSDN Git Service

[InstCombine] Factor the logic for propagating !nonnull and !range
authorChandler Carruth <chandlerc@gmail.com>
Mon, 26 Jun 2017 03:31:31 +0000 (03:31 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Mon, 26 Jun 2017 03:31:31 +0000 (03:31 +0000)
commit5a057dc8edbb63887f8c611dd8ddf1b76997f07c
tree40bbb4c3364d0fb18106a49f15318364b29f59ef
parent92c7507eee3afde0495e53abd7305bd73973f775
[InstCombine] Factor the logic for propagating !nonnull and !range
metadata out of InstCombine and into helpers.

NFC, this just exposes the logic used by InstCombine when propagating
metadata from one load instruction to another. The plan is to use this
in SROA to address PR32902.

If anyone has better ideas about how to factor this or name variables,
I'm all ears, but this seemed like a pretty good start and lets us make
progress on the PR.

This is based on a patch by Ariel Ben-Yehuda (D34285).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306267 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Transforms/Utils/Local.h
lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
lib/Transforms/Utils/Local.cpp