platform/upstream/llvm.git
9 years agoMC: Tidy up LOH naming a bit. NFC.
Jim Grosbach [Mon, 1 Jun 2015 23:55:06 +0000 (23:55 +0000)]
MC: Tidy up LOH naming a bit. NFC.

llvm-svn: 238800

9 years agoMC: Tidy up formatting a bit. NFC.
Jim Grosbach [Mon, 1 Jun 2015 23:55:02 +0000 (23:55 +0000)]
MC: Tidy up formatting a bit. NFC.

llvm-svn: 238799

9 years ago[Support] Simplify Triple::getOSVersion
David Majnemer [Mon, 1 Jun 2015 23:45:25 +0000 (23:45 +0000)]
[Support] Simplify Triple::getOSVersion

Those who are interested in the Android version can use
getEnvironmentVersion instead of getOSVersion.

llvm-svn: 238798

9 years ago[Basic] Transition getEnvironmentVersion from getOSVersion for android
David Majnemer [Mon, 1 Jun 2015 23:38:25 +0000 (23:38 +0000)]
[Basic] Transition getEnvironmentVersion from getOSVersion for android

'android' occupies the environment component of the triple.  Let's use
getEnvironmentVersion to extract it instead of getOSVersion.

llvm-svn: 238797

9 years ago[ADT] Add Triple::getEnvironmentVersion
David Majnemer [Mon, 1 Jun 2015 23:38:09 +0000 (23:38 +0000)]
[ADT] Add Triple::getEnvironmentVersion

This allows us to extract version numbers from the environment.
getOSVersion is currently overloaded for that purpose, this allows us to
clean it up.

llvm-svn: 238796

9 years agoARM: Thumb2 LDRD/STRD supports independent input/output regs
Matthias Braun [Mon, 1 Jun 2015 23:27:08 +0000 (23:27 +0000)]
ARM: Thumb2 LDRD/STRD supports independent input/output regs

The existing code would unnecessarily break LDRD/STRD apart with
non-adjacent registers, on thumb2 this is not necessary.

Ideally on thumb2 we shouldn't match for ldrd/strd pre-regalloc anymore
as there is not reason to set register hints anymore, changing that is
something for a future patch however.

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

llvm-svn: 238795

9 years agoFix a race condition where 2 threads might try to call Process::SetExitStatus() at...
Greg Clayton [Mon, 1 Jun 2015 23:14:09 +0000 (23:14 +0000)]
Fix a race condition where 2 threads might try to call Process::SetExitStatus() at the same time.

The problem was the mutex was only protecting the setting of m_exit_string and m_exit_string, but this function relies on the m_private_state being set to eStateExited in order to prevent more than 1 client setting the exit status. We want to only allow the first caller to succeed.

On MacOSX we have a thread that reaps the process we are debugging, and we also have a thread that monitors the debugserver process. When a process exists, the ProcessGDBRemote::AsyncThread() would set the exit status to the correct value and then another thread would reap the debugserver process and they would often both end up in Process::SetExitStatus() at the same time. With the mutex at the top we allow all variables to be set and the m_private_state to be set to eStateExited _before_ the other thread (debugserver reaped) can try to set th exist status to -1 and "lost connection to debugserver" being set as the exit status.

This was probably an issue for lldb-server as well and could very well cleanup some tests that might have been expecting a specific exit status from the process being debugged.

llvm-svn: 238794

9 years agoAArch64: Use CMP;CCMP sequences for and/or/setcc trees.
Matthias Braun [Mon, 1 Jun 2015 22:31:17 +0000 (22:31 +0000)]
AArch64: Use CMP;CCMP sequences for and/or/setcc trees.

Previously CCMP/FCCMP instructions were only used by the
AArch64ConditionalCompares pass for control flow. This patch uses them
for SELECT like instructions as well by matching patterns in ISelLowering.

PR20927, rdar://18326194

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

llvm-svn: 238793

9 years ago[bpf] fix build
Alexei Starovoitov [Mon, 1 Jun 2015 22:24:36 +0000 (22:24 +0000)]
[bpf] fix build

fix breakage due to r238634

Patch by Vijay Subramanian.

llvm-svn: 238792

9 years agoMove the name pointer out of Value into a map that lives on the
Owen Anderson [Mon, 1 Jun 2015 22:24:01 +0000 (22:24 +0000)]
Move the name pointer out of Value into a map that lives on the
LLVMContext.  Production builds of clang do not set names on most
Value's, so this is wasted space on almost all subclasses of Value.
This reduces the size of all Value subclasses by 8 bytes on 64 bit
hosts.

The one tricky part of this change is averting compile time regression
by keeping Value::hasName() fast.  This required stealing bits out of
NumOperands.

