diff options
author | Tilmann Scheller <t.scheller@samsung.com> | 2015-11-20 19:17:10 +0000 |
---|---|---|
committer | Tilmann Scheller <t.scheller@samsung.com> | 2015-11-20 19:17:10 +0000 |
commit | 925b193eed58459894e9f443fe1ba0b225c276ca (patch) | |
tree | c9502bfc9f5e3d9f10f88e0e73ec57bead40b46e /llvm/lib/Transforms/IPO/FunctionAttrs.cpp | |
parent | a731829788542d4b9591c34478a0c8caf7a11760 (diff) | |
download | llvm-925b193eed58459894e9f443fe1ba0b225c276ca.zip llvm-925b193eed58459894e9f443fe1ba0b225c276ca.tar.gz llvm-925b193eed58459894e9f443fe1ba0b225c276ca.tar.bz2 |
Revert "[FunctionAttrs] Remove redundant assignment."
This reverts r253661.
Turns out that the assignment is not redundant (despite the Clang static analyzer claiming the opposite).
The variable is being used by the lambda function AddUsersToWorklistIfCapturing().
llvm-svn: 253696
Diffstat (limited to 'llvm/lib/Transforms/IPO/FunctionAttrs.cpp')
-rw-r--r-- | llvm/lib/Transforms/IPO/FunctionAttrs.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/IPO/FunctionAttrs.cpp b/llvm/lib/Transforms/IPO/FunctionAttrs.cpp index 9c33f99..e699c5e 100644 --- a/llvm/lib/Transforms/IPO/FunctionAttrs.cpp +++ b/llvm/lib/Transforms/IPO/FunctionAttrs.cpp @@ -486,6 +486,8 @@ determinePointerReadAttrs(Argument *A, return Attribute::None; } + Captures &= !CS.doesNotCapture(UseIndex); + // Since the optimizer (by design) cannot see the data flow corresponding // to a operand bundle use, these cannot participate in the optimistic SCC // analysis. Instead, we model the operand bundle uses as arguments in |