1. [InstCombine] Precommit umul.with.overflow sign check test. (details)
  2. [Support] Check for atomics64 when deciding if '-latomic'  is needed (details)
  3. [lldb][NFC] Make all CompilerDeclContext parameters references instead of pointers (details)
  4. [lldb][NFC] Document TypeSystemClang (details)
  5. [InstCombine] Simplify a umul overflow check to a != 0 && b != 0. (details)
Commit b0866f61c127e27855b88873503cbcd5c2e49212 by flo
[InstCombine] Precommit umul.with.overflow sign check test.

Precommit tests for D74141.
The file was addedllvm/test/Transforms/InstCombine/umul-sign-check.ll
Commit d4a4a32cd94eccbaaa4608b0daac8b820e041214 by luismarques
[Support] Check for atomics64 when deciding if '-latomic'  is needed

The CheckAtomic module performs two tests to determine if passing
'-latomic' to the linker is required: one for 64-bit atomics, and
another for non-64-bit atomics. Include the missing check for 64-bit

Reviewers: beanz, compnerd
Reviewed By: beanz, compnerd
Tags: #llvm
Differential Revision:
The file was modifiedllvm/lib/Support/CMakeLists.txt
Commit f9568a95493aea3ea813bd37cb8c084ec4294e38 by Raphael Isemann
[lldb][NFC] Make all CompilerDeclContext parameters references instead of pointers

All of our lookup APIs either use `CompilerDeclContext &` or `CompilerDeclContext *` semi-randomly it seems.
This leads to us constantly converting between those two types (and doing nullptr checks when going from
pointer to reference). It also leads to the confusing situation where we have two possible ways to express
that we don't have a CompilerDeclContex: either a nullptr or an invalid CompilerDeclContext (aka a default
constructed CompilerDeclContext).

This moves all APIs to use references and gets rid of all the nullptr checks and conversions.

Reviewers: labath, mib, shafik

Reviewed By: labath, shafik

Subscribers: shafik, arphaman, abidh, JDevlieghere, lldb-commits

Tags: #lldb

Differential Revision:
The file was modifiedlldb/source/Core/ModuleList.cpp
The file was modifiedlldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
The file was modifiedlldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
The file was modifiedlldb/source/Expression/IRExecutionUnit.cpp
The file was modifiedlldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h
The file was modifiedlldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
The file was modifiedlldb/source/Plugins/InstrumentationRuntime/TSan/InstrumentationRuntimeTSan.cpp
The file was modifiedlldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
The file was modifiedlldb/source/API/SBModule.cpp
The file was modifiedlldb/source/Core/AddressResolverName.cpp
The file was modifiedlldb/tools/lldb-test/lldb-test.cpp
The file was modifiedlldb/source/Symbol/SymbolFile.cpp
The file was modifiedlldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h
The file was modifiedlldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
The file was modifiedlldb/source/Breakpoint/BreakpointResolverName.cpp
The file was modifiedlldb/include/lldb/Core/Module.h
The file was modifiedlldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
The file was modifiedlldb/source/Plugins/SymbolFile/DWARF/DWARFIndex.cpp
The file was modifiedlldb/source/Core/SourceManager.cpp
The file was modifiedlldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
The file was modifiedlldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
The file was modifiedlldb/source/Core/Module.cpp
The file was modifiedlldb/include/lldb/Symbol/SymbolFile.h
The file was modifiedlldb/source/Core/Disassembler.cpp
The file was modifiedlldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp
The file was modifiedlldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
The file was modifiedlldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h
The file was modifiedlldb/source/Commands/CommandObjectTarget.cpp
The file was modifiedlldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp
Commit 813ca53fdea130a23e302ea2afecaa5134def6db by Raphael Isemann
[lldb][NFC] Document TypeSystemClang
The file was modifiedlldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h
Commit 6c85e92bcf675bdd42e3658908b0d68b7dc44d53 by flo
[InstCombine] Simplify a umul overflow check to a != 0 && b != 0.

This patch adds a simplification if an OR weakens the overflow condition
for umul.with.overflow by treating any non-zero result as overflow. In that
case, we overflow if both umul.with.overflow operands are != 0, as in that
case the result can only be 0, iff the multiplication overflows.

Code like this is generated by code using __builtin_mul_overflow with
negative integer constants, e.g.
   bool test(unsigned long long v, unsigned long long *res) {
     return __builtin_mul_overflow(v, -4775807LL, res);

Name: D74141
  %res = umul_overflow {i8, i1} %a, %b
  %mul = extractvalue {i8, i1} %res, 0
  %overflow = extractvalue {i8, i1} %res, 1
  %cmp = icmp ne %mul, 0
  %ret = or i1 %overflow, %cmp
  ret i1 %ret
  %t0 = icmp ne i8 %a, 0
  %t1 = icmp ne i8 %b, 0
  %ret = and i1 %t0, %t1
  ret i1 %ret
  %res = umul_overflow {i8, i1} %a, %b
  %mul = extractvalue {i8, i1} %res, 0
  %cmp = icmp ne %mul, 0
  %overflow = extractvalue {i8, i1} %res, 1

Done: 1
Optimization is correct!


Reviewers: nikic, lebedev.ri, spatel, Bigcheese, dexonsmith, aemerson

Reviewed By: lebedev.ri

Differential Revision:
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
The file was modifiedllvm/test/Transforms/InstCombine/umul-sign-check.ll