With this change, peak memory usage on verify-uselistorder-nodbg.lto.bc
is decreased by approximately 2.3% (~3MB absolute on my machine).

llvm-svn: 238791

9 years ago[dsymutil] Remove extraneous std::move of local in return statement.
Frederic Riss [Mon, 1 Jun 2015 22:03:05 +0000 (22:03 +0000)]
[dsymutil] Remove extraneous std::move of local in return statement.

llvm-svn: 238790

9 years agoR600/SI: Don't hardcode pointer type
Matt Arsenault [Mon, 1 Jun 2015 21:58:24 +0000 (21:58 +0000)]
R600/SI: Don't hardcode pointer type

llvm-svn: 238789

9 years agoadd missing dependency for ExecutionEngine lib
Sanjay Patel [Mon, 1 Jun 2015 21:56:56 +0000 (21:56 +0000)]
add missing dependency for ExecutionEngine lib

This appears to be masked most of the time, but the problem
was exposed on some bots by r238051.

llvm-svn: 238788

9 years agoFix TestJoinAfterBreak test on Windows
Adrian McCarthy [Mon, 1 Jun 2015 21:51:50 +0000 (21:51 +0000)]
Fix TestJoinAfterBreak test on Windows

llvm-svn: 238787

9 years agoUse reinterpret_cast instead of const_cast and C-style cast.
Rui Ueyama [Mon, 1 Jun 2015 21:49:21 +0000 (21:49 +0000)]
Use reinterpret_cast instead of const_cast and C-style cast.

llvm-svn: 238786

9 years agoLiveRangeEdit: Fix liveranges not shrinking on subrange kill.
Matthias Braun [Mon, 1 Jun 2015 21:26:26 +0000 (21:26 +0000)]
LiveRangeEdit: Fix liveranges not shrinking on subrange kill.

If a dead instruction we may not only have a last-use in the main live
range but also in a subregister range if subregisters are tracked. We
need to partially rebuild live ranges in both cases.

The testcase only broke when subregister liveness was enabled. I
commited it in the current form because there is currently no flag to
enable/disable subregister liveness.

This fixes PR23720.

llvm-svn: 238785

9 years agoARMLoadStoreOptimizer: Fix doxygen comments; NFC
Matthias Braun [Mon, 1 Jun 2015 21:26:23 +0000 (21:26 +0000)]
ARMLoadStoreOptimizer: Fix doxygen comments; NFC

llvm-svn: 238784

9 years ago[dsymutil] Remove unnecessary ';'
Frederic Riss [Mon, 1 Jun 2015 21:25:53 +0000 (21:25 +0000)]
[dsymutil] Remove unnecessary ';'

llvm-svn: 238783

9 years agoCOFF: Remove BitcodeFile::BitcodeFile(StringRef Filename).
Rui Ueyama [Mon, 1 Jun 2015 21:19:43 +0000 (21:19 +0000)]
COFF: Remove BitcodeFile::BitcodeFile(StringRef Filename).

In r238690, I made all files have only MemoryBufferRefs. This change
is to do the same thing for the bitcode file reader. Also updated
a few variable names to match with other code.

llvm-svn: 238782

9 years ago[dsymutil] Use YAMLIO to dump debug map.
Frederic Riss [Mon, 1 Jun 2015 21:12:45 +0000 (21:12 +0000)]
[dsymutil] Use YAMLIO to dump debug map.

Doing so will allow us to also accept a YAML debug map in input as using
YAMLIO gives us the parsing for free. Being able to have textual debug
maps will in turn allow much more control over the tests, because 1/
no need to check-in a binary containing the debug map and 2/ it will allow
to use the same objects/IR files with made-up debug-maps to test
different scenari.

llvm-svn: 238781

9 years agoCOFF: Support import-by-ordinal DLL imports.
Rui Ueyama [Mon, 1 Jun 2015 21:05:27 +0000 (21:05 +0000)]
COFF: Support import-by-ordinal DLL imports.

Symbols exported by DLLs can be imported not by name but by
small number or ordinal. Usually, symbols have both ordinals
and names, and in that case ordinals are called "hints" and
used by the loader as hints.

However, symbols can have only ordinals. They are called
import-by-ordinal symbols. You need to manage ordinals by hand
so that they will never change if you choose to use the feature.
But it's supposed to make dynamic linking faster because
it needs no string comparison. Not sure if that claim still
stands in year 2015, though. Anyways, the feature exists,
and this patch implements that.

llvm-svn: 238780

9 years agoCOFF: Use Chunk instead of its derived classes.
Rui Ueyama [Mon, 1 Jun 2015 21:05:24 +0000 (21:05 +0000)]
COFF: Use Chunk instead of its derived classes.

I'm adding ordinal-only (nameless) imports to the import table.
The chunk for that type is going to be different from LookupChunk.
Without this change, we cannot add objects of the new type to the
vectors.

