LLVM/llvm 351620compiler-rt/trunk/lib/hwasan hwasan_poisoning.cc hwasan.cc, compiler-rt/trunk/lib/sanitizer_common sanitizer_linux.h

[hwasan] Madvise away unused shadow.

Whenever a large shadow region is tagged to zero, madvise(DONT_NEED)
as much of it as possible.

This reduces shadow RSS on Android by 45% or so, and total memory use
by 2-4%, probably even more on long running multithreaded programs.
CPU time seems to be in the noise.

Reviewers: kcc, pcc

Subscribers: srhines, kubamracek, llvm-commits

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

LLVM/llvm 351619llvm/trunk/lib/CodeGen CodeGenPrepare.cpp, llvm/trunk/test/Transforms/CodeGenPrepare/X86 sink-addrmode-cse-inttoptrs.ll

Revert "Reapply "[CGP] Check for existing inttotpr before creating new one""

This reverts commit r351618.

Compiler RT + ASAN tests are failing for PowerPC. Not sure
how would I reproduce these on macOS, so reverting (again)
until I do.

LLVM/llvm 351618llvm/trunk/lib/CodeGen CodeGenPrepare.cpp, llvm/trunk/test/Transforms/CodeGenPrepare/X86 sink-addrmode-cse-inttoptrs.ll

Reapply "[CGP] Check for existing inttotpr before creating new one"

Original commit: r351582

LLVM/llvm 351617llvm/trunk/lib/CodeGen MachineVerifier.cpp, llvm/trunk/test/CodeGen/MIR/AArch64 invalid-extload.mir

Revert r351584: "GlobalISel: Verify g_zextload and g_sextload"

This new assertion triggered on the AArch64 GlobalISel bots. Reverting while it's being 

LLVM/llvm 351616llvm/trunk/include/llvm/Target TargetCallingConv.td, llvm/trunk/lib/Target/X86 X86CallingConv.cpp X86CallingConv.h

[X86] Deduplicate static calling convention helpers for code size, NFC

Right now we include ${TGT}GenCallingConv.inc once per each instruction
selection method implemented by ${TGT}:
- ${TGT}ISelLowering.cpp
- ${TGT}CallLowering.cpp
- ${TGT}FastISel.cpp

Instead, add a mechanism to tablegen for marking a particular convention
as "External", which causes tablegen to emit into the ::llvm namespace,
instead of as a static helper. This allows us to provide a header to
forward declare it, so we can simply call the function from all the
places it is referenced. Typically the calling convention analyzer is
called indirectly, so it doesn't benefit from inlining.

This saves a bit of final binary size, but mostly just saves object file

before  after   diff   artifact
12852K  12492K  -360K  X86ISelLowering.cpp.obj
4640K   4280K   -360K  X86FastISel.cpp.obj
1704K   2092K   +388K  X86CallingConv.cpp.obj
52448K  52336K  -112K  llc.exe

    [12 lines not shown]

LLVM/llvm 351615llvm/trunk/test CMakeLists.txt lit.cfg.py, llvm/trunk/utils/gn TODO.txt

Use llvm_canonicalize_cmake_booleans for LLVM_LIBXML2_ENABLED [llvm]

