LLVM/llvm 349604cfe/trunk/lib/Sema SemaStmtAsm.cpp

Use "EvaluateAsRValue" instead of as a known int, because if it's not a known
integer we want to emit a diagnostic instead of asserting.

LLVM/llvm 349603cfe/trunk/lib/Sema SemaStmtAsm.cpp

Revert accidentally included code.

LLVM/llvm 349602llvm/trunk/include/llvm/CodeGen AsmPrinter.h

[DebugInfo] Make AsmPrinter struct HandlerInfo and Handlers protected

In AsmPrinter, make struct HandlerInfo and SmallVector
Handlers protected, so target extended AsmPrinter will
be able to add their own handlers.

Signed-off-by: Yonghong Song <yhs at fb.com>

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

LLVM/llvm 349601llvm/trunk/test/BugPoint func-attrs-keyval.ll func-attrs.ll, llvm/trunk/tools/bugpoint CrashDebugger.cpp

[bugpoint][PR29027] Reduce function attributes

Summary:
In addition to reducing the functions in an LLVM module, bugpoint now
reduces the function attributes associated with each of the remaining
functions.

To test this, add a -bugpoint-crashfuncattr test pass, which crashes if
a function in the module has a "bugpoint-crash" attribute. A test case
demonstrates that the IR is reduced to just that one attribute.

Reviewers: MatzeB, silvas, davide, reames

Reviewed By: reames

Subscribers: reames, llvm-commits

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

LLVM/llvm 349600llvm/trunk/include/llvm/ProfileData SampleProfReader.h, llvm/trunk/unittests/ProfileData SampleProfTest.cpp

Fix use-after-free with profile remapping.

We need to keep the underlying profile reader alive as long as the
profile data, because the profile data may contain StringRefs referring
to strings in the reader's name table.

LLVM/llvm 349599llvm/trunk/lib/Target/PowerPC PPCISelLowering.cpp PPCISelLowering.h, llvm/trunk/test/CodeGen/PowerPC ppc64-P9-vabsd.ll

[PowerPC]Exploit P9 vabsdu for unsigned vselect patterns

For type v4i32/v8ii16/v16i8, do following transforms:
  (vselect (setcc a, b, setugt), (sub a, b), (sub b, a)) -> (vabsd a, b)
  (vselect (setcc a, b, setuge), (sub a, b), (sub b, a)) -> (vabsd a, b)
  (vselect (setcc a, b, setult), (sub b, a), (sub a, b)) -> (vabsd a, b)
  (vselect (setcc a, b, setule), (sub b, a), (sub a, b)) -> (vabsd a, b)

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

LLVM/llvm 349598llvm/trunk/utils/gn/secondary BUILD.gn, llvm/trunk/utils/gn/secondary/llvm/tools llvm-objcopy

[gn build] Add build file for llvm-objcopy

Needed by check-lld.

This should've been part of r349486 but I messed up.

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

LLVM/llvm 349597cfe/branches/google stable, cfe/tags/google/stable 2018-12-18

Creating branches/google/stable and tags/google/stable/2018-12-18 from r349201

LLVM/llvm 349596llvm/trunk/cmake/modules TableGen.cmake

Re-land "Fix MSVC dependency issue between Clang-tablegen and LLVM-tablegen"

Previously, when compiling Visual Studio targets, one could see random build errors. This 
was caused by tablegen projects using the same build folders.
This workaround simply chains tablegen projects.

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

LLVM/llvm 349595llvm/trunk/docs llvm-objdump.1

Add llvm-objdump man page

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

LLVM/llvm 349593lnt/trunk/tests/SharedInputs/FakeCompilers fakecompiler.py

Unused import

LLVM/llvm 349594lnt/trunk/tests/SharedInputs/FakeCompilers fakecompiler.py

Whitespace fixups

LLVM/llvm 349591lnt/trunk/tests/testing/Inputs fake-objdump.py

whitespace fixup, unused import

LLVM/llvm 349592lnt/trunk/tests/testing/Inputs fake-nm.py

Unused import

LLVM/llvm 349589lnt/trunk/lnt/testing/util machineinfo.py

fatal was not imported, and fix formatting

LLVM/llvm 349590lnt/trunk/tests/SharedInputs create_temp_instance.py

whitespace fixup

LLVM/llvm 349588lnt/trunk/lnt/server/db testsuite.py, lnt/trunk/lnt/server/db/migrations upgrade_0_to_1.py

Remove another * import, and put back the import that is needed.

LLVM/llvm 349587lnt/trunk/lnt/server/db testsuite.py

Help mypy understand this

LLVM/llvm 349586lnt/trunk/lnt/server/db testsuite.py testsuitedb.py

Get rid of nasty * imports

LLVM/llvm 349585compiler-rt/trunk/test/asan/TestCases/Linux odr-vtable.cc

[asan] Disable ODR test on Android

LLVM/llvm 349584lnt/trunk/lnt/tests test_suite.py

I think this is unused

LLVM/llvm 349583lnt/trunk/lnt/testing/util compilers.py

