Commit Graph

144776 Commits

Author SHA1 Message Date
Tom Stellard b2f2f960ce R600: Clean up datalayout strings so they better match hardware capabilities
llvm-svn: 176439
2013-03-04 17:40:28 +00:00
Enrico Granata c1a5b2eba8 <rdar://problem/12897838>
Making sure we do not try to copy memory at address 0 - that would make us crash

llvm-svn: 176438
2013-03-04 17:20:57 +00:00
Edwin Vane 529e3c7c57 Adding failing LoopConvert testcase
LoopConvert isn't properly handling iterators whose dereference operator
returns by value. This test case demonstrates the failure.

See PR15437.

llvm-svn: 176437
2013-03-04 16:56:04 +00:00
Edwin Vane 2f43085b46 Properly identify 'this' as range-based for container
The Loop-Convert transform was mistransforming loops using 'this' implicitly.
Fixed and added tests.

Fixes PR15411.

llvm-svn: 176436
2013-03-04 16:35:04 +00:00
Daniel Jasper 973c9420e1 Format a line if a range in its leading whitespace was selected.
With [] marking the selected range, clang-format invoked on

    [  ]   int a;

Would so far not reformat anything. With this patch, it formats a
line if its leading whitespace is touched.

llvm-svn: 176435
2013-03-04 13:43:19 +00:00
Manuel Klimek 3de6d3a2a0 Make the tutorial easier to compile by adding in some of the details.
Patch by Béatrice Creusillet.

llvm-svn: 176434
2013-03-04 11:31:46 +00:00
John McCall 02ba35092b Correction to r176432: the bug actually fixed was <rdar://13025708>.
llvm-svn: 176433
2013-03-04 07:35:41 +00:00
John McCall cc5788c5ce Centralize and refine the __unknown_anytype argument rules
and be sure to apply them whether or not the debugger gave
us a method declaration.

rdar://12565338

llvm-svn: 176432
2013-03-04 07:34:02 +00:00
John McCall a37c2fa409 Fix the emission of the copy-initialization of a block capture
from a lambda capture when the capture is not trivially-copyable.

rdar://13295759

llvm-svn: 176431
2013-03-04 06:32:36 +00:00
Shankar Easwaran 7b0ae11c82 [ELF] no functionality change, update dynamicTable functionality
llvm-svn: 176430
2013-03-04 02:21:16 +00:00
Chandler Carruth 58d6eb6d03 Check for warnings in a bunch of the linker invocations, and add one
with both -static-libgcc and -static on the commandline.

Fix a warning in the latter case due to a backwards short circuiting ||
operator in the driver. No real functionality changed here, just allows
the driver to properly consume -static-libgcc when -static is also
specified.

llvm-svn: 176429
2013-03-04 02:07:55 +00:00
John McCall f22d0acfac Perform non-overload placeholder conversions on the operands
to a subscript operator.

rdar://13332183

llvm-svn: 176428
2013-03-04 01:30:55 +00:00
Chandler Carruth 4588e349b0 Beef up the testing of our 'ld' invocation on linux to cover static
linking. About to fix a bug here and there was no good test case.

llvm-svn: 176427
2013-03-04 01:27:49 +00:00
Jia Liu 434874db6f Mips ISD typo
llvm-svn: 176426
2013-03-04 01:06:54 +00:00
Shankar Easwaran 03a525d6fd [lld][ELF] Add modified writer
llvm-svn: 176425
2013-03-03 22:10:57 +00:00
Shankar Easwaran 1993b0000c [lld][ELF] rename to add new support in the ELF Writer
llvm-svn: 176424
2013-03-03 22:09:22 +00:00
Dmitri Gribenko 80bfa95d5b Add an idea for a cpp11-migrate tool: TR1 migration
Idea by Marshall Clow.

llvm-svn: 176423
2013-03-03 17:54:36 +00:00
David Chisnall 168a15188e Remove unused check from test.
llvm-svn: 176422
2013-03-03 17:50:06 +00:00
Sean Silva d4ac85d21a [docs] Spelling
llvm-svn: 176421
2013-03-03 17:07:35 +00:00
David Chisnall ef78c305fa Improve C11 atomics support:
- Generate atomicrmw operations in most of the cases when it's sensible to do
  so.
- Don't crash in several common cases (and hopefully don't crash in more of
  them).
- Add some better tests.

We now generate significantly better code for things like:
_Atomic(int) x;
...
x++;

On MIPS, this now generates a 4-instruction ll/sc loop, where previously it
generated about 30 instructions in two nested loops.  On x86-64, we generate a
single lock incl, instead of a lock cmpxchgl loop (one instruction instead of
ten).