llvm-svn: 238779

9 years agoCOFF: Initial implementation of link-time optimization.
Peter Collingbourne [Mon, 1 Jun 2015 20:10:10 +0000 (20:10 +0000)]
COFF: Initial implementation of link-time optimization.

This implementation is known to work in very simple cases (see new test case).

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

llvm-svn: 238777

9 years agoMake the C++ LTO API easier to use from C++ clients.
Peter Collingbourne [Mon, 1 Jun 2015 20:08:30 +0000 (20:08 +0000)]
Make the C++ LTO API easier to use from C++ clients.

Start using C++ types such as StringRef and MemoryBuffer in the C++ LTO
API. In doing so, clarify the ownership of the native object file: the caller
now owns it, not the LTOCodeGenerator. The C libLTO library has been modified
to use a derived class of LTOCodeGenerator that owns the object file.

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

llvm-svn: 238776

9 years agoUpdate for clang API change.
Rafael Espindola [Mon, 1 Jun 2015 20:00:20 +0000 (20:00 +0000)]
Update for clang API change.

Patch by Косов Евгений.

llvm-svn: 238775

9 years agoReplace a few std::string& with StringRef. NFC.
Rafael Espindola [Mon, 1 Jun 2015 20:00:16 +0000 (20:00 +0000)]
Replace a few std::string& with StringRef. NFC.

Patch by Косов Евгений!

llvm-svn: 238774

9 years agoRevert "[Hexagon] Test passes for hexagon target now that the backend correctly gener...
Rafael Espindola [Mon, 1 Jun 2015 19:46:36 +0000 (19:46 +0000)]
Revert "[Hexagon] Test passes for hexagon target now that the backend correctly generates relocations."

This reverts commit r238754.

It depends on r238748, which was reverted.

llvm-svn: 238773

9 years agoRevert "[Hexagon] Adding basic ELF relocation generation and testing advanced relaxat...
Rafael Espindola [Mon, 1 Jun 2015 19:20:47 +0000 (19:20 +0000)]
Revert "[Hexagon] Adding basic ELF relocation generation and testing advanced relaxation codepath."

This reverts commit r238748.

It broke the msan bot:

http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/4372/steps/check-llvm%20msan/logs/stdio

llvm-svn: 238772

9 years agoDump error if dotest itself fails and no tests were run.
Chaoren Lin [Mon, 1 Jun 2015 19:06:01 +0000 (19:06 +0000)]
Dump error if dotest itself fails and no tests were run.

Reviewers: zturner, clayborg

Subscribers: lldb-commits

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

llvm-svn: 238771

9 years agoDon't close handle returned by _get_osfhandle.
Oleksiy Vyalov [Mon, 1 Jun 2015 18:52:16 +0000 (18:52 +0000)]
Don't close handle returned by _get_osfhandle.

http://reviews.llvm.org/D9931

llvm-svn: 238770

9 years agoAdditional RenderScript debug features.
Colin Riley [Mon, 1 Jun 2015 18:23:41 +0000 (18:23 +0000)]
Additional RenderScript debug features.
Base framework for inspecting RenderScript runtime details and helpers for various runtime actions on x86 and arm targets.

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

llvm-svn: 238768

9 years agoFix TestPaths.
Chaoren Lin [Mon, 1 Jun 2015 18:04:10 +0000 (18:04 +0000)]
Fix TestPaths.

Reviewers: vharron, clayborg

Reviewed By: clayborg

Subscribers: lldb-commits

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

llvm-svn: 238767

9 years agolit: Allow configurations to restrict the set of tests to run
Arnold Schwaighofer [Mon, 1 Jun 2015 17:50:03 +0000 (17:50 +0000)]
lit: Allow configurations to restrict the set of tests to run

By setting limit_to_features to a non empty list of features a configuration can
restrict the set of tests to run to only include tests that require a feature in
this list.

rdar://21082253

llvm-svn: 238766

9 years agoUpdated dosep.py to output progress and dump std{out,err} on test failure.
Chaoren Lin [Mon, 1 Jun 2015 17:49:25 +0000 (17:49 +0000)]
Updated dosep.py to output progress and dump std{out,err} on test failure.

Reviewers: vharron, clayborg, zturner

Subscribers: lldb-commits

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

llvm-svn: 238765

9 years agoFix types.py to actually be able to run check_padding_command() without erroring...
Greg Clayton [Mon, 1 Jun 2015 17:28:45 +0000 (17:28 +0000)]
Fix types.py to actually be able to run check_padding_command() without erroring out.

<rdar://problem/21071347>

llvm-svn: 238764

