LLVM/llvm 306686lldb/trunk/source/Host/macosx Symbols.cpp, lldb/trunk/source/Plugins/SymbolVendor/MacOSX SymbolVendorMacOSX.cpp

Fix Mac build for the Timer move

LLVM/llvm 306685llvm/trunk/lib/Target/BPF BPFISelDAGToDAG.cpp, llvm/trunk/test/CodeGen/BPF remove_truncate_1.ll remove_truncate_2.ll

bpf: remove unnecessary truncate operation

For networking-type bpf program, it often needs to access
packet data. A context data structure is provided to the bpf
programs with two fields:
        u32 data;
        u32 data_end;
User can access these two fields with ctx->data and ctx->data_end.
During program verification process, the kernel verifier modifies
the bpf program with loading of actual pointer value from kernel
data structure.
    r = ctx->data      ===> r = actual data start ptr
    r = ctx->data_end  ===> r = actual data end ptr

A typical program accessing ctx->data like
    char *data_ptr = (char *)(long)ctx->data
will result in a 32-bit load followed by a zero extension.
Such an operation is combined into a single LDW in DAG combiner
as bpf LDW does zero extension automatically.

In cases like the below (which can be a result of global value numbering
and partial redundancy elimination before insn selection):
   u32 a = load-32-bit &ctx->data
   u64 pa = zext a

    [27 lines not shown]

LLVM/llvm 306684llvm/trunk/test/CodeGen/ARM thumb2-it-block.ll long-setcc.ll, llvm/trunk/test/CodeGen/Thumb long-setcc.ll

[NFC] Use stdin for some tests instead of positional argument.

Summary: Otherwise unexpected matches with the path to the tests might happen.

Reviewers: rengolin, spatel, efriedma, RKSimon

Reviewed By: spatel

Subscribers: n.bozhenov, javed.absar, llvm-commits

Patch by Andrei Elovikov <andrei.elovikov at intel.com>

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

LLVM/llvm 306683lldb/trunk/packages/Python/lldbsuite/test/functionalities/return-value TestReturnValue.py, lldb/trunk/packages/Python/lldbsuite/test/make Android.rules

Android.rules: build x86 tests with -mstackrealign

All android builds systems have switched to -mstackrealign for building
x86 binaries, so follow their cue with our mini build system.

This presently breaks just one test (TestReturnValue), and this is due
to a compiler bug, which has already been fixed in clang, but it hasn't
made it yet into the official NDK compiler. While I'm touching that
test, I also remove an android-specific XFAIL, which is not relevant

LLVM/llvm 306682lldb/trunk/include/lldb/Core Timer.h, lldb/trunk/include/lldb/Utility Timer.h

Move Timer and TraceOptions from Core to Utility

The classes have no dependencies, and they are used both by lldb and
lldb-server, so it makes sense for them to live in the lowest layers.

Reviewers: zturner, jingham

Subscribers: emaste, mgorny, lldb-commits

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

LLVM/llvm 306681llvm/trunk/test/Transforms/InstCombine memset.ll

Restore original intent of memset instcombine test

The original intent of test/Transforms/InstCombine/memset.ll was to test for lowering of 
llvm.memset into stores when the size of the memset is 1, 2, 4, or 8. Sometime between 
then and now the test has stopped testing for that, but remained passing due to testing 
for the absence of llvm.memset calls rather than the presence of store instructions. Right 
now this test ends up with an empty function body because the alloca is eliminated as 
safe-to-remove, which results in the llvm.memset calls's being eliminated due to their 
pointer args being undef; so it is not testing for conversion of llvm.memset into store 
instructions at all.

This change alters the test to verify that store instructions are created, and moves the 
target of the memset to an arg of the proc to avoid it being eliminated as unused.

Reviewers: anna, efriedma

Reviewed By: efriedma

Subscribers: efriedma, llvm-commits

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

LLVM/llvm 306680cfe/trunk/include/clang/AST NSAPI.h

Fix NSAPI constants to reflect the current state of
NSStringMethodKind/NSDictionaryMethodKind enums

Patch by Vladimir Voskresensky!

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

LLVM/llvm 306679llvm/trunk/test/Transforms/InstCombine memmove.ll

Explicitly check for presence of correct results in instcombine memmove test

Rather than testing for expected results, test/Transforms/InstCombine/memmove.ll is 
testing for the absence of calls to llvm.memmove.