llvm-svn: 176420
2013-03-03 16:02:42 +00:00
David Chisnall e0a5c0d914 Default to enabling default-synthesized ivars on all platforms
llvm-svn: 176419
2013-03-03 15:36:10 +00:00
Sean Silva edd5ca5a36 [docs] Use vim code-block instead of console.
llvm-svn: 176418
2013-03-03 15:17:35 +00:00
Sean Silva 206bc114f8 .gitignore: ignore docs/_build
That is where the documentation gets built to.

I'm pretty much clueless about SVN; I would appreciate if someone more
knowledgeable about SVN made the equivalent change.

llvm-svn: 176417
2013-03-03 15:15:12 +00:00
Shankar Easwaran 62bba5ddfb [ELF] rename Writer to ExecutableWriter
llvm-svn: 176416
2013-03-03 07:37:17 +00:00
Shankar Easwaran 1729e12358 [ELF][Hexagon] add initial changes to add GOT/PLT
llvm-svn: 176415
2013-03-03 07:34:56 +00:00
Rafael Espindola de6a39f759 Process #pragma weak only after we know the linkage of the function or variable
we are looking at.

llvm-svn: 176414
2013-03-02 21:41:48 +00:00
Jim Grosbach a3c5c769d6 ARM: Creating a vector from a lane of another.
The VDUP instruction source register doesn't allow a non-constant lane
index, so make sure we don't construct a ARM::VDUPLANE node asking it to
do so.

rdar://13328063
http://llvm.org/bugs/show_bug.cgi?id=13963

llvm-svn: 176413
2013-03-02 20:16:24 +00:00
Jim Grosbach c6f1914ef0 Clean up code format a bit.
llvm-svn: 176412
2013-03-02 20:16:19 +00:00
Jim Grosbach 54efea0a7a Tidy up. Trailing whitespace.
llvm-svn: 176411
2013-03-02 20:16:15 +00:00
Arnold Schwaighofer 99cba9697a ARM NEON: Fix v2f32 float intrinsics
Mark them as expand, they are not legal as our backend does not match them.

llvm-svn: 176410
2013-03-02 19:38:33 +00:00
Benjamin Kramer 65d2d14f32 Make gen_my_std.h.py compatible with python 2.5 too.
llvm-svn: 176409
2013-03-02 15:52:55 +00:00
Nuno Lopes 589443bd93 recommit r172363 & r171325 (reverted in r172756)
This adds minimalistic support for PHI nodes to llvm.objectsize() evaluation

fingers crossed so that it does break clang boostrap again..

llvm-svn: 176408
2013-03-02 11:36:24 +00:00
Nuno Lopes 6e3d46014d add getUnderlyingObjectSize()
this is similar to getObjectSize(), but doesnt subtract the offset
tweak the BasicAA code accordingly (per PR14988)

llvm-svn: 176407
2013-03-02 11:23:34 +00:00
Benjamin Kramer 336ec56081 Make the UseAuto test case generator compatible with python 2.5.
llvm-svn: 176406
2013-03-02 09:24:42 +00:00
Jason Molenda 503d018111 ProcessMachCore had (until 2013-01-29) some simple checks to find a kernel
in a core file if it didn't start at the beginning of a memory segment.
I added more sophisticated kernel location code to DynamicLoaderDarwinKernel
and removed the simple one in ProcessMachCore.  Unfortunately the kernel
DynamicLoader doesn't get a chance to search around in memory unless there's
a hint that this might be a kernel debug session.  It was easy ot make the
kernel location code static in DynamicLoaderDarwinKernel and call it from
ProcessMachCore on the start of the session, so that's what I did.
<rdar://problem/13326647> 

llvm-svn: 176405
2013-03-02 07:19:32 +00:00
Peter Collingbourne fe7a348614 CommandLineArgumentParser: handle single quotes.
Differential Revision: http://llvm-reviews.chandlerc.com/D482

llvm-svn: 176404
2013-03-02 06:00:16 +00:00
Arnold Schwaighofer 20ef54f4c1 X86 cost model: Adjust cost for custom lowered vector multiplies
This matters for example in following matrix multiply:

int **mmult(int rows, int cols, int **m1, int **m2, int **m3) {
  int i, j, k, val;
  for (i=0; i<rows; i++) {
    for (j=0; j<cols; j++) {
      val = 0;
      for (k=0; k<cols; k++) {
        val += m1[i][k] * m2[k][j];
      }
      m3[i][j] = val;
    }
  }
  return(m3);
}

Taken from the test-suite benchmark Shootout.

We estimate the cost of the multiply to be 2 while we generate 9 instructions
for it and end up being quite a bit slower than the scalar version (48% on my
machine).

Also, properly differentiate between avx1 and avx2. On avx-1 we still split the
vector into 2 128bits and handle the subvector muls like above with 9
instructions.
Only on avx-2 will we have a cost of 9 for v4i64.

