LLVM/llvm 306497cfe/trunk/lib/Driver/ToolChains Clang.cpp

Remove a redundant call to ArgList::hasFlag. NFC.

LLVM/llvm 306496lld/trunk/test/ELF/linkerscript data-commands-gc.s

Check the produced file instead of stderr.

It is somewhat pointless to check that a specific error is not
produced. That is already checked by the ld.lld exit value.

Instead make the test a bit stronger by checking that the output file
has the expected symbol and section.

LLVM/llvm 306495llvm/trunk/lib/Transforms/Utils CloneFunction.cpp

Inlining: Don't re-map simplified cloned instructions.

When simplifying an instruction that has been re-mapped, it should never
simplify to an instruction in the original function. In the edge case
where we are inlining a function into itself, the existing code led to
incorrect behavior. Replace the incorrect code with an assert verifying
that we never expect simplification to produce an instruction in the old
function, unless the functions are the same.

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

LLVM/llvm 306494cfe/trunk/lib/CodeGen CGCall.cpp, cfe/trunk/test/CodeGenObjC parameterized_classes.m

[CodeGen] Fix assertion failure in EmitCallArg.

The assertion was failing when a method of a parameterized class was
called and the types of the argument and parameter didn't match. To fix
the failure, move the assertion in EmitCallArg to its only caller
EmitCallArgs and require the argument and parameter types match only
when the method is not parameterized.

rdar://problem/32874473

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

LLVM/llvm 306493compiler-rt/trunk/lib/asan asan_interceptors.cc

[asan] Fix windows build.

LLVM/llvm 306492llvm/trunk/utils/TableGen CodeGenSchedule.cpp SubtargetEmitter.cpp

[TableGen] Improve Debug Output for --debug-only=subtarget-emitter NFCI

Add headers for each section of output, with white space and "+++" to
improve readability.

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

LLVM/llvm 306491llvm/trunk/lib/Bitcode/Writer LLVMBuild.txt

Add missing library dependency.

LLVM/llvm 306490llvm/trunk/lib/Object COFFObjectFile.cpp, llvm/trunk/lib/Target/AArch64/MCTargetDesc AArch64WinCOFFObjectWriter.cpp AArch64WinCOFFStreamer.h

[COFF, ARM64] Add support for Windows ARM64 COFF format

Summary:
This is the llvm part of the initial implementation to support Windows ARM64 COFF format.
I will gradually add more functionality in subsequent patches.

Reviewers: ruiu, rnk, t.p.northover, compnerd

Reviewed By: ruiu, compnerd

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

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

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

[COFF, ARM64] Add support for Windows ARM64 COFF format

Summary: This is the clang part of the initial implementation to support Windows ARM64 
COFF format.

Reviewers: ruiu, t.p.northover, rnk, compnerd

Reviewed By: ruiu, compnerd

Subscribers: aemerson, kristof.beyls, cfe-commits, llvm-commits

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

LLVM/llvm 306488llvm/trunk/include/llvm/Bitcode BitcodeReader.h, llvm/trunk/include/llvm/Object IRSymtab.h

Object: Teach irsymtab::read() to try to use the irsymtab that we wrote to disk.

Fixes PR27551.

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

LLVM/llvm 306487llvm/trunk/include/llvm/Bitcode BitcodeWriter.h LLVMBitCodes.h, llvm/trunk/lib/Bitcode/Writer BitcodeWriter.cpp

Bitcode: Write the irsymtab to disk.

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

LLVM/llvm 306486llvm/trunk/include/llvm/Object IRSymtab.h, llvm/trunk/lib/Object IRSymtab.cpp

Object: Add version and producer fields to the irsymtab header. NFCI.

These will be necessary in order to handle upgrades from old bitcode
files.

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

LLVM/llvm 306485llvm/trunk/lib/CodeGen CodeGenPrepare.cpp, llvm/trunk/test/CodeGen/PowerPC memcmpIR.ll memcmp.ll

[CGP] add specialization for memcmp expansion with only one basic block

LLVM/llvm 306484llvm/trunk/lib/Analysis InlineCost.cpp, llvm/trunk/test/Transforms/Inline inline-cold-callsite.ll inline-cold-callsite-pgo.ll

