Commit Graph

138165 Commits

Author SHA1 Message Date
Douglas Gregor 22103e3416 When we're emitting a diagnostic with a source location in an imported
module, provide a module import stack similar to what we would get for
an include stack, e.g.,

In module 'DependsOnModule' imported from build-fail-notes.m:4:
In module 'Module' imported from DependsOnModule.framework/Headers/DependsOnModule.h:1:
Inputs/Module.framework/Headers/Module.h:15:12: note: previous definition is here
@interface Module

<rdar://problem/12696425>

llvm-svn: 169042
2012-11-30 21:58:49 +00:00
Aaron Ballman f505d55472 Fixing a precedence issue with my previous commit.
llvm-svn: 169041
2012-11-30 21:44:01 +00:00
Jakob Stoklund Olesen 2776b4c624 Add a -time-compilations=<N> option to llc.
This causes llc to repeat the module compilation N times, making it
possible to get more accurate information from -time-passes when
compiling small modules.

llvm-svn: 169040
2012-11-30 21:42:47 +00:00
Jakob Stoklund Olesen 366a2e812d Aggregate pass execution time report by pass ID instead of pass instance.
This avoids unidentified duplicates in the pass execution time report
when a pass runs more than once in the pass manager pipeline.

llvm-svn: 169039
2012-11-30 21:42:45 +00:00
Daniel Dunbar 2555a4fc08 lit: Add a simple test suite for checking test runner parallelism.
llvm-svn: 169038
2012-11-30 21:34:04 +00:00
Aaron Ballman 56b226a8da Fixing an MSVC warning about an unsafe mixture of Boolean and unsigned types in a logical operator.
llvm-svn: 169037
2012-11-30 21:15:20 +00:00
Michael J. Spencer 299fc29a59 [CMake] Add support for selecting which c++ abi library to use.
llvm-svn: 169036
2012-11-30 21:02:29 +00:00
Jim Ingham c5917d9a38 Save and restore terminal state when lldb is suspended with SIGTSTP and resumed with SIGCONT.
Readline & gdb have a bunch of code to handle older UNIX'es with other job control mechanisms.
I didn't try to replicate that.

llvm-svn: 169032
2012-11-30 20:23:19 +00:00
Enrico Granata 69ea91b402 <rdar://problem/12676084> Dump the traceback when a Python error occurs in "command script import" and the exception is not an ImportError
llvm-svn: 169031
2012-11-30 20:15:16 +00:00
Dmitri Gribenko 9ebd1611b6 Comments: no need to escape any characters in \code ... \endcode.
llvm-svn: 169030
2012-11-30 20:04:39 +00:00
Dmitry Vyukov e993dac233 tsan: fix int overflow and several instances where tid is used with ignore
llvm-svn: 169029
2012-11-30 20:02:11 +00:00
Aaron Ballman 406ea51cfb Support for #pragma region/endregion for MSVC compatibility. Patch thanks to pravic!
llvm-svn: 169028
2012-11-30 19:52:30 +00:00
Douglas Gregor 6fb03aeae1 Actually keep track of the source locations at which particular module
files are loaded.

llvm-svn: 169027
2012-11-30 19:28:05 +00:00
Chad Rosier 31e7d2deb3 test/CodeGen/PowerPC/vec_mul.ll: Add a triple. Thanks, Hal.
llvm-svn: 169026
2012-11-30 19:15:10 +00:00
Pedro Artigas d8795040de Add fast math inst combine X*log2(Y*0.5)-->X*log2(Y)-X
reviewed by Michael Ilseman <milseman@apple.com>

llvm-svn: 169025
2012-11-30 19:09:41 +00:00
Sebastian Pop a204f72237 Codegen failure for vmull with small vectors
Codegen was failing with an assertion because of unexpected vector
operands when legalizing the selection DAG for a MUL instruction.

The asserting code was legalizing multiplies for vectors of size 128
bits. It uses a custom lowering to try and detect cases where it can
use a VMULL instruction instead of a VMOVL + VMUL.  The code was
looking for input operands to the MUL that had been sign or zero
extended. If it found the extended operands it would drop the
sign/zero extension and use the original vector size as input to a
VMULL instruction.

The code assumed that the original input vector was 64 bits so that
after dropping the extension it would fit directly into a D register
and could be used as an operand of a VMULL instruction. The input
code that trigger the failure used a vector of <4 x i8> that was
sign extended to <4 x i32>. It was not safe to drop the sign
extension in this case because the original vector is only 32 bits
wide. The fix is to insert a sign extension for the vector to reach
the required 64 bit size. In this particular example, the vector would
need to be sign extented to a <4 x i16>.

