Commit Graph

168518 Commits

Author SHA1 Message Date
Chandler Carruth d9887739c3 [docs] Fix my links to use the correct ReST syntax.
llvm-svn: 202490
2014-02-28 11:12:14 +00:00
Chandler Carruth e70016954b [docs] Fix 80-column wrap that I messed up.
llvm-svn: 202489
2014-02-28 11:11:41 +00:00
Chandler Carruth b2719d48ab [docs] Tweak discussion of BSDs based on feedback from Roman Divacky.
FreeBSD 10.0 and newer have a modern Clang toolchain that should work
well.

llvm-svn: 202488
2014-02-28 11:09:33 +00:00
Kostya Serebryany afc4f2af76 [sanitizer] speedup deadlock detector for the case when we destroy a mutex that has never been locked
llvm-svn: 202487
2014-02-28 10:59:33 +00:00
Chandler Carruth 0ec4f909fc [docs] Add a big section with details about how to go about acquiring
a more modern host C++ toolchain for Linux distros where folks sometimes
don't have a good option to get one as part of their system.

This is a first cut, so feedback, testing, and suggestions are very,
very welcom. This is one of the last real documentation changes that was
specifically requested prior to switching LLVM and Clang to build in
C++11 mode by default.

llvm-svn: 202486
2014-02-28 10:56:57 +00:00
Dmitry Vyukov 6cfab724ec tsan: refactor deadlock detector
Introduce DDetector interface between the tool and the DD itself.
It will help to experiment with other DD implementation,
as well as reuse DD in other tools.

llvm-svn: 202485
2014-02-28 10:48:13 +00:00
Dmitry Vyukov 371639ea1f tsan: deflake test
llvm-svn: 202484
2014-02-28 10:47:07 +00:00
NAKAMURA Takumi cdb9fafa71 Reorder Mips/MCTargetDesc/CMakeLists.txt.
llvm-svn: 202483
2014-02-28 10:18:21 +00:00
Sasa Stankovic 441880f700 [mips] Add MipsNaClELFStreamer.cpp to CMakeLists.txt.
llvm-svn: 202482
2014-02-28 10:14:12 +00:00
Tobias Grosser 4e9069291a cmake: Do not link in system libs
They are not needed any more.

llvm-svn: 202481
2014-02-28 10:11:20 +00:00
Kostya Serebryany 261993ad1a [sanitizer] a test for recursive rwlock and deadlock detector (currently fails)
llvm-svn: 202480
2014-02-28 10:03:51 +00:00
Sasa Stankovic 8c5736b921 [mips] Implement NaCl sandboxing of indirect jumps:
* Align targets of indirect jumps to instruction bundle boundaries (in MI layer).
  * Add masking instructions before indirect jumps (in MC layer).

Differential Revision: http://llvm-reviews.chandlerc.com/D2847

llvm-svn: 202479
2014-02-28 10:00:38 +00:00
Alp Toker 763b93965c Add support for FreeBSD
Port the OpenMP runtime to FreeBSD along with associated build system changes.

Also begin to generalize affinity capabilities so they aren't tied explicitly
to Windows and Linux.

The port builds with stock clang and gmake and has no additional runtime
dependencies.

All but a handful of the validation suite tests are now passing on FreeBSD 10
x86_64.

llvm-svn: 202478
2014-02-28 09:42:41 +00:00
Tobias Grosser 6c6af852f9 Add new 'remark' diagnostic type
llvm-svn: 202477
2014-02-28 09:42:12 +00:00
Kostya Serebryany b86b56c0db [tsan] one more test for deadlock detector
llvm-svn: 202476
2014-02-28 09:17:16 +00:00
Tobias Grosser 741602461d Add 'remark' diagnostic type in 'clang'
A 'remark' is information that is not an error or a warning, but rather some
additional information provided to the user. In contrast to a 'note' a 'remark'
is an independent diagnostic, whereas a 'note' always depends on another
diagnostic.

A typical use case for remark nodes is information provided to the user, e.g.
information provided by the vectorizer about loops that have been vectorized.

This patch provides the initial implementation of 'remarks'. It includes the
actual definiton of the remark nodes, their printing as well as basic parameter
handling. We are reusing the existing diagnostic parameters which means a remark
can be enabled with normal '-Wdiagnostic-name' flags and can be upgraded to
an error using '-Werror=diagnostic-name'. '-Werror' alone does not upgrade
remarks.

