Commit Graph

146677 Commits

Author SHA1 Message Date
Nico Weber 0f27c6079b Revert r178079, it caused PR15637.
Also add a test for PR15637.

llvm-svn: 178497
2013-04-01 20:33:18 +00:00
Richard Smith 5205a8cfd8 Don't eagerly deserialize every templated function (and every static data
member inside a class template) when loading a PCH file or module.

llvm-svn: 178496
2013-04-01 20:22:16 +00:00
Shankar Easwaran 34353270a0 [ELF][Hexagon] fix few relocations and add test
llvm-svn: 178495
2013-04-01 20:20:11 +00:00
Ariel J. Bernal f78debd7d2 Refactor Usenullptr matcher to avoid duplication
Previously UseNullptr matched separately implicit and explicit casts to nullptr,
now it matches casts that either are implict casts to nullptr or have an
implicit cast to nullptr within.

Also fixes PR15572 since the same macro replacement logic is applied to implicit
and explicit casts.

llvm-svn: 178494
2013-04-01 20:09:29 +00:00
Daniel Malea 335bf6fb76 Fix bug in ProcessPOSIX::IsAlive() exposed by r178324
- process in 'unloaded' state was (incorrectly) considered to be alive by POSIX plugin
- above caused a regression in TestProcessLaunch cases

llvm-svn: 178493
2013-04-01 19:48:37 +00:00
Eli Bendersky e60fc2f676 Fix top-comment header and some indentation
llvm-svn: 178492
2013-04-01 19:47:56 +00:00
Daniel Malea d659dc16cc Avoid hang in attach-by-name test case
- Check that process attach succeeded before attempting to WaitForProcessToStop (observed to cause hangs on Linux)
- Update comment in TestHelloWorld case -- attaching by name still broken

llvm-svn: 178491
2013-04-01 19:47:00 +00:00
Adrian Prantl 5d5b67c52c * Attempt to un-break gdb buildbot by emitting a lexical block end only
when we actually end a lexical block.
* Added new test for line table / block cleanup.
* Follow-up to r177819 / rdar://problem/13115369

llvm-svn: 178490
2013-04-01 19:02:06 +00:00
Hal Finkel 3f88d08974 Fix a bad assert in PPCTargetLowering
llvm-svn: 178489
2013-04-01 18:42:58 +00:00
John McCall b65e8fe143 Only merge down a variable type if the previous declaration was
visible.  There's a lot of potential badness in how we're modelling
these things, but getting this much correct is reasonably easy.

rdar://13535367

llvm-svn: 178488
2013-04-01 18:34:28 +00:00
Edwin Vane ec0748068e Adding parenType() and innerType() AST Matchers
Updated docs and tests.

llvm-svn: 178487
2013-04-01 18:33:34 +00:00
Hal Finkel c2eddb0d02 Add triple to test/CodeGen/PowerPC/stfiwx-2
llvm-svn: 178486
2013-04-01 18:18:44 +00:00
Edwin Vane 61af48ce4e Improve loop convert's variable aliasing
Loop convert's variable name aliasing may cause issues if the variable is
declared as a value (copy). The converted loop will declare the variable as a
reference which may inadvertently cause modifications to the container if it
were used and modified as a temporary copy.

This is fixed by preserving the reference or value qualifiers of the aliased
variable. That is, if the variable was declared as a value the loop variable
will also be declared as a value and similarly for references.

Fixes: PR15600
Author: Jack Yang <jack.yang@intel.com>
llvm-svn: 178485
2013-04-01 18:15:06 +00:00
Shuxin Yang 6662fd0f15 Correct assertion condition
llvm-svn: 178484
2013-04-01 18:13:05 +00:00
Arnold Schwaighofer 6752366ed7 Merge load/store sequences with adresses: base + index + offset
We would also like to merge sequences that involve a variable index like in the
example below.

    int index = *idx++
    int i0 = c[index+0];
    int i1 = c[index+1];
    b[0] = i0;
    b[1] = i1;

By extending the parsing of the base pointer to handle dags that contain a
base, index, and offset we can handle examples like the one above.

The dag for the code above will look something like:

 (load (i64 add (i64 copyfromreg %c)
                (i64 signextend (i8 load %index))))

 (load (i64 add (i64 copyfromreg %c)
                (i64 signextend (i32 add (i32 signextend (i8 load %index))
                                         (i32 1)))))

