platform/upstream/llvm.git
9 years agoReinforce ARMTargetParser::getCanonicalArchName validation
Renato Golin [Fri, 22 May 2015 20:43:30 +0000 (20:43 +0000)]
Reinforce ARMTargetParser::getCanonicalArchName validation

Before, getCanonicalArchName was relying on parseArch() to validate the arch
name, which was a problem when other methods, that also needed to call it,
were duplicating the steps.

But to dissociate getCanonicalArchName from parseArch, we needed to make
getCanonicalArchName more robust in detecting valid arch names. It's still
not perfect, but will do for the time being, until we merge Triple with
TargetParser into a TargetDescription mega class.

llvm-svn: 238047

9 years agoUse new MachineInstr mayLoadOrStore() API. NFC.
Chad Rosier [Fri, 22 May 2015 20:07:34 +0000 (20:07 +0000)]
Use new MachineInstr mayLoadOrStore() API. NFC.

llvm-svn: 238044

9 years agodotest.py - fixed a bug displaying usage
Vince Harron [Fri, 22 May 2015 19:49:23 +0000 (19:49 +0000)]
dotest.py - fixed a bug displaying usage

./dotest.py --help

llvm-svn: 238043

9 years agoImplement PlatformWindows::GetEnvironment.
Zachary Turner [Fri, 22 May 2015 19:34:17 +0000 (19:34 +0000)]
Implement PlatformWindows::GetEnvironment.

This fixes a couple of tests that rely on being able to get the
host's environment or spawn an inferior with specific arguments.

llvm-svn: 238042

9 years agoFix use-after-free in OptionValueString.
Zachary Turner [Fri, 22 May 2015 19:33:54 +0000 (19:33 +0000)]
Fix use-after-free in OptionValueString.

We were assigning a temporary std::string to a StringRef.  Somehow
this worked on every platform but Windows.

llvm-svn: 238041

9 years agoDisable TestConcurrentEvents.py on Windows.
Zachary Turner [Fri, 22 May 2015 19:33:32 +0000 (19:33 +0000)]
Disable TestConcurrentEvents.py on Windows.

This test takes over 5 minutes to run just by itself, and everything
fails anyway, so it doesn't make sense to keep it running for now.

llvm-svn: 238040

9 years ago[TestRaise] Skip the SIGRTMIN test on Android.
Siva Chandra [Fri, 22 May 2015 19:00:33 +0000 (19:00 +0000)]
[TestRaise] Skip the SIGRTMIN test on Android.

Summary:
Running "kill -l" on nexus player (i386) device results in this:

    1    HUP Hangup                        33     33 Signal 33
    2    INT Interrupt                     34     34 Signal 34
    3   QUIT Quit                          35     35 Signal 35
    4    ILL Illegal instruction           36     36 Signal 36
    5   TRAP Trap                          37     37 Signal 37
    6   ABRT Aborted                       38     38 Signal 38
    7    BUS Bus error                     39     39 Signal 39
    8    FPE Floating point exception      40     40 Signal 40
    9   KILL Killed                        41     41 Signal 41
   10   USR1 User signal 1                 42     42 Signal 42
   11   SEGV Segmentation fault            43     43 Signal 43
   12   USR2 User signal 2                 44     44 Signal 44
   13   PIPE Broken pipe                   45     45 Signal 45
   14   ALRM Alarm clock                   46     46 Signal 46
   15   TERM Terminated                    47     47 Signal 47
   16 STKFLT Stack fault                   48     48 Signal 48
   17   CHLD Child exited                  49     49 Signal 49
   18   CONT Continue                      50     50 Signal 50
   19   STOP Stopped (signal)              51     51 Signal 51
   20   TSTP Stopped                       52     52 Signal 52
   21   TTIN Stopped (tty input)           53     53 Signal 53
   22   TTOU Stopped (tty output)          54     54 Signal 54
   23    URG Urgent I/O condition          55     55 Signal 55
   24   XCPU CPU time limit exceeded       56     56 Signal 56
   25   XFSZ File size limit exceeded      57     57 Signal 57
   26 VTALRM Virtual timer expired         58     58 Signal 58
   27   PROF Profiling timer expired       59     59 Signal 59
   28  WINCH Window size changed           60     60 Signal 60
   29     IO I/O possible                  61     61 Signal 61
   30    PWR Power failure                 62     62 Signal 62
   31    SYS Bad system call               63     63 Signal 63
   32     32 Signal 32                     64     64 Signal 64

The signals from 33-64 are missing symbolic names.

Test Plan: dotest.py -p TestRaise on Android

Reviewers: labath

Subscribers: tberghammer, aemerson, lldb-commits

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

llvm-svn: 238039

9 years ago[bpf] emit jmp fixups in little endian
Alexei Starovoitov [Fri, 22 May 2015 18:47:33 +0000 (18:47 +0000)]
[bpf] emit jmp fixups in little endian

The 'off' field of 'struct bpf_insn' is in cpu-endianness,
since the rest is emitted as little endian, make sure
that 'off' field is little endian as well.

llvm-svn: 238038

9 years agoUse profile and version parsers from ARMTargetParser
Renato Golin [Fri, 22 May 2015 18:18:25 +0000 (18:18 +0000)]
Use profile and version parsers from ARMTargetParser

Now that ARMTargetParser can parse profile and version numbers,
use them instead of the local implementation.

llvm-svn: 238037

9 years agoAdding profile and version parsers to ARMTargetParser
Renato Golin [Fri, 22 May 2015 18:17:55 +0000 (18:17 +0000)]
Adding profile and version parsers to ARMTargetParser

This allows us to match armv6m to default to thumb, but will also be used by
Clang's driver and remove the current incomplete copy in it.

llvm-svn: 238036

9 years agoReapply r238011 with a fix for the trap instruction.
Quentin Colombet [Fri, 22 May 2015 18:10:47 +0000 (18:10 +0000)]
Reapply r238011 with a fix for the trap instruction.
The problem was that I slipped a change required for shrink-wrapping, namely I
used getFirstTerminator instead of the getLastNonDebugInstr that was here before
the refactoring, whereas the surrounding code is not yet patched for that.

Original message:
[X86] Refactor the prologue emission to prepare for shrink-wrapping.

- Add a late pass to expand pseudo instructions (tail call and EH returns).
 Instead of doing it in the prologue emission.
- Factor some static methods in X86FrameLowering to ease code sharing.

NFC.

Related to <rdar://problem/20821487>

llvm-svn: 238035

9 years agoRemove redundant std::move on functions that return a unique_ptr.
Benjamin Kramer [Fri, 22 May 2015 17:52:04 +0000 (17:52 +0000)]
Remove redundant std::move on functions that return a unique_ptr.

llvm-svn: 238034

9 years ago[Unroll] Separate the logic for testing each iteration of the loop,
Chandler Carruth [Fri, 22 May 2015 17:41:35 +0000 (17:41 +0000)]
[Unroll] Separate the logic for testing each iteration of the loop,
accumulating estimated cost, and other loop-centric logic from the logic
used to analyze instructions in a particular iteration.

This makes the visitor very narrow in scope -- all it does is visit
instructions, update a map of simplified values, and return whether it
is able to optimize away a particular instruction.

The two cost metrics are now returned as an optional struct. When the
optional is left unengaged, there is no information about the unrolled
cost of the loop, when it is engaged the cost metrics are available to
run against the thresholds.

No functionality changed.

llvm-svn: 238033

9 years ago[PPC64] Add support for clrbhrb, mfbhrbe, rfebb.
Bill Schmidt [Fri, 22 May 2015 16:44:10 +0000 (16:44 +0000)]
[PPC64] Add support for clrbhrb, mfbhrbe, rfebb.

This patch adds support for the ISA 2.07 additions involving the
branch history rolling buffer and event-based branching.  These will
not be used by typical applications, so built-in support is not
required.  They will only be available via inline assembly.

Assembly/disassembly tests are included in the patch.

llvm-svn: 238032

9 years agoAdd clarifying note that sampling-based profiles cannot be used for code coverage.
Diego Novillo [Fri, 22 May 2015 16:05:07 +0000 (16:05 +0000)]
Add clarifying note that sampling-based profiles cannot be used for code coverage.