[NewPM/Inliner] Reduce threshold for cold callsites in the non-PGO case

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

LLVM/llvm 306483cfe/trunk/bindings/python/clang cindex.py, cfe/trunk/bindings/python/tests test_exception_specification_kind.py

[libclang] Support for querying the exception specification type through libclang

Summary: This patch exposes the exception specification type (noexcept,
etc.) of a C++ function through libclang and Python clang.cindex.

Reviewers: rsmith, aaron.ballman

Reviewed By: aaron.ballman

Subscribers: jbcoe, cfe-commits

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

Patch by Andrew Bennieston

LLVM/llvm 306482compiler-rt/trunk/lib/asan asan_interceptors.cc, compiler-rt/trunk/lib/msan msan_interceptors.cc

[msan] Intercept wcscat, wcsncat.

Also move wcslen, wscnlen to common interceptors.

Reviewers: vitalybuka

Reviewed By: vitalybuka

Subscribers: kubamracek, llvm-commits

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

LLVM/llvm 306481llvm/trunk/lib/CodeGen/GlobalISel MachineIRBuilder.cpp

GlobalISel: add some more sanity-checking to MachineInstrBuilder. NFC.

LLVM/llvm 306480compiler-rt/trunk/lib/profile InstrProfilingFile.c

[Profile] Remove redundant call

LLVM/llvm 306479polly/trunk/lib/Exchange JSONExporter.cpp, polly/trunk/test/JSONExporter/ImportArrays ImportArrays-Negative-size.ll ImportArrays_Negative_Size___%for.cond1.preheader---%for.end18.jscop.transformed

[JSONImport] Check, if the size of an imported array is positive

LLVM/llvm 306478llvm/trunk/lib/Target/AArch64 AArch64TargetTransformInfo.cpp AArch64TargetTransformInfo.h, llvm/trunk/test/Transforms/Inline/AArch64 inline-target-attr.ll

[AArch64] Inline callee if its target-features are a subset of the caller

Summary:
Similar to X86, it should be safe to inline callees if their target-features
are a subset of the caller. This change matches GCC's inlining behavior
with respect to attributes [1].

[1] 
https://gcc.gnu.org/onlinedocs/gcc/AArch64-Function-Attributes.html#AArch64-Function-Attributes

Reviewers: kristof.beyls, javed.absar, rengolin, t.p.northover

Reviewed By: t.p.northover

Subscribers: aemerson, eraman, llvm-commits

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

LLVM/llvm 306477llvm/trunk/lib/Passes PassBuilder.cpp, llvm/trunk/lib/Transforms/IPO PassManagerBuilder.cpp

[EarlyCSE][MemorySSA] Enable MemorySSA in function-simplification pass of EarlyCSE.

LLVM/llvm 306476llvm/trunk/include/llvm/Analysis LoopInfo.h LoopInfoImpl.h

[Analysis] Revert r306472 changes in LoopInfo headers to fix broken builds.

LLVM/llvm 306475llvm/trunk/include/llvm/Target GenericOpcodes.td TargetOpcodes.def, llvm/trunk/include/llvm/Target/GlobalISel SelectionDAGCompat.td

[GISel]: Add G_FEXP, G_FEXP2 opcodes

Also add IRTranslator support.
https://reviews.llvm.org/D34710

LLVM/llvm 306474llvm/trunk/lib/Target/AArch64/MCTargetDesc AArch64ELFObjectWriter.cpp

clang-format a file.

It had a few inconsistent indentations that made a followup patch
hard to read.

LLVM/llvm 306473llvm/trunk/test/Transforms/LoopVectorize/AArch64 loop-vectorization-factors.ll reduction-small-size.ll, llvm/trunk/test/Transforms/LoopVectorize/ARM gcc-examples.ll

re-commit r306336: Enable vectorizer-maximize-bandwidth by default.

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

LLVM/llvm 306472llvm/trunk/include/llvm/Analysis RegionInfo.h LoopInfo.h, llvm/trunk/lib/Analysis RegionInfo.cpp

[Analysis] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; 
other minor fixes (NFC).

LLVM/llvm 306471llvm/trunk/lib/CodeGen CodeGenPrepare.cpp, llvm/trunk/test/CodeGen/PowerPC memcmpIR.ll memCmpUsedInZeroEqualityComparison.ll