The code that parses the tree ignores the intermediate sign extensions. However,
if there is a sign extension it needs to be on all indexes.

 (load (i64 add (i64 copyfromreg %c)
                (i64 signextend (add (i8 load %index)
                                     (i8 1))))
 vs

 (load (i64 add (i64 copyfromreg %c)
                (i64 signextend (i32 add (i32 signextend (i8 load %index))
                                         (i32 1)))))
radar://13536387

llvm-svn: 178483
2013-04-01 18:12:58 +00:00
Enrico Granata 8fab9fdac2 Integrating option parsing in TestCase for added convenience
To hook it up to individual test cases:
- define GetLongOptions() in your test case class to return something other than NULL (hopefully an array of options :-)
- implement ParseOption() to check for the short option char and do the right thing - return true at the end if you want more options to come your way or false if you don’t
- make sure that your Setup() call takes int& and char**& so that optind post-processing can happen - and call TestCase::Setup from your setup

llvm-svn: 178482
2013-04-01 18:02:25 +00:00
Chad Rosier 10230d4d6e Cleanup. No functional change intended.
llvm-svn: 178481
2013-04-01 17:58:03 +00:00
Hal Finkel f6d45f2379 Add more PPC floating-point conversion instructions
The P7 and A2 have additional floating-point conversion instructions which
allow a direct two-instruction sequence (plus load/store) to convert from all
combinations (signed/unsigned i32/i64) <--> (float/double) (on previous cores,
only some combinations were directly available).

llvm-svn: 178480
2013-04-01 17:52:07 +00:00
DeLesley Hutchins c105ba19e9 Thread safety analysis: Turn on checking for non-scalar types by default.
These were previously enabled as a "beta" feature, but they have now been
extensively tested.

llvm-svn: 178478
2013-04-01 17:47:37 +00:00
Enrico Granata 4b4e24da61 Proper option parser for the Sketch test case
llvm-svn: 178477
2013-04-01 17:42:02 +00:00
Richard Smith 474b9315ad Add test for PR12527 (bug has apparently already been fixed).
llvm-svn: 178476
2013-04-01 17:41:23 +00:00
Argyrios Kyrtzidis b2792972a2 [libclang] Make clang_Cursor_getArgument work with call-exprs.
Patch by Matthias Kleine!

llvm-svn: 178475
2013-04-01 17:38:59 +00:00
Daniel Jasper 6e42b1eb8b Improve formatting of function types.
Before: void * (*a)(int *, SomeType *);
After:  void *(*a)(int *, SomeType *);
llvm-svn: 178474
2013-04-01 17:13:26 +00:00
Hal Finkel 39caf9f5ec Use ImmToIdxMap.count in PPCRegisterInfo
Code improvement suggested by Jakob (in review of r178450). No functionality
change intended.

llvm-svn: 178473
2013-04-01 17:02:06 +00:00
Hal Finkel c006295f3c Fix PowerPC/cttz.ll to specify a cpu (and use FileCheck)
llvm-svn: 178472
2013-04-01 16:31:56 +00:00
Jyotsna Verma 5d97cc2b2b Modifed debug-info-byval.cpp test to grep for .string or .asciz.
The assembly output for Hexagon contains ".string missing_arg".

llvm-svn: 178471
2013-04-01 15:59:25 +00:00
Hal Finkel 290376dd78 Add the PPC popcntw instruction
The popcntw instruction is available whenever the popcntd instruction is
available, and performs a separate popcnt on the lower and upper 32-bits.
Ignoring the high-order count, this can be used for the 32-bit input case
(saving on the explicit zero extension otherwise required to use popcntd).

llvm-svn: 178470
2013-04-01 15:58:15 +00:00
Nadav Rotem be79a7ac7a Add support for vector data types in the LLVM interpreter.
Patch by:
Veselov, Yuri <Yuri.Veselov@intel.com>

llvm-svn: 178469
2013-04-01 15:53:30 +00:00
Hal Finkel 60c7510711 Treat PPCISD::STFIWX like the memory opcode that it is
PPCISD::STFIWX is really a memory opcode, and so it should come after
FIRST_TARGET_MEMORY_OPCODE, and we should use DAG.getMemIntrinsicNode to create
nodes using it.

No functionality change intended (although there could be optimization benefits
from preserving the MMO information).

llvm-svn: 178468
2013-04-01 15:37:53 +00:00
Shankar Easwaran 1d9e531856 [ELF][Hexagon] Create .got.plt entries with the appropriate alignment
llvm-svn: 178467
2013-04-01 15:14:34 +00:00
Shankar Easwaran cbe06ca340 [ELF] Set the symbol type for undefined atoms properly
llvm-svn: 178466
2013-04-01 15:12:54 +00:00
Evgeniy Stepanov f8213b4eb3 [sanitizer] More interceptors.
getpwnam, getpwuid, getpwnam_r, getpwuid_r, clock_getres, clock_gettime,
clock_settime, getitimer, setitimer, sigaction (MSan).

llvm-svn: 178465
2013-04-01 14:47:21 +00:00
Alexander Potapenko 1d021bff28 [libsanitizer] Run the callback on a separate stack in StopTheWorld.
Currently the callback runs on the caller's stack. If this stack
contains values that have gone out of scope, and we are not super careful, those
values can propagate into global variables (the libc sigaction() in particular
has a side effect that can lead to this). This has caused false negatives in
leak checking code.

Changes: map a separate stack space for the tracer thread. Also, move some
globals into local scope (they had no business being global anyway).

Patch by Sergey Matveev (earthdok@google.com)

llvm-svn: 178464
2013-04-01 14:38:56 +00:00
Alexander Potapenko 401bed0b9a [libsanitizer] Added data() and capacity() getters to InternalVector.
Same interface as in STL. Needed for LSan.

Patch by Sergey Matveev (earthdok@google.com)

llvm-svn: 178463
2013-04-01 13:55:34 +00:00
Duncan Sands fee96f832d Remove unused typedef.
llvm-svn: 178462
2013-04-01 13:46:15 +00:00
Alexander Potapenko 9cc2e436bb [libsanitizer] Add register dumping support to SuspendedThreadsList.
An interface for obtaining register contexts from suspended threads. Tailored
for LSan use.

Patch by Sergey Matveev (earthdok@google.com)

llvm-svn: 178461
2013-04-01 13:36:42 +00:00
Arnold Schwaighofer 6793aebb84 ARM Scheduler Model: Add resources instructions, map resources in subtargets
Reapply r177968:
After commit 178074 we can now have undefined scheduler variants.

Move the CortexA9 resources into the CortexA9 SchedModel namespace. Define
resource mappings under the CortexA9 SchedModel. Define resources and mappings
for the SwiftModel.

Incooperate Andrew's feedback.

llvm-svn: 178460
2013-04-01 13:07:05 +00:00
Benjamin Kramer 52ceb44331 X86TTI: Add accurate costs for itofp operations, based on the actual instruction counts.
llvm-svn: 178459
2013-04-01 10:23:49 +00:00
Alexey Samsonov e624795558 [ASan] More careful reports for globals that are ASCII strings
llvm-svn: 178458
2013-04-01 08:57:38 +00:00
Michael Gottesman 4ddc2156d6 Change the cmake variable COMPILER_RT_CAN_EXECUTE_TESTS to be an option so that it can overwritten.
The reason why this simple change is needed is that I am trying to set up a
quick cmake/ninja based buildbot and apple-clang does not support using the
sanitizers currently.

The default behavior follows exactly what was there before implying that no ones
builds should be affected at all.

llvm-svn: 178455
2013-04-01 04:13:03 +00:00
Joe Abbey bc6f4baea9 Whitespace cleanup
llvm-svn: 178454
2013-04-01 02:28:07 +00:00
Benjamin Kramer 3c33161192 Fix typo. This method isn't used anywhere.
llvm-svn: 178453
2013-03-31 20:14:24 +00:00
Vincent Lejeune 53f3525d35 R600: Emit native instructions for tex
llvm-svn: 178452
2013-03-31 19:33:04 +00:00
Duncan Sands e1aa194aab There is no longer any need to silence this compiler warning as the warning has
been turned off globally.

llvm-svn: 178451
2013-03-31 17:44:09 +00:00
Hal Finkel 8540f7771c Cleanup ImmToIdxMap and noImmForm in PPCRegisterInfo
ImmToIdxMap should be a DenseMap (not a std::map) because there
is no ordering requirement. Also, we don't need a separate list
of instructions for noImmForm in eliminateFrameIndex, because this
list is essentially the complement of the keys in ImmToIdxMap.

No functionality change intended.

llvm-svn: 178450
2013-03-31 14:43:31 +00:00
Benjamin Kramer b60633fb87 X86: Promote sitofp <8 x i16> to <8 x i32> when AVX is available.
A vector sext + sitofp is a lot cheaper than 8 scalar conversions.

llvm-svn: 178448
2013-03-31 12:49:15 +00:00
Hal Finkel beb296bea1 Add the PPC lfiwax instruction
This instruction is available on modern PPC64 CPUs, and is now used
to improve the SINT_TO_FP lowering (by eliminating the need for the
separate sign extension instruction and decreasing the amount of
needed stack space).

llvm-svn: 178446
2013-03-31 10:12:51 +00:00
Hal Finkel e53429a13e Cleanup PPC(64) i32 -> float/double conversion
The existing SINT_TO_FP code for i32 -> float/double conversion was disabled
because it relied on broken EXTSW_32/STD_32 instruction definitions. The
original intent had been to enable these 64-bit instructions to be used on CPUs
that support them even in 32-bit mode.  Unfortunately, this form of lying to
the infrastructure was buggy (as explained in the FIXME comment) and had
therefore been disabled.

This re-enables this functionality, using regular DAG nodes, but only when
compiling in 64-bit mode. The old STD_32/EXTSW_32 definitions (which were dead)
are removed.

llvm-svn: 178438
2013-03-31 01:58:02 +00:00
Rafael Espindola b49ec5d0aa Remove unused default values.
llvm-svn: 178435
2013-03-30 23:04:08 +00:00
Benjamin Kramer 9335443236 DAGCombine: visitXOR can replace a node without returning it, bail out in that case.
Fixes the crash reported in PR15608.

llvm-svn: 178429
2013-03-30 21:28:18 +00:00