SuccessChanges

Summary

  1. CrashRecoveryContextCleanup - fix uninitialized variable warnings. NFCI. (details)
  2. Obj2YamlError - fix uninitialized variable warning. NFCI. (details)
  3. TimeTraceProfiler - fix uninitialized variable warning. NFCI. (details)
  4. PODSmallVector - fix uninitialized variable warnings. NFCI. (details)
  5. [LVI] Normalize pointer behavior (details)
  6. Adapt LLDB to clang API change in ObjCMethodDecl::create(). (details)
Commit 24d507f4468a361ced298f1880485cebef8424a8 by llvm-dev
CrashRecoveryContextCleanup - fix uninitialized variable warnings. NFCI.
Remove default values from constructor.
The file was modifiedllvm/include/llvm/Support/CrashRecoveryContext.h
Commit 66f63d18e1d08dd7364f2c267264b7103673cde6 by llvm-dev
Obj2YamlError - fix uninitialized variable warning. NFCI.
The file was modifiedllvm/tools/obj2yaml/Error.h
Commit abe9dd4e58d28c0d456fb61559ada1403c49c86b by llvm-dev
TimeTraceProfiler - fix uninitialized variable warning. NFCI.
The file was modifiedllvm/lib/Support/TimeProfiler.cpp
Commit 1471a7ddeed030eff707942c8687ebd32456d1ae by llvm-dev
PODSmallVector - fix uninitialized variable warnings. NFCI.
The file was modifiedllvm/include/llvm/Demangle/ItaniumDemangle.h
Commit 15bc4dc9a8949f9cffd46ec647baf0818d28fb28 by nikita.ppv
[LVI] Normalize pointer behavior
Related to D69686. As noted there, LVI currently behaves differently for
integer and pointer values: For integers, the block value is always
valid inside the basic block, while for pointers it is only valid at the
end of the basic block. I believe the integer behavior is the correct
one, and CVP relies on it via its getConstantRange() uses.
The reason for the special pointer behavior is that LVI checks whether a
pointer is dereferenced in a given basic block and marks it as non-null
in that case. Of course, this information is valid only after the
dereferencing instruction, or in conservative approximation, at the end
of the block.
This patch changes the treatment of dereferencability: Instead of
including it inside the block value, we instead treat it as something
similar to an assume (it essentially is a non-nullness assume) and
incorporate this information in
intersectAssumeOrGuardBlockValueConstantRange() if the context
instruction is the terminator of the basic block. This happens either
when determining an edge-value internally in LVI, or when a terminator
was explicitly passed to getValueAt(). The latter case makes this change
not fully NFC, because we can now fold terminator icmps based on the
dereferencability information in the same block. This is the reason why
I changed one JumpThreading test
(it would optimize the condition away without the change).
Of course, we do not want to recompute dereferencability on each
intersectAssume call, so we need a new cache for this. The
dereferencability analysis requires walking the entire basic block and
computing underlying objects of all memory operands. This was previously
done separately for each queried pointer value. In the new
implementation (both because this makes the caching simpler, and because
it is faster), I instead only walk the full BB once and cache all the
dereferenced pointers. So the traversal is now performed only once per
BB, instead of once per queried pointer value.
I think the overall model now makes more sense than before, and there
will be no more pitfalls due to differing integer/pointer behavior.
Differential Revision: https://reviews.llvm.org/D69914
The file was modifiedllvm/lib/Analysis/LazyValueInfo.cpp
The file was modifiedllvm/test/Transforms/JumpThreading/combine-metadata.ll
Commit 454acae97ca4ad25cac582afe66c616ad46e4dd1 by Adrian Prantl
Adapt LLDB to clang API change in ObjCMethodDecl::create().
The file was modifiedlldb/source/Symbol/ClangASTContext.cpp
The file was modifiedlldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp