Commit Graph

215031 Commits

Author SHA1 Message Date
Kuba Brecka 8eab127307 [tsan] Skip building libcxx_tsan on OS X
The TSan-instrumented version of libcxx doesn't even build on OS X at this point. Let's skip it from the OS X build for now, since most of TSan functionality doesn't depend on it. This will enable `check-tsan` to be run.

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

llvm-svn: 252455
2015-11-09 09:53:38 +00:00
George Rimar 564da7ee87 [ELF2] - Fixed crash for case when section sh_entsize is set to zero for SHF_MERGE type of sections.
Differential revision: http://reviews.llvm.org/D14451

llvm-svn: 252454
2015-11-09 08:40:44 +00:00
Colin LeMahieu 9ea507edc7 [Hexagon] Adding override to methods.
llvm-svn: 252453
2015-11-09 07:10:24 +00:00
Peter Zotov b0342a66a0 Make it possible to use libunwind without heap.
This patch allows to use libunwind on bare-metal systems that do not
include malloc/free by conditionally turning off nonessential
functionality that requires these functions.

The disabled functionality includes:

  * the .cfi_remember_state and .cfi_restore_state instructions;
  * the DWARF FDE cache.

The .cfi_{remember,restore}_state instructions don't seem to be used
by contemporary compilers. None of the LLVM backends emit it.

The DWARF FDE cache is bypassed if _LIBUNWIND_NO_HEAP is defined.
Specifically, entries are never added to it, so the search begins
and ends at the statically allocated, empty initial cache.

Such heap-less libunwind on a bare metal system is successfully used
in the ARTIQ project[1], and it is my hope that it will be useful
elsewhere.

[1]: http://m-labs.hk/artiq

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

llvm-svn: 252452
2015-11-09 06:57:29 +00:00
Johannes Doerfert 7a6e292d86 [FIX] Use same alloca for invariant loads and the scalar users
llvm-svn: 252451
2015-11-09 06:28:45 +00:00
Colin LeMahieu 088b7877f2 [Hexagon] Removing XFAIL on Hexagon target.
llvm-svn: 252450
2015-11-09 06:15:55 +00:00
Johannes Doerfert 544b23a1ef Revert "Fix non-affine generated entering node not being recognized as dominating"
This reverts commit 9775824b265e574fc541e975d64d3e270243b59d due to a
failing unit test.

Please check and correct the unit test and commit again.

llvm-svn: 252449
2015-11-09 06:04:05 +00:00
Colin LeMahieu 775d7ad677 [Hexagon] Fixing warnings.
llvm-svn: 252448
2015-11-09 05:47:56 +00:00
Colin LeMahieu a1adb51e6b [Hexagon] Removing extra gen line.
llvm-svn: 252447
2015-11-09 05:31:39 +00:00
Colin LeMahieu 892f54f408 [Hexagon] Maybe the makefile?
llvm-svn: 252446
2015-11-09 05:16:08 +00:00
Michael Kruse fd9c89e84b Fix non-affine generated entering node not being recognized as dominating
Scalar reloads in the generated entering block were not recognized as
dominating the subregions locks when there were multiple entering
nodes. This resulted in values defined in there not being copied.

As a fix, we unconditionally add the BBMap of the generated entering
node to the generated entry. This fixes part of llvm.org/PR25439.

llvm-svn: 252445
2015-11-09 05:00:30 +00:00
Colin LeMahieu d5537bf219 [Hexagon] Adding LLVMBuild.txt reference to HexagonAsmParser.
llvm-svn: 252444
2015-11-09 04:31:02 +00:00
Colin LeMahieu 7cd0892729 [Hexagon] Enabling ASM parsing on Hexagon backend and adding instruction parsing tests. General updating of the code emission.
llvm-svn: 252443
2015-11-09 04:07:48 +00:00
Mehdi Amini 3383ccc400 Add a method to the BitcodeReader to parse only the identification block
Summary: Mimic parseTriple(); and exposes it to LTOModule.cpp

Reviewers: dexonsmith, rafael

Subscribers: llvm-commits

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 252442
2015-11-09 02:46:41 +00:00
Todd Fiala 247662b766 Added myself to the CODE_OWNERS.txt list for a few subsystems.
I'm primarily testing my git-svn setup.

llvm-svn: 252441
2015-11-09 01:24:36 +00:00
Colin LeMahieu 23403c277a [AsmParser] Generalize matching for grammars without mnemonic-lead statements
Differential Revision: http://reviews.llvm.org/D14257

llvm-svn: 252440
2015-11-09 00:46:46 +00:00
Colin LeMahieu 8a0453e23a [AsmParser] Backends can parameterize ASM tokenization.
llvm-svn: 252439
2015-11-09 00:31:07 +00:00
Todd Fiala 87f5e80614 Fix up curses_results.py for new package specification requirement.
This was breaking but probably missed since it is currently
infrequently used.

llvm-svn: 252438
2015-11-09 00:23:01 +00:00
Johannes Doerfert 188542fda9 [FIX] Initialize incoming scalar memory locations for PHIs
llvm-svn: 252437
2015-11-09 00:21:21 +00:00
Johannes Doerfert 80c716df2b [NFC] Remove unused variable.
llvm-svn: 252436
2015-11-09 00:21:04 +00:00
Colin LeMahieu 7820dff228 [AsmParser] Provide target direct access to mnemonic token. Allow assignment parsing to be hooked by target. Allow target to specify if identifier is a label.
Differential Revision:  http://reviews.llvm.org/D14255

llvm-svn: 252435
2015-11-09 00:15:45 +00:00
Xinliang David Li 2d7ec5a970 [PGO] Code cleanup [NFC]
Use interfaces defined in LLVM to create FuncName
and FuncNameVar.

llvm-svn: 252434
2015-11-09 00:04:16 +00:00
Xinliang David Li 441959d296 [PGO] Instr func name var creation code refactoring
Move the code from cfe to LLMV and become shared interfaces.
There is no functional change.

llvm-svn: 252433
2015-11-09 00:01:22 +00:00
Colin LeMahieu a4c85d4c96 [AsmParser] Allow tokens to be put back in to the token stream.
Differential Revision: http://reviews.llvm.org/D14252

llvm-svn: 252432
2015-11-08 23:48:23 +00:00
Sylvestre Ledru da07885dcc autotools: Also link the new go libraries
llvm-svn: 252429
2015-11-08 22:30:34 +00:00
Yaron Keren 30e4515a5f Replace tab with 8 spaces, NFC.
llvm-svn: 252426
2015-11-08 22:01:45 +00:00
Matthias Gehre eeb71758cc [clang-tidy] add new check cppcoreguidelines-pro-type-cstyle-cast
Summary:
This check flags all use of c-style casts that perform a static_cast
downcast, const_cast, or reinterpret_cast.

Use of these casts can violate type safety and cause the program to
access a
variable that is actually of type X to be accessed as if it were of an
unrelated type Z. Note that a C-style (T)expression cast means to
perform
the first of the following that is possible: a const_cast, a
static_cast, a
static_cast followed by a const_cast, a reinterpret_cast, or a
reinterpret_cast followed by a const_cast. This rule bans (T)expression
only when used to perform an unsafe cast.

This rule is part of the "Type safety" profile of the C++ Core
Guidelines, see
https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#-type4-dont-use-c-style-texpression-casts-that-would-perform-a-static_cast-downcast-const_cast-or-reinterpret_cast.

Reviewers: alexfh, sbenza, bkramer, aaron.ballman

Subscribers: cfe-commits

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

llvm-svn: 252425
2015-11-08 21:10:39 +00:00
Johannes Doerfert f85ad0411f [FIX] Carefully simplify assumptions in the presence of error blocks
If a SCoP contains error blocks we cannot use the domain constraints
  to simplify the assumptions as the domain is already influenced by the
  assumptions we took. Before this patch we did that and some assumptions
  became self-fulfilling as they were implied by the domain constraints.

llvm-svn: 252424
2015-11-08 20:16:39 +00:00
Maksim Panchenko 87ef57148a [RuntimeDyld] Add support for R_X86_64_PC8 relocation.
llvm-svn: 252423
2015-11-08 19:34:17 +00:00
Johannes Doerfert a768624f14 [FIX] Introduce different SAI objects for scalar and memory accesses
Even if a scalar and memory access have the same base pointer, we cannot use
  one SAI object as the type but also the number of dimensions are wrong. For
  the attached test case this caused a crash in the invariant load hoisting,
  though it could cause various other problems too.

This fixes bug 25428 and a execution time bug in MallocBench/cfrac.

Reported-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
llvm-svn: 252422
2015-11-08 19:12:05 +00:00
Xinliang David Li 470bfa9aaa [PGO] Cleanup: fix function-data field names
To make them the same as the common def in InstrProfData.inc.
This is a preparation to make the runtime code  to use the 
template as well. NFC

llvm-svn: 252421
2015-11-08 18:00:13 +00:00
Johannes Doerfert 3797707695 [FIX] Use unreachable to indicate dead code and repair dominance
When we bail out early we make the partially build new code path
  practically dead, though it was not unreachable. To remove dominance
  problems we now make it not only dead but also prevent the control
  flow to join with the original code path, thus allow to use original
  values after the SCoP without any PHI nodes.

This fixes bug 25447.

llvm-svn: 252420
2015-11-08 17:57:41 +00:00
Johannes Doerfert 1dd6e37af4 Verify IR after we bail out
The bail out in r252412 left the code generation without verifying the (so
  far) generated IR. This will change now and ensure we always run the
  verifier.

Suggested-by: Tobias Grosser <tobias@grosser.es>
llvm-svn: 252419
2015-11-08 16:34:17 +00:00
NAKAMURA Takumi 02d97aa74e Appease hosts without HAVE_BACKTRACE nor ENABLE_BACKTRACES.
llvm/lib/Support/Signals.cpp:66:13: warning: unused function 'printSymbolizedStackTrace' [-Wunused-function]
  llvm/lib/Support/Signals.cpp:52:13: warning: function 'findModulesAndOffsets' has internal linkage but is not defined [-Wundefined-internal]

llvm-svn: 252418
2015-11-08 09:45:06 +00:00
Hal Finkel f046f72efa [PowerPC] Fix LoopPreIncPrep not to depend on SCEV constant simplifications
Under most circumstances, if SCEV can simplify X-Y to a constant, then it can
also simplify Y-X to a constant. However, there is no guarantee that this is
always true, and concensus is not to consider that a correctness bug in SCEV
(although it is undesirable).

PPCLoopPreIncPrep gathers pointers used to access memory (via loads, stores and
prefetches) into buckets, where in each bucket the relative pointer offsets are
constant. We used to keep each bucket as a multimap, where SCEV's subtraction
operation was used to define the ordering predicate. Instead, use a fixed SCEV
base expression for each bucket, record the constant offsets from that base
expression, and adjust it later, if desirable, once all pointers have been
collected.

Doing it this way should be more compile-time efficient than the previous
scheme (in addition to making the implementation less sensitive to SCEV
simplification quirks).

Fixes PR25170.

llvm-svn: 252417
2015-11-08 08:04:40 +00:00
David Majnemer b222184223 [LoopStrengthReduce] Don't bother fixing up PHIs from EH Pad preds
We cannot really insert fixup code into a PHI's predecessor.

This fixes PR25445.

llvm-svn: 252416
2015-11-08 05:04:07 +00:00
Davide Italiano bbcc7f6115 [ELF2/AArch64] Support R_AARCH64_LDST64_ABS_LO12_NC relocation.
llvm-svn: 252415
2015-11-08 04:45:26 +00:00
David Majnemer 189d7da1f5 Make bugpoint ehpad/token friendly
Tokens shouldn't be blindly replaced with undef/null.  Also, don't try
to remove EH pad instructions from the top of basic blocks.