Fixup invalid imports

LLVM/llvm 349582lnt/trunk/lnt/server/db rules_manager.py, lnt/trunk/lnt/server/db/rules rule_update_fixed_regressions.py

Some type annotations to make Mypy happier

LLVM/llvm 349581lld/trunk/ELF Driver.cpp InputFiles.cpp

Use unique_ptr to manage a TarWriter instance. NFC.

LLVM/llvm 349580lldb/trunk/source/Plugins/Process/gdb-remote GDBRemoteCommunication.cpp

Don't forget to free the libcompression scratch buffer in the dtor.

LLVM/llvm 349579lnt/trunk setup.cfg tox.ini, lnt/trunk/tests/server/ui V4Pages.py test_matrix_page.py

Getting server UI tests working in flake8

These were all valid style or correctness issues.

LLVM/llvm 349577lnt/trunk tox.ini

Add a whitelist of files to keep linter clean

Linters help a lot of Python; however, we have so many issues in LNT we
can't use flake8.  Start a whitelist of file to make sure are lint free
and make tox error on those.
DeltaFile
+11-0lnt/trunk/tox.ini
+11-01 files

LLVM/llvm 349578lnt/trunk/lnt/server/db fieldchange.py, lnt/trunk/tests/server/ui change_processing.py

Scaleability improvements: don't expire objects and use better query

When we commit we expire all objects in the session, meaning the will be
lazy loaded again next time they are accessed.  Move the commit of all
found regressions to the end of processing, so the caches stay valid for
the entire life of analysis.

Also, use FieldChange directly for analysis, instead of RegressionInd,
we were mostly only accessing the change field anyways.

LLVM/llvm 349575lnt/trunk/lnt/server/db/rules rule_update_fixed_regressions.py

Prevent detached object errors

Looks like this cache is holding stuff between sessions. Since those
object could expire, lets purge the cache before we start.

LLVM/llvm 349576lnt/trunk/lnt/server/db testsuitedb.py

Do bulk add to avoid DB round trips

Each add has to stage a sample, which leads to a SQL query and DB round
trip. For runs with a lot of sample, that can be avoided by adding them
all in one batch.

LLVM/llvm 349574lnt/trunk/lnt/server/db/rules rule_update_fixed_regressions.py

Short circuit regression fix checking

If any of these are false, we are returning false, so no point in
checking the rest of them.  This make regression evolution MUCH faster.

LLVM/llvm 349573lldb/trunk/lit/Driver/Inputs hello.c

[lit] Rather than including stdio.h, forward-declare printf in 
TestConvenienceVariables.test

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

Remove the zlib CFLAGS and LDFLAGS settings from the xcode project file.
We're linking against libcompression all the time now, we don't need to
fall back to zlib.  zlib support will still be used when lldb is built on
linux et al systems, so I'm not removing any of the source support, but
when built on darwin with xcode, we'll be using libcompression.

LLVM/llvm 349571lld/trunk/ELF Driver.cpp

Fix error message.

Previously, this code printed out an error message like this

  ld.lld: error: --reproduce: failed to open /foo: cannot open /foo

Apparently "failed to open /foo:" part is redundant.

LLVM/llvm 349570cfe/trunk/lib/Driver Driver.cpp, cfe/trunk/test/Driver nostdlibxx.cpp

[Driver] Also obey -nostdlib++ when rewriting -lstdc++.

Reviewers: pirama

Reviewed By: pirama

Subscribers: cfe-commits

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

LLVM/llvm 349569llvm/trunk/lib/Target/AArch64 AArch64SchedExynosM3.td

[AArch64] Simplify the Exynos M3 pipeline model

LLVM/llvm 349568llvm/trunk/lib/Target/AArch64 AArch64SchedExynosM1.td

[AArch64] Fix instructions order (NFC)

LLVM/llvm 349567llvm/trunk/test/tools/llvm-mca/AArch64/Exynos register-offset.s

[llvm-mca] Improve test (NFC)

Add more instruction variations for Exynos.

LLVM/llvm 349566libcxx/trunk/test/std/containers/unord/unord.map/unord.map.cnstr assign_copy.pass.cpp, libcxx/trunk/test/std/input.output/iostream.format/std.manip resetiosflags.pass.cpp setw.pass.cpp

Portability fix: add missing includes and static_casts. Reviewed as 
https://reviews.llvm.org/D55777. Thanks to Andrey Maksimov for the patch.

LLVM/llvm 349565lldb/trunk/lit/SymbolFile/NativePDB nested-types.cpp, lldb/trunk/lit/SymbolFile/NativePDB/Inputs nested-types.lldbinit

[NativePDB] Correctly reconstruct DeclContext for nested enums.

We reconstruct the AST hierarchy by trying to hack up a mangled
name for the parent type using the child type's mangled name.
This was failing for enums because their tag type is represented
with two letters ("W4") instead of one letter ("T", "U", etc) as
it is with classes, structs, and unions.  After accounting for
this we can now correctly determine when an enum is nested
inside of a namespace or a class.