llvm-svn: 169024
2012-11-30 19:08:04 +00:00
Greg Clayton 1c5f186f30 Added new options to "target create" and "target modules add".
For "target create" you can now specify "--no-dependents" to not track down and add all dependent shared libraries. This can be handy when doing manual symbolication. Also added the "--symfile" or "-s" for short so you can specify a module and a stand alone debug info file:

(lldb) target create --symfile /tmp/a.dSYM /usr/bin/a

Added the "--symfile" option to the "target modules add" for the same reason. These all help with manualy symbolication and expose functionality that was previously only available through the public API layer.

llvm-svn: 169023
2012-11-30 19:05:35 +00:00
Howard Hinnant c1c87c15f2 __list::ends_with_template was giving the wrong answer for empty lists. And __parse_unnamed_type_name wasn't properly handling the list of paramters and was not safe against incorrectly mangled lambdas (running past last).
llvm-svn: 169022
2012-11-30 18:43:50 +00:00
Douglas Gregor af8f02634b When an error occurs while building a module on demand, provide "While
building module 'Foo' imported from..." notes (the same we we provide
"In file included from..." notes) in the diagnostic, so that we know
how this module got included in the first place. This is part of
<rdar://problem/12696425>.

llvm-svn: 169021
2012-11-30 18:38:50 +00:00
Chad Rosier a820e7feff test/CodeGen/PowerPC/vec_mul.ll: Fix register operands.
llvm-svn: 169020
2012-11-30 18:29:01 +00:00
Dmitry Vyukov d05418eac6 tsan: suppress weird race reports when JVM is embed into the process
llvm-svn: 169019
2012-11-30 17:45:53 +00:00
Jyotsna Verma a77c054e85 Use multiclass for the load instructions with MEMri operand.
llvm-svn: 169018
2012-11-30 17:31:52 +00:00
Dmitry Vyukov 1450ac6406 tsan: add __libc_memalign interceptor (used by dynamic loader to allocate tls for dlopen'ed modules)
llvm-svn: 169017
2012-11-30 17:27:58 +00:00
Nadav Rotem 6b494be886 Remove the use of LPPassManager. We can remove LPM because we dont need to run any additional loop passes on the new vector loop.
llvm-svn: 169016
2012-11-30 17:27:53 +00:00
Dmitry Vyukov ad9c530f7c tsan: add sanity checks into memory allocator
llvm-svn: 169015
2012-11-30 17:26:50 +00:00
Eli Bendersky 43d50d4a35 Clean up whitespace and add comments
llvm-svn: 169002
2012-11-30 14:22:14 +00:00
Eli Bendersky 8e1c647787 Make FileCheck return 2 in case of an error as documented,
instead of 1 or true (?!)

llvm-svn: 169001
2012-11-30 13:51:33 +00:00
Manuel Klimek 9d0412334e Allow matchers to access the ASTContext.
Patch by Edwin Vane.

llvm-svn: 169000
2012-11-30 13:45:19 +00:00
NAKAMURA Takumi faaf131091 test/CodeGen/PowerPC: Add explicit -march=ppc32.
FIXME: Please add another RUN line if you would like to check also on ppc64.
llvm-svn: 168999
2012-11-30 13:28:31 +00:00
Adhemerval Zanella 812410f2d1 This patch fixes the Altivec addend construction for the fused multiply-add
instruction (vmaddfp) to conform with IEEE to ensure the sign of a zero
result when resulting product is -0.0.

The -0.0 vector addend to vmaddfp is generated by a creating a vector
with full bits sets and then shifting each elements by 31-bits to the
left, resulting in a vector of 0x80000000 (or -0.0 as float).

The 'buildvec_canonicalize.ll' was adjusted to reflect this change and
the 'vec_mul.ll' was complemented with the float vector multiplication
test.

llvm-svn: 168998
2012-11-30 13:05:44 +00:00
Evgeniy Stepanov 5a16af8638 [msan] Tests for vector manipulation instructions.
llvm-svn: 168997
2012-11-30 12:12:20 +00:00
Chandler Carruth f12e3a67db Switch LLVM_USE_RVALUE_REFERENCES to LLVM_HAS_RVALUE_REFERENCES.
Rationale:
1) This was the name in the comment block. ;]
2) It matches Clang's __has_feature naming convention.
3) It matches other compiler-feature-test conventions.

Sorry for the noise. =]

I've also switch the comment block to use a \brief tag and not duplicate
the name.