llvm-svn: 252414
2015-11-08 04:16:12 +00:00
David Majnemer e35244cf63 [WinEH] Update PHIs of CATCHRET successors
The TailDuplication machine pass ran across a malformed CFG: a PHI node
referred it's predecessor's predecessor instead of it's predecessor.
This occurred because we split the edge in X86ISelLowering when we
processed the CATCHRET but forgot to do something about the PHI nodes.

This fixes PR25444.

llvm-svn: 252413
2015-11-08 02:36:00 +00:00
Johannes Doerfert c4898504ea [FIX] Bail out if there is a dependence cycle between invariant loads
While the program cannot cause a dependence cycle between invariant
  loads, additional constraints (e.g., to ensure finite loops) can
  introduce them. It is hard to detect them in the SCoP description,
  thus we will only check for them at code generation time. If such a
  recursion is detected we will bail out the code generation and place a
  "false" runtime check to guarantee the original code is used.

  This fixes bug 25443.

llvm-svn: 252412
2015-11-07 19:46:04 +00:00
Johannes Doerfert 44483c5599 [FIX] Remove all invariant load occurences from own execution context
llvm-svn: 252411
2015-11-07 19:45:27 +00:00
Devin Coughlin 2cb767d32b [analyzer] Update SATestBuild.py to enable a 'download and patch' model for projects.
Currently the SATestBuild.py and SATestAdd.py buildbot scripts expect project
sources to be checked into the project repository. This commit changes these
scripts to additionally support a model where project sources are downloaded
rather than checked into the repository. Sometimes projects may need to be
modified (for example, to support a newer versions of clang), so the updated scripts
also allow for an optional patch file that will be applied to the downloaded
project source before analysis.

To support this workflow, this commit changes the expected layout of
a project in the repository. The project-specific helper scripts will stay
in the root of each project directory, but the benchmark source itself (if
checked into the repo) should now be stored in a subdirectory named
'CachedSource':

  project_name/
    cleanup_run_static_analyzer.sh [optional]
    run_static_analyzer.cmd [required]
    download_project.sh [optional]
    CachedSource/ [optional]
    changes_for_analyzer.patch [optional]

If the 'CachedSource' source directory is not present, the download script will
be executed. This script should download the project source into 'CachedSource'.
Then, if 'changes_for_analyzer.patch' is present its changes will
be applied to a copy of 'CachedSource' before analysis.

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

llvm-svn: 252410
2015-11-07 18:27:35 +00:00
Davide Italiano a92bc3576a Fix pessimizing moves. Found by clang.
llvm-svn: 252409
2015-11-07 18:15:05 +00:00
Marshall Clow 33adf230a7 Mark LWG#2224 as complete. Wording change only, no code changes required
llvm-svn: 252408
2015-11-07 17:56:51 +00:00
Marshall Clow e5f1288fa0 Implement LWG#2353: std::next is over-constrained
llvm-svn: 252407
2015-11-07 17:48:49 +00:00
Marshall Clow 8be59af1ed More of P0006R0: type traits variable aliases for C++17.
llvm-svn: 252406
2015-11-07 17:44:36 +00:00
Yaron Keren e02bcdca88 Remove spaces in empty line, NFC.
llvm-svn: 252405
2015-11-07 16:35:07 +00:00
Yaron Keren 5f813e8de3 Remove spaces at start of line, NFC.
llvm-svn: 252404
2015-11-07 16:24:52 +00:00
Bruce Mitchener d31113f0b9 Add more NetBSD platform glue for lldb
Summary:
These changes are still incomplete, but  we are almost there.

Changes:
- CMake and gmake code
- SWIG code
- minor code additions

Reviewers: emaste, joerg

Subscribers: youri, akat1, brucem, lldb-commits, joerg

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

llvm-svn: 252403
2015-11-07 15:31:54 +00:00
Kuba Brecka be81c28ec6 [tsan] Turn lit test deadlocks into failures (OS X)
Several tests currently deadlock when the lit test suite is run on OS X. Let's mark them as unsupported.

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

llvm-svn: 252402
2015-11-07 14:29:38 +00:00