9 years agoDisable MachineSink on convergent operations, similar to how IR Sink is
Owen Anderson [Mon, 1 Jun 2015 17:26:30 +0000 (17:26 +0000)]
Disable MachineSink on convergent operations, similar to how IR Sink is
restricted.  No test because no in-tree target currently has convergent
MachineInstr's.

llvm-svn: 238763

9 years agoTeach the IR Sink pass to (conservatively) respect convergent annotations.
Owen Anderson [Mon, 1 Jun 2015 17:20:31 +0000 (17:20 +0000)]
Teach the IR Sink pass to (conservatively) respect convergent annotations.

llvm-svn: 238762

9 years agoInitialize 3 variables which were being used un-initialized.
Hafiz Abid Qadeer [Mon, 1 Jun 2015 17:08:30 +0000 (17:08 +0000)]
Initialize 3 variables which were being used un-initialized.

No regression on testsuite. Comitted as obvious.

llvm-svn: 238761

9 years ago[mips][FastISel] Implement bswap.
Vasileios Kalintiris [Mon, 1 Jun 2015 16:40:45 +0000 (16:40 +0000)]
[mips][FastISel] Implement bswap.

Summary: Implement bswap intrinsic for MIPS FastISel. It's very different for misp32 r1/r2 .

Based on a patch by Reed Kotler.

Test Plan:
bswap1.ll
test-suite

Reviewers: dsanders, rkotler

Subscribers: llvm-commits, rfuhler

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

llvm-svn: 238760

9 years ago[mips][FastISel] Implement intrinsics memset, memcopy & memmove.
Vasileios Kalintiris [Mon, 1 Jun 2015 16:36:01 +0000 (16:36 +0000)]
[mips][FastISel] Implement intrinsics memset, memcopy & memmove.

Summary:
Implement the intrinsics memset, memcopy and memmove in MIPS FastISel.
Make some needed infrastructure fixes so that this can work.

Based on a patch by Reed Kotler.

Test Plan:
memtest1.ll
The patch passes test-suite for mips32 r1/r2 and at O0/O2

Reviewers: rkotler, dsanders

Subscribers: llvm-commits, rfuhler

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

llvm-svn: 238759

9 years agoFix PR21945: Crash in constant evaluator.
Jonathan Roelofs [Mon, 1 Jun 2015 16:23:08 +0000 (16:23 +0000)]
Fix PR21945: Crash in constant evaluator.

Patch by Косов Евгений!

llvm-svn: 238758

9 years ago[mips][FastISel] Implement srem/urem and sdiv/udiv instructions.
Vasileios Kalintiris [Mon, 1 Jun 2015 16:17:37 +0000 (16:17 +0000)]
[mips][FastISel] Implement srem/urem and sdiv/udiv instructions.

Summary: Implement the LLVM assembly urem/srem and sdiv/udiv instructions in MIPS FastISel.

Based on a patch by Reed Kotler.

Test Plan:
srem1.ll
div1.ll
test-suite at O0/O2 for mips32 r1/r2

Reviewers: dsanders, rkotler

Subscribers: llvm-commits, rfuhler

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

llvm-svn: 238757

9 years ago[mips][FastISel] Implement the select statement for MIPS FastISel.
Vasileios Kalintiris [Mon, 1 Jun 2015 15:56:40 +0000 (15:56 +0000)]
[mips][FastISel] Implement the select statement for MIPS FastISel.

Summary: Implement the LLVM IR select statement for MIPS FastISelsel.

Based on a patch by Reed Kotler.

Test Plan:
"Make check" test included now.
Passes test-suite at O2/O0 mips32 r1/r2.

Reviewers: dsanders, rkotler

Subscribers: llvm-commits, rfuhler

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

llvm-svn: 238756

9 years ago[mips][FastISel] Clobber HI0/LO0 registers in MUL instructions.
Vasileios Kalintiris [Mon, 1 Jun 2015 15:48:09 +0000 (15:48 +0000)]
[mips][FastISel] Clobber HI0/LO0 registers in MUL instructions.

Summary:
The contents of the HI/LO registers are unpredictable after the execution of
the MUL instruction. In addition to implicitly defining these registers in the
MUL instruction definition, we have to mark those registers as dead too.

Without this the fast register allocator is running out of registers when the
MUL instruction is followed by another one that tries to allocate the AC0
register.

Based on a patch by Reed Kotler.

Reviewers: dsanders, rkotler

Subscribers: llvm-commits, rfuhler

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

llvm-svn: 238755

9 years ago[Hexagon] Test passes for hexagon target now that the backend correctly generates...
Colin LeMahieu [Mon, 1 Jun 2015 15:47:46 +0000 (15:47 +0000)]
[Hexagon] Test passes for hexagon target now that the backend correctly generates relocations.

llvm-svn: 238754

9 years agoDrop remaining Dragonegg support in release scripts
Hans Wennborg [Mon, 1 Jun 2015 15:37:58 +0000 (15:37 +0000)]
Drop remaining Dragonegg support in release scripts