r291284 added a nice mechanism to consistently pass CMake on/off toggles to
lit. This change uses it for LLVM_LIBXML2_ENABLED too (which was added around
the same time and doesn't use the new system yet).

Also alphabetically sort the list passed to llvm_canonicalize_cmake_booleans()
in llvm/test/CMakeLists.txt.

No intended behavior change.

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

LLVM/llvm 351614lld/trunk/test lit.cfg.py CMakeLists.txt

Use llvm_canonicalize_cmake_booleans for LLVM_LIBXML2_ENABLED [lld]

r291284 added a nice mechanism to consistently pass CMake on/off toggles to
lit. This change uses it for LLVM_LIBXML2_ENABLED too (which was added around
the same time and doesn't use the new system yet).

No intended behavior change.

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

LLVM/llvm 351613llvm/trunk/include/llvm/Support FileOutputBuffer.h, llvm/trunk/lib/Support FileOutputBuffer.cpp

Remove F_modify flag from FileOutputBuffer.

This code is dead. There is no use of the feature in the entire LLVM codebase.

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

LLVM/llvm 351612lld/trunk/ELF SyntheticSections.cpp

[lld] Use range-based llvm::sort

LLVM/llvm 351611lldb/trunk/packages/Python/lldbsuite/test lldbtest.py

[dotest] Add logging to investigate CI issue.

We're seeing an odd issue on GreenDragon's lldb-cmake-matrix. Dotest is
unable to move a log file (OSError: [Errno 2] No such file or
directory). The os.rename call is guarded with a check that the source
file and destination directory exist.

This wraps the call in a try-except that prints the source and
destination path to see which component seemingly doesn't exist.

LLVM/llvm 351610cfe/trunk/lib/StaticAnalyzer/Core ExprEngineCXX.cpp, cfe/trunk/test/Analysis cfg.cpp unions.cpp

[analyzer] pr37688: Fix a crash upon evaluating a deleted destructor of a union.

Add a defensive check against an invalid destructor in the CFG.

Unions with fields with destructors have their own destructor implicitly
deleted. Due to a bug in the CFG we're still trying to evaluate them
at the end of the object's lifetime and crash because we are unable
to find the destructor's declaration.


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

LLVM/llvm 351609cfe/trunk/lib/Analysis BodyFarm.cpp, cfe/trunk/test/Analysis properties.m

[analyzer] Do not try to body-farm Objective-C properties with custom accessors.

If a property is defined with a custom getter, we should not behave as if
the getter simply returns an instance variable. We don't support setters,
so they aren't affected.

On top of being the right thing to do, this also fixes a crash on
the newly added test - in which a property and its getter are defined
in two separate categories.


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

LLVM/llvm 351608www/trunk/foundation/relicensing index.html

Add another company that I mised in my triage here.

LLVM/llvm 351607compiler-rt/trunk/lib/safestack safestack_platform.h safestack.cc

[safestack] Add ThreadId type as uint64_t

Reviewers: krytarowski, eugenis

Subscribers: llvm-commits

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

LLVM/llvm 351606cfe/trunk/test/AST ast-dump-undeserialized.cpp

[ASTDump] Add test for current AST dump behavior

LLVM/llvm 351605cfe/trunk/lib/AST ASTDumper.cpp

[ASTDump] NFC: Move variable into if() statement

LLVM/llvm 351604cfe/trunk/lib/AST ASTDumper.cpp

[ASTDump] NFC: Remove redundant condition

These conditions are duplicated from the dumpDeclContext function called
within the if(). This is presumably an attempt to avoid calling the
function in the case it will do nothing.

That may have made sense in the past if the code was different, but it
doesn't make sense now.

LLVM/llvm 351603cfe/trunk/lib/AST ASTDumper.cpp

[ASTDump] NFC: Remove non-needed braces

LLVM/llvm 351602www/trunk/foundation/relicensing index.html

Add several more companies that have signed.

LLVM/llvm 351601cfe/trunk/lib/AST ASTDumper.cpp

[ASTDump] Mark null params with a tag rather than a child node

Reviewers: aaron.ballman

Subscribers: cfe-commits

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

LLVM/llvm 351600cfe/trunk/lib/AST ASTDumper.cpp, cfe/trunk/test/AST ast-dump-decl.mm

[ASTDump] Mark BlockDecls which capture this with a tag

Removal of the child node makes it easier to separate traversal from
output generation.

Reviewers: aaron.ballman

Subscribers: cfe-commits

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

LLVM/llvm 351599llvm/trunk/lib/Target/AMDGPU AMDGPULegalizerInfo.cpp, llvm/trunk/test/CodeGen/AMDGPU/GlobalISel legalize-select.mir regbankselect-select.mir

AMDGPU/GlobalISel: Legalize more types for select

LLVM/llvm 351598llvm/trunk/lib/CodeGen CodeGenPrepare.cpp, llvm/trunk/test/Transforms/CodeGenPrepare/X86 sink-addrmode-cse-inttoptrs.ll

Revert "[CGP] Check for existing inttotpr before creating new one"

This reverts commit r351582.

Bots are failing. Reverting this to fix and re-commit later.

LLVM/llvm 351597cfe/trunk/lib/AST ASTDumper.cpp TextNodeDumper.cpp, cfe/trunk/test/AST ast-dump-decl.m

[ASTDump] Mark variadic declarations with a tag instead of child node

This makes it easier to separate traversal of the AST from output

Reviewers: aaron.ballman

Subscribers: cfe-commits

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

LLVM/llvm 351596llvm/trunk/lib/Target/AMDGPU AMDGPULegalizerInfo.cpp, llvm/trunk/test/CodeGen/AMDGPU/GlobalISel legalize-constant.mir legalize-fconstant.mir

AMDGPU/GlobalISel: Legalize illegal g_constant

LLVM/llvm 351595cfe/trunk/lib/Sema SemaDecl.cpp, cfe/trunk/test/Sema fixed-enum.c

[Sema] Suppress a warning about a forward-declared fixed enum in C mode

As of r343360, we support fixed-enums in C. This lead to some
warnings in project headers where a fixed enum is forward declared
then later defined. In C++, this is fine, the forward declaration is
treated as a complete type even though the definition isn't present.
We use this rule in C too, but still warn about the forward
declaration anyways. This patch suppresses the warning.


Differential revision: https://reviews.llvm.org/D56879

LLVM/llvm 351594llvm/trunk/lib/CodeGen MachineVerifier.cpp, llvm/trunk/test/CodeGen/AArch64/GlobalISel legalize-simple.mir

GlobalISel: Verify G_BITCAST

LLVM/llvm 351593cfe/trunk/include/clang/Basic FixedPoint.h, cfe/trunk/lib/AST ExprConstant.cpp

[Fixed Point Arithmetic] Fixed Point Addition Constant Expression Evaluation

This patch includes logic for constant expression evaluation of fixed point additions.

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

LLVM/llvm 351592llvm/trunk/test/tools/llvm-elfabi binary-read-neededlibs.test binary-read-neededlibs-bad-offset.test, llvm/trunk/tools/llvm-elfabi ELFObjHandler.cpp

[elfabi] Add support for reading DT_NEEDED from binaries

This patch gives elfabi the ability to read DT_NEEDED entries from ELF binaries
to populate NeededLibs in TextAPI's ELFStub.

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

LLVM/llvm 351591llvm/trunk/lib/CodeGen MachineVerifier.cpp, llvm/trunk/test/Verifier test_g_fcmp.mir test_g_icmp.mir

GlobalISel: Verify G_ICMP/G_FCMP vector types

LLVM/llvm 351590llvm/trunk/test/CodeGen/X86 bitcast-and-setcc-256.ll

[x86] add more movmsk tests; NFC

The existing tests already show a sub-optimal transform,
but this should make it clear that we can't just match
an 'and' op when creating movmsk instructions.

LLVM/llvm 351589llvm/trunk/test/ThinLTO/X86 cfi-devirt.ll

Make ThinLTO test run single threaded to try to avoid flakiness

To see if this helps flaky bot failures in PR40351.

LLVM/llvm 351588cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker RetainCountDiagnostics.cpp

Fix MSVC "not all control paths return a value" warning. NFCI.

LLVM/llvm 351587libunwind/trunk/src Unwind-sjlj.c

[SjLj] Don't use __declspec(thread) in MinGW mode

GCC and Clang in MinGW mode don't support __declspec(thread), which
after expanding macros ends up as __attribute__((thread)). Use the
GCC specific attribute __thread instead (the next one in the chain
of alternatives).

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

LLVM/llvm 351586llvm/trunk/lib/Target/AMDGPU AMDGPUIntrinsicInfo.cpp AMDGPUIntrinsicInfo.h

AMDGPU: Remove llvm.SI.load.const

It's taken 3 years, but now all of the old AMDGPU and SI intrinsics
are finally gone

LLVM/llvm 351585lldb/trunk/lldb.xcodeproj project.pbxproj

Add BreakpadRecords to the Xcode project.

LLVM/llvm 351584llvm/trunk/lib/CodeGen MachineVerifier.cpp, llvm/trunk/test/CodeGen/MIR/AArch64 invalid-extload.mir

GlobalISel: Verify g_zextload and g_sextload

LLVM/llvm 351583llvm/trunk/lib/Target/X86 X86IntrinsicsInfo.h X86ISelLowering.cpp

[X86] Lower avx512f scatter intrinsics to X86MaskedScatterSDNode instead of going directly 
to MachineSDNode.

This sends these intrinsics through isel in a much more normal way. This should allow 
addressing mode matching in isel to make better use of the displacement field.

LLVM/llvm 351582llvm/trunk/lib/CodeGen CodeGenPrepare.cpp, llvm/trunk/test/Transforms/CodeGenPrepare/X86 sink-addrmode-cse-inttoptrs.ll

[CGP] Check for existing inttotpr before creating new one

Make sure CodeGenPrepare doesn't emit multiple inttoptr instructions of
the same integer value while sinking address computations, but rather
CSEs them on the fly: excessive inttoptr's confuse SCEV into thinking
that related pointers have nothing to do with each other.

This problem blocks LoadStoreVectorizer from vectorizing some of the
loads / stores in a downstream target.

Reviewed By: hfinkel

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

LLVM/llvm 351581llvm/trunk/include/llvm/CodeGen SelectionDAG.h, llvm/trunk/lib/CodeGen/SelectionDAG SelectionDAGDumper.cpp SDNodeDbgValue.h

[SelectionDAG] Updates for -dag-dump-verbose

This patch makes some changes related to -dag-dump-verbose.
Main use case has been when debugging how SelectionDAG is
dealing with debug info (SDDbgValue nodes).

1) We now print the number of DbgValues that are mapped to each
2) Removed duplicated printing of DebugLoc (nowadays DebugLoc is
   printed also when not using -dag-dump-verbose).