[CGP] eliminate a sub instruction in memcmp expansion

As noted in D34071, there are some IR optimization opportunities that could be 
handled by normal IR passes if this expansion wasn't happening so late in CGP.

Regardless of that, it seems wasteful to knowingly produce suboptimal IR here, 
so I'm proposing this change:
  %s = sub i32 %x, %y
  %r = icmp ne %s, 0
    =>
  %r = icmp ne %x, %y

Changing the predicate to 'eq' mimics what InstCombine would do, so that's just
an efficiency improvement if we decide this expansion should happen sooner.

The fact that the PowerPC backend doesn't eliminate the 'subf.' might be 
something for PPC folks to investigate separately.

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

LLVM/llvm 306470llvm/trunk/lib/CodeGen/GlobalISel RegBankSelect.cpp MachineIRBuilder.cpp, llvm/trunk/test/CodeGen/AArch64/GlobalISel legalize-exceptions.ll

GlobalISel: verify that a COPY is trivial when created.

Without this check, COPY instructions can actually be one of the generic casts
in disguise. That's confusing and bad.

At some point during ISel this restriction has to be relaxed since the fully
selected instructions will usually use COPY for those purposes. Right now I
think it's possible that relaxation occurs during RegBankSelect (hence the
change there). I'm not convinced that's where it belongs long-term though.

LLVM/llvm 306469lldb/trunk/include/lldb lldb-enumerations.h

Upstream the 'eInstrumentationRuntimeTypeSwiftRuntimeReporting' value of the 
'eInstrumentationRuntimeType' enum from the swift-lldb project (to avoid potential 
clashes).

LLVM/llvm 306468llvm/trunk/test/Transforms/CodeExtractor BlockAddressSelfReference.ll

Clean up a test case

LLVM/llvm 306467cfe/trunk/include/clang/Basic AttrDocs.td DiagnosticSemaKinds.td, cfe/trunk/lib/Sema SemaDecl.cpp

[Sema] Allow unmarked overloadable functions.

This patch extends the `overloadable` attribute to allow for one
function with a given name to not be marked with the `overloadable`
attribute. The overload without the `overloadable` attribute will not
have its name mangled.

So, the following code is now legal:

  void foo(void) __attribute__((overloadable));
  void foo(int);
  void foo(float) __attribute__((overloadable));

In addition, this patch fixes a bug where we'd accept code with
`__attribute__((overloadable))` inconsistently applied. In other words,
we used to accept:

  void foo(void);
  void foo(void) __attribute__((overloadable));

But we will do this no longer, since it defeats the original purpose of
requiring `__attribute__((overloadable))` on all redeclarations of a
function.

This breakage seems to not be an issue in practice, since the only code

    [10 lines not shown]

LLVM/llvm 306466llvm/trunk/lib/CodeGen LiveRangeCalc.cpp, llvm/trunk/test/CodeGen/Hexagon regalloc-liveout-undef.mir

Create a PHI value when merging with a known undef live-in

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

LLVM/llvm 306465lld/trunk/test/COFF resource.test combined-resources.test, lld/trunk/test/COFF/Inputs combined-resources.rc combined-resources-2.rc

Add more stringent tests for the resource section of executables.

Summary: The testing on the resource section of executables produced by lld has been very 
lax, and allowed a major bug to go unnoticed when we switched from shelling out to 
cvtres.exe to using llvm's own library.  These additional tests should cover all the major 
failure points.

Reviewers: zturner, ruiu

Subscribers: llvm-commits

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

LLVM/llvm 306464llvm/trunk/test/tools/llvm-objdump/WebAssembly lit.local.cfg

[WebAssembly] Only run WebAssembly objdump tests if it is enabled as a target

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

LLVM/llvm 306463compiler-rt/trunk/lib CMakeLists.txt

Don't build tsan/dd when COMPILER_RT_HAS_TSAN is false

LLVM/llvm 306462llvm/trunk/lib/Target/AArch64 AArch64SchedThunderX2T99.td AArch64InstrInfo.td

[AArch64] Performance enhancements for Cavium ThunderX2 T99

This patch enables significant performance enhancements to the
Cavium ThunderX2T99 LLVM backend, as observed by running SPEC2K6,
by adding more detailed scheduling information.