r236077 and r236081 dropped Dragonegg support from the release scripts
but left some pieces. The most notable change is that Dragonegg won't
be tagged any more.

Patch by David Wiberg <dwiberg@gmail.com>.

llvm-svn: 238753

9 years agoRefactor many file functions to use FileSpec over strings.
Ed Maste [Mon, 1 Jun 2015 15:24:37 +0000 (15:24 +0000)]
Refactor many file functions to use FileSpec over strings.

This is the FreeBSD change for r238604.

llvm-svn: 238752

9 years agoFix relocation selection for foo-. on mips.
Rafael Espindola [Mon, 1 Jun 2015 15:10:51 +0000 (15:10 +0000)]
Fix relocation selection for foo-. on mips.

This handles only the 32 bit case.

llvm-svn: 238751

9 years agoSimplify code, NFC.
Rafael Espindola [Mon, 1 Jun 2015 14:58:29 +0000 (14:58 +0000)]
Simplify code, NFC.

llvm-svn: 238750

9 years agoAdd isConstant argument to MDBuilder::createTBAAStructTagNode
Artur Pilipenko [Mon, 1 Jun 2015 14:53:55 +0000 (14:53 +0000)]
Add isConstant argument to MDBuilder::createTBAAStructTagNode

According to the TBAA description struct-path tag node can have an optional IsConstant field. Add corresponding argument to MDBuilder::createTBAAStructTagNode.

Reviewed By: hfinkel

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

llvm-svn: 238749

9 years ago[Hexagon] Adding basic ELF relocation generation and testing advanced relaxation...
Colin LeMahieu [Mon, 1 Jun 2015 14:51:26 +0000 (14:51 +0000)]
[Hexagon] Adding basic ELF relocation generation and testing advanced relaxation codepath.

llvm-svn: 238748

9 years agoThe fragment implies the section, don't store both.
Rafael Espindola [Mon, 1 Jun 2015 14:34:40 +0000 (14:34 +0000)]
The fragment implies the section, don't store both.

This reduces MCSymbol from 64 to 56 bytes on x86_64.

llvm-svn: 238747

9 years agoFirst commit test.
Asaf Badouh [Mon, 1 Jun 2015 13:56:00 +0000 (13:56 +0000)]
First commit test.

llvm-svn: 238745

9 years ago[CMake] Revert commits r238740/r238741 for embedding Windows version info.
Greg Bedwell [Mon, 1 Jun 2015 13:40:14 +0000 (13:40 +0000)]
[CMake] Revert commits r238740/r238741 for embedding Windows version info.

The clang Windows bots are showing mysterious failures.
Reverting until I can figure out what's going on.

llvm-svn: 238744

9 years agoAVX-512: Optimized vector shuffle for v16f32 and v16i32 types.
Elena Demikhovsky [Mon, 1 Jun 2015 13:26:18 +0000 (13:26 +0000)]
AVX-512: Optimized vector shuffle for v16f32 and v16i32 types.

llvm-svn: 238743

9 years agoRemoving commited assembly file.
Luke Cheeseman [Mon, 1 Jun 2015 13:18:53 +0000 (13:18 +0000)]
Removing commited assembly file.

llvm-svn: 238742

9 years agoremove the use of the LOCATION CMake variable from r238740.
Greg Bedwell [Mon, 1 Jun 2015 13:06:10 +0000 (13:06 +0000)]
remove the use of the LOCATION CMake variable from r238740.

It caused the following failure:
"Policy CMP0026 is not set: Disallow use of the LOCATION target property."

llvm-svn: 238741

9 years agoIn MSVC builds embed a VERSIONINFO resource in our exe and DLL files.
Greg Bedwell [Mon, 1 Jun 2015 12:41:55 +0000 (12:41 +0000)]
In MSVC builds embed a VERSIONINFO resource in our exe and DLL files.

This embeds Windows version information into our executables and DLLs.
The most visible place to view this data is in the details tab of the file
properties window in Windows explorer.

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

llvm-svn: 238740

9 years agoRe-commit of r238201 with fix for building with shared libraries.
Luke Cheeseman [Mon, 1 Jun 2015 12:02:47 +0000 (12:02 +0000)]
Re-commit of r238201 with fix for building with shared libraries.

llvm-svn: 238739

9 years agoAVX-512: Implemented VRANGEPD and VRANGEPD instructions for SKX.
Elena Demikhovsky [Mon, 1 Jun 2015 11:05:34 +0000 (11:05 +0000)]
AVX-512: Implemented VRANGEPD and VRANGEPD instructions for SKX.
Implemented DAG lowering for all these forms.
Added tests for encoding.

By Igor Breger (igor.breger@intel.com)