llvm-svn: 238031

9 years ago[ELF] Remove redundant unique_ptr moves found by -Wpessimizing-move.
Benjamin Kramer [Fri, 22 May 2015 16:01:21 +0000 (16:01 +0000)]
[ELF] Remove redundant unique_ptr moves found by -Wpessimizing-move.

llvm-svn: 238030

9 years ago[ELF] Fix shared CMake build.
Benjamin Kramer [Fri, 22 May 2015 16:01:12 +0000 (16:01 +0000)]
[ELF] Fix shared CMake build.

llvm-svn: 238029

9 years agoStop inventing symbol sizes.
Rafael Espindola [Fri, 22 May 2015 15:43:00 +0000 (15:43 +0000)]
Stop inventing symbol sizes.

MachO and COFF quite reasonably only define the size for common symbols.

We used to try to figure out the "size" by computing the gap from one symbol to
the next.

This would not be correct in general, since a part of a section can belong to no
visible symbol (padding, private globals).

It was also really expensive, since we would walk every symbol to find the size
of one.

If a caller really wants this, it can sort all the symbols once and get all the
gaps ("size") in O(n log n) instead of O(n^2).

On MachO this also has the advantage of centralizing all the checks for an
invalid n_sect.

llvm-svn: 238028

9 years agoremove names from comments, fix typos; NFC
Sanjay Patel [Fri, 22 May 2015 15:38:24 +0000 (15:38 +0000)]
remove names from comments, fix typos; NFC

llvm-svn: 238027

9 years agofix typo, 80-col; NFC
Sanjay Patel [Fri, 22 May 2015 15:32:33 +0000 (15:32 +0000)]
fix typo, 80-col; NFC

llvm-svn: 238026

9 years agofix typo in comment; NFC
Sanjay Patel [Fri, 22 May 2015 15:31:47 +0000 (15:31 +0000)]
fix typo in comment; NFC

llvm-svn: 238025

9 years agoDetect invalid section indexes when we first read them.
Rafael Espindola [Fri, 22 May 2015 14:59:27 +0000 (14:59 +0000)]
Detect invalid section indexes when we first read them.

We still detect the same errors, but now we do it earlier.

llvm-svn: 238024

9 years ago[ARM] Fix typo in subtarget feature list for 7em triple
John Brawn [Fri, 22 May 2015 14:16:22 +0000 (14:16 +0000)]
[ARM] Fix typo in subtarget feature list for 7em triple

The list of subtarget features for the 7em triple contains 't2xtpk',
which actually disables that subtarget feature. Correct that to
'+t2xtpk' and test that the instructions enabled by that feature do
actually work.

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

llvm-svn: 238022

9 years agoUpdating the documentation to include an operator! for negative capability support.
Aaron Ballman [Fri, 22 May 2015 13:36:48 +0000 (13:36 +0000)]
Updating the documentation to include an operator! for negative capability support.

llvm-svn: 238020

9 years agoFix llvm-nm -S option.
Rafael Espindola [Fri, 22 May 2015 13:28:35 +0000 (13:28 +0000)]
Fix llvm-nm -S option.

It is explicitly documented to have no effect on object formats where symbols
don't have sizes.

llvm-svn: 238019

9 years agoMake this test stricter. NFC.
Rafael Espindola [Fri, 22 May 2015 13:17:31 +0000 (13:17 +0000)]
Make this test stricter. NFC.

llvm-svn: 238018

9 years ago[ARM] report_fatal_error for not implemented functionality
Denis Protivensky [Fri, 22 May 2015 12:39:05 +0000 (12:39 +0000)]
[ARM] report_fatal_error for not implemented functionality

llvm-svn: 238017

9 years agoAdding new AST matcher: isConstexpr
Szabolcs Sipos [Fri, 22 May 2015 11:35:50 +0000 (11:35 +0000)]
Adding new AST matcher: isConstexpr

It matches constexpr variable and function declarations.

llvm-svn: 238016

9 years ago[ARM] Ability to add GOT and PLTGOT entries for same symbol
Denis Protivensky [Fri, 22 May 2015 11:23:39 +0000 (11:23 +0000)]
[ARM] Ability to add GOT and PLTGOT entries for same symbol

These two serve different purpose:
PLTGOT entries are (usually) lazily resolved and serve as trampolines
to correctly call dynamically linked functions. They often have
R_*_JUMP_SLOT dynamic relocation type used.
Simple GOT entries hold other things, one of them may be
R_*_GLOB_DAT to correctly reference global and static data. This
is also used to hold dynamically linked function's address.

To properly handle cases when shared object's function is called
and at the same time its address is taken, we need to be able to have
both GOT and PLTGOT entries bearing different dynamic relocation types
for the same symbol.

llvm-svn: 238015

9 years ago[ARM] Implement R_ARM_GLOB_DAT for GOT entries
Denis Protivensky [Fri, 22 May 2015 11:00:31 +0000 (11:00 +0000)]
[ARM] Implement R_ARM_GLOB_DAT for GOT entries

This is used when referencing global or static data in shared
objects. This is also used when function's address is taken and
function call is made indirectly.

llvm-svn: 238014

9 years agoAdd a clang-tidy check for move constructors/assignment ops without noexcept.
Alexander Kornienko [Fri, 22 May 2015 10:31:17 +0000 (10:31 +0000)]
Add a clang-tidy check for move constructors/assignment ops without noexcept.

Summary:
Add a clang-tidy check (misc-noexcept-move-ctors) for move constructors
and assignment operators not using noexcept.

http://llvm.org/PR23519

Reviewers: klimek

Reviewed By: klimek

Subscribers: curdeius, cfe-commits

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

llvm-svn: 238013

9 years agoReapply part of r237975, "Fix Clang -Wmissing-override warning", except for DIContext...
NAKAMURA Takumi [Fri, 22 May 2015 10:11:07 +0000 (10:11 +0000)]
Reapply part of r237975, "Fix Clang -Wmissing-override warning", except for DIContext.h, to apease g++-4.7.

llvm-svn: 238012

9 years agoRevert "[X86] Fix a variable name for r237977 so that it works with every compilers."
Tamas Berghammer [Fri, 22 May 2015 10:01:56 +0000 (10:01 +0000)]
Revert "[X86] Fix a variable name for r237977 so that it works with every compilers."
Revert "[X86] Refactor the prologue emission to prepare for shrink-wrapping."

This reverts commit 6b3b93fc8b68a2c806aa992ee4bd3d7f61898d4b.
This reverts commit ab0b15dff8539826283a59c2dd700a18a9680e0f.

llvm-svn: 238011

9 years ago[OPENMP] Prepare codegen for privates in tasks for non-capturing of privates in Captu...
Alexey Bataev [Fri, 22 May 2015 08:56:35 +0000 (08:56 +0000)]
[OPENMP] Prepare codegen for privates in tasks for non-capturing of privates in CapturedStmt.

Reworked codegen for privates in tasks:

call @kmpc_omp_task_alloc();
...
call @kmpc_omp_task(task_proxy);

void map_privates(.privates_rec. *privs, type1 ** priv1_ref, ..., typen **privn_ref) {
  *priv1_ref = &privs->private1;
  ...
  *privn_ref = &privs->privaten;
  ret void
}

i32 task_entry(i32 ThreadId, i32 PartId, void* privs, void (void*, ...) map_privates, shareds* captures) {
  type1 **priv1;
  ...
  typen **privn;
  call map_privates(privs, priv1, ..., privn);
  <Task body with priv1, .., privn instead of the captured variables>.
  ret i32
}

i32 task_proxy(i32 ThreadId, kmp_task_t_with_privates *tt) {
  call task_entry(ThreadId, tt->task_data.PartId, &tt->privates, map_privates, tt->task_data.shareds);
}

llvm-svn: 238010

9 years agoAdd real time signals support to LinuxSignals
Pavel Labath [Fri, 22 May 2015 08:46:18 +0000 (08:46 +0000)]
Add real time signals support to LinuxSignals

Summary: This enables correct handling of real time signals by lldb.