This patch is by intention minimal in terms of parameter handling. More
experience and more discussions will most likely lead to further enhancements
in the parameter handling.

llvm-svn: 202475
2014-02-28 09:11:08 +00:00
Tobias Grosser e8d4c9a2c7 Add 'remark' diagnostic type in LLVM
A 'remark' is information that is not an error or a warning, but rather some
additional information provided to the user. In contrast to a 'note' a 'remark'
is an independent diagnostic, whereas a 'note' always depends on another
diagnostic.

A typical use case for remark nodes is information provided to the user, e.g.
information provided by the vectorizer about loops that have been vectorized.

llvm-svn: 202474
2014-02-28 09:08:45 +00:00
Alexey Samsonov a82e4c8015 Turn static inline functions to inline, following Rafael's suggestion
llvm-svn: 202473
2014-02-28 08:23:09 +00:00
Alexey Samsonov 6c282b4149 [CMake] Fix PR18987: discard /MD flag if we're adding /MT
llvm-svn: 202472
2014-02-28 08:04:30 +00:00
Argyrios Kyrtzidis 24c55228a9 [ASTUnit] Don't let the preamble diagnostics out-live the CompilerInstance that created them,
this is inherently unsafe.

Instead get the diagnostic info into a SourceManager-independent form.

llvm-svn: 202471
2014-02-28 07:11:01 +00:00
Dmitry Vyukov 6403c34c2a tsan: add new line at the end of error message
llvm-svn: 202470
2014-02-28 06:29:42 +00:00
Hal Finkel b998915ee1 Swap PPC isel operands to allow for 0-folding
The PPC isel instruction can fold 0 into the first operand (thus eliminating
the need to materialize a zero-containing register when the 'true' result of
the isel is 0). When the isel is fed by a bit register operation that we can
invert, do so as part of the bit-register-operation peephole routine.

llvm-svn: 202469
2014-02-28 06:11:16 +00:00
Bob Wilson 1e3f3bf950 Add a testcase for r202437.
llvm-svn: 202468
2014-02-28 05:57:14 +00:00
Nick Lewycky b8336b7d13 Fix crash with enable_if on constructors.
llvm-svn: 202467
2014-02-28 05:26:13 +00:00
Rui Ueyama cf39784b3a llvm-objdump: Fix crash bug with printing unwind info on stripped file.
The current COFF unwind printer tries to print SEH handler function names,
assuming that it can always find function names in string table. It crashes
if file being read has no symbol table (i.e. executable).

With this patch, llvm-objdump prints SEH handler's RVA if there's no symbol
table entry for that RVA.

llvm-svn: 202466
2014-02-28 05:21:29 +00:00
Rui Ueyama 1618fe25d1 Style fix.
llvm-svn: 202465
2014-02-28 05:21:26 +00:00
Jim Ingham 286fb1ef32 Plumb the EvaluateExpressionOptions::{Set,Get}StopOthers through the SB API, and make it work in RunThreadPlan.
Also remove SetStopOthers from the ThreadPlanCallFunction, because if the value you have doesn't match what is
in the EvaluateExpressionOptions the plan was passed when created it won't work correctly.

llvm-svn: 202464
2014-02-28 02:52:06 +00:00
Rafael Espindola a51f0f8367 Now that it is possible, use the mangler in IRObjectFile.
A really simple patch marks the end of a lot of yak shaving :-)

llvm-svn: 202463
2014-02-28 02:17:23 +00:00
Rafael Espindola cc126271f8 Add support for OpenBSD SPARC assembler.
Patch by Brad Smith.

llvm-svn: 202462
2014-02-28 01:55:21 +00:00
Richard Smith 2868a736f8 Add a -Wclass-varargs to warn on objects of any class type being passed through an ellipsis. Since C++11 relaxed the rules on this, we allow a lot more bad code through silently, such as:
const char *format = "%s";
  std::experimental::string_view view = "foo";
  printf(format, view);

In this case, not only warn about a class type being used here, but also suggest that calling c_str() might be a good idea.

llvm-svn: 202461
2014-02-28 01:36:39 +00:00
Rui Ueyama 854d6d0a58 Rename coff_pdata_x64 -> coff_runtime_function_x64.
llvm-svn: 202460
2014-02-28 01:18:58 +00:00
Hal Finkel 5cae2168c7 Trying to unbreak the darwin11 builder
The CR bit tracking code broke PPC/Darwin; trying to get it working again...