llvm-svn: 238738

9 years agoFix address adjusment in stack frame inline block lookup
Tamas Berghammer [Mon, 1 Jun 2015 10:38:23 +0000 (10:38 +0000)]
Fix address adjusment in stack frame inline block lookup

When the current address is pointing 1 (unit) over the end of a
section the we have to do a section lookup after making the adjusment
of the current address.

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

llvm-svn: 238737

9 years agoclang-format: [JS] Making arrow function wrapping more consistent.
Daniel Jasper [Mon, 1 Jun 2015 09:56:32 +0000 (09:56 +0000)]
clang-format: [JS] Making arrow function wrapping more consistent.

Before:
  someFunction(() =>
               {
                 doSomething();  // break
               })
      .doSomethingElse(  // break
          );

After:
  someFunction(() => {
    doSomething();  // break
  })
      .doSomethingElse(  // break
          );

This is still bad, but at least it is consistent with what we do for other
function literals. Added corresponding tests.

llvm-svn: 238736

9 years agoAVX-512: Implemented vector shuffle lowering for v8i64 and v8f64 types.
Elena Demikhovsky [Mon, 1 Jun 2015 09:49:53 +0000 (09:49 +0000)]
AVX-512: Implemented vector shuffle lowering for v8i64 and v8f64 types.
I removed the vector-shuffle-512-v8.ll, it is auto-generated test, not valid any more.

llvm-svn: 238735

9 years agoCOFF: Fix warnings found by gcc
Denis Protivensky [Mon, 1 Jun 2015 09:26:32 +0000 (09:26 +0000)]
COFF: Fix warnings found by gcc

llvm-svn: 238734

9 years agoCOFF: Better noexcept specification with LLVM_NOEXCEPT
Denis Protivensky [Mon, 1 Jun 2015 09:08:11 +0000 (09:08 +0000)]
COFF: Better noexcept specification with LLVM_NOEXCEPT

This is a follow-on to r238732

llvm-svn: 238733

9 years agoCOFF: Add noexcept to std::error_category::name
Denis Protivensky [Mon, 1 Jun 2015 08:12:44 +0000 (08:12 +0000)]
COFF: Add noexcept to std::error_category::name

This fixes build error with gcc.

llvm-svn: 238732

9 years ago[MS ABI] Be a little more defensive wrt vector types
David Majnemer [Mon, 1 Jun 2015 07:41:37 +0000 (07:41 +0000)]
[MS ABI] Be a little more defensive wrt vector types

We probably shouldn't say that all appropriately sized vector types are
intel vector types (i.e. __m128, etc.) as they don't exist for all
architectures.  While this is largely academic, it'd save some debugging
if we supported such a platform.

llvm-svn: 238731

9 years ago[WinCOFF] Ignore .safeseh for non-x86 architectures
David Majnemer [Mon, 1 Jun 2015 07:34:26 +0000 (07:34 +0000)]
[WinCOFF] Ignore .safeseh for non-x86 architectures

We don't want to bother with creating .sxdata sections on Win64; all the
relevant information is already in the .pdata section.

llvm-svn: 238730

9 years agoAVX-512: added all forms of VPSHUFD and VPSHUFHW, VPSHUFLW
Elena Demikhovsky [Mon, 1 Jun 2015 07:17:23 +0000 (07:17 +0000)]
AVX-512: added all forms of VPSHUFD and VPSHUFHW, VPSHUFLW
including encodings.

llvm-svn: 238729

9 years agoAVX-512: Implemented VFIXUPIMMPD and VFIXUPIMMPS instructions for KNL and SKX
Elena Demikhovsky [Mon, 1 Jun 2015 06:50:49 +0000 (06:50 +0000)]
AVX-512: Implemented VFIXUPIMMPD and VFIXUPIMMPS instructions for KNL and SKX
Implemented DAG lowering for all these forms.
Added tests for encoding.

by Igor Breger (igor.breger@intel.com)

llvm-svn: 238728

9 years ago[TableGen] Move a couple virtual methods out of line so vtable anchors can be removed...
Craig Topper [Mon, 1 Jun 2015 06:44:18 +0000 (06:44 +0000)]
[TableGen] Move a couple virtual methods out of line so vtable anchors can be removed. NFC

llvm-svn: 238727

9 years ago[TableGen] Remove unnecessary explicit initialization to null of a unique_ptr. NFC
Craig Topper [Mon, 1 Jun 2015 06:44:16 +0000 (06:44 +0000)]
[TableGen] Remove unnecessary explicit initialization to null of a unique_ptr. NFC

llvm-svn: 238726

9 years ago[TableGen] Remove unnecessary forward declarations. NFC
Craig Topper [Mon, 1 Jun 2015 06:44:14 +0000 (06:44 +0000)]
[TableGen] Remove unnecessary forward declarations. NFC