Test Plan: Added a test that verifies handling of SIGRTMIN

Reviewers: tberghammer, ovyalov

Subscribers: lldb-commits

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

llvm-svn: 238009

9 years agoCompile time improvements to VirtRegRewriter.
Puyan Lotfi [Fri, 22 May 2015 08:11:26 +0000 (08:11 +0000)]
Compile time improvements to VirtRegRewriter.

This change to VirtRegRewriter::addMBBLiveIns adds live-in registers for each
MachineBasicBlock's LiveIns set without isLiveIn checks as they are being added
because doing so is expensive. After all live-in registers are added, the LiveIn
vectors are sorted and uniqued.

llvm-svn: 238008

9 years agoRevert r237954, "Resubmit r237708 (MIR Serialization: print and parse LLVM IR using...
NAKAMURA Takumi [Fri, 22 May 2015 07:17:07 +0000 (07:17 +0000)]
Revert r237954, "Resubmit r237708 (MIR Serialization: print and parse LLVM IR using MIR format)."

It brought cyclic dependencies between LLVMCodeGen and LLVMMIR.

llvm-svn: 238007

9 years agoModernize some doc comments. NFC
Justin Bogner [Fri, 22 May 2015 06:48:13 +0000 (06:48 +0000)]
Modernize some doc comments. NFC

llvm-svn: 238006

9 years agoMC: Shave a pointer off of MCSymbol::Name
Duncan P. N. Exon Smith [Fri, 22 May 2015 06:04:42 +0000 (06:04 +0000)]
MC: Shave a pointer off of MCSymbol::Name

Shave a pointer off of `MCSymbolName` by storing `StringMapEntry<bool>*`
instead of `StringRef`.  This brings `sizeof(MCSymbol)` down to 64 on
64-bit platforms, a nice round number.  My profile showed memory
dropping from 914 MB down to 908 MB, roughly 0.7%.  Other than memory
usage, no functionality change here.

(I'm looking at `llc` memory usage on `verify-uselistorder.lto.opt.bc`;
see r236629 for details.)

llvm-svn: 238005

9 years agoRevert "Fix Clang -Wmissing-override warning"
Tobias Grosser [Fri, 22 May 2015 06:01:04 +0000 (06:01 +0000)]
Revert "Fix Clang -Wmissing-override warning"

This reverts commit r237975. This seems also to break with gcc 4.7

llvm-svn: 238004

9 years agoMC: Pack MCSymbol::Index in with the bitfield in MCSymbol
Duncan P. N. Exon Smith [Fri, 22 May 2015 05:59:05 +0000 (05:59 +0000)]
MC: Pack MCSymbol::Index in with the bitfield in MCSymbol

Save a pointer for each `MCSymbol`, bringing `llc` memory usage down
from 920 MB to 914 MB, around ~0.6%.

(I'm looking at `llc` memory usage on `verify-uselistorder.lto.opt.bc`;
see r236629 for details.)

llvm-svn: 238003

9 years ago[ItaniumMangle] Fix a typo.
David Majnemer [Fri, 22 May 2015 05:54:24 +0000 (05:54 +0000)]
[ItaniumMangle] Fix a typo.

llvm-svn: 238002

9 years agoMC: Lift MCSymbolData::Index up to MCSymbol::Index, NFC
Duncan P. N. Exon Smith [Fri, 22 May 2015 05:54:01 +0000 (05:54 +0000)]
MC: Lift MCSymbolData::Index up to MCSymbol::Index, NFC

Lift `MCSymbolData::Index` up a level to `MCSymbol`, as preparation for
packing it into the bitfield in `MCSymbol`.

llvm-svn: 238001

9 years agoRevert part of r237975, "Fix Clang -Wmissing-override warning" in DIContext.h, to...
NAKAMURA Takumi [Fri, 22 May 2015 05:52:50 +0000 (05:52 +0000)]
Revert part of r237975, "Fix Clang -Wmissing-override warning" in DIContext.h, to appease g++-4.7.

  llvm/include/llvm/DebugInfo/DIContext.h:144:11: error:   overriding â€˜virtual llvm::LoadedObjectInfo::~LoadedObjectInfo() noexcept (true)’

It seems the destructor in the base class may not be "default".

llvm-svn: 238000

9 years ago[Sema] Don't crash on out-of-line virtual constexpr functions
David Majnemer [Fri, 22 May 2015 05:49:41 +0000 (05:49 +0000)]
[Sema] Don't crash on out-of-line virtual constexpr functions

The method wasn't an overrider but didn't have 'virtual' textually
written because our CXXMethodDecl was an out-of-line definition.  Make
sure we use the canonical decl instead.

This fixes PR23629.

llvm-svn: 237999

9 years agoSDAG: Give SDDbgValues their own allocator (and reset it)
Duncan P. N. Exon Smith [Fri, 22 May 2015 05:45:19 +0000 (05:45 +0000)]
SDAG: Give SDDbgValues their own allocator (and reset it)

Previously `SDDbgValue`s used the general allocator that lives for all
of `SelectionDAG`.  Instead, give them their own allocator, and reset it
whenever `SDDbgInfo::clear()` is called, plugging a spiritual leak.

This drops `SelectionDAGBuilder::visitIntrinsicCall()` off of my heap
profile (was at around 2% of `llc` for codegen of `-flto -g`).  Thanks
to Pete Cooper for spotting the problem and suggesting the fix.

llvm-svn: 237998

9 years agoSDAG: Cleanup initialization of SDDbgValue, NFC
Duncan P. N. Exon Smith [Fri, 22 May 2015 05:35:53 +0000 (05:35 +0000)]
SDAG: Cleanup initialization of SDDbgValue, NFC

Cleanup how `SDDbgValue` is initialized, and rearrange the fields to
save two pointers in the struct layout.  No real functionality change
though (and I doubt the memory savings would show up in a profile).

llvm-svn: 237997

9 years agoRevert "unique_ptrify LoadedObjectInfo::clone"
Tobias Grosser [Fri, 22 May 2015 05:33:54 +0000 (05:33 +0000)]
Revert "unique_ptrify LoadedObjectInfo::clone"

This reverts commit r237976, which seems to break existing gcc 4.7 buildbots.

llvm-svn: 237996

9 years ago[InstSimplify] Handle some overflow intrinsics in InstSimplify
David Majnemer [Fri, 22 May 2015 03:56:46 +0000 (03:56 +0000)]
[InstSimplify] Handle some overflow intrinsics in InstSimplify

This change does a few things:
- Move some InstCombine transforms to InstSimplify
- Run SimplifyCall from within InstCombine::visitCallInst
- Teach InstSimplify to fold [us]mul_with_overflow(X, undef) to 0.

llvm-svn: 237995

9 years ago[Unroll] Replace a hand-wavy FIXME with a FIXME that explains the actual
Chandler Carruth [Fri, 22 May 2015 03:07:28 +0000 (03:07 +0000)]
[Unroll] Replace a hand-wavy FIXME with a FIXME that explains the actual
problem instead of suggesting doing something that is trivial to do but
incorrect given the current design of the libraries.

llvm-svn: 237994

9 years ago[Unroll] Extract the logic for caching SCEV-modeled GEPs with their
Chandler Carruth [Fri, 22 May 2015 03:02:22 +0000 (03:02 +0000)]
[Unroll] Extract the logic for caching SCEV-modeled GEPs with their
simplified model for use simulating each iteration into a separate
helper function that just returns the cache.

Building this cache had nothing to do with the rest of the unroll
analysis and so this removes an unnecessary coupling, etc. It should
also make it easier to think about the concept of providing fast cached
access to basic SCEV models as an orthogonal concept to the overall
unroll simulation.

I'd really like to see this kind of caching logic folded into SCEV
itself, it seems weird for us to provide it at this layer rather than
making repeated queries into SCEV fast all on their own.

No functionality changed.

llvm-svn: 237993

9 years agoApply existing checks to C++1Z (has_feature_cxx0x); NFC
Faisal Vali [Fri, 22 May 2015 02:57:28 +0000 (02:57 +0000)]
Apply existing checks to C++1Z (has_feature_cxx0x); NFC

