platform/upstream/llvm.git
8 years agoRename LocationNode -> SectionsCommand.
Rui Ueyama [Mon, 18 Apr 2016 21:00:45 +0000 (21:00 +0000)]
Rename LocationNode -> SectionsCommand.

They are called sections-command in the doc, so it is nice to keep
it consistent with it.
https://sourceware.org/binutils/docs/ld/SECTIONS.html#SECTIONS

llvm-svn: 266668

8 years agoRemove redundant curly braces.
Rui Ueyama [Mon, 18 Apr 2016 21:00:43 +0000 (21:00 +0000)]
Remove redundant curly braces.

llvm-svn: 266667

8 years agoRefactor LinkerScript::assignAddresses. NFC.
Rui Ueyama [Mon, 18 Apr 2016 21:00:40 +0000 (21:00 +0000)]
Refactor LinkerScript::assignAddresses. NFC.

llvm-svn: 266666

8 years ago[Orc] Explicitly delete RPC::SequenceNumberManager's copy-constructor and
Lang Hames [Mon, 18 Apr 2016 20:56:22 +0000 (20:56 +0000)]
[Orc] Explicitly delete RPC::SequenceNumberManager's copy-constructor and
copy-assignment operator.

MSVC is trying to synthesize these and failing. Hopefully explicitly deleting
them will help.

llvm-svn: 266665

8 years agoensure lldbinline remembers .py extension
Todd Fiala [Mon, 18 Apr 2016 20:26:56 +0000 (20:26 +0000)]
ensure lldbinline remembers .py extension

This ensure lldbinline.test_file paths are tracked as .py
files rather than .pyc files.

Also, this change adds an assert to the test infrastructure
if a filename that is not ending in .py is attempted to be
added to the test events infrastructure where we track test
results.

See:
http://reviews.llvm.org/D19215

Earlier revision reviewed by:
Pavel Labath

llvm-svn: 266664

8 years ago[Orc] Re-commit r266581 with fixes for MSVC, and format cleanups.
Lang Hames [Mon, 18 Apr 2016 19:55:43 +0000 (19:55 +0000)]
[Orc] Re-commit r266581 with fixes for MSVC, and format cleanups.

Fixes:

(1) Removes constexpr (unsupported in MSVC)
(2) Move constructors (remove explicitly defaulted ones)
(3) <future> - Add warning suppression for MSVC.

llvm-svn: 266663

8 years ago[X86][AVX] Added extra memory folding tests for D19228
Simon Pilgrim [Mon, 18 Apr 2016 19:48:16 +0000 (19:48 +0000)]
[X86][AVX] Added extra memory folding tests for D19228

llvm-svn: 266662

8 years agotry to make comments more meaningful; NFC
Sanjay Patel [Mon, 18 Apr 2016 19:11:57 +0000 (19:11 +0000)]
try to make comments more meaningful; NFC

Retry r266541 without the range-based-for-loop-change that was wrong.

llvm-svn: 266658

8 years ago[ValueTracking] Correct lit test comments. NFC.
Chad Rosier [Mon, 18 Apr 2016 19:11:45 +0000 (19:11 +0000)]
[ValueTracking] Correct lit test comments. NFC.

llvm-svn: 266657

8 years agoFix shared build of LLVMPasses.
Marcin Koscielnicki [Mon, 18 Apr 2016 19:04:19 +0000 (19:04 +0000)]
Fix shared build of LLVMPasses.

It's missing a dependency on Instrumentation (needed for
llvm::InstrProfiling::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&))

llvm-svn: 266656

8 years agoAdd missing dependency.
Rafael Espindola [Mon, 18 Apr 2016 19:03:36 +0000 (19:03 +0000)]
Add missing dependency.

llvm-svn: 266655

8 years ago[BPI] Consider deoptimize calls as "unreachable"
Sanjoy Das [Mon, 18 Apr 2016 19:01:28 +0000 (19:01 +0000)]
[BPI] Consider deoptimize calls as "unreachable"

Summary:
Calls to @llvm.experimental.deoptimize are expected to "never execute",
so optimize them as such.

Reviewers: chandlerc

Subscribers: junbuml, mcrosier, llvm-commits

Differential Revision: http://reviews.llvm.org/D19095

llvm-svn: 266654

8 years agolli: avoid global variables, use a local unique_ptr instead
Mehdi Amini [Mon, 18 Apr 2016 18:52:39 +0000 (18:52 +0000)]
lli: avoid global variables, use a local unique_ptr instead

There was issue with order of destruction in some cases.

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 266652

8 years ago[libFuzzer] add fresh openssl trophies
Kostya Serebryany [Mon, 18 Apr 2016 18:41:25 +0000 (18:41 +0000)]
[libFuzzer] add fresh openssl trophies

llvm-svn: 266649

8 years agoBlock: Fix a crash when we have type attributes or qualifiers with omitted
Manman Ren [Mon, 18 Apr 2016 18:40:51 +0000 (18:40 +0000)]
Block: Fix a crash when we have type attributes or qualifiers with omitted
return type.

Emit a warning instead of crashing in IR generation.