llvm-svn: 238725

9 years agoAVX-512: Fixed a bug in compress and expand intrinsics.
Elena Demikhovsky [Mon, 1 Jun 2015 06:30:13 +0000 (06:30 +0000)]
AVX-512: Fixed a bug in compress and expand intrinsics.

By Igor Breger (igor.breger@intel.com)

llvm-svn: 238724

9 years agoAdd address space argument to isLegalAddressingMode
Matt Arsenault [Mon, 1 Jun 2015 05:31:59 +0000 (05:31 +0000)]
Add address space argument to isLegalAddressingMode

This is important because of different addressing modes
depending on the address space for GPU targets.

This only adds the argument, and does not update
any of the uses to provide the correct address space.

llvm-svn: 238723

9 years agoRemove "%zu" format specifier for MSVC.
Chaoren Lin [Mon, 1 Jun 2015 04:28:12 +0000 (04:28 +0000)]
Remove "%zu" format specifier for MSVC.

Reviewers: zturner

Subscribers: lldb-commits

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

llvm-svn: 238722

9 years agoApply name change to testsuite file.
Jonathan Peyton [Mon, 1 Jun 2015 04:24:23 +0000 (04:24 +0000)]
Apply name change to testsuite file.

This change has the llvm-lit part of the testsuite have clang
link to libomp instead of libiomp5.

llvm-svn: 238721

9 years agoApply name change to Makefile build system.
Jonathan Peyton [Mon, 1 Jun 2015 04:21:22 +0000 (04:21 +0000)]
Apply name change to Makefile build system.

This change produces a dynamic library named libomp instead of
libiomp5.  Similar to the CMake change, it produces symlinks of libiomp5
in the exports/ directory for Unix systems and copies for Windows.

llvm-svn: 238720

9 years agoCOFF: Fix the import table Hint/Name field.
Rui Ueyama [Mon, 1 Jun 2015 03:55:04 +0000 (03:55 +0000)]
COFF: Fix the import table Hint/Name field.

llvm-svn: 238719

9 years agoFix comments.
Rui Ueyama [Mon, 1 Jun 2015 03:55:02 +0000 (03:55 +0000)]
Fix comments.

llvm-svn: 238718

9 years agoCOFF: Fix /include. Included symbols are GC-roots.
Rui Ueyama [Mon, 1 Jun 2015 03:42:54 +0000 (03:42 +0000)]
COFF: Fix /include. Included symbols are GC-roots.

llvm-svn: 238717

9 years ago[opaque pointer type] Explicitly store the pointee type of the result of a GEP
David Blaikie [Mon, 1 Jun 2015 03:09:34 +0000 (03:09 +0000)]
[opaque pointer type] Explicitly store the pointee type of the result of a GEP

Alternatively, this type could be derived on-demand whenever
getResultElementType is called - if someone thinks that's the better
choice (simple time/space tradeoff), I'm happy to give it a go.

llvm-svn: 238716

9 years agoApply name change to CMake build system.
Jonathan Peyton [Mon, 1 Jun 2015 03:05:13 +0000 (03:05 +0000)]
Apply name change to CMake build system.

This change has the CMake build system create a dynamic library named
libomp instead of libiomp5.  Also any reference to libiomp is replaced
with libomp.  One can still use the LIBOMP_LIB_NAME variable to enforce
a different name, and everything will still work as expected.  An important
note is that libiomp5 and libgomp symlinks are created at install time when
on Unix systems.  On Windows, copies are created with the legacy names.

llvm-svn: 238715

9 years agoCOFF: Define an error category for the linker.
Rui Ueyama [Mon, 1 Jun 2015 02:58:15 +0000 (02:58 +0000)]
COFF: Define an error category for the linker.

Instead of returning non-categorized errors, return categorized errors.
All uses of make_dynamic_error_code are removed.

Because we don't have error reporting mechanism, I just chose to print out
error messages to stderr, and then return an error object. Not sure if
that's the right thing to do, but at least it seems practical.

http://reviews.llvm.org/D10129

llvm-svn: 238714

