Commit Graph

201889 Commits

Author SHA1 Message Date
Sanjay Patel 9d084a7ebb add missing include for TargetRecip
llvm-svn: 238064
2015-05-22 22:59:27 +00:00
Kostya Serebryany f3c7cb464e [lib/Fuzzer] remove -use_coverage_pairs=1, an experimental feature that is unlikely to ever scale
llvm-svn: 238063
2015-05-22 22:47:03 +00:00
Kostya Serebryany 926b9bdffc [lib/Fuzzer] mention the user-supplied mutators
llvm-svn: 238062
2015-05-22 22:43:05 +00:00
Jonathan Peyton 81f9cd1335 Fix doxygen comments
These fixes make doxygen happy.

llvm-svn: 238061
2015-05-22 22:37:22 +00:00
Jonathan Peyton 1406f014fd Fix spelling errors
These spelling errors are in comments and some debug messages.

llvm-svn: 238060
2015-05-22 22:35:51 +00:00
Kostya Serebryany f342459aa4 [lib/Fuzzer] extend the fuzzer interface to allow user-supplied mutators
llvm-svn: 238059
2015-05-22 22:35:31 +00:00
Justin Bogner cb0829943b CodeGen: Avoid a reserved name and fix the naming style of some arguments. NFC
It's undefined to use reserved names like _Diags. Fix up the other
parameter names to consistently use a modern style while I'm here.

llvm-svn: 238058
2015-05-22 22:16:55 +00:00
Saleem Abdulrasool a3b3952ccd builtins: mark functions as aapcs on Windows
Windows does not use AAPCS, but rather AAPCS-VFP, and thus the functions which
are assumed to be AAPCS will cause invalid argument setup.  Ensure that the
functions are marked as AAPCS.

llvm-svn: 238056
2015-05-22 21:47:24 +00:00
Sanjay Patel f5019e60c7 add the -mrecip driver flag and process its options
This is the front-end counterpart to D8982 (LLVM r238051).

The -mrecip option interface is based on maintaining compatibility with gcc:
https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gcc/i386-and-x86-64-Options.html#index-mrecip_003dopt-1627
https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gcc/RS_002f6000-and-PowerPC-Options.html#index-mrecip-2289

...while adding more functionality (allowing users to specify the number of refinement steps for each
estimate type).

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

llvm-svn: 238055
2015-05-22 21:42:10 +00:00
Ahmed Bougacha 236f9040d0 [AArch64][CGP] Sink zext feeding stxr/stlxr into the same block.
The usual CodeGenPrepare trickery, on a target-specific intrinsic.
Without this, the expansion of atomics will usually have the zext
be hoisted out of the loop, defeating the various patterns we have
to catch this precise case.

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

llvm-svn: 238054
2015-05-22 21:37:17 +00:00
Rafael Espindola 95ee81daf6 Relax these tests a bit.
It is not relevant where in the string table the name is located.

llvm-svn: 238053
2015-05-22 21:37:13 +00:00
Ahmed Bougacha 3d2d9d1d91 [AArch64] Robustize atomic cmpxchg test a little more. NFC.
We changed the test to test non-constant values in r238049.
We can also use CHECK-NEXT to be a little stricter.

llvm-svn: 238052
2015-05-22 21:35:14 +00:00
Sanjay Patel ba2ba80302 make reciprocal estimate code generation more flexible by adding command-line options
This patch adds a class for processing many recip codegen possibilities.
The TargetRecip class is intended to handle both command-line options to llc as well
as options passed in from a front-end such as clang with the -mrecip option.

The x86 backend is updated to use the new functionality.
Only -mcpu=btver2 with -ffast-math should see a functional change from this patch.
All other CPUs continue to *not* use reciprocal estimates by default with -ffast-math.

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

llvm-svn: 238051
2015-05-22 21:10:06 +00:00
Simon Atanasyan b2f6afb30a [Mips] Cleanup and reformat test cases, add more checkings
No functional changes.

llvm-svn: 238050
2015-05-22 21:08:37 +00:00
Ahmed Bougacha df94265963 [AArch64] Robustize atomic cmpxchg test. NFC.
Constants are easy to get right the wrong way.

llvm-svn: 238049
2015-05-22 21:08:15 +00:00
Rafael Espindola b8a1293e0b Make unique section names the default again.
Using non unique names found a bug in the ICF inplementation in gold:

https://sourceware.org/bugzilla/show_bug.cgi?id=18440