(the darwin11 builder, which defaults to the darwin ABI when running PPC tests,
asserted when running test/CodeGen/PowerPC/inverted-bool-compares.ll)

llvm-svn: 202459
2014-02-28 01:17:25 +00:00
Reid Kleckner 383c2f232e Attempt to fix non-MSVC build
llvm-svn: 202458
2014-02-28 01:12:55 +00:00
Reid Kleckner ad59deb436 -fdump-record-layouts: Sort nvbases by offset before printing them
It makes our -fdump-record-layouts a little more sane.

llvm-svn: 202457
2014-02-28 01:03:09 +00:00
Todd Fiala 550b1a298a Re-enable TestExprDoesntBlock.py on Linux.
This is related to:
http://llvm.org/bugs/show_bug.cgi?id=15258

I ran this test 10 times successfully against Ubuntu 12.04 LTS x86_64
with lldb built with gcc 4.8.2 and July 2013 libedit.

llvm-svn: 202456
2014-02-28 00:46:57 +00:00
Hal Finkel b39a0475c0 Try to unbreak the C++11 build
Cannot use negative numbers in case statements without running afoul of -Wc++11-narrowing.

llvm-svn: 202455
2014-02-28 00:45:27 +00:00
NAKAMURA Takumi b47a2c09aa [CMake] llvm_add_library(SHARED|STATIC): Fix broken OUTPUT_NAME for *_static.
llvm-svn: 202454
2014-02-28 00:28:13 +00:00
Hal Finkel 00a950f488 Add -mcrbits/-mno-crbits to control the PowerPC CR-bit-tracking feature
The backend currently enables CR-bit tracking by default at -O2 and higher.
These flags allow the user to override that default.

llvm-svn: 202453
2014-02-28 00:27:57 +00:00
Alexander Kornienko 31219d3abd Added a naive NOLINT implementation.
Summary:
Added a naive NOLINT implementation. It doesn't care about specific
linter categories, just the "// NOLINT" on the same line as a diagnostic.

Reviewers: klimek

Reviewed By: klimek

CC: cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D2896

llvm-svn: 202452
2014-02-28 00:27:50 +00:00
Hal Finkel 940ab934d4 Add CR-bit tracking to the PowerPC backend for i1 values
This change enables tracking i1 values in the PowerPC backend using the
condition register bits. These bits can be treated on PowerPC as separate
registers; individual bit operations (and, or, xor, etc.) are supported.
Tracking booleans in CR bits has several advantages:

 - Reduction in register pressure (because we no longer need GPRs to store
   boolean values).

 - Logical operations on booleans can be handled more efficiently; we used to
   have to move all results from comparisons into GPRs, perform promoted
   logical operations in GPRs, and then move the result back into condition
   register bits to be used by conditional branches. This can be very
   inefficient, because the throughput of these CR <-> GPR moves have high
   latency and low throughput (especially when other associated instructions
   are accounted for).

 - On the POWER7 and similar cores, we can increase total throughput by using
   the CR bits. CR bit operations have a dedicated functional unit.

Most of this is more-or-less mechanical: Adjustments were needed in the
calling-convention code, support was added for spilling/restoring individual
condition-register bits, and conditional branch instruction definitions taking
specific CR bits were added (plus patterns and code for generating bit-level
operations).

This is enabled by default when running at -O2 and higher. For -O0 and -O1,
where the ability to debug is more important, this feature is disabled by
default. Individual CR bits do not have assigned DWARF register numbers,
and storing values in CR bits makes them invisible to the debugger.