LLVM/llvm 349564llvm/trunk/include/llvm/CodeGen DebugHandlerBase.h DbgEntityHistoryCalculator.h, llvm/trunk/lib/CodeGen/AsmPrinter DebugHandlerBase.h DbgEntityHistoryCalculator.h

[DebugInfo] Move several private headers to include directory

This patch moved the following files in lib/CodeGen/AsmPrinter/
  AsmPrinterHandler.h
  DbgEntityHistoryCalculator.h
  DebugHandlerBase.h
to include/llvm/CodeGen directory.

Such a change will enable Target to extend DebugHandlerBase
and emit Target specific debug info sections.

Signed-off-by: Yonghong Song <yhs at fb.com>

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

LLVM/llvm 349563lldb/trunk/lldb.xcodeproj project.pbxproj, lldb/trunk/source/Plugins/Process/gdb-remote GDBRemoteCommunication.cpp GDBRemoteCommunication.h

Force libcompression calls to be enabled when building on Darwin
systems.  It has been available in the OS over over three years
now.  If lldb doesn't link against -lcompression, it should be an
error.

Allocate a scratch buffer for libcompression to use when decoding
packets, instead of it having to allocate & free one on every call.

Fix a typeo with the size of the buffer that compression_decode_buffer()
is expanding into.

<rdar://problem/41601084> 

LLVM/llvm 349562lldb/trunk/lit/Driver/Inputs hello.c, lldb/trunk/lit/tools/lldb-mi/data data-info-line.test

[lit] Use the new build.py script in the lldb-mi tests

This allows the tests to pass on Windows as well

LLVM/llvm 349561cfe/trunk/lib/Basic TargetInfo.cpp, cfe/trunk/lib/CodeGen CGStmt.cpp

Emit ASM input in a constant context

Summary:
Some ASM input constraints (e.g., "i" and "n") require immediate values. At O0,
very few code transformations are performed. So if we cannot resolve to an
immediate when emitting the ASM input we shouldn't delay its processing.

Reviewers: rsmith, efriedma

Reviewed By: efriedma

Subscribers: rehana, efriedma, craig.topper, jyknight, cfe-commits

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

LLVM/llvm 349560llvm/trunk/test/Transforms/InstCombine scalarization.ll

[InstCombine] add tests for extract of vector load; NFC

There's a mismatch internally about how we are handling these patterns. 
We count loads as cheapToScalarize(), but then we don't actually 
scalarize them, so that can leave extra instructions compared to where 
we started when scalarizing other ops. If it's cheapToScalarize, then 
we should be scalarizing.

LLVM/llvm 349559llvm/trunk/lib/CodeGen PreISelIntrinsicLowering.cpp, llvm/trunk/test/Transforms/PreISelIntrinsicLowering objc-arc.ll

Preserve the linkage for objc* intrinsics as clang will set them to weak_external in some 
cases

Clang uses weak linkage for objc runtime functions when they are not available on the 
platform.

The intrinsic has this linkage so we just need to pass that on to the runtime call.

LLVM/llvm 349558llvm/trunk/lib/CodeGen PreISelIntrinsicLowering.cpp, llvm/trunk/test/Transforms/PreISelIntrinsicLowering objc-arc.ll

Add nonlazybind to objc_retain/objc_release when converting from intrinsics.

For performance reasons, clang set nonlazybind on these functions.  Now that we
are using intrinsics instead of runtime calls, we should set this attribute when
creating the runtime functions.

LLVM/llvm 349557lld/trunk/ELF Driver.cpp, lld/trunk/test/ELF static-error.s tls-static.s

Reject .so files if -static is given.

Previously, if you pass -static to lld, lld searches for only foo.a
and skips foo.so for -lfoo option. However, it didn't reject .so files
if you directly pass their pathnames via the command line, which is a bug.

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

LLVM/llvm 349556llvm/trunk/include/llvm/Analysis LoopAccessAnalysis.h, llvm/trunk/lib/Analysis LoopAccessAnalysis.cpp

[LAA] Introduce enum for vectorization safety status (NFC).

This patch adds a VectorizationSafetyStatus enum, which will be extended
in a follow up patch to distinguish between 'safe with runtime checks'
and 'known unsafe' dependences.

Reviewers: anemet, anna, Ayal, hsaito

Reviewed By: Ayal

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

LLVM/llvm 349555compiler-rt/trunk/test/asan/TestCases/Linux odr-vtable.cc, llvm/trunk/lib/Transforms/Instrumentation AddressSanitizer.cpp

[asan] Restore ODR-violation detection on vtables

Summary:
unnamed_addr is still useful for detecting of ODR violations on vtables

Still unnamed_addr with lld and --icf=safe or --icf=all can trigger false
reports which can be avoided with --icf=none or by using private aliases
with -fsanitize-address-use-odr-indicator

Reviewers: eugenis

Reviewed By: eugenis

Subscribers: kubamracek, hiraditya, llvm-commits

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