In the case of test3, the test has stopped testing for materialization of loads/stores, 
but remained passing due to testing for the absence of llvm.memset calls rather than the 
presence of load/store instructions. Right now this test ends up with an empty function 
body because the alloca is eliminated as safe-to-remove, which results in the llvm.memmove 
calls being eliminated due to a pointer arg being undef; so it is not testing for 
conversion of llvm.memmove into load/store instructions at all.

Reviewers: eli.friedman, anna, efriedma

Reviewed By: efriedma

Subscribers: efriedma, llvm-commits

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

LLVM/llvm 306678llvm/trunk/lib/Target/PowerPC PPCTLSDynamicCall.cpp PPCTargetMachine.cpp, llvm/trunk/test/CodeGen/PowerPC tls_get_addr_fence1.mir tls_get_addr_fence2.mir

[PowerPC] fix potential verification error on __tls_get_addr

This patch fixes a verification error with -verify-machineinstrs while expanding 
__tls_get_addr by not creating ADJCALLSTACKUP and ADJCALLSTACKDOWN if there is another 
ADJCALLSTACKUP in this basic block since nesting ADJCALLSTACKUP/ADJCALLSTACKDOWN is not 

Here, ADJCALLSTACKUP and ADJCALLSTACKDOWN are created as a fence for instruction 
scheduling to avoid _tls_get_addr is scheduled before mflr in the prologue 
(https://bugs.llvm.org//show_bug.cgi?id=25839). So if another ADJCALLSTACKUP exists before 
_tls_get_addr, we do not need to create a new ADJCALLSTACKUP.

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

LLVM/llvm 306677llvm/trunk/lib/DebugInfo/DWARF DWARFContext.cpp

[DWARF] - Fix message reporting about broken relocation.

Because of mistake introduced in r306517,
wrong variable ("name" instead of "Name") was used
in error message.
As a result it reported section name instead of
relocation name.

This file still needs cleanup to match LLVM coding style
and more tests I think.

LLVM/llvm 306676llvm/trunk/lib/CodeGen MachineBasicBlock.cpp CFIInstrInserter.cpp, llvm/trunk/lib/Target/X86 X86FrameLowering.cpp

Revert "r306529 - [X86] Correct dwarf unwind information in function epilogue"

I am 99% sure that this breaks the PPC ASAN build bot:

If it doesn't go back to green, we can recommit (and fix the original
commit message at the same time :) ).

LLVM/llvm 306675llvm/trunk/lib/Analysis TypeBasedAliasAnalysis.cpp

[TBAA] Remove metadata keyword from IR examples in comments (NFC).

The metadata keyword has been removed from the IR.

LLVM/llvm 306674llvm/trunk/include/llvm/Analysis TargetTransformInfo.h TargetTransformInfoImpl.h, llvm/trunk/lib/Analysis TargetTransformInfo.cpp

[TargetTransformInfo, API] Add a list of operands to TTI::getUserCost

The changes are a result of discussion of https://reviews.llvm.org/D33685.
It solves the following problem:

1. We can inform getGEPCost about simplified indices to help it with
   calculating the cost. But getGEPCost does not take into account the
   context which GEPs are used in.
2. We have getUserCost which can take the context into account but we cannot
   inform about simplified indices.

With the changes getUserCost will have access to additional information
as getGEPCost has.

The one parameter getUserCost is also provided.

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

LLVM/llvm 306673cfe/trunk/lib/Basic Targets.cpp, cfe/trunk/test/Preprocessor predefined-arch-macros.c

[Clang][X86][Goldmont]Adding new target-cpu: Goldmont 

[Clang-side] Connecting the GoldMont processor to his feature.

1. igorb
2. delena
3. zvi

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

LLVM/llvm 306672cfe/trunk/lib/Format TokenAnnotator.cpp, cfe/trunk/unittests/Format FormatTestProto.cpp

[clang-format] Fix parsing of msg{field}-style proto options