3) Renamed SDDbgValue::dump to SDDbgValue::print, and added a
   new SDDbgValue::dump that will start a new line after calling
4) SDDbgValue::print now prints "Order", and it also prints
   some additional information when kind is CONST/FRAMEIX/VREG.
5) SelectionDAG::dump() now dumps all SDDbgValue nodes after
   the list of SDNodes (both "regular" and "ByVal" SDDbgValue:s).
   Invalidated nodes are not printed.
6) Prohibit inline printing of SDNode operands that has SDDbgValue
   nodes associated to them.

Reviewers: jmorse, aprantl

Reviewed By: aprantl

    [4 lines not shown]

LLVM/llvm 351580cfe/trunk/docs OpenMPSupport.rst ReleaseNotes.rst

[OPENMP][DOCS] Release notes/OpenMP support updates, NFC.

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

LLVM/llvm 351579cfe/trunk/include/clang/Driver Options.td, cfe/trunk/lib/Driver/ToolChains Clang.cpp

[mips] Add '-mrelax-pic-calls', '-mno-relax-pic-calls'

These two options enable/disable emission of R_{MICRO}MIPS_JALR fixups along
with PIC calls. The linker may then try to turn PIC calls into direct jumps.
By default, these fixups do get emitted by the backend, use
'-mno-relax-pic-calls' to omit them.