9 years agoApply name change to tools/* files.
Jonathan Peyton [Mon, 1 Jun 2015 02:41:44 +0000 (02:41 +0000)]
Apply name change to tools/* files.

These changes are all in comments.  Change libiomp references to
libomp.

llvm-svn: 238713

9 years agoApply name change to src/* files.
Jonathan Peyton [Mon, 1 Jun 2015 02:37:28 +0000 (02:37 +0000)]
Apply name change to src/* files.

These changes are mostly in comments, but there are a few
that aren't.  Change libiomp5 => libomp everywhere.  One internal
function name is changed in kmp_gsupport.c, and in kmp_i18n.c, the
static char[] variable 'name' is changed to "libomp".

llvm-svn: 238712

9 years agoApply name change to doxygen files.
Jonathan Peyton [Mon, 1 Jun 2015 02:32:03 +0000 (02:32 +0000)]
Apply name change to doxygen files.

This change only affects the doxygen file that contains a
reference to libiomp5.  change libiomp5 to libomp.

llvm-svn: 238711

9 years agoAdding libomp.rc.var for name change
Jonathan Peyton [Mon, 1 Jun 2015 02:26:08 +0000 (02:26 +0000)]
Adding libomp.rc.var for name change

Adding a new file libomp.rc.var in anticipation of more
name change commits.  This file is a copy of libiomp.rc.var.

llvm-svn: 238710

9 years agoTry to fix the build of IntelJITEventListener.
Rafael Espindola [Mon, 1 Jun 2015 02:18:14 +0000 (02:18 +0000)]
Try to fix the build of IntelJITEventListener.

llvm-svn: 238709

9 years agoRename HasData to IsRegistered.
Rafael Espindola [Mon, 1 Jun 2015 01:52:18 +0000 (01:52 +0000)]
Rename HasData to IsRegistered.

There is no MCSectionData, so the old name is now meaningless.

Also remove some asserts/checks that were there just because the information
they used was in MCSectionData.

llvm-svn: 238708

9 years agoRemove trivial forwarding function.
Rafael Espindola [Mon, 1 Jun 2015 01:39:15 +0000 (01:39 +0000)]
Remove trivial forwarding function.

llvm-svn: 238707

9 years agoStore a bit in MCSection saying if it was registered with MCAssembler.
Rafael Espindola [Mon, 1 Jun 2015 01:30:01 +0000 (01:30 +0000)]
Store a bit in MCSection saying if it was registered with MCAssembler.

With this we can replace a SetVector with a plain std::vector.

llvm-svn: 238706

9 years agoUse a bitfield. NFC.
Rafael Espindola [Mon, 1 Jun 2015 01:05:07 +0000 (01:05 +0000)]
Use a bitfield. NFC.

llvm-svn: 238705

9 years agoUse a 32 bit field for the symbol index.
Rafael Espindola [Mon, 1 Jun 2015 00:58:31 +0000 (00:58 +0000)]
Use a 32 bit field for the symbol index.

Even 64 ELF uses a 32 bit field to refer to symbols.

llvm-svn: 238704

9 years agoSimplify another function that doesn't fail.
Rafael Espindola [Mon, 1 Jun 2015 00:27:26 +0000 (00:27 +0000)]
Simplify another function that doesn't fail.

llvm-svn: 238703

9 years ago[PHITransAddr] Don't translate unreachable values
David Majnemer [Mon, 1 Jun 2015 00:15:08 +0000 (00:15 +0000)]
[PHITransAddr] Don't translate unreachable values

Unreachable values may use themselves in strange ways due to their
dominance property.  Attempting to translate through them can lead to
infinite recursion, crashing LLVM.  Instead, claim that we weren't able
to translate the value.

This fixes PR23096.

llvm-svn: 238702

9 years ago[PHITransAddr] Use std::find instead of std::count
David Majnemer [Mon, 1 Jun 2015 00:15:04 +0000 (00:15 +0000)]
[PHITransAddr] Use std::find instead of std::count

There is no need to visit all the elements if we are merely performing a
membership check.  NFCI.

llvm-svn: 238701

9 years agoSimplify interface of function that doesn't fail.
Rafael Espindola [Sun, 31 May 2015 23:52:50 +0000 (23:52 +0000)]
Simplify interface of function that doesn't fail.

llvm-svn: 238700

9 years ago[DWARF] Fix a bug in line info handling
Keno Fischer [Sun, 31 May 2015 23:37:04 +0000 (23:37 +0000)]
[DWARF] Fix a bug in line info handling

This fixes a bug in the line info handling in the dwarf code, based on a
problem I when implementing RelocVisitor support for MachO.
Since addr+size will give the first address past the end of the function,
we need to back up one line table entry. Fix this by looking up the
end_addr-1, which is the last address in the range. Note that this also
removes a duplicate output from the llvm-rtdyld line table dump. The
relevant line is the end_sequence one in the line table and has an offset
of the first address part the end of the range and hence should not be
included.
Also factor out the common functionality into a separate function.
This comes up on MachO much more than on ELF, since MachO
doesn't store the symbol size separately, hence making
said situation always occur.

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

llvm-svn: 238699

9 years agoFor COFF and MachO, compute the gap between to symbols.
Rafael Espindola [Sun, 31 May 2015 23:15:35 +0000 (23:15 +0000)]
For COFF and MachO, compute the gap between to symbols.

Before r238028 we used to do this in O(N^2), now we do it in O(N log N).

llvm-svn: 238698