llvm-svn: 168996
2012-11-30 11:45:22 +00:00
Kostya Serebryany 817b60af38 [asan] simplify the code around doesNotReturn call. It now magically works.
llvm-svn: 168995
2012-11-30 11:08:59 +00:00
Chandler Carruth adc29e11d0 Update to reflect the change of macro name in r168993.
llvm-svn: 168994
2012-11-30 11:04:44 +00:00
Chandler Carruth 9c7462a8b8 Separate out the tests for whether the compiler suports R-value
references from whether it supports an R-value reference *this. No
version of GCC today supports the latter, which breaks GCC C++11
compiles of LLVM and Clang now.

Also add doxygen comments clarifying what's going on here, and update
the usage in Optional. I'll update the usages in Clang next.

llvm-svn: 168993
2012-11-30 11:04:18 +00:00
Kostya Serebryany 436462046a [asan] make asan_test.cc more gcc-friendly
llvm-svn: 168992
2012-11-30 10:41:42 +00:00
Patrik Hagglund 086ee1ee50 More strict error checking in parseSpecifier + simplified code.
For example, don't allow empty strings to be passed to getInt.

Move asserts inside parseSpecifier. (One day we may want to pass parse
error messages to the user - from LLParser - instead of using asserts,
but keep the code simple until then. There have been an attempt to do
this. See r142288, which got reverted, and r142605.)

llvm-svn: 168991
2012-11-30 10:06:59 +00:00
Kostya Serebryany 6a786e66cf [asan] simplify break_optimization in tests (Jakub Jelinek)
llvm-svn: 168990
2012-11-30 09:52:44 +00:00
Chandler Carruth d9ef81e133 Fix non-determinism introduced in r168970 and pointed out by Duncan.
We're iterating over a non-deterministically ordered container looking
for two saturating flags. To do this correctly, we have to saturate
both, and only stop looping if both saturate to their final value.
Otherwise, which flag we see first changes the result.

This is also a micro-optimization of the previous version as now we
don't go into the (possibly expensive) test logic once the first
violation of either constraint is detected.

llvm-svn: 168989
2012-11-30 09:34:29 +00:00
Chandler Carruth 77d433dafe Rearrange the comments, control flow, and variable names; no
functionality changed.

Evan's commit r168970 moved the code that the primary comment in this
function referred to to the other end of the function without moving the
comment, and there has been a steady creep of "boolean" logic in it that
is simpler if handled via early exit. That way each special case can
have its own comments. I've also made the variable name a bit more
explanatory than "AllFit". This is in preparation to fix the
non-deterministic output of this function.

llvm-svn: 168988
2012-11-30 09:26:25 +00:00
Dmitry Vyukov 71d759d392 tsan: intercept mlock() because of the kernel bug
llvm-svn: 168987
2012-11-30 06:50:15 +00:00
Eric Christopher 3c23009117 Add the rest of the experimental fission sections to MC.
llvm-svn: 168986
2012-11-30 06:47:06 +00:00
Dmitry Vyukov 0a4d875c48 tsan: fix bug that leads to spurious use-after-free reports
llvm-svn: 168985
2012-11-30 06:39:01 +00:00
Eli Friedman dea98de3fb Fix the computation of highlight ranges so we produce something sane when
the beginning and end of the range are in different macro arguments.
PR14399.

llvm-svn: 168984
2012-11-30 06:19:40 +00:00
Jyotsna Verma b950ea61fc Use multiclass for the store instructions with MEMri operand.
llvm-svn: 168983
2012-11-30 06:10:22 +00:00
Richard Smith 328aae595c Refactor to reduce duplication in handling of special member functions. No functionality change.
llvm-svn: 168977
2012-11-30 05:11:39 +00:00
Jyotsna Verma ede608cce0 Use multiclass for the load instructions with 'base + register offset'
addressing mode.

llvm-svn: 168976
2012-11-30 04:19:09 +00:00
Meador Inge e3f2b26bfa Move library call simplification statistic to instcombine
The simplify-libcalls pass maintained a statistic to count the number
of library calls that have been simplified.  Now that library call
simplification is being carried out in instcombine the statistic should
be moved to there.

llvm-svn: 168975
2012-11-30 04:05:06 +00:00
Chandler Carruth dbd6958183 Move the InstVisitor utility into VMCore where it belongs. It heavily
depends on the IR infrastructure, there is no sense in it being off in
Support land.

This is in preparation to start working to expand InstVisitor into more
special-purpose visitors that are still generic and can be re-used
across different passes. The expansion will go into the Analylis tree
though as nothing in VMCore needs it.

llvm-svn: 168972
2012-11-30 03:08:41 +00:00
Evan Cheng 65df808f62 Fix logic to determine whether to turn a switch into a lookup table. When
the tables cannot fit in registers (i.e. bitmap), do not emit the table
if it's using an illegal type.

rdar://12779436

llvm-svn: 168970
2012-11-30 02:02:42 +00:00