OSDN Git Service

[ScheduleDAGInstrs] fix behavior of getUnderlyingObjectsForCodeGen when no identifiab...
authorHiroshi Inoue <inouehrs@jp.ibm.com>
Thu, 12 Oct 2017 06:26:04 +0000 (06:26 +0000)
committerHiroshi Inoue <inouehrs@jp.ibm.com>
Thu, 12 Oct 2017 06:26:04 +0000 (06:26 +0000)
commit0f48afc62263f61d37aa9f4fee5a35dead456ea5
tree0ffb26d072dbf024618a1e73c560462454ddb8a7
parentf799d906ab66d40da8918620145f9c326784e7f6
[ScheduleDAGInstrs] fix behavior of getUnderlyingObjectsForCodeGen when no identifiable object found

This patch fixes the bug introduced in https://reviews.llvm.org/D35907; the bug is reported by http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20171002/491452.html.

Before D35907, when GetUnderlyingObjects fails to find an identifiable object, allMMOsOkay lambda in getUnderlyingObjectsForInstr returns false and Objects vector is cleared. This behavior is unintentionally changed by D35907.

This patch makes the behavior for such case same as the previous behavior.
Since D35907 introduced a wrapper function getUnderlyingObjectsForCodeGen around GetUnderlyingObjects, getUnderlyingObjectsForCodeGen is modified to return a boolean value to ask the caller to clear the Objects vector.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315565 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/ValueTracking.h
lib/Analysis/ValueTracking.cpp
lib/CodeGen/ScheduleDAGInstrs.cpp