This applies the existing checks in has_feature_cxx0x to -std=c++1z.
In addition, references to C++1y are updated to refer to C++14

No functional change. Testing of __has_feature for C++1z features
is not added in this change.

Patch by Hubert Tong!

llvm-svn: 237992

9 years ago[OpenMP] Test AVX default SIMD alignment. NFC.
Ahmed Bougacha [Fri, 22 May 2015 02:51:49 +0000 (02:51 +0000)]
[OpenMP] Test AVX default SIMD alignment.  NFC.

llvm-svn: 237991

9 years ago[Unroll] Refactor the accumulation of optimized instruction costs into
Chandler Carruth [Fri, 22 May 2015 02:47:29 +0000 (02:47 +0000)]
[Unroll] Refactor the accumulation of optimized instruction costs into
a single location.

This reduces code duplication a bit and will also pave the way for
a better separation between the visitation algorithm and the unroll
analysis.

No functionality changed.

llvm-svn: 237990

9 years ago[CodeGen] Use TargetInfo::getABI() throughout X86*TargetCodeGenInfo.
Ahmed Bougacha [Fri, 22 May 2015 02:25:58 +0000 (02:25 +0000)]
[CodeGen] Use TargetInfo::getABI() throughout X86*TargetCodeGenInfo.

We already have the ABI, we don't need a "HasAVX" flag.
This will also makes it easier to add an AVX512 ABI.

No functional change intended.

llvm-svn: 237989

9 years agoAdd TODO items
Eric Fiselier [Fri, 22 May 2015 02:23:22 +0000 (02:23 +0000)]
Add TODO items

llvm-svn: 237988

9 years ago[LICM] Sinking doesn't involve the preheader
Philip Reames [Fri, 22 May 2015 02:14:05 +0000 (02:14 +0000)]
[LICM] Sinking doesn't involve the preheader

PR23608 pointed out that using the preheader to gain a context instruction isn't always legal because a loop might not have a preheader.  When looking into that, I realized that using the preheader to determine legality for sinking is questionable at best.  Given no test covers that case and the original commit didn't seem to intend it, I restructured the code to only ask context sensative queries for hoising of loads and stores.  This is effectively a partial revert of 237593.

llvm-svn: 237985

9 years agoRevert r236894 "[BasicAA] Fix zext & sext handling"
Hans Wennborg [Fri, 22 May 2015 01:27:37 +0000 (01:27 +0000)]
Revert r236894 "[BasicAA] Fix zext & sext handling"

This seems to have caused PR23626: Clang miscompiles webkit's base64 decoder

llvm-svn: 237984

9 years agoFix assertion when assigning to object in OpenCL constant address space.
Richard Smith [Fri, 22 May 2015 01:14:39 +0000 (01:14 +0000)]
Fix assertion when assigning to object in OpenCL constant address space.

Patch by John Garvin!

llvm-svn: 237983

9 years ago"This adds -fconcepts-ts as a cc1 option for enabling the
Faisal Vali [Fri, 22 May 2015 01:11:10 +0000 (01:11 +0000)]
"This adds -fconcepts-ts as a cc1 option for enabling the
in-progress implementation of the Concepts TS. The recommended feature
test macro __cpp_experimental_concepts is set to 1 (as opposed to
201501) to indicate that the feature is enabled, but the
implementation is incomplete.

The link to the Concepts TS in cxx_status is updated to refer to the
PDTS (N4377). Additional changes related to __has_feature and
__has_extension are to follow in a later change.

Relevant tests include:

test/Lexer/cxx-features.cpp

The test file is updated with testing of the C++14 + Concepts TS mode.
The expected behaviour is the same as that of the C++14 modes except
for the case of __cpp_experimental_concepts."

- Hubert Tong.

Being committed for Hubert (as per his understanding with Richard Smith) as we start work on the concepts-ts following our preliminary strategy session earlier today.

The patch is tiny and seems quite standard.

Thanks Hubert!

llvm-svn: 237982

9 years ago[TestLldbGdbServer] Up sleep duration to 1min in the inferior thread_func.
Siva Chandra [Fri, 22 May 2015 00:52:41 +0000 (00:52 +0000)]
[TestLldbGdbServer] Up sleep duration to 1min in the inferior thread_func.

Summary:
The current sleep duration is not sufficient for Android.

[[ Its a completely different investigation as to why Android needs longer
   sleep durations for this test. ]]

Test Plan: dotest.py -p TestLldbGdbServer on Android and local linux.

Reviewers: chaoren

Reviewed By: chaoren

Subscribers: tberghammer, lldb-commits

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

llvm-svn: 237981

9 years ago[X86] Fix a variable name for r237977 so that it works with every compilers.
Quentin Colombet [Fri, 22 May 2015 00:41:03 +0000 (00:41 +0000)]
[X86] Fix a variable name for r237977 so that it works with every compilers.

llvm-svn: 237980

9 years ago[lld] Make the MachO -stack_size default '0', add a test case.
Lang Hames [Fri, 22 May 2015 00:25:34 +0000 (00:25 +0000)]
[lld] Make the MachO -stack_size default '0', add a test case.

Addresses some review comments for r237841.

llvm-svn: 237979

9 years agoMergedLoadStoreMotion preserves MemoryDependenceAnalysis, it does not require it.
Daniel Berlin [Fri, 22 May 2015 00:13:05 +0000 (00:13 +0000)]
MergedLoadStoreMotion preserves MemoryDependenceAnalysis, it does not require it.
(It already was coded assuming it can sometimes be null, so no other changes are necessary)

llvm-svn: 237978

9 years ago[X86] Refactor the prologue emission to prepare for shrink-wrapping.
Quentin Colombet [Fri, 22 May 2015 00:12:31 +0000 (00:12 +0000)]
[X86] Refactor the prologue emission to prepare for shrink-wrapping.

- Add a late pass to expand pseudo instructions (tail call and EH returns).
  Instead of doing it in the prologue emission.
- Factor some static methods in X86FrameLowering to ease code sharing.

NFC.

Related to <rdar://problem/20821487>

llvm-svn: 237977

9 years agounique_ptrify LoadedObjectInfo::clone
David Blaikie [Fri, 22 May 2015 00:05:05 +0000 (00:05 +0000)]
unique_ptrify LoadedObjectInfo::clone

As noted in the original review, this is unused in tree & is used by
Julia... that's problematic. This API coudl easily be deleted/modified
by accident without any validation that it remains correct.

llvm-svn: 237976

9 years agoFix Clang -Wmissing-override warning
David Blaikie [Fri, 22 May 2015 00:00:00 +0000 (00:00 +0000)]
Fix Clang -Wmissing-override warning

& remove the duplication by introducing a CRTP base to implement the
clone behavior.

llvm-svn: 237975

9 years ago[PPC] Correct iterator bug in PPCTLSDynamicCall
Hal Finkel [Thu, 21 May 2015 23:45:49 +0000 (23:45 +0000)]
[PPC] Correct iterator bug in PPCTLSDynamicCall