rdar://22762981

Differential Revision: http://reviews.llvm.org/D18567

llvm-svn: 266648

8 years ago[Hexagon] Define macros __HVX__ and __HVXDBL__ when appropriate
Krzysztof Parzyszek [Mon, 18 Apr 2016 18:38:11 +0000 (18:38 +0000)]
[Hexagon] Define macros __HVX__ and __HVXDBL__ when appropriate

llvm-svn: 266647

8 years ago[MSan] [PowerPC] Add loadable library name for testing.
Marcin Koscielnicki [Mon, 18 Apr 2016 18:21:41 +0000 (18:21 +0000)]
[MSan] [PowerPC] Add loadable library name for testing.

Differential Revision: http://reviews.llvm.org/D19217

llvm-svn: 266646

8 years ago[Parser][ObjC] Make sure c++11 in-class initialization is done when the
Akira Hatanaka [Mon, 18 Apr 2016 18:19:45 +0000 (18:19 +0000)]
[Parser][ObjC] Make sure c++11 in-class initialization is done when the
constructor's definition is in an implementation block.

Without this commit, ptr doesn't get initialized to null in the
following code:

struct S {
  S();
  void *ptr = nullptr;
};

@implementation I
  S::S() {}
@end

rdar://problem/25693624

llvm-svn: 266645

8 years agoClarifying the wording of this diagnostic; it confused parameter and argument.
Aaron Ballman [Mon, 18 Apr 2016 18:10:53 +0000 (18:10 +0000)]
Clarifying the wording of this diagnostic; it confused parameter and argument.

llvm-svn: 266644

8 years agoNFC: unify clang / LLVM atomic ordering
JF Bastien [Mon, 18 Apr 2016 18:01:49 +0000 (18:01 +0000)]
NFC: unify clang / LLVM atomic ordering

This makes the C11 / C++11 *ABI* atomic ordering accessible from LLVM,
as discussed in http://reviews.llvm.org/D18200#inline-151433

This re-applies r266574 which I had reverted in r266575.

Depends on http://reviews.llvm.org/D18875

Original review: http://reviews.llvm.org/D18876

llvm-svn: 266641

8 years agoNFC: unify clang / LLVM atomic ordering
JF Bastien [Mon, 18 Apr 2016 18:01:43 +0000 (18:01 +0000)]
NFC: unify clang / LLVM atomic ordering

This makes the C11 / C++11 *ABI* atomic ordering accessible from LLVM,
as discussed in http://reviews.llvm.org/D18200#inline-151433

This re-applies r266573 which I had reverted in r266576.

Original review: http://reviews.llvm.org/D18875

llvm-svn: 266640

8 years agoAdd missing new file for r266637
Xinliang David Li [Mon, 18 Apr 2016 17:54:25 +0000 (17:54 +0000)]
Add missing new file for r266637

llvm-svn: 266639

8 years agoUpdate InstrProf pass creator API reference
Xinliang David Li [Mon, 18 Apr 2016 17:48:12 +0000 (17:48 +0000)]
Update InstrProf pass creator API reference

llvm-svn: 266638

8 years agoPort InstrProfiling pass to the new pass manager
Xinliang David Li [Mon, 18 Apr 2016 17:47:38 +0000 (17:47 +0000)]
Port InstrProfiling pass to the new pass manager

Differential Revision: http://reviews.llvm.org/D18126

llvm-svn: 266637

8 years ago[CMake] Fix misleading error message in CMakeLists.txt.
Eugene Zelenko [Mon, 18 Apr 2016 17:40:18 +0000 (17:40 +0000)]
[CMake] Fix misleading error message in CMakeLists.txt.

Differential revision: http://reviews.llvm.org/D17117

llvm-svn: 266635

8 years ago[STATS] Remove timePair class and unused functions
Jonathan Peyton [Mon, 18 Apr 2016 17:27:30 +0000 (17:27 +0000)]
[STATS] Remove timePair class and unused functions

llvm-svn: 266634

8 years ago[STATS] print Total_* stats on their own line
Jonathan Peyton [Mon, 18 Apr 2016 17:24:20 +0000 (17:24 +0000)]
[STATS] print Total_* stats on their own line

llvm-svn: 266633

8 years ago[X86][AVX] Added zero+blend vs vperm2f128 optsize tests cases (PR22984)
Simon Pilgrim [Mon, 18 Apr 2016 17:14:04 +0000 (17:14 +0000)]
[X86][AVX] Added zero+blend vs vperm2f128 optsize tests cases (PR22984)