This reverts commit r234143.

llvm-svn: 238048
2015-05-22 20:44:03 +00:00
Renato Golin ebdd12cbf1 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
2015-05-22 20:43:30 +00:00
Chad Rosier 67336305f5 Use new MachineInstr mayLoadOrStore() API. NFC.
llvm-svn: 238044
2015-05-22 20:07:34 +00:00
Vince Harron 8994fedc2b dotest.py - fixed a bug displaying usage
./dotest.py --help

llvm-svn: 238043
2015-05-22 19:49:23 +00:00
Zachary Turner 279a2b7575 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
2015-05-22 19:34:17 +00:00
Zachary Turner 4f2a9726d4 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
2015-05-22 19:33:54 +00:00
Zachary Turner 101a82bf8b 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
2015-05-22 19:33:32 +00:00
Siva Chandra 0b0106bb9b [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
2015-05-22 19:00:33 +00:00
Alexei Starovoitov 6296f6d7d8 [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
2015-05-22 18:47:33 +00:00
Renato Golin f6c154d532 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
2015-05-22 18:18:25 +00:00
Renato Golin fadc210817 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
2015-05-22 18:17:55 +00:00
Quentin Colombet 494eb606cd 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
2015-05-22 18:10:47 +00:00
Benjamin Kramer ebcc0dcad1 Remove redundant std::move on functions that return a unique_ptr.
llvm-svn: 238034
2015-05-22 17:52:04 +00:00
Chandler Carruth 0215608bda [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
2015-05-22 17:41:35 +00:00
Bill Schmidt e26236eed9 [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
2015-05-22 16:44:10 +00:00
Diego Novillo e0d289efbd Add clarifying note that sampling-based profiles cannot be used for code coverage.
llvm-svn: 238031
2015-05-22 16:05:07 +00:00
Benjamin Kramer 91d8cfd698 [ELF] Remove redundant unique_ptr moves found by -Wpessimizing-move.
llvm-svn: 238030
2015-05-22 16:01:21 +00:00
Benjamin Kramer fc99f3d43f [ELF] Fix shared CMake build.
llvm-svn: 238029
2015-05-22 16:01:12 +00:00
Rafael Espindola 62a07cb59b 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
2015-05-22 15:43:00 +00:00
Sanjay Patel f692ef9e47 remove names from comments, fix typos; NFC
llvm-svn: 238027
2015-05-22 15:38:24 +00:00
Sanjay Patel 864a165864 fix typo, 80-col; NFC
llvm-svn: 238026
2015-05-22 15:32:33 +00:00
Sanjay Patel 5df2444433 fix typo in comment; NFC
llvm-svn: 238025
2015-05-22 15:31:47 +00:00
Rafael Espindola 0d85d10747 Detect invalid section indexes when we first read them.
We still detect the same errors, but now we do it earlier.

llvm-svn: 238024
2015-05-22 14:59:27 +00:00
John Brawn c815a969c7 [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
2015-05-22 14:16:22 +00:00
Aaron Ballman 8afcd0a71a Updating the documentation to include an operator! for negative capability support.
llvm-svn: 238020
2015-05-22 13:36:48 +00:00
Rafael Espindola f7cfed4bff 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
2015-05-22 13:28:35 +00:00
Rafael Espindola 4fb845f031 Make this test stricter. NFC.
llvm-svn: 238018
2015-05-22 13:17:31 +00:00
Denis Protivensky f2c22f4ff8 [ARM] report_fatal_error for not implemented functionality
llvm-svn: 238017
2015-05-22 12:39:05 +00:00
Szabolcs Sipos b37b0ed239 Adding new AST matcher: isConstexpr
It matches constexpr variable and function declarations.

llvm-svn: 238016
2015-05-22 11:35:50 +00:00
Denis Protivensky 575f7d4f1c [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
2015-05-22 11:23:39 +00:00
Denis Protivensky 214122cffc [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
2015-05-22 11:00:31 +00:00
Alexander Kornienko 3396a8b8e6 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
2015-05-22 10:31:17 +00:00
NAKAMURA Takumi 73dc2e495b Reapply part of r237975, "Fix Clang -Wmissing-override warning", except for DIContext.h, to apease g++-4.7.
llvm-svn: 238012
2015-05-22 10:11:07 +00:00
Tamas Berghammer 466692abdc 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
2015-05-22 10:01:56 +00:00
Alexey Bataev 3ae88e2124 [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
2015-05-22 08:56:35 +00:00