Unfortunately, I can't reduce a small test case for this (although compiling
mpfr-3.1.2 with -O2 -mcpu=a2 would fairly reliably trigger a crash), but the
problem is fairly clear (at least once you know you're looking for one). If the
TLS instruction being replaced was at the end of the block, we'd increment the
iterator past it (so it would then point to MBB.end()), and then we'd increment
it again as part of the for statement, thus overrunning the end of the list.
Don't do that.

llvm-svn: 237974

9 years ago[ELF] Simplify dynamic table entry creation.
Davide Italiano [Thu, 21 May 2015 23:44:19 +0000 (23:44 +0000)]
[ELF] Simplify dynamic table entry creation.

Differential Revision: http://reviews.llvm.org/D9921
Reviewed by:  atanasyan

llvm-svn: 237973

9 years agoRevert r237590, "ARM: allow jump tables to be placed as constant islands."
Peter Collingbourne [Thu, 21 May 2015 23:20:55 +0000 (23:20 +0000)]
Revert r237590, "ARM: allow jump tables to be placed as constant islands."

Caused a miscompile of the Android port of Chromium, details
forthcoming.

llvm-svn: 237972

9 years ago[NaryReassoc] reassociate GEP for CSE
Jingyue Wu [Thu, 21 May 2015 23:17:30 +0000 (23:17 +0000)]
[NaryReassoc] reassociate GEP for CSE

Summary:
x = &a[i];
y = &a[i + j];

=>

y = x + j;

along with some refactoring work such as extracting method
findClosestMatchingDominator.

Depends on D9786 which provides the ScalarEvolution::getGEPExpr interface.

Test Plan: nary-gep.ll

Reviewers: meheff, broune

Reviewed By: broune

Subscribers: jholewinski, llvm-commits

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

llvm-svn: 237971

9 years ago[Support] Fix ErrorOr equality operator.
Michael J. Spencer [Thu, 21 May 2015 23:15:00 +0000 (23:15 +0000)]
[Support] Fix ErrorOr equality operator.

llvm-svn: 237970

9 years agofix typos, remove function names from comments, NFC
Sanjay Patel [Thu, 21 May 2015 23:04:44 +0000 (23:04 +0000)]
fix typos, remove function names from comments, NFC

llvm-svn: 237969

9 years ago[InstCombine] X - 0 is equal to X, not undef
David Majnemer [Thu, 21 May 2015 23:04:21 +0000 (23:04 +0000)]
[InstCombine] X - 0 is equal to X, not undef

A refactoring made @llvm.ssub.with.overflow.i32(i32 %X, i32 0) transform
into undef instead of %X.

This fixes PR23624.

llvm-svn: 237968

9 years agoUse Op<0> accessor instead of OperandList for Instructions. NFC
Pete Cooper [Thu, 21 May 2015 22:48:54 +0000 (22:48 +0000)]
Use Op<0> accessor instead of OperandList for Instructions.  NFC

This is consistent with other uses of the operand list.  I'm planning a future commit where this will actually matter.

llvm-svn: 237967

9 years agoFix lldb-platform usage string.
Chaoren Lin [Thu, 21 May 2015 22:43:43 +0000 (22:43 +0000)]
Fix lldb-platform usage string.

llvm-svn: 237966

9 years agoUse new MachineInstr mayLoadOrStore() API.
Chad Rosier [Thu, 21 May 2015 21:59:57 +0000 (21:59 +0000)]
Use new MachineInstr mayLoadOrStore() API.

llvm-svn: 237965

9 years ago[InlineSpiller] Fix rematerialization for bundles.
Quentin Colombet [Thu, 21 May 2015 21:41:55 +0000 (21:41 +0000)]
[InlineSpiller] Fix rematerialization for bundles.

Prior to this patch, we could update the operand of another MI in the same
bundle.

Longer version:
Before InlineSpiller rematerializes a vreg, it iterates over operands of each MI
in a bundle, collecting all (MI, OpNo) pairs that reference that vreg.

Then if it does rematerialize, it goes through the pair list and replaces the
operands with the new (rematerialized) vreg.  The problem is, it tries to
replace all of these operands in the main MI ! This works fine for single MIs.
However, if we are processing a bundle of MIs and the list contains multiple
pairs - the rematerialization will either crash trying to access a non-existing
operand of the main MI, or silently corrupt one of the existing ones. It will
also ignore other MIs in the bundle.

The obvious fix is to use the MI pointers saved in collected (MI, OpNo) pairs.
This must have been the original intent of the pair list but somehow these
pointers got lost.

Patch by Dmitri Shtilman <dshtilman@icloud.com>!

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

<rdar://problem/21002163>

llvm-svn: 237964

9 years ago[AArch64] Enhance the load/store optimizer with target-specific alias analysis.
Chad Rosier [Thu, 21 May 2015 21:36:46 +0000 (21:36 +0000)]
[AArch64] Enhance the load/store optimizer with target-specific alias analysis.

Phabricator: http://reviews.llvm.org/D9863
llvm-svn: 237963

9 years agofix typo in comment; NFC
Sanjay Patel [Thu, 21 May 2015 21:29:13 +0000 (21:29 +0000)]
fix typo in comment; NFC

llvm-svn: 237962

9 years agoMake it easier to use DwarfContext with MCJIT
Keno Fischer [Thu, 21 May 2015 21:24:32 +0000 (21:24 +0000)]
Make it easier to use DwarfContext with MCJIT

Summary:
This supersedes http://reviews.llvm.org/D4010, hopefully properly
dealing with the JIT case and also adds an actual test case.
DwarfContext was basically already usable for the JIT (and back when
we were overwriting ELF files it actually worked out of the box by
accident), but in order to resolve relocations correctly it needs
to know the load address of the section.
Rather than trying to get this out of the ObjectFile or requiring
the user to create a new ObjectFile just to get some debug info,
this adds the capability to pass in that info directly.
As part of this I separated out part of the LoadedObjectInfo struct
from RuntimeDyld, since it is now required at a higher layer.

Reviewers: lhames, echristo

Reviewed By: echristo

Subscribers: vtjnash, friss, rafael, llvm-commits

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

llvm-svn: 237961

9 years agoPut GEPOperator member function definition in the appropriate .cpp file
David Blaikie [Thu, 21 May 2015 21:17:12 +0000 (21:17 +0000)]
Put GEPOperator member function definition in the appropriate .cpp file

Last commit put it in Constants.cpp instead of Operator.cpp

llvm-svn: 237960

9 years agoOne line fix - bug with final clause of task construct
Jonathan Peyton [Thu, 21 May 2015 21:16:38 +0000 (21:16 +0000)]
One line fix - bug with final clause of task construct

Should be looking at parent_task->td_flags.final instead of the recently allocated task.

llvm-svn: 237959

9 years ago[opaque pointer type] Allow gep_type_iterator to work with the pointee type from...
David Blaikie [Thu, 21 May 2015 21:12:43 +0000 (21:12 +0000)]
[opaque pointer type] Allow gep_type_iterator to work with the pointee type from the GEP instruction

The raw non-instruction/constant form of this is still relying on being
able to access the pointee type from a pointer type - those will be
cleaned up later. For now, just focus on the cases where the pointee
type is easily accessible.

llvm-svn: 237958

9 years agoStop forwarding (get|set)Aligment from MCSectionData to MCSection.
Rafael Espindola [Thu, 21 May 2015 21:02:35 +0000 (21:02 +0000)]
Stop forwarding (get|set)Aligment from MCSectionData to MCSection.

llvm-svn: 237956

9 years ago[MachineInstr] Add mayLoadOrStore API. NFC.
Chad Rosier [Thu, 21 May 2015 21:00:30 +0000 (21:00 +0000)]
[MachineInstr] Add mayLoadOrStore API. NFC.

llvm-svn: 237955

9 years agoResubmit r237708 (MIR Serialization: print and parse LLVM IR using MIR format).
Alex Lorenz [Thu, 21 May 2015 20:54:45 +0000 (20:54 +0000)]
Resubmit r237708 (MIR Serialization: print and parse LLVM IR using MIR format).

This commit is a 2nd attempt at committing the initial MIR serialization patch.
The first commit (r237708) made the incremental buildbots unstable and was
reverted in r237730. The original commit didn't add a terminating null
character to the LLVM IR source which was passed to LLParser, and this
sometimes caused the test 'llvmIR.mir' to fail with a parsing error because
the LLVM IR source didn't have a null character immediately after the end
and thus LLLexer encountered some garbage characters that ultimately caused
the error.

This commit also includes the other test fixes I committed in
r237712 (llc path fix) and r237723 (remove target triple) which
also got reverted in r237730.

--Original Commit Message--

MIR Serialization: print and parse LLVM IR using MIR format.

This commit is the initial commit for the MIR serialization project.
It creates a new library under CodeGen called 'MIR'. This new
library adds a new machine function pass that prints out the LLVM IR
using the MIR format. This pass is then added as a last pass when a
'stop-after' option is used in llc. The new library adds the initial
functionality for parsing of MIR files as well. This commit also
extends the llc tool so that it can recognize and parse MIR input files.

Reviewers: Duncan P. N. Exon Smith, Matthias Braun, Philip Reames

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

llvm-svn: 237954

9 years agoAdded a new command in ProcessGDBRemote that can figure out the performance character...
Greg Clayton [Thu, 21 May 2015 20:52:06 +0000 (20:52 +0000)]
Added a new command in ProcessGDBRemote that can figure out the performance characterisitics of your GDB remote server.

To addess this, attach to any GDB server and when stopped type:

(lldb) process plugin packet speed-test

The default will send a variety of packets with different amounts of data to send/receive and print the performance of each packet type:

Testing sending 1000 packets of various sizes:
qSpeedTest(send=0      , recv=0      ) in 0.057837000 sec for  17289.97 packets/sec (  0.057837 ms per packet) with standard deviation of   0.007705 ms
qSpeedTest(send=0      , recv=4      ) in 0.056162000 sec for  17805.63 packets/sec (  0.056162 ms per packet) with standard deviation of   0.004439 ms
qSpeedTest(send=0      , recv=8      ) in 0.057687000 sec for  17334.93 packets/sec (  0.057687 ms per packet) with standard deviation of   0.008135 ms
qSpeedTest(send=0      , recv=16     ) in 0.058547000 sec for  17080.29 packets/sec (  0.058547 ms per packet) with standard deviation of   0.005884 ms
qSpeedTest(send=0      , recv=32     ) in 0.058289000 sec for  17155.89 packets/sec (  0.058289 ms per packet) with standard deviation of   0.004057 ms
qSpeedTest(send=0      , recv=64     ) in 0.061324000 sec for  16306.83 packets/sec (  0.061324 ms per packet) with standard deviation of   0.010838 ms
qSpeedTest(send=0      , recv=128    ) in 0.065688000 sec for  15223.48 packets/sec (  0.065688 ms per packet) with standard deviation of   0.006997 ms
qSpeedTest(send=0      , recv=256    ) in 0.070621000 sec for  14160.09 packets/sec (  0.070621 ms per packet) with standard deviation of   0.006188 ms
qSpeedTest(send=0      , recv=512    ) in 0.086738000 sec for  11528.97 packets/sec (  0.086738 ms per packet) with standard deviation of   0.007867 ms
qSpeedTest(send=0      , recv=1024   ) in 0.146375000 sec for   6831.77 packets/sec (  0.146375 ms per packet) with standard deviation of   0.010313 ms
qSpeedTest(send=4      , recv=0      ) in 0.057807000 sec for  17298.94 packets/sec (  0.057807 ms per packet) with standard deviation of   0.009702 ms
....

It will then also use various sizes to receive 4MB of data from the GDB server and print out the stats:

Testing receiving 4.0MB of data using varying receive packet sizes:
qSpeedTest(send=0      , recv=32     ) 131072 packets needed to receive 4.0MB in 7.721290000 sec for 0.518048 MB/sec for  16975.40 packets/sec (  0.058909 ms per packet)
qSpeedTest(send=0      , recv=64     )  65536 packets needed to receive 4.0MB in 4.029236000 sec for 0.992744 MB/sec for  16265.12 packets/sec (  0.061481 ms per packet)
qSpeedTest(send=0      , recv=128    )  32768 packets needed to receive 4.0MB in 2.233854000 sec for 1.790627 MB/sec for  14668.82 packets/sec (  0.068172 ms per packet)
qSpeedTest(send=0      , recv=256    )  16384 packets needed to receive 4.0MB in 1.160024000 sec for 3.448204 MB/sec for  14123.84 packets/sec (  0.070802 ms per packet)
qSpeedTest(send=0      , recv=512    )   8192 packets needed to receive 4.0MB in 0.701603000 sec for 5.701230 MB/sec for  11676.12 packets/sec (  0.085645 ms per packet)
qSpeedTest(send=0      , recv=1024   )   4096 packets needed to receive 4.0MB in 0.596786000 sec for 6.702570 MB/sec for   6863.43 packets/sec (  0.145700 ms per packet)

There is a JSON mode so we can use this in the test suite to track GDB server performance for each platform:

(lldb) process plugin packet speed-test --json
{ "packet_speeds" : {
    "num_packets" : 1000,
    "results" : [
     {"send_size" :      0, "recv_size" :      0, "total_time_nsec" :     64516000, "standard_deviation_nsec" :     20566 },
     {"send_size" :      0, "recv_size" :      4, "total_time_nsec" :     59648000, "standard_deviation_nsec" :     10493 },
     {"send_size" :      0, "recv_size" :      8, "total_time_nsec" :     56894000, "standard_deviation_nsec" :      5480 },
     {"send_size" :      0, "recv_size" :     16, "total_time_nsec" :     59422000, "standard_deviation_nsec" :      6557 },
     {"send_size" :      0, "recv_size" :     32, "total_time_nsec" :     61159000, "standard_deviation_nsec" :     12384 },
     {"send_size" :      0, "recv_size" :     64, "total_time_nsec" :     61386000, "standard_deviation_nsec" :      9208 },
     {"send_size" :      0, "recv_size" :    128, "total_time_nsec" :     64768000, "standard_deviation_nsec" :      4737 },
     {"send_size" :      0, "recv_size" :    256, "total_time_nsec" :     71046000, "standard_deviation_nsec" :      5904 },
     {"send_size" :      0, "recv_size" :    512, "total_time_nsec" :     87233000, "standard_deviation_nsec" :      8967 },
     {"send_size" :      0, "recv_size" :   1024, "total_time_nsec" :    146629000, "standard_deviation_nsec" :      9526 },
     {"send_size" :      4, "recv_size" :      0, "total_time_nsec" :     57131000, "standard_deviation_nsec" :      7884 },
     {"send_size" :      4, "recv_size" :      4, "total_time_nsec" :     56772000, "standard_deviation_nsec" :      6064 },
     {"send_size" :      4, "recv_size" :      8, "total_time_nsec" :     57450000, "standard_deviation_nsec" :      6341 },
     {"send_size" :      4, "recv_size" :     16, "total_time_nsec" :     58279000, "standard_deviation_nsec" :      5998 },
     {"send_size" :      4, "recv_size" :     32, "total_time_nsec" :     59995000, "standard_deviation_nsec" :      6294 },
     {"send_size" :      4, "recv_size" :     64, "total_time_nsec" :     61632000, "standard_deviation_nsec" :      7838 },
     {"send_size" :      4, "recv_size" :    128, "total_time_nsec" :     66535000, "standard_deviation_nsec" :      8026 },
     {"send_size" :      4, "recv_size" :    256, "total_time_nsec" :     72754000, "standard_deviation_nsec" :      9519 },
     {"send_size" :      4, "recv_size" :    512, "total_time_nsec" :     87072000, "standard_deviation_nsec" :      9268 },
     {"send_size" :      4, "recv_size" :   1024, "total_time_nsec" :    147221000, "standard_deviation_nsec" :      9702 },
     {"send_size" :      8, "recv_size" :      0, "total_time_nsec" :     57900000, "standard_deviation_nsec" :      7356 },
     {"send_size" :      8, "recv_size" :      4, "total_time_nsec" :     58116000, "standard_deviation_nsec" :      7630 },
     {"send_size" :      8, "recv_size" :      8, "total_time_nsec" :     57745000, "standard_deviation_nsec" :      8541 },
     {"send_size" :      8, "recv_size" :     16, "total_time_nsec" :     59091000, "standard_deviation_nsec" :      7851 },
     {"send_size" :      8, "recv_size" :     32, "total_time_nsec" :     59943000, "standard_deviation_nsec" :      6761 },
     {"send_size" :      8, "recv_size" :     64, "total_time_nsec" :     62097000, "standard_deviation_nsec" :      8580 },
     {"send_size" :      8, "recv_size" :    128, "total_time_nsec" :     69942000, "standard_deviation_nsec" :     16645 },
     {"send_size" :      8, "recv_size" :    256, "total_time_nsec" :     72927000, "standard_deviation_nsec" :     11031 },
     {"send_size" :      8, "recv_size" :    512, "total_time_nsec" :     87221000, "standard_deviation_nsec" :      8002 },
     {"send_size" :      8, "recv_size" :   1024, "total_time_nsec" :    148696000, "standard_deviation_nsec" :     10383 },
     {"send_size" :     16, "recv_size" :      0, "total_time_nsec" :     59890000, "standard_deviation_nsec" :     15160 },
     {"send_size" :     16, "recv_size" :      4, "total_time_nsec" :     56664000, "standard_deviation_nsec" :      4650 },
     {"send_size" :     16, "recv_size" :      8, "total_time_nsec" :     57574000, "standard_deviation_nsec" :      7787 },
     {"send_size" :     16, "recv_size" :     16, "total_time_nsec" :     59312000, "standard_deviation_nsec" :      8104 },
     {"send_size" :     16, "recv_size" :     32, "total_time_nsec" :     59764000, "standard_deviation_nsec" :      7496 },
     {"send_size" :     16, "recv_size" :     64, "total_time_nsec" :     61644000, "standard_deviation_nsec" :      8331 },
     {"send_size" :     16, "recv_size" :    128, "total_time_nsec" :     66476000, "standard_deviation_nsec" :      9251 },
     {"send_size" :     16, "recv_size" :    256, "total_time_nsec" :     72386000, "standard_deviation_nsec" :      8627 },
     {"send_size" :     16, "recv_size" :    512, "total_time_nsec" :     87810000, "standard_deviation_nsec" :     12318 },
     {"send_size" :     16, "recv_size" :   1024, "total_time_nsec" :    146918000, "standard_deviation_nsec" :     11595 },
     {"send_size" :     32, "recv_size" :      0, "total_time_nsec" :     56493000, "standard_deviation_nsec" :      6577 },
     {"send_size" :     32, "recv_size" :      4, "total_time_nsec" :     57069000, "standard_deviation_nsec" :      5931 },
     {"send_size" :     32, "recv_size" :      8, "total_time_nsec" :     57563000, "standard_deviation_nsec" :      8157 },
     {"send_size" :     32, "recv_size" :     16, "total_time_nsec" :     59694000, "standard_deviation_nsec" :      6932 },
     {"send_size" :     32, "recv_size" :     32, "total_time_nsec" :     60852000, "standard_deviation_nsec" :      8010 },
     {"send_size" :     32, "recv_size" :     64, "total_time_nsec" :     61926000, "standard_deviation_nsec" :      8372 },
     {"send_size" :     32, "recv_size" :    128, "total_time_nsec" :     66734000, "standard_deviation_nsec" :      8047 },
     {"send_size" :     32, "recv_size" :    256, "total_time_nsec" :     72000000, "standard_deviation_nsec" :      8103 },
     {"send_size" :     32, "recv_size" :    512, "total_time_nsec" :     88268000, "standard_deviation_nsec" :     12289 },
     {"send_size" :     32, "recv_size" :   1024, "total_time_nsec" :    147946000, "standard_deviation_nsec" :     12122 },
     {"send_size" :     64, "recv_size" :      0, "total_time_nsec" :     58126000, "standard_deviation_nsec" :      5895 },
     {"send_size" :     64, "recv_size" :      4, "total_time_nsec" :     58927000, "standard_deviation_nsec" :      8933 },
     {"send_size" :     64, "recv_size" :      8, "total_time_nsec" :     58163000, "standard_deviation_nsec" :      6663 },
     {"send_size" :     64, "recv_size" :     16, "total_time_nsec" :     59901000, "standard_deviation_nsec" :      8340 },
     {"send_size" :     64, "recv_size" :     32, "total_time_nsec" :     60365000, "standard_deviation_nsec" :      6319 },
     {"send_size" :     64, "recv_size" :     64, "total_time_nsec" :     61776000, "standard_deviation_nsec" :      7461 },
     {"send_size" :     64, "recv_size" :    128, "total_time_nsec" :     66984000, "standard_deviation_nsec" :      6810 },
     {"send_size" :     64, "recv_size" :    256, "total_time_nsec" :     73913000, "standard_deviation_nsec" :      8826 },
     {"send_size" :     64, "recv_size" :    512, "total_time_nsec" :     88134000, "standard_deviation_nsec" :      8356 },
     {"send_size" :     64, "recv_size" :   1024, "total_time_nsec" :    146932000, "standard_deviation_nsec" :      7571 },
     {"send_size" :    128, "recv_size" :      0, "total_time_nsec" :     57616000, "standard_deviation_nsec" :      6158 },
     {"send_size" :    128, "recv_size" :      4, "total_time_nsec" :     59091000, "standard_deviation_nsec" :      7458 },
     {"send_size" :    128, "recv_size" :      8, "total_time_nsec" :     60263000, "standard_deviation_nsec" :     11999 },
     {"send_size" :    128, "recv_size" :     16, "total_time_nsec" :     59238000, "standard_deviation_nsec" :      6102 },
     {"send_size" :    128, "recv_size" :     32, "total_time_nsec" :     60783000, "standard_deviation_nsec" :      6244 },
     {"send_size" :    128, "recv_size" :     64, "total_time_nsec" :     62975000, "standard_deviation_nsec" :      8947 },
     {"send_size" :    128, "recv_size" :    128, "total_time_nsec" :     65742000, "standard_deviation_nsec" :      5907 },
     {"send_size" :    128, "recv_size" :    256, "total_time_nsec" :     72402000, "standard_deviation_nsec" :      6601 },
     {"send_size" :    128, "recv_size" :    512, "total_time_nsec" :     87457000, "standard_deviation_nsec" :      9004 },
     {"send_size" :    128, "recv_size" :   1024, "total_time_nsec" :    148412000, "standard_deviation_nsec" :     10532 },
     {"send_size" :    256, "recv_size" :      0, "total_time_nsec" :     58705000, "standard_deviation_nsec" :      7274 },
     {"send_size" :    256, "recv_size" :      4, "total_time_nsec" :     58818000, "standard_deviation_nsec" :      5453 },
     {"send_size" :    256, "recv_size" :      8, "total_time_nsec" :     59451000, "standard_deviation_nsec" :      6926 },
     {"send_size" :    256, "recv_size" :     16, "total_time_nsec" :     60237000, "standard_deviation_nsec" :      5781 },
     {"send_size" :    256, "recv_size" :     32, "total_time_nsec" :     61456000, "standard_deviation_nsec" :      5591 },
     {"send_size" :    256, "recv_size" :     64, "total_time_nsec" :     62615000, "standard_deviation_nsec" :      7588 },
     {"send_size" :    256, "recv_size" :    128, "total_time_nsec" :     68554000, "standard_deviation_nsec" :      7766 },
     {"send_size" :    256, "recv_size" :    256, "total_time_nsec" :     74557000, "standard_deviation_nsec" :      8748 },
     {"send_size" :    256, "recv_size" :    512, "total_time_nsec" :     87929000, "standard_deviation_nsec" :      9510 },
     {"send_size" :    256, "recv_size" :   1024, "total_time_nsec" :    148522000, "standard_deviation_nsec" :     11394 },
     {"send_size" :    512, "recv_size" :      0, "total_time_nsec" :     59697000, "standard_deviation_nsec" :      7825 },
     {"send_size" :    512, "recv_size" :      4, "total_time_nsec" :     59427000, "standard_deviation_nsec" :      5706 },
     {"send_size" :    512, "recv_size" :      8, "total_time_nsec" :     59538000, "standard_deviation_nsec" :      6863 },
     {"send_size" :    512, "recv_size" :     16, "total_time_nsec" :     61139000, "standard_deviation_nsec" :      7645 },
     {"send_size" :    512, "recv_size" :     32, "total_time_nsec" :     62203000, "standard_deviation_nsec" :      7985 },
     {"send_size" :    512, "recv_size" :     64, "total_time_nsec" :     62577000, "standard_deviation_nsec" :      8118 },
     {"send_size" :    512, "recv_size" :    128, "total_time_nsec" :     68722000, "standard_deviation_nsec" :     10581 },
     {"send_size" :    512, "recv_size" :    256, "total_time_nsec" :     74290000, "standard_deviation_nsec" :      8931 },
     {"send_size" :    512, "recv_size" :    512, "total_time_nsec" :     88635000, "standard_deviation_nsec" :      7771 },
     {"send_size" :    512, "recv_size" :   1024, "total_time_nsec" :    149589000, "standard_deviation_nsec" :     11456 },
     {"send_size" :   1024, "recv_size" :      0, "total_time_nsec" :     63243000, "standard_deviation_nsec" :      6331 },
     {"send_size" :   1024, "recv_size" :      4, "total_time_nsec" :     64381000, "standard_deviation_nsec" :      8372 },
     {"send_size" :   1024, "recv_size" :      8, "total_time_nsec" :     63481000, "standard_deviation_nsec" :      5608 },
     {"send_size" :   1024, "recv_size" :     16, "total_time_nsec" :     65549000, "standard_deviation_nsec" :      8826 },
     {"send_size" :   1024, "recv_size" :     32, "total_time_nsec" :     65485000, "standard_deviation_nsec" :      6822 },
     {"send_size" :   1024, "recv_size" :     64, "total_time_nsec" :     67125000, "standard_deviation_nsec" :      9829 },
     {"send_size" :   1024, "recv_size" :    128, "total_time_nsec" :     72680000, "standard_deviation_nsec" :      7641 },
     {"send_size" :   1024, "recv_size" :    256, "total_time_nsec" :     79206000, "standard_deviation_nsec" :      9854 },
     {"send_size" :   1024, "recv_size" :    512, "total_time_nsec" :     92418000, "standard_deviation_nsec" :      9107 },
     {"send_size" :   1024, "recv_size" :   1024, "total_time_nsec" :    152392000, "standard_deviation_nsec" :     11124 }
    ]
  },
  "download_speed" : {
    "byte_size" : 4194304,
    "results" : [
     {"send_size" :      0, "recv_size" :     32, "total_time_nsec" :   7735630000 },
     {"send_size" :      0, "recv_size" :     64, "total_time_nsec" :   3985169000 },
     {"send_size" :      0, "recv_size" :    128, "total_time_nsec" :   2128791000 },
     {"send_size" :      0, "recv_size" :    256, "total_time_nsec" :   1172077000 },
     {"send_size" :      0, "recv_size" :    512, "total_time_nsec" :    703833000 },
     {"send_size" :      0, "recv_size" :   1024, "total_time_nsec" :    594966000 }
    ]
  }
}

llvm-svn: 237953

9 years ago[PPC64] Handle vpkudum mask pattern correctly when vpkudum isn't available
Bill Schmidt [Thu, 21 May 2015 20:48:49 +0000 (20:48 +0000)]
[PPC64] Handle vpkudum mask pattern correctly when vpkudum isn't available

My recent patch to add support for ISA 2.07 vector pack/unpack
instructions didn't properly check for availability of the vpkudum
instruction when recognizing it as a special vector shuffle case.
This causes us to leave the vector shuffle in place (rather than
converting it to a vector permute) so that it can be recognized later
as a vpkudum, but that pattern is invalid for processors prior to
POWER8.  Thus LLVM crashes with an "unable to select" message.  We
observed this since one of our buildbots is configured to generate
code for a POWER7.

This patch fixes the problem by checking for availability of the
vpkudum instruction during custom lowering of vector shuffles.

I've added a test case variant for the vpkudum pattern when the
instruction isn't available.

llvm-svn: 237952

9 years agoStop creating MCSectionData is the ELF writer.
Rafael Espindola [Thu, 21 May 2015 20:43:13 +0000 (20:43 +0000)]
Stop creating MCSectionData is the ELF writer.

Now is is just its use of MCSymbolData that requires it to take a non const
MCAssembler.

llvm-svn: 237951

9 years ago[lib/Fuzzer] ignore flags that start with --; use git pull --rebase instead of just...
Kostya Serebryany [Thu, 21 May 2015 20:39:13 +0000 (20:39 +0000)]
[lib/Fuzzer] ignore flags that start with --; use git pull --rebase instead of just git pull

llvm-svn: 237950

9 years agoIR / debug info: Add a DWOId field to DICompileUnit,
Adrian Prantl [Thu, 21 May 2015 20:37:30 +0000 (20:37 +0000)]
IR / debug info: Add a DWOId field to DICompileUnit,
so DWARF skeleton CUs can be expression in IR. A skeleton CU is a
(typically empty) DW_TAG_compile_unit that has a DW_AT_(GNU)_dwo_name and
a DW_AT_(GNU)_dwo_id attribute. It is used to refer to external debug info.

This is a prerequisite for clang module debugging as discussed in
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-November/040076.html.
In order to refer to external types stored in split DWARF (dwo) objects,
such as clang modules, we need to emit skeleton CUs, which identify the
dwarf object (i.e., the clang module) by filename (the SplitDebugFilename)
and a hash value, the dwo_id.

This patch only contains the IR changes. The idea is that a CUs with a
non-zero dwo_id field will be emitted together with a DW_AT_GNU_dwo_name
and DW_AT_GNU_dwo_id attribute.

http://reviews.llvm.org/D9488
rdar://problem/20091852

llvm-svn: 237949

9 years agoDebug info: Adapt to new DIBuilder interface.
Adrian Prantl [Thu, 21 May 2015 20:37:26 +0000 (20:37 +0000)]
Debug info: Adapt to new DIBuilder interface.

llvm-svn: 237948

9 years ago[PPC/LoopUnrollRuntime] Don't avoid high-cost trip count computation on the PPC/A2
Hal Finkel [Thu, 21 May 2015 20:30:23 +0000 (20:30 +0000)]
[PPC/LoopUnrollRuntime] Don't avoid high-cost trip count computation on the PPC/A2

On X86 (and similar OOO cores) unrolling is very limited, and even if the
runtime unrolling is otherwise profitable, the expense of a division to compute
the trip count could greatly outweigh the benefits. On the A2, we unroll a lot,
and the benefits of unrolling are more significant (seeing a 5x or 6x speedup
is not uncommon), so we're more able to tolerate the expense, on average, of a
division to compute the trip count.

llvm-svn: 237947

9 years agoDon't import module `lock` at global scope.
Zachary Turner [Thu, 21 May 2015 20:16:02 +0000 (20:16 +0000)]
Don't import module `lock` at global scope.

`lock` depends on `fcntl`, which doesn't exist on Windows.  Until
someone implements an equivalent locking mechanism on Windows, we
can't have lock imported globally.

llvm-svn: 237946

9 years agoFix race condition when detaching/killing an inferior.
Zachary Turner [Thu, 21 May 2015 19:56:26 +0000 (19:56 +0000)]
Fix race condition when detaching/killing an inferior.

llvm-svn: 237945

9 years agowriteSymbolTable now only needs a MCContext.
Rafael Espindola [Thu, 21 May 2015 19:54:44 +0000 (19:54 +0000)]
writeSymbolTable now only needs a MCContext.

It used to use an MCAssembler just to record the alignment of the sections.

llvm-svn: 237944

9 years agoPass a const MCAssembler to writeSectionHeader.
Rafael Espindola [Thu, 21 May 2015 19:46:39 +0000 (19:46 +0000)]
Pass a const MCAssembler to writeSectionHeader.

It never creates sections, so it can use Asm.getSectionData instead of
Asm.getOrCreateSectionData.

llvm-svn: 237943

9 years agoYAML: Null terminate block scalar's value.
Alex Lorenz [Thu, 21 May 2015 19:45:02 +0000 (19:45 +0000)]
YAML: Null terminate block scalar's value.

The commit null terminates the string value in the `yaml::BlockScalarNode`
class.

This change is motivated by the initial MIR serialization commit (r237708)
that I reverted in r237730 because the LLVM IR source from the block
scalar node wasn't terminated by a null character and thus the buildbots
failed on one testcase sometimes. This change enables me to recommit
the reverted commit.

llvm-svn: 237942

9 years agoRevert r237766, "Support: Introduce LLVM_FALLTHROUGH macro."
Peter Collingbourne [Thu, 21 May 2015 19:44:44 +0000 (19:44 +0000)]
Revert r237766, "Support: Introduce LLVM_FALLTHROUGH macro."

The value of this macro seems to be very low unless we actually start
using it everywhere, and I don't have immediate plans to make that
happen.

llvm-svn: 237941