Related Bugzilla bug: http://bugs.llvm.org/show_bug.cgi?id=32562

Patch by: steleman

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

LLVM/llvm 306461llvm/trunk/include/llvm/Object Wasm.h, llvm/trunk/lib/Object WasmObjectFile.cpp

[WebAssembly] Add support for printing relocations with llvm-objdump

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

LLVM/llvm 306460lldb/trunk/scripts/Xcode repo.py build-llvm.py

[build system] If there's an OVERRIDE, don't guess the current SCM.

This makes automatic checkout work even in situations where the
current repository can't be determined, such as in the case of a 
Git tag.

LLVM/llvm 306459llvm/trunk/include/llvm/BinaryFormat Wasm.h, llvm/trunk/lib/MC WasmObjectWriter.cpp

[WebAssembly] Add data size and alignement to linking section

The overal size of the data section (including BSS)
is otherwise not included in the wasm binary.

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

LLVM/llvm 306458llvm/trunk/lib/Target/Hexagon HexagonInstrInfo.cpp, llvm/trunk/test/CodeGen/Hexagon expand-vselect-kill.ll

[Hexagon] Use proper predicate register state when expanding PS_vselect

LLVM/llvm 306457llvm/trunk/lib/Transforms/InstCombine InstCombineMulDivRem.cpp, llvm/trunk/test/Transforms/InstCombine mul.ll

[InstCombine] Propagate nsw flag when turning mul by pow2 into shift when the constant is 
a vector splat or the scalar bit width is larger than 64-bits

The check to see if we can propagate the nsw flag used m_ConstantInt(uint64_t*&) which 
doesn't work with splat vectors and has a restriction that the bitwidth of the ConstantInt 
must be 64-bits are less.

This patch changes it to use m_APInt to remove both these issues

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

LLVM/llvm 306456llvm/trunk/lib/IR Constants.cpp

[Constants] Fix copy-pasto in llvm_unreachable message. NFC

LLVM/llvm 306455compiler-rt/trunk/test CMakeLists.txt

Don't double-include cfi tests on linux

LLVM/llvm 306454www-releases/trunk/4.0.1/tools/clang DiagnosticsReference.html LibASTMatchersReference.html, www-releases/trunk/4.0.1/tools/clang/_sources DiagnosticsReference.txt AttributeReference.txt

Add 4.0.1 clang docs

LLVM/llvm 306453compiler-rt/trunk/lib CMakeLists.txt, compiler-rt/trunk/test CMakeLists.txt

Loop directly over sanitizers to build in cmake

Summary: Cleaner than computing the intersection for each possible sanitizer

Reviewers: compnerd, beanz

Subscribers: llvm-commits, mgorny

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

LLVM/llvm 306452llvm/trunk/lib/CodeGen CodeGenPrepare.cpp

[CGP] simplify code to get bswap in memcmp expansion; NFCI

LLVM/llvm 306451www-releases/trunk/4.0.1/docs LangRef.html ProgrammersManual.html, www-releases/trunk/4.0.1/docs/_sources LangRef.txt ProgrammersManual.txt

Add 4.0.1 docs for LLVM

LLVM/llvm 306450compiler-rt/trunk/lib CMakeLists.txt, compiler-rt/trunk/test CMakeLists.txt

Only test sanitizers that are built when COMPILER_RT_SANITIZERS_TO_BUILD is used

Summary: This allows check-all to be used when only a subset of the sanitizers are built.

Reviewers: beanz, compnerd, rnk, pcc

Subscribers: llvm-commits, mgorny

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

LLVM/llvm 306449llvm/trunk/lib/Target/AMDGPU SIInstructions.td, llvm/trunk/test/CodeGen/AMDGPU alignbit-pat.ll

[AMDGPU] Add 2 new alignbit patterns

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

LLVM/llvm 306448llvm/trunk/lib/Transforms/Utils CodeExtractor.cpp, llvm/trunk/test/Transforms/CodeExtractor BlockAddressSelfReference.ll BlockAddressReference.ll

[CodeExtractor] Prevent extraction of block involving blockaddress

BlockAddress are only valid within their function context, which does not
interact well with CodeExtractor. Detect this case and prevent it.

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