I changed the test case in test/Transforms/LoopVectorize/X86/avx1.ll to use an
add instead of a mul because with a mul we now no longer vectorize. I did
verify that the mul would be indeed more expensive when vectorized with 3
kernels:

for (i ...)
   r += a[i] * 3;
for (i ...)
  m1[i] = m1[i] * 3; // This matches the test case in avx1.ll
and a matrix multiply.

In each case the vectorized version was considerably slower.

radar://13304919

llvm-svn: 176403
2013-03-02 04:02:52 +00:00
Anna Zaks 8d7c8a4dd6 [analyzer] Simple inline defensive checks suppression
Inlining brought a few "null pointer use" false positives, which occur because
the callee defensively checks if a pointer is NULL, whereas the caller knows
that the pointer cannot be NULL in the context of the given call.

This is a first attempt to silence these warnings by tracking the symbolic value
along the execution path in the BugReporter. The new visitor finds the node
in which the symbol was first constrained to NULL. If the node belongs to
a function on the active stack, the warning is reported, otherwise, it is
suppressed.

There are several areas for follow up work, for example:
 - How do we differentiate the cases where the first check is followed by
another one, which does happen on the active stack?

Also, this only silences a fraction of null pointer use warnings. For example, it
does not do anything for the cases where NULL was assigned inside a callee.

llvm-svn: 176402
2013-03-02 03:20:52 +00:00
Fariborz Jahanian e400cb70d4 Some refactoring in my patch on document
command source fidelity. // rdar://13066276

llvm-svn: 176401
2013-03-02 02:39:57 +00:00
Andrew Trick 63474629e8 Added FIXME for future Hexagon cleanup.
llvm-svn: 176400
2013-03-02 01:43:08 +00:00
Nadav Rotem 739e37a0d2 PR14448 - prevent the loop vectorizer from vectorizing the same loop twice.
The LoopVectorizer often runs multiple times on the same function due to inlining.
When this happens the loop vectorizer often vectorizes the same loops multiple times, increasing code size and adding unneeded branches.
With this patch, the vectorizer during vectorization puts metadata on scalar loops and marks them as 'already vectorized' so that it knows to ignore them when it sees them a second time.

PR14448.

llvm-svn: 176399
2013-03-02 01:33:49 +00:00
Peter Collingbourne 2ee0b630dc LLVM API changes.
llvm-svn: 176398
2013-03-02 01:20:22 +00:00
Peter Collingbourne 1b97a9c82a Modify {Call,Invoke}Inst::addAttribute to take an AttrKind.
llvm-svn: 176397
2013-03-02 01:20:18 +00:00
Jordan Rose 643aa0e0dc CMake: Always include the CheckCXXCompilerFlag in HandleLLVMOptions.cmake.
Previously we relied on it being included by config-ix.cmake.

llvm-svn: 176396
2013-03-02 01:00:40 +00:00
Michael Gottesman ee45c03fec Revert "Rewrite a test to count emitted instructions without using -stats"
This reverts commit aac7922b8fe7ae733d3fe6697e6789fd730315dc. I am reverting the
commit since it broke the phase 1 public buildbot for a few hours.

http://lab.llvm.org:8013/builders/clang-x86_64-darwin11-nobootstrap-RA/builds/2137

llvm-svn: 176394
2013-03-02 00:53:20 +00:00
Jordan Rose bd804e9d6a CMake: -Wno-nested-anon-types for Clang.
In LLVM, -pedantic is not set unless LLVM_ENABLE_PEDANTIC is set.
However, Clang's CMakeLists.txt unilaterally adds -pedantic to the run
line, so we need to disable -Wnested-anon-types explicitly.

llvm-svn: 176393
2013-03-02 00:49:47 +00:00
Jim Ingham 0f063ba6b4 Convert from the C-based LLVM Disassembler shim to the full MC Disassembler API's.
Calculate "can branch" using the MC API's rather than our hand-rolled regex'es.
As extra credit, allow setting the disassembly flavor for x86 based architectures to intel or att.

<rdar://problem/11319574>
<rdar://problem/9329275>

llvm-svn: 176392
2013-03-02 00:26:47 +00:00
Eli Bendersky b1caf3c30e Remove duplicate line and move another closer to its actual use
llvm-svn: 176391
2013-03-01 23:32:40 +00:00
Andrew Trick 3821d9d028 MIsched machine model: tablegen subtarget emitter improvement.
Fix the way resources are counted. I'm taking some time to cleanup the
way MachineScheduler handles in-order machine resources. Eventually
we'll need more PPC/Atom test cases in tree.

llvm-svn: 176390
2013-03-01 23:31:26 +00:00
Jordan Rose 687d1d33f4 [analyzer] Update open source checker build to checker-272.
See http://clang-analyzer.llvm.org/release_notes.html for what's new
in this build.

llvm-svn: 176389
2013-03-01 23:26:05 +00:00