We should be trying to use vperm2f128 instead of zero+blend (if we're only the user of zero?) when optsize is enabled.

llvm-svn: 266632

8 years agoRevert r266488.
Easwaran Raman [Mon, 18 Apr 2016 17:10:17 +0000 (17:10 +0000)]
Revert r266488.

This goes with r266477 which has been  reverted.

llvm-svn: 266631

8 years agoLanai: fix debug build
JF Bastien [Mon, 18 Apr 2016 16:33:41 +0000 (16:33 +0000)]
Lanai: fix debug build

There's currently no raw_ostream &operator<<(SimpleValueType); provided by LLVM. It could be added by refactoring utils/TableGen/CodeGenTarget.cpp:getEnumName, but that's much more work than fixing the build.

llvm-svn: 266627

8 years ago[AMDGPU] Add insert nops pass based on subtarget features instead of cl::opt
Konstantin Zhuravlyov [Mon, 18 Apr 2016 16:28:23 +0000 (16:28 +0000)]
[AMDGPU] Add insert nops pass based on subtarget features instead of cl::opt
Also,
- Skip pass if machine module does not have debug info
- Minor comment changes
- Added test

Differential Revision: http://reviews.llvm.org/D19079

llvm-svn: 266626

8 years ago[ARM] predefines __ELF__ macro for arm-none-eabi
Weiming Zhao [Mon, 18 Apr 2016 16:25:46 +0000 (16:25 +0000)]
[ARM] predefines __ELF__ macro for arm-none-eabi

Summary: predefines __ELF__ macro for arm-none-eabi

Reviewers: silviu.baranga, rengolin

Subscribers: aemerson, rengolin, cfe-commits

Differential Revision: http://reviews.llvm.org/D19225

llvm-svn: 266625

8 years agofix a race is the LLDB test suite results collection
Todd Fiala [Mon, 18 Apr 2016 16:09:21 +0000 (16:09 +0000)]
fix a race is the LLDB test suite results collection

The race boiled down to this:

If a test worker queue is able to run the test inferior and
clean up before the dosep.py listener socket is spun up, and
the worker queue is the last one (as would be the case when
there's only one test rerunning in the rerun queue), then
the test suite will exit the main loop before having a chance
to process any test events coming from the test inferior or
the worker queue job control.

I found this race to be far more likely on fast hardware.
Our Linux CI is one such example.  While it will show
up primarily during meta test events generated by
a worker thread when a test inferior times out or
exits with an exceptional exit (e.g. seg fault), it only
requires that the OS takes longer to hook up the
listener socket than it takes for the final test inferior
and worker thread to shut down.

See:
http://reviews.llvm.org/D19214

reviewed by:
Pavel Labath

llvm-svn: 266624

8 years ago[X86][AVX] Renamed vperm2f128 test to make it quicker to review
Simon Pilgrim [Mon, 18 Apr 2016 16:08:19 +0000 (16:08 +0000)]
[X86][AVX] Renamed vperm2f128 test to make it quicker to review

missed one the first time round...

llvm-svn: 266623

8 years agoSCoPValidator: Use SCEVTraversal to simplify SCEVInRegionDependences
Tobias Grosser [Mon, 18 Apr 2016 15:46:27 +0000 (15:46 +0000)]
SCoPValidator: Use SCEVTraversal to simplify SCEVInRegionDependences

llvm-svn: 266622

8 years ago[X86][AVX] Renamed vperm2f128 tests to make it quicker to review
Simon Pilgrim [Mon, 18 Apr 2016 15:37:45 +0000 (15:37 +0000)]
[X86][AVX] Renamed vperm2f128 tests to make it quicker to review

llvm-svn: 266621

8 years agoReapply "[Coverage] Prevent detection of false instantiations in case of macro expans...
Igor Kudrin [Mon, 18 Apr 2016 15:36:30 +0000 (15:36 +0000)]
Reapply "[Coverage] Prevent detection of false instantiations in case of macro expansion."

The root of the problem was that findMainViewFileID(File, Function)
could return some ID for any given file, even though that file
was not the main file for that function.

This patch ensures that the result of this function is conformed
with the result of findMainViewFileID(Function).

This commit reapplies r266436, which was reverted by r266458,
with the .covmapping file serialized in v1 format.

Differential Revision: http://reviews.llvm.org/D18787

llvm-svn: 266620

8 years agoRevert "Replace the use of MaxFunctionCount module flag"
Eric Liu [Mon, 18 Apr 2016 15:31:11 +0000 (15:31 +0000)]
Revert "Replace the use of MaxFunctionCount module flag"

This reverts commit r266477.

This commit introduces cyclic dependency. This commit has "Analysis" depend on "ProfileData",
while "ProfileData" depends on "Object", which depends on "BitCode", which
depends on "Analysis".

llvm-svn: 266619

8 years ago[ELF] - Avoid using memset for zero-initialization of struct member. NFC.
George Rimar [Mon, 18 Apr 2016 15:16:17 +0000 (15:16 +0000)]
[ELF] - Avoid using memset for zero-initialization of struct member. NFC.

llvm-svn: 266618

8 years ago[AMDGPU][llvm-mc] s_setreg* - Fix order of operands
Artem Tamazov [Mon, 18 Apr 2016 14:54:26 +0000 (14:54 +0000)]
[AMDGPU][llvm-mc] s_setreg* - Fix order of operands

Order should match the sp3 syntax, where destination (simm16 denoting the hwreg) is coming first.

Differential Revision: http://reviews.llvm.org/D19161

llvm-svn: 266617

8 years agoSilence some "initialized but unused" warnings from MSVC -- the function being called...
Aaron Ballman [Mon, 18 Apr 2016 14:47:19 +0000 (14:47 +0000)]
Silence some "initialized but unused" warnings from MSVC -- the function being called is a static function, so there's no need for an instance variable. NFC.

llvm-svn: 266616

8 years agoRevert 266581 (and follow-up 266588), it doesn't build on Windows.
Nico Weber [Mon, 18 Apr 2016 13:57:08 +0000 (13:57 +0000)]
Revert 266581 (and follow-up 266588), it doesn't build on Windows.

Three problems:
1. <future> can't be easily used.  If you must use it, see
   include/Support/ThreadPool.h for how.
2. constexpr problems, even after 266588.
3. Move assignment operators can't be defaulted in MSVC2013.

llvm-svn: 266615

8 years agoUnbreak building unit tests on Windows after r266595.
Nico Weber [Mon, 18 Apr 2016 13:54:50 +0000 (13:54 +0000)]
Unbreak building unit tests on Windows after r266595.

llvm-svn: 266614

8 years agoUnbreak building LLVMTarget on Windows after r266595.
Nico Weber [Mon, 18 Apr 2016 13:38:58 +0000 (13:38 +0000)]
Unbreak building LLVMTarget on Windows after r266595.

llvm-svn: 266613

8 years agoUnbreak building llvm-pdbdump on Windows after r266595.
Nico Weber [Mon, 18 Apr 2016 13:31:31 +0000 (13:31 +0000)]
Unbreak building llvm-pdbdump on Windows after r266595.

llvm-svn: 266612

8 years agoRespect LIBCXXABI_LIBDIR_SUFFIX before an install
Ben Craig [Mon, 18 Apr 2016 13:30:38 +0000 (13:30 +0000)]
Respect LIBCXXABI_LIBDIR_SUFFIX before an install

Prior to this patch, setting LIBCXXABI_LIBDIR_SUFFIX would confuse the
check-libcxxabi target. libc++abi.* would get output to lib instead of
lib${LIBCXXABI_LIBDIR_SUFFIX}, but the tests would look in the suffixed
directory.

Now, we match what libcxx does, and set the CMAKE_*_OUTPUT_DIRECTORY to the
LIBRARY_DIR.

http://reviews.llvm.org/D17410

llvm-svn: 266611

8 years agoFix handling of R_X86_64_GOT32.
Rafael Espindola [Mon, 18 Apr 2016 12:58:59 +0000 (12:58 +0000)]
Fix handling of R_X86_64_GOT32.

It computes the offset to the end of .got.

llvm-svn: 266610

8 years agoSimplify handling of R_X86_64_TPOFF32. NFC.
Rafael Espindola [Mon, 18 Apr 2016 12:44:33 +0000 (12:44 +0000)]
Simplify handling of R_X86_64_TPOFF32. NFC.

llvm-svn: 266609

8 years ago[mips][ias] Prevent double-filling of delay slots by generating '.set noreorder'...
Daniel Sanders [Mon, 18 Apr 2016 12:35:36 +0000 (12:35 +0000)]
[mips][ias] Prevent double-filling of delay slots by generating '.set noreorder' regions.

Summary:
When clang is given -save-temps or -via-file-asm, any inline assembly in
the source is parsed twice. Once by the compiler, and again by the
assembler. We must take care to ensure that this doesn't lead to
double-filling delay slots.

Reviewers: sdardis, vkalintiris

Subscribers: dsanders, sdardis, llvm-commits

Differential Revision: http://reviews.llvm.org/D19166

llvm-svn: 266608

8 years agoRemove isGotRelative.
Rafael Espindola [Mon, 18 Apr 2016 12:31:37 +0000 (12:31 +0000)]
Remove isGotRelative.

It is now redundant with the expression. While at it, handle both "X -
Got" and "Got - PC".

llvm-svn: 266607

8 years agoInclude SmallVector.h header in lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPri...
Eric Liu [Mon, 18 Apr 2016 12:21:59 +0000 (12:21 +0000)]
Include SmallVector.h header in lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.h

llvm-svn: 266606

8 years agoAttempt to fix darwin build after header refactor in llvm (r266595)
Pavel Labath [Mon, 18 Apr 2016 12:18:35 +0000 (12:18 +0000)]
Attempt to fix darwin build after header refactor in llvm (r266595)

llvm-svn: 266605

8 years agoHave getRelExpr handle all cases on x86.
Rafael Espindola [Mon, 18 Apr 2016 12:07:13 +0000 (12:07 +0000)]
Have getRelExpr handle all cases on x86.

This requires adding a few more expression types, but is already a small
simplification. Having Writer.cpp know the exact expression will also
allow further simplifications.

llvm-svn: 266604

8 years ago[ARM] AArch32 v8 NEON is still not IEEE-754 compliant
Renato Golin [Mon, 18 Apr 2016 12:06:47 +0000 (12:06 +0000)]
[ARM] AArch32 v8 NEON is still not IEEE-754 compliant

llvm-svn: 266603

8 years ago[mips][ias] Stream macro expansions to output instead of buffering them. NFC.
Daniel Sanders [Mon, 18 Apr 2016 12:06:15 +0000 (12:06 +0000)]
[mips][ias] Stream macro expansions to output instead of buffering them. NFC.

Summary:
This will allows us to eliminate some magic numbers from the offset operand of
branch instructions in favour of symbols and makes it possible to avoid
double-filling delay slots when clang is given -save-temps.

parseDirectiveCpRestore() is calling isIntegratedAssemblerRequired() for the
moment since correctly pushing the generation of these instructions into the
ELF target streamer is tricky enough to warrant a separate patch.

Reviewers: sdardis, vkalintiris

Subscribers: dsanders, llvm-commits, sdardis

Differential Revision: http://reviews.llvm.org/D19164

llvm-svn: 266602

8 years agoMerge duplicated cases. NFC.
Rafael Espindola [Mon, 18 Apr 2016 11:53:42 +0000 (11:53 +0000)]
Merge duplicated cases. NFC.

llvm-svn: 266601

8 years ago[PowerPC] add comment to test
Strahinja Petrovic [Mon, 18 Apr 2016 11:52:14 +0000 (11:52 +0000)]
[PowerPC] add comment to test

Added comment in test for soft-float operations on ppc architecture.
Test commit.

llvm-svn: 266600

8 years agoclang-format: Improve heuristics to detect function declarations/definitions.
Daniel Jasper [Mon, 18 Apr 2016 11:31:21 +0000 (11:31 +0000)]
clang-format: Improve heuristics to detect function declarations/definitions.

Specifically understand ellipses in parameter lists and treat trailing
reference qualifiers and the "{" as signals.

llvm-svn: 266599

8 years agoFixup r266327
Pavel Labath [Mon, 18 Apr 2016 11:01:41 +0000 (11:01 +0000)]
Fixup r266327

Fix XFAILed tests in TestThreadStates for the new signature of wait_for_running_event.

llvm-svn: 266598

8 years agoAdd missing header (NFC)
Mehdi Amini [Mon, 18 Apr 2016 09:33:41 +0000 (09:33 +0000)]
Add missing header (NFC)

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 266597

8 years agoAdd missing header (NFC)
Mehdi Amini [Mon, 18 Apr 2016 09:26:29 +0000 (09:26 +0000)]
Add missing header (NFC)

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 266596

8 years ago[NFC] Header cleanup
Mehdi Amini [Mon, 18 Apr 2016 09:17:29 +0000 (09:17 +0000)]
[NFC] Header cleanup

Removed some unused headers, replaced some headers with forward class declarations.

Found using simple scripts like this one:
clear && ack --cpp -l '#include "llvm/ADT/IndexedMap.h"' | xargs grep -L 'IndexedMap[<]' | xargs grep -n --color=auto 'IndexedMap'

Patch by Eugene Kosov <claprix@yandex.ru>

Differential Revision: http://reviews.llvm.org/D19219

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 266595

8 years agoAdd missing include for StringRef (NFC)
Mehdi Amini [Mon, 18 Apr 2016 09:08:59 +0000 (09:08 +0000)]
Add missing include for StringRef (NFC)

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 266594

8 years ago[asan] [SystemZ] Add slop for stack address detection.
Marcin Koscielnicki [Mon, 18 Apr 2016 09:01:19 +0000 (09:01 +0000)]
[asan] [SystemZ] Add slop for stack address detection.

On s390, siginfo reports the faulting address with page granularity -
we need to mask off the low bits of sp before comparison.

Differential Revision: http://reviews.llvm.org/D19112

llvm-svn: 266593

8 years agoMark P0152R1 as complete.
Eric Fiselier [Mon, 18 Apr 2016 06:58:50 +0000 (06:58 +0000)]
Mark P0152R1 as complete.

llvm-svn: 266592

8 years agoMark LWG issue 2469 as done. Also simplify try_emplace and insert_or_assign implement...
Eric Fiselier [Mon, 18 Apr 2016 06:51:33 +0000 (06:51 +0000)]
Mark LWG issue 2469 as done. Also simplify try_emplace and insert_or_assign implementations in unordered_map

llvm-svn: 266591

8 years agoImplement LWG issue 2219 - support reference_wrapper in INVOKE
Eric Fiselier [Mon, 18 Apr 2016 06:17:30 +0000 (06:17 +0000)]
Implement LWG issue 2219 - support reference_wrapper in INVOKE

llvm-svn: 266590

8 years ago[LLDB][MIPS] Fix TestConcurrentEvents
Mohit K. Bhakkad [Mon, 18 Apr 2016 05:27:42 +0000 (05:27 +0000)]
[LLDB][MIPS] Fix TestConcurrentEvents

Patch by Nitesh Jain

Reviewers: clayborg
Subscribers: jaydeep, bhushan, mohit.bhakkad, sagar
Differential Revision: http://reviews.llvm.org/D18389

llvm-svn: 266589

8 years ago[Orc] Tweak some of the new RPC code to silence a warning (extraneous ';') and
Lang Hames [Mon, 18 Apr 2016 05:22:32 +0000 (05:22 +0000)]
[Orc] Tweak some of the new RPC code to silence a warning (extraneous ';') and
MSVC errors related to constexpr.

llvm-svn: 266588

8 years agoAdd hash specializations for __int128_t. Fixes LWG issue 2119
Eric Fiselier [Mon, 18 Apr 2016 02:54:00 +0000 (02:54 +0000)]
Add hash specializations for __int128_t. Fixes LWG issue 2119

llvm-svn: 266587

8 years agoAdd tests for LWG issue 2361
Eric Fiselier [Mon, 18 Apr 2016 02:31:05 +0000 (02:31 +0000)]
Add tests for LWG issue 2361

llvm-svn: 266586

8 years agoFix LWG issue 2345 - Add insert(value_type&&)
Eric Fiselier [Mon, 18 Apr 2016 01:40:45 +0000 (01:40 +0000)]
Fix LWG issue 2345 - Add insert(value_type&&)

llvm-svn: 266585

8 years agoDelete the now redundant pointsToLocalDynamicGotEntry.
Rafael Espindola [Mon, 18 Apr 2016 01:34:20 +0000 (01:34 +0000)]
Delete the now redundant pointsToLocalDynamicGotEntry.

llvm-svn: 266584

8 years agoHave getRelExpr return the final values for tls gd.
Rafael Espindola [Mon, 18 Apr 2016 01:29:15 +0000 (01:29 +0000)]
Have getRelExpr return the final values for tls gd.

llvm-svn: 266583

8 years agoBitcodeWriter: WorkList => Worklist, NFC
Duncan P. N. Exon Smith [Mon, 18 Apr 2016 01:24:58 +0000 (01:24 +0000)]
BitcodeWriter: WorkList => Worklist, NFC

I have no idea how I chose two different spellings in the space of a
couple of weeks, but now I can't remember what to use where.  Choose
"Worklist".

llvm-svn: 266582

8 years ago[ORC] Generalize the ORC RPC utils to support RPC function return values and
Lang Hames [Mon, 18 Apr 2016 01:06:49 +0000 (01:06 +0000)]
[ORC] Generalize the ORC RPC utils to support RPC function return values and
asynchronous call/handle. Also updates the ORC remote JIT API to use the new
scheme.

The previous version of the RPC tools only supported void functions, and
required the user to manually call a paired function to return results. This
patch replaces the Procedure typedef (which only supported void functions) with
the Function typedef which supports return values, e.g.:

  Function<FooId, int32_t(std::string)> Foo;

The RPC primitives and channel operations are also expanded. RPC channels must
support four new operations: startSendMessage, endSendMessage,
startRecieveMessage and endRecieveMessage, to handle channel locking. In
addition, serialization support for tuples to RPCChannels is added to enable
multiple return values.

The RPC primitives are expanded from callAppend, call, expect and handle, to:

appendCallAsync - Make an asynchronous call to the given function.

callAsync - The same as appendCallAsync, but calls send on the channel when
            done.

callSTHandling - Blocking call for single-threaded code. Wraps a call to
                 callAsync then waits on the result, using a user-supplied
                 handler to handle any callbacks from the remote.

callST - The same as callSTHandling, except that it doesn't handle
         callbacks - it expects the result to be the first return.

expect and handle - as before.

handleResponse - Handle a response from the remote.

waitForResult - Wait for the response with the given sequence number to arrive.

llvm-svn: 266581

8 years agoChange getRelExpr to return the final value for TLSLD. NFC.
Rafael Espindola [Mon, 18 Apr 2016 00:28:57 +0000 (00:28 +0000)]
Change getRelExpr to return the final value for TLSLD. NFC.

llvm-svn: 266580

8 years agoLinker: Share a single Metadata map for the lifetime of IRMover
Duncan P. N. Exon Smith [Sun, 17 Apr 2016 23:30:31 +0000 (23:30 +0000)]
Linker: Share a single Metadata map for the lifetime of IRMover

Cache the result of mapping metadata nodes between instances of IRLinker
(i.e., for the lifetime of IRMover).  There shouldn't be any real
functional change here, but this should give a major speedup.  I had
loaned this to Mehdi when he tested performance of r266446, and the two
patches together gave a 10x speedup in metadata mapping.

llvm-svn: 266579

8 years agoMake CreateTargetMachine as small as possible.
Rafael Espindola [Sun, 17 Apr 2016 23:20:08 +0000 (23:20 +0000)]
Make CreateTargetMachine as small as possible.

It is a pity that we have to create a TargetMachine once per thread,
so at least make that code as small as possible.

llvm-svn: 266578

8 years ago[X86] Be explicit about calls to setOperationAction for AVX2 and AVX512 rather than...
Craig Topper [Sun, 17 Apr 2016 22:49:46 +0000 (22:49 +0000)]
[X86] Be explicit about calls to setOperationAction for AVX2 and AVX512 rather than just looping over all vector types and conditinally matching them. NFC

llvm-svn: 266577

8 years agoRevert "NFC: unify clang / LLVM atomic ordering"
JF Bastien [Sun, 17 Apr 2016 21:29:01 +0000 (21:29 +0000)]
Revert "NFC: unify clang / LLVM atomic ordering"

This reverts commit 537951f2f16d6a8542571c7722fcbae07d4e62c2.

Causes an assert in:
  test/Transforms/AtomicExpand/SPARC/libcalls.ll
  (Ordering2 != AtomicOrdering::NotAtomic && "expect atomic MO")

Bot:
  http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_check/21724/testReport/junit/LLVM/Transforms_AtomicExpand_SPARC/libcalls_ll/

I'm not getting this assert on my local debug build, but I'll revert
just to be sure.

llvm-svn: 266576

8 years agoRevert "NFC: unify clang / LLVM atomic ordering"
JF Bastien [Sun, 17 Apr 2016 21:28:50 +0000 (21:28 +0000)]
Revert "NFC: unify clang / LLVM atomic ordering"

This reverts commit b0495df9eae2824bee830cc4c94f5441f0d4cbc9.

Same as for the corresponding LLVM revert, an assert seems to fire.

llvm-svn: 266575

8 years agoNFC: unify clang / LLVM atomic ordering
JF Bastien [Sun, 17 Apr 2016 21:01:09 +0000 (21:01 +0000)]
NFC: unify clang / LLVM atomic ordering

Summary:
Depends on http://reviews.llvm.org/D18875

This makes the C11 / C++11 *ABI* atomic ordering accessible from LLVM, as discussed in http://reviews.llvm.org/D18200#inline-151433

Reviewers: jyknight, reames

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D18876

llvm-svn: 266574

8 years agoNFC: unify clang / LLVM atomic ordering
JF Bastien [Sun, 17 Apr 2016 21:00:57 +0000 (21:00 +0000)]
NFC: unify clang / LLVM atomic ordering

Summary: This makes the C11 / C++11 *ABI* atomic ordering accessible from LLVM, as discussed in http://reviews.llvm.org/D18200#inline-151433

Reviewers: jyknight, reames

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D18875

llvm-svn: 266573

8 years agoWhen building with LLVM_ENABLE_MODULES, put the module cache into the build
Richard Smith [Sun, 17 Apr 2016 20:58:01 +0000 (20:58 +0000)]
When building with LLVM_ENABLE_MODULES, put the module cache into the build
directory. This is important for build bots to avoid filling up /tmp.

llvm-svn: 266571

8 years agoTransforms: Try harder to fix bootstrap after r266565
Duncan P. N. Exon Smith [Sun, 17 Apr 2016 20:11:09 +0000 (20:11 +0000)]
Transforms: Try harder to fix bootstrap after r266565

This catches two nullptr insertions into the ValueMap I missed in
r266567.  I missed CloneFunction becuase it never calls RemapInstruction
directly.  Here's one of the still-failing bots:
  http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/11496

llvm-svn: 266570

8 years agoLinker: Don't double-schedule appending variables
Duncan P. N. Exon Smith [Sun, 17 Apr 2016 19:40:20 +0000 (19:40 +0000)]
Linker: Don't double-schedule appending variables

Add an assertion to ValueMapper that prevents double-scheduling of
GlobalValues to remap, and fix the one place it happened.  There are
tons of tests that fail with this assertion in place and without the
code change, so I'm not adding another.

Although it looks related, r266563 was, indeed, removing dead code.
AFAICT, this cross-file double-scheduling started in r266510 when the
cross-file recursion was removed.

llvm-svn: 266569

8 years ago[ParallelCG] SmallVector<char> -> SmallString.
Davide Italiano [Sun, 17 Apr 2016 19:38:57 +0000 (19:38 +0000)]
[ParallelCG] SmallVector<char> -> SmallString.

llvm-svn: 266568

8 years agoTransforms: Fix bootstrap after r266565
Duncan P. N. Exon Smith [Sun, 17 Apr 2016 19:26:49 +0000 (19:26 +0000)]
Transforms: Fix bootstrap after r266565

Apparently there isn't test coverage for all of these.  I'd appreciate
if someone with could reproduce and send me something to reduce, but for
now I've just looked for users of RemapInstruction and MapValue and
ensured they don't accidentally insert nullptr.  Here is one of the
bootstraps that caught:

  http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/11494

llvm-svn: 266567

8 years agoFix a use after move.
Rafael Espindola [Sun, 17 Apr 2016 18:56:49 +0000 (18:56 +0000)]
Fix a use after move.

llvm-svn: 266566

8 years agoValueMapper: Don't allow explicit null mappings of Values, NFC
Duncan P. N. Exon Smith [Sun, 17 Apr 2016 18:53:24 +0000 (18:53 +0000)]
ValueMapper: Don't allow explicit null mappings of Values, NFC

As a follow-up to r123058, assert that there are no null mappings in the
ValueMap instead of just ignoring them when they are there.  There were
a couple of accidental insertions in CloneFunction so I cleaned those up
(caught by testcases).

llvm-svn: 266565

8 years agoKeep only the splitCodegen version that takes a factory.
Rafael Espindola [Sun, 17 Apr 2016 18:42:27 +0000 (18:42 +0000)]
Keep only the splitCodegen version that takes a factory.

This makes it much easier to see that all created TargetMachines are
equivalent.

llvm-svn: 266564

8 years agoIRMover: Remove dead code, NFC
Duncan P. N. Exon Smith [Sun, 17 Apr 2016 18:21:47 +0000 (18:21 +0000)]
IRMover: Remove dead code, NFC

llvm-svn: 266563

8 years agoDeclare MVT::SimpleValueType as an int8_t sized enum. This removes 400 bytes from...
Craig Topper [Sun, 17 Apr 2016 17:37:33 +0000 (17:37 +0000)]
Declare MVT::SimpleValueType as an int8_t sized enum. This removes 400 bytes from TargetLoweringBase and probably other places.

This required changing several places to print VT enums as strings instead of raw ints since the proper method to use to print became ambiguous. This is probably an improvement anyway.

This also appears to save ~8K from an x86 self host build of llc.

llvm-svn: 266562

8 years agoImplement CWG 941 - explicit specializations of deleted function templates
Faisal Vali [Sun, 17 Apr 2016 17:32:04 +0000 (17:32 +0000)]
Implement CWG 941 - explicit specializations of deleted function templates

  template<class T> void f(T) = delete;
  template<> void f(int); // OK.

  f(3); // OK

Implementation strategy:

When an explicit specialization of a function template, a member function template or a member function of a class template is declared, clang first implicitly instantiates the declaration of a specialization from the templated-entity being explicitly specialized (since their signatures must be the same) and then links the explicit specialization being declared as a redeclaration of the aforementioned specialization.

The problem was that when clang 'implicitly instantiates' the initial specialization, it marks the corresponding FunctionDecl as deleted if the corresponding templated-entity was deleted, rather than waiting to see whether the explicit specialization being declared provides a non-deleted body. (The eager marking of delete has advantages during overload resolution I suppose, where we don't have to try and instantiate a definition of the function to see if it is deleted).

The present fix entails recognizing that when clang knows that an explicit specialization is being declared (for whichever templated-entity), the prior implicit instantiation should not inherit the 'deleted' status, and so we reset it to false.

I suppose an alternative fix (amongst others) could consider creating a new context (ExplicitSpecializationDeclarationSubstitution or some such) that is checked during template-argument-deduction and final substitution, and avoid inheriting the deleted status during declaration substitution.  But while conceptually cleaner, that would be a slightly more involved change (as could be some of the other alternatives: such as avoid tagging implicit specializations as deleted, and check their primary templates for the deleted status where needed), and so I chose a different path.  Hopefully it'll prove to not be a bad choice.

llvm-svn: 266561

8 years ago[X86][SSE] Added 16i8 -> 8i64 sext test
Simon Pilgrim [Sun, 17 Apr 2016 15:10:42 +0000 (15:10 +0000)]
[X86][SSE] Added 16i8 -> 8i64 sext test

Shows poor codegen for AVX2

llvm-svn: 266560

8 years ago[X86] Added TODO comment for target shuffle mask decoding of bitcasted masks
Simon Pilgrim [Sun, 17 Apr 2016 11:34:18 +0000 (11:34 +0000)]
[X86] Added TODO comment for target shuffle mask decoding of bitcasted masks

llvm-svn: 266559

8 years agoFix shared build after r266484
Ismail Donmez [Sun, 17 Apr 2016 09:01:51 +0000 (09:01 +0000)]
Fix shared build after r266484

llvm-svn: 266558

8 years ago[X86] Remove unneeded variables
Asaf Badouh [Sun, 17 Apr 2016 08:28:40 +0000 (08:28 +0000)]
[X86] Remove unneeded variables

no functional change.
ExtraLoad and WrapperKind are been used only if (OpFlags == X86II::MO_GOTPCREL).

Differential Revision: http://reviews.llvm.org/D18942

llvm-svn: 266557

8 years agoDebugInfo: Make DICompositeTypes distinct most of the time
Duncan P. N. Exon Smith [Sun, 17 Apr 2016 07:45:08 +0000 (07:45 +0000)]
DebugInfo: Make DICompositeTypes distinct most of the time

Since elements of most kinds of DICompositeType have back references,
most are involved in uniquing cycles.  Except via the ODR 'identifier:'
field, which doesn't care about the storage type (see r266549),
they have no hope of being uniqued.

Distinct nodes are far more efficient, so use them for most kinds of
DICompositeType definitions (i.e., when DIType::isForwardDecl is false).
The exceptions:

  - DW_TAG_array_type, since their elements never have back-references
    and they never have ODR 'identifier:' fields;

  - DW_TAG_enumeration_type when there is no ODR 'identifier:' field,
    since their elements usually don't have back-references.

This breaks the last major uniquing cycle I'm aware of in the debug info
graph.  The impact won't be enormous for C++ because references to
ODR-uniqued nodes still use string-based DITypeRefs; but this should
prevent a regression in C++ when we drop the string-based references.

This wouldn't have been reasonable until r266549, when composite types
stopped relying on being uniqued by structural equivalence to prevent
blow-ups at LTO time.

llvm-svn: 266556