This patch makes the `{` in `msg_field{field: OK}` in a proto option scope be
treated as an assignment operator. Previosly the added test case was formatted
option (MyProto.options) = {
  field_a: OK
  field_b{field_c: OK} field_d: OKOKOK field_e: OK

Reviewers: djasper

Reviewed By: djasper

Subscribers: klimek, cfe-commits

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

LLVM/llvm 306671llvm/trunk/include/llvm/Support Errno.h, llvm/trunk/lib/Support MemoryBuffer.cpp

Recommit "[Support] Add RetryAfterSignal helper function"

The difference from the previous version is the use of decltype, as the
implementation of std::result_of in libc++ did not work correctly for
variadic function like open(2).

Original summary:
This function retries an operation if it was interrupted by a signal
(failed with EINTR). It's inspired by the TEMP_FAILURE_RETRY macro in
glibc, but I've turned that into a template function. I've also added a
fail-value argument, to enable the function to be used with e.g.
fopen(3), which is documented to fail for any reason that open(2) can
fail (which includes EINTR).

The main user of this function will be lldb, but there were also a
couple of uses within llvm that I could simplify using this function.

Reviewers: zturner, silvas, joerg

Subscribers: mgorny, llvm-commits

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

LLVM/llvm 306670lnt/trunk MANIFEST.in

Fix MANIFEST.in file adding two missing entries.

These are required to correctly specify the files needed to distribute LNT as
redistributable Python source distribution.  If we don’t supply an explicit
list of files, packaging command puts a minimal default set of files into the
source distribution (omitting requirements.client.txt &
requirements.server.txt). Both .txt files store pinned versions of dependencies
for LNT client and server.

Patch by Przemysław Wirkus.
Differential Revision: https://reviews.llvm.org/D34617

LLVM/llvm 306669lldb/trunk/scripts analyze-project-deps.py

Make scripts/analyze-project-deps.py executable

LLVM/llvm 306668lldb/trunk/unittests/Utility StructuredDataTest.cpp, lldb/trunk/unittests/Utility/Helpers MockTildeExpressionResolver.cpp MockTildeExpressionResolver.h

[unittests] Add a helper function for getting an input file

Fetching an input file required about five lines of code, and this was
repeated in multiple unit tests, with slight variations. Add a helper
function for doing that into the lldbUtilityMocks module (which I rename
to lldbUtilityHelpers to commemorate the fact it includes more than

Reviewers: zturner, eugene

Subscribers: emaste, mgorny, lldb-commits

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

LLVM/llvm 306667polly/trunk/include/polly ScopInfo.h, polly/trunk/include/polly/Support ScopHelper.h

[ScopInfo] Do not use ScopStmt in Domain derivation of ScopInfo. NFC

ScopStmts were being used in the computation of the Domain of the SCoPs
in ScopInfo. Once statements are split, there will not be a 1-to-1
correspondence between Stmts and Basic blocks. Thus this patch avoids
the use of getStmtFor() by creating a map of BB to InvalidDomain and
using it to compute the domain of the statements.

Contributed-by: Nanidini Singhal <cs15mtech01004 at iith.ac.in>

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

LLVM/llvm 306666lldb/trunk/source/Plugins/UnwindAssembly/x86 x86AssemblyInspectionEngine.cpp x86AssemblyInspectionEngine.h, lldb/trunk/unittests/UnwindAssembly/x86 Testx86AssemblyInspectionEngine.cpp

[UnwindAssembly/x86] Add support for "lea imm(%ebp), %esp" pattern

The instruction pattern:
and $-16, %esp
sub $imm, %esp
lea imm(%ebp), %esp

appears when the compiler is realigning the stack (for example in
main(), or almost everywhere with -mstackrealign switch). The "and"
instruction is very difficult to model, but that's not necessary, as
these frames are always %ebp-based (the compiler also needs a way to
restore the original %esp). Therefore the plans we were generating for
these function were almost correct already. The only place we were doing
it wrong were the last instructions of the epilogue (usually just
"ret"), where we had to revert to %esp-based unwinding, as the %ebp had
been popped already.

This was wrong because our "distance of esp from cfa" counter had picked
up the "sub" instruction (and incremented the counter) but it had not
seen that the register was reset by the "lea" instruction.

This patch fixes that shortcoming, and adds a test for handling
functions like this.

    [10 lines not shown]

LLVM/llvm 306665llvm/trunk/lib/Target/X86 X86InstructionSelector.cpp, llvm/trunk/test/CodeGen/X86/GlobalISel select-merge-vec512.mir select-merge-vec256.mir

[GlobalISel][X86] Support vector type G_MERGE_VALUES selection.

Support vector type G_MERGE_VALUES selection. For now G_MERGE_VALUES marked as legal for 
any type, so nothing to do in legalizer.
Split from https://reviews.llvm.org/D33665

Reviewers: qcolombet, t.p.northover, zvi, guyblank

Reviewed By: guyblank

Subscribers: rovka, kristof.beyls, guyblank, llvm-commits

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

LLVM/llvm 306664llvm/trunk/test/CodeGen/X86 palignr.ll

[X86][SSE] Dropped -mcpu from palignr tests

Use triple and attribute only for consistency 

Add AVX tests as well

LLVM/llvm 306663llvm/trunk/test/CodeGen/X86 lower-vec-shuffle-bug.ll

[X86][SSE] Regenerate shuffle test with update_llc_test_checks.py

LLVM/llvm 306662llvm/trunk/test/CodeGen/X86 lower-vec-shift.ll

[X86][SSE] Dropped -mcpu from vector shift tests

Use triple and attribute only for consistency 

LLVM/llvm 306661llvm/trunk/test/CodeGen/X86 insertelement-zero.ll

[X86][SSE] Dropped -mcpu from zero insertion tests

Use triple and attribute only for consistency 

LLVM/llvm 306660cfe/trunk/lib/Sema SemaType.cpp, cfe/trunk/test/SemaOpenCL function-no-args.cl invalid-pipes-cl2.0.cl

Revert r306653, "[OpenCL] Allow function declaration with empty argument list."

It broke bots.

LLVM/llvm 306659cfe/trunk/lib/Tooling CompilationDatabase.cpp, cfe/trunk/unittests/Tooling CompilationDatabaseTest.cpp

[Tooling] FixedCompilationDatabase should be able to strip positional
arguments when `-fsyntax-only` is used

Previously, Clang failed to create a fixed compilation database when the
compilation arguments use -fsyntax-only instead of -c. This commit fixes the
issue by forcing Clang to look at the compilation job when stripping the
positional arguments.

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

LLVM/llvm 306658llvm/trunk/lib/Support Host.cpp, llvm/trunk/lib/Target/X86 X86.td X86Subtarget.h

[LLVM][X86][Goldmont] Adding new target-cpu: Goldmont

Connecting the GoldMont processor to his feature.

1. igorb
2. zvi
3. delena
4. RKSimon
5. craig.topper        

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

LLVM/llvm 306657llvm/trunk/include/llvm/Analysis RegionIterator.h, polly/trunk/lib/External CMakeLists.txt

Test commit

LLVM/llvm 306656clang-tools-extra/trunk/unittests/clangd ClangdTests.cpp

[clangd] Run a test, searching for gcc install, only on Unix.

This should fix windows buildbots.

LLVM/llvm 306655llvm/trunk/lib/Transforms/Vectorize SLPVectorizer.cpp

[SLPVectorizer] Introducing getTreeEntry() helper function [NFC]

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

LLVM/llvm 306654llvm/trunk/lib/Target/ARM ARMInstrThumb.td ARMRegisterInfo.td, llvm/trunk/test/CodeGen/ARM jump-table-tbh.ll

[ARM] Add tGPRwithpc register class and use it for TBB/THH

TBB and THH allow using a Thumb GPR or the PC as destination operand.
A few machine verifier failures where due to those instructions not
expecting PC as destination operand.

Add -verify-machineinstrs to test/CodeGen/ARM/jump-table-tbh.ll to add
test coverage even if expensive checks are disabled.

Reviewers: MatzeB, t.p.northover, jmolloy

Reviewed By: MatzeB

Subscribers: aemerson, javed.absar, kristof.beyls, llvm-commits

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

LLVM/llvm 306653cfe/trunk/lib/Sema SemaType.cpp, cfe/trunk/test/SemaOpenCL function-no-args.cl invalid-pipes-cl2.0.cl

[OpenCL] Allow function declaration with empty argument list.

does it make sense to enable K&R function declaration style for OpenCL?
clang throws following error message for the declaration w/o arguments:

int my_func();
error: function with no prototype cannot use the spir_function calling convention

Current way to fix this issue is to specify that parameter list is empty by using 'void':

int my_func(void);

Let me know what do you think about this patch.

Reviewers: Anastasia, yaxunl

Reviewed By: Anastasia

Subscribers: cfe-commits, echuraev

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

LLVM/llvm 306652clang-tools-extra/trunk/unittests/clangd ClangdTests.cpp

[clangd] Added a test, checking that gcc install is searched via VFS.

Reviewers: bkramer, krasimir, klimek

Reviewed By: klimek

Subscribers: klimek, cfe-commits

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

LLVM/llvm 306651clang-tools-extra/trunk/clang-tidy/modernize UseNullptrCheck.cpp, clang-tools-extra/trunk/test/clang-tidy modernize-use-nullptr.cpp

[clang-tidy] Fix modernize-use-nullptr only warns the first NULL argument.

Reviewers: alexfh

Reviewed By: alexfh

Subscribers: xazax.hun, cfe-commits

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

LLVM/llvm 306650clang-tools-extra/trunk/docs/clang-tidy/checks misc-definitions-in-headers.rst, clang-tools-extra/trunk/test/clang-tidy check_clang_tidy.py misc-definitions-in-headers.hpp

[clang-tidy] follow-up on misc-definitions-in-header check.

A follow-up on D34449:
* add `-std=c++11` to `.hpp` file by default.
* add constexpr function to test and doc.

Reviewers: alexfh

Reviewed By: alexfh

Subscribers: JDevlieghere, xazax.hun, cfe-commits

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

LLVM/llvm 306649polly/trunk/lib/Support RegisterPasses.cpp

Initializing NVPTX backend within Polly

The NVPTX backend is now initialised within Polly. A language front-end need not be 
modified to initialise the backend, just for Polly.

Reviewers: Meinersbur, grosser

Reviewed By: Meinersbur

Subscribers: vchuravy, mgorny

Tags: #polly

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

LLVM/llvm 306648cfe/trunk/include/clang/Basic SourceManager.h, cfe/trunk/lib/Basic SourceManager.cpp

Factor out a functionality from isBeforeInTranslationUnit

The first user of this API will be the cross translation unit
functionality of the Static Analyzer which will be committed in a
follow-up patch. 

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

LLVM/llvm 306647llvm/trunk/lib/BinaryFormat Magic.cpp

[BinaryFormat] Identify AArch64 COFF files

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

LLVM/llvm 306646llvm/trunk/test/CodeGen/X86 vector-shuffle-512-v8.ll vector-shuffle-512-v16.ll

[X86] Adding shuffle tests demonstrating missed vcompress opportunities. NFC

LLVM/llvm 306645zorg/trunk/buildbot/osuosl/master/config slaves.py

Limited number of builds for slave ps4-buildslave1.

LLVM/llvm 306644compiler-rt/trunk/lib/lsan lsan_allocator.cc lsan_interceptors.cc, compiler-rt/trunk/test/lsan/TestCases allocator_returns_null.cc

Revert "[LSan] Make LSan allocator allocator_may_return_null compliant"

This reverts commit r306624.

The committed test failed on various bots (e.g. on green dragon).

LLVM/llvm 306643llvm/trunk/utils/lit/lit util.py, llvm/trunk/utils/lit/lit/formats googletest.py

[lit] Re-apply: Fix some convoluted logic around Unicode encoding, and de-duplicate across 
modules that used it.

(Take 2: this patch re-applies r306625, which was reverted in r306629. This
patch includes only trivial fixes.)

In Python2 and Python3, the various (non-)?Unicode string types are sort of
spaghetti. Python2 has unicode support tacked on via the 'unicode' type, which
is distinct from 'str' (which are bytes). Python3 takes the "unicode-everywhere"
approach, with 'str' representing a Unicode string.

Both have a 'bytes' type. In Python3, it is the only way to represent raw bytes.
However, in Python2, 'bytes' is an alias for 'str'. This leads to interesting
problems when an interface requires a precise type, but has to run under both
Python2 and Python3.

The previous logic appeared to be correct in all cases, but went through more
layers of indirection than necessary. This change does the necessary conversions
in one shot, with documentation about which paths might be taken in Python2 or

Changes from r306625: some tests just print binary outputs, so in those cases,
fall back to str() in Python3. For googletests, add one missing call to

    [2 lines not shown]

LLVM/llvm 306641zorg/trunk/zorg/buildbot/builders/sanitizers buildbot_android_functions.sh

[asan] Fix unavailable device warning

LLVM/llvm 306642zorg/trunk/zorg/buildbot/builders/sanitizers buildbot_android.sh buildbot_android_functions.sh

[asan] Fix Android architectures

LLVM/llvm 306640zorg/trunk/buildbot/osuosl/master/config slaves.py

Updated slave properties for ps4-buildslave1.

LLVM/llvm 306639zorg/trunk/buildbot/osuosl/master/config builders.py slaves.py

Moved builders clang-with-lto-ubuntu, clang-with-thin-lto-ubuntu, 
llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast to Ubuntu 16.04 LTS.

LLVM/llvm 306638zorg/trunk/zorg/buildbot/builders/sanitizers buildbot_android.sh

[asan] Fix USER and HOME vars

LLVM/llvm 306637zorg/trunk/zorg/buildbot/builders/sanitizers buildbot_android_functions.sh

[asan] Report missing Android devices as warning