It is critical, however, that we don't move i1 values that have been promoted
to larger values (such as those passed as function arguments) into bit
registers only to quickly turn around and move the values back into GPRs (such
as happens when values are returned by functions). A pair of target-specific
DAG combines are added to remove the trunc/extends in:
  trunc(binary-ops(binary-ops(zext(x), zext(y)), ...)
and:
  zext(binary-ops(binary-ops(trunc(x), trunc(y)), ...)
In short, we only want to use CR bits where some of the i1 values come from
comparisons or are used by conditional branches or selects. To put it another
way, if we can do the entire i1 computation in GPRs, then we probably should
(on the POWER7, the GPR-operation throughput is higher, and for all cores, the
CR <-> GPR moves are expensive).

POWER7 test-suite performance results (from 10 runs in each configuration):

SingleSource/Benchmarks/Misc/mandel-2: 35% speedup
MultiSource/Benchmarks/Prolangs-C++/city/city: 21% speedup
MultiSource/Benchmarks/MiBench/automotive-susan: 23% speedup
SingleSource/Benchmarks/CoyoteBench/huffbench: 13% speedup
SingleSource/Benchmarks/Misc-C++/Large/sphereflake: 13% speedup
SingleSource/Benchmarks/Misc-C++/mandel-text: 10% speedup

SingleSource/Benchmarks/Misc-C++-EH/spirit: 10% slowdown
MultiSource/Applications/lemon/lemon: 8% slowdown

llvm-svn: 202451
2014-02-28 00:27:01 +00:00
Hal Finkel 2756dc17a6 Add an OutPatFrag TableGen class
Unfortunately, it is currently impossible to use a PatFrag as part of an output
pattern (the part of the pattern that has instructions in it) in TableGen.
Looking at the current implementation, this was clearly intended to work (there
is already code in place to expand patterns in the output DAG), but is
currently broken by the baked-in type-checking assumption and the order in which
the pattern fragments are processed (output pattern fragments need to be
processed after the instruction definitions are processed).

Fixing this is fairly simple, but requires some way of differentiating output
patterns from the existing input patterns. The simplest way to handle this
seems to be to create a subclass of PatFrag, and so that's what I've done here.

As a simple example, this allows us to write:

def crnot : OutPatFrag<(ops node:$in),
                       (CRNOR $in, $in)>;

def       : Pat<(not i1:$in),
                (crnot $in)>;

which captures the core use case: handling of repeated subexpressions inside
of complicated output patterns.

This will be used by an upcoming commit to the PowerPC backend.

llvm-svn: 202450
2014-02-28 00:26:56 +00:00
Hal Finkel ab51ecd4fc Fix visitTRUNCATE for legal i1 values
This extract-and-trunc vector optimization cannot work for i1 values as
currently implemented, and so I'm disabling this for now for i1 values. In the
future, this can be fixed properly.

Soon I'll commit support for i1 CR bit tracking in the PowerPC backend, and
this will be covered by one of the existing regression tests.

llvm-svn: 202449
2014-02-28 00:26:45 +00:00
Todd Fiala 7ffb2b0b53 Enable TestCallThatRestarts test on Linux.
This is related to:
http://llvm.org/bugs/show_bug.cgi?id=15278

I ran this 20 times in a row without failure at svn r202440 on Ubuntu
12.04 LTS x86_64 using July 2013 libedit and gcc 4.8.2.

llvm-svn: 202448
2014-02-28 00:20:10 +00:00
Greg Clayton 52c3a07ece Revert Xcode run argument settings that were accidentally checked in.
llvm-svn: 202447
2014-02-28 00:13:03 +00:00
Todd Fiala 347284f82d Re-enable TestMultithreaded.py test on Linux.
I could not get http://llvm.org/bugs/show_bug.cgi?id=16016)
to fail on my end running 10 times in a row.  Re-enabling
the test.

llvm-svn: 202446
2014-02-28 00:13:00 +00:00
Rui Ueyama eaaf5908d9 Remove unnecessary temporary variable.
llvm-svn: 202445
2014-02-28 00:06:20 +00:00
Richard Trieu 86738692fd "&&&" != "&&"
llvm-svn: 202444
2014-02-27 23:59:14 +00:00
Ben Langmuir 1b8d44f59b Revert "Honour 'use-external-names' in FileManager"
Revert r202442, which broke the buildbots.

llvm-svn: 202443
2014-02-27 23:48:03 +00:00
Ben Langmuir 09e0d5c1bb Honour 'use-external-names' in FileManager
Pass through the externally-visible names that we got from the VFS down
to FileManager, and test that this is the name showing up in __FILE__,
diagnostics, and debug information.

llvm-svn: 202442
2014-02-27 23:27:54 +00:00
Reid Kleckner d6f9b83ae1 MS ABI: Attempt to fix DenseMap entry reference invalidation
llvm-svn: 202441
2014-02-27 22:51:43 +00:00