Differential revision: https://reviews.llvm.org/D56878

LLVM/llvm 351578clang-tools-extra/branches/google stable, clang-tools-extra/tags/google/stable 2019-01-18

Creating branches/google/stable and tags/google/stable/2019-01-18 from r351319

LLVM/llvm 351577llvm/trunk/lib/MC MCWin64EH.cpp

Fix the buildbot issue introduced by r351421

The EXPENSIVE_CHECK x86_64 Windows buildbot is failing due to this change. Fix
the map access.

LLVM/llvm 351576cfe/trunk/lib/AST ASTContext.cpp

[NFC] Fix wParentheses warning in ASTContext getFixedPointSemantics

Change-Id: I862f00a548236872fe24f7da8eb2bf7917e123ff

LLVM/llvm 351575cfe/trunk/lib/StaticAnalyzer/Checkers/RetainCountChecker RetainCountChecker.cpp RetainCountDiagnostics.cpp, cfe/trunk/test/Analysis osobject-retain-release.cpp os_smart_ptr.h

Revert "Fix failing MSan bots"

This reverts commit 2cedaaef383d8d6142046074ffebc2bb5a914778.

Revert with a fix.

LLVM/llvm 351574llvm/trunk/lib/CodeGen/GlobalISel LegalizerInfo.cpp

[GlobalISel] Change to range-based invocation of llvm::sort

LLVM/llvm 351573cfe/trunk/lib/Format Format.cpp

[clang] Change to range-based invocation of llvm::sort

LLVM/llvm 351572llvm/trunk/include/llvm/ADT Twine.h, llvm/trunk/include/llvm/IR IRBuilder.h

[adt] Twine(nullptr) derefs the nullptr. Add a deleted Twine(std::nullptr_t)

nullptr can implicitly convert to Twine as Twine(nullptr) in which case it
resolves to Twine(const char *). This constructor derefs the pointer and
therefore doesn't work. Add a Twine(std::nullptr_t) = delete to make it a
compile time error.

It turns out that in-tree usage of Twine(nullptr) is confined to a single
private method in IRBuilder where foldConstant(... const Twine &Name = nullptr)
and this method is only ever called with an explicit Name argument as making it
a mandatory argument doesn't cause compile-time or run-time errors.

Reviewers: jyknight

Reviewed By: jyknight

Subscribers: dexonsmith, kristina, llvm-commits

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

LLVM/llvm 351571llvm/trunk/lib/CodeGen/SelectionDAG DAGCombiner.cpp

[SelectionDAG] Split very large token factors for chained stores to 64k chunks.

Similar to D55073. Without this change, the DAG combiner crashes on code
with more than 64k of stores in a single basic block that form parallelizable

No test case, as it would be very IR file.

Reviewed By: RKSimon

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