Commit Graph

144721 Commits

Author SHA1 Message Date
Stefanus Du Toit b331850194 Fix typos: [Dd]iagnosic -> [Dd]iagnostic
These all appear in comments or (ironically) diagnostics output.

llvm-svn: 176383
2013-03-01 21:41:22 +00:00
Jean-Luc Duprat 3cec010805 Removed extraneous #include "LLVMContextImpl.h" from lib/IR/Module.cpp
llvm-svn: 176382
2013-03-01 21:37:24 +00:00
Eli Bendersky 0091e2ff00 Rewrite a test to count emitted instructions without using -stats
Also removed the comments of "should produce..." because they completely
don't match the actually produced output.

llvm-svn: 176381
2013-03-01 21:34:37 +00:00
Akira Hatanaka a4c0341514 Fix indentation.
llvm-svn: 176380
2013-03-01 21:22:21 +00:00
Edwin Vane a98217a2b6 Avoid parallelism problems generating lit.site.cfgs
extra/test/cpp11-migrate/Makefile was using the same tmp file for generating
lit.site.cfg for two different directories. Parallelism caused conflicts so now
using differently named temp files.

llvm-svn: 176379
2013-03-01 21:21:37 +00:00
Akira Hatanaka 3d055580a9 Set properties for f128 type.
llvm-svn: 176378
2013-03-01 21:11:44 +00:00
Eli Bendersky 10ab5e72e1 Rewrite a test to check actual output rather than intermediate implementation
detail.

The was this test was written, it was relying on an implementation detail
(fixups) and hence was very brittle (relying, among other things, on the
exact ordering of statistics printed by MC).

The test was rewritten to check a more observable output difference. While it
doesn't cover 100% of the things the original test covered, it's a good
practice to write regression tests this way. If we want to check that
internal details and invariants hold, such tests should be expressed as unit
tests.

llvm-svn: 176377
2013-03-01 20:54:00 +00:00
Stefanus Du Toit e9779bbef0 cpp11-migrate: Reduce the number of parsing passes.
Previously we would check the syntax of the file before we transform
it, but that's redundant since it'll be checked as part of the
transformation. Remove that check completely.

We also had an unconditional syntax check after transforming. This
is only really useful to debug cpp11-migrate, since users will end
up compiling the transformed source anyways, and the transformations
*should* never introduce a failure. Made this an option, accessible
via "-final-syntax-check".

Resolves PR 15380.

llvm-svn: 176376
2013-03-01 20:53:43 +00:00
Jim Ingham 0943792a65 Move m_destroy_in_process to Process (from ProcessKDP) since it is generally useful,
and use it to keep from doing the OS Plugin UpdateThreadList while destroying, since
if that does anything that requires the API lock it may deadlock against whoever is
running the Process::Destroy.

<rdar://problem/13308627>

llvm-svn: 176375
2013-03-01 20:04:25 +00:00
Edwin Vane 510c341517 No need to force-create clang-tools-extra lit.site.cfg
The make (all) target takes care of creating lit configs and auto-generating
tests. The problem with the original 'lit.site.cfg' target is it's not
recursive and doesn't fully create everything necessary for testing
clang-tools-extra.

llvm-svn: 176374
2013-03-01 19:58:58 +00:00
Edwin Vane b1bb4c2dbb Fix recursive make in clang-tools-extra
Autoconf make (all) now properly recurses from tools/extra/Makefile into
tools/extra/test/Makefile and tools/extra/test/cpp11-migrate/Makefile. The
'all' target is responsible for creating lit config files and autogenerating
tests. Subsequent 'check-all' targets will properly work.

Re-enabling UseAuto/iterator.cpp test.

General clean-up of clang-tools-extra makefiles; removing dead targets and
removing duplicated pieces of llvm/Makefile.rules.

llvm-svn: 176373
2013-03-01 19:50:52 +00:00
Stefanus Du Toit 169949724e cpp11-migrate: Factor out duplicate code in UseNullPtr
This moves the actual replacement code into a separate
function. There is still a bit of code duplication to
go from macros to expansion areas, but that code will
need to be fixed anyways to resolve bugs around macro
replacement.

Reviewed by: Tareq Siraj, Edwin Vane

llvm-svn: 176372
2013-03-01 19:47:09 +00:00
Jordan Rose 801916baf1 [analyzer] Suppress paths involving a reference whose rvalue is null.
Most map types have an operator[] that inserts a new element if the key
isn't found, then returns a reference to the value slot so that you can
assign into it. However, if the value type is a pointer, it will be
initialized to null. This is usually no problem.

However, if the user /knows/ the map contains a value for a particular key,
they may just use it immediately:

   // From ClangSACheckersEmitter.cpp
   recordGroupMap[group]->Checkers

In this case the analyzer reports a null dereference on the path where the
key is not in the map, even though the user knows that path is impossible
here. They could silence the warning by adding an assertion, but that means
splitting up the expression and introducing a local variable. (Note that
the analyzer has no way of knowing that recordGroupMap[group] will return
the same reference if called twice in a row!)

We already have logic that says a null dereference has a high chance of
being a false positive if the null came from an inlined function. This
patch simply extends that to references whose rvalues are null as well,
silencing several false positives in LLVM.

<rdar://problem/13239854>

llvm-svn: 176371
2013-03-01 19:45:10 +00:00
Shankar Easwaran b0e356e223 move dynamic linking atoms to Atoms.h
llvm-svn: 176370
2013-03-01 19:33:42 +00:00
Michael Liao d10584e38b Add regression tests (WORKSFORME)
- These tests wont't crash on trunk but would be better to add them so that
  they don't break again in the future.

llvm-svn: 176369
2013-03-01 19:23:37 +00:00
Chad Rosier b3864609cf Generate an error message instead of asserting or segfaulting when we can't
handle indirect register inputs.
rdar://13322011

llvm-svn: 176367
2013-03-01 19:12:05 +00:00
Benjamin Kramer 12f98fae98 LoopVectorize: Don't hang forever if a PHI only has skipped PHI uses.
Fixes PR15384.

llvm-svn: 176366
2013-03-01 19:07:31 +00:00
Michael Ilseman 516d70399e Cache the result of Function::getIntrinsicID() in a DenseMap attached to the LLVMContext.
This reduces the time actually spent doing string to ID conversion and shows a 10% improvement in compile time for a particularly bad case that involves ARM Neon intrinsics (these have many overloads).

Patch by Jean-Luc Duprat!

llvm-svn: 176365
2013-03-01 18:48:54 +00:00
Michael Liao 6af16fc3b7 Fix PR10475
- ISD::SHL/SRL/SRA must have either both scalar or both vector operands
  but TLI.getShiftAmountTy() so far only return scalar type. As a
  result, backend logic assuming that breaks.
- Rename the original TLI.getShiftAmountTy() to
  TLI.getScalarShiftAmountTy() and re-define TLI.getShiftAmountTy() to
  return target-specificed scalar type or the same vector type as the
  1st operand.
- Fix most TICG logic assuming TLI.getShiftAmountTy() a simple scalar
  type.

llvm-svn: 176364
2013-03-01 18:40:30 +00:00
Chad Rosier 9660343b42 Add support for using non-pic code for arm and thumb1 when emitting the sjlj
dispatch code.  As far as I can tell the thumb2 code is behaving as expected.
I was able to compile and run the associated test case for both arm and thumb1.
rdar://13066352

llvm-svn: 176363
2013-03-01 18:30:38 +00:00
Daniel Malea 9e84eb41f6 Add a test case for static member variables
- expected to fail across the board due to llvm.org/pr15401

Patch by Ashok Thirumurthi!

llvm-svn: 176362
2013-03-01 18:25:42 +00:00
Daniel Jasper a79064a88f Remove whitespace at end of file.
This fixes the rest of llvm.org/PR15062.

llvm-svn: 176361
2013-03-01 18:11:39 +00:00
Matt Kopec 66fd4b1ab9 Fix string warning I introduced with indirect function support.
llvm-svn: 176360
2013-03-01 17:44:31 +00:00
Christian Konig 3c54770365 R600/SI: fix sampler tests after fixing wait insertions
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 176359
2013-03-01 17:39:05 +00:00
Jyotsna Verma 8425643728 Hexagon: Add constant extender support framework.
llvm-svn: 176358
2013-03-01 17:37:13 +00:00
Matt Kopec c51b243a43 Update TestCallStdStringFunction to expected fail for gcc and account for multiple breakpoint locations.
Patch from Ashok Thirumurthi.

llvm-svn: 176357
2013-03-01 17:29:16 +00:00
Daniel Jasper 8eb371b3cc Correctly format arrays of pointers and function types.
Before:
void f(Type(*parameter)[10]) {}
int(*func)(void *);

After:
void f(Type (*parameter)[10]) {}
int (*func)(void *);

llvm-svn: 176356
2013-03-01 17:13:29 +00:00
Argyrios Kyrtzidis 7c9ba11747 [PCH] Remove building a SmallPtrSet that is not actually used for anything.
llvm-svn: 176354
2013-03-01 17:01:31 +00:00
Peng Cheng e021c4e7cc test commit to use consistent comment notation.
llvm-svn: 176353
2013-03-01 16:49:35 +00:00
Daniel Jasper f9a84b5f57 Normal indent for last element of builder-type call.
In builder type call, we indent to the laster function calls.
However, for the last element of such a call, we don't need to do
so, as that normally just wastes space and does not increase
readability.

Before:
aaaaaa->aaaaaa->aaaaaa( // break
                  aaaaaa);
aaaaaaaaaaaaaaaaaaaaa->aaaaaaaaaaaaaaaaaaaaaa
    ->aaaaaaaaaaaaaaaaaaaaaaaaaa(
        aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa);

After:
aaaaaa->aaaaaa->aaaaaa( // break
    aaaaaa);
aaaaaaaaaaaaaaaaaaaaa->aaaaaaaaaaaaaaaaaaaaaa->aaaaaaaaaaaaaaaaaaaaaaaaaa(
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa);

llvm-svn: 176352
2013-03-01 16:48:32 +00:00
Daniel Jasper 3324cbefcd Remove trailing whitespace of line comments.
This fixed llvm.org/PR15378.

llvm-svn: 176351
2013-03-01 16:45:59 +00:00
Manuel Klimek e317d1b1e8 Implements breaking string literals at slashes.
We now break at a slash if we do not find a space to break on.

Also fixes a bug where we would go over the limit when breaking the
second line.

llvm-svn: 176350
2013-03-01 13:29:19 +00:00
Manuel Klimek b176cff89d Implement fallback split point for string literals.
If we don't find a natural split point (currently space) in a string
literal protruding over the line, we just split at the last possible
point.

llvm-svn: 176349
2013-03-01 13:14:08 +00:00
Yiannis Tsiouris 70dd0caa46 GCInfoDeleter code cleanup after r175528
Remove GCInfoDeleter from passes and comments.

llvm-svn: 176347
2013-03-01 11:40:32 +00:00
Christian Konig d0e3da1818 R600/SI: handle all registers in copyPhysReg v2
v2: based on Michels patch, but now allows copying of all registers sizes.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
llvm-svn: 176346
2013-03-01 09:46:27 +00:00
Christian Konig 1f344cda53 R600/SI: remove S_MOV immediate patterns
They won't match anyway.

Signed-off-by: Christian König <christian.koenig@amd.com>
llvm-svn: 176345
2013-03-01 09:46:22 +00:00
Christian Konig 8465296420 R600/SI: remove GPR*AlignEncode
It's much easier to specify the encoding with tablegen directly.

Signed-off-by: Christian König <christian.koenig@amd.com>
llvm-svn: 176344
2013-03-01 09:46:17 +00:00
Christian Konig 01fd1f6b36 R600/SI: fix warning about overloaded virtual
Signed-off-by: Christian König <christian.koenig@amd.com>
llvm-svn: 176343
2013-03-01 09:46:11 +00:00
Christian Konig 862fd9fa2c R600/SI: fix inserting waits for unordered defines
Signed-off-by: Christian König <christian.koenig@amd.com>
llvm-svn: 176342
2013-03-01 09:46:04 +00:00
Duncan Sands 2cb41d372c GCC thinks that this variable might be used uninitialized (it isn't).
llvm-svn: 176341
2013-03-01 09:46:03 +00:00
Evgeniy Stepanov f5d8c90f57 [asan] Revert r176255, r176264.
New allocator has 1.5x memory overhead of the old one.

llvm-svn: 176340
2013-03-01 09:33:05 +00:00
John McCall 80c93a0793 Perform the receiver-expression transformations regardless of
whether we already have a method.  Fixes a bug where we were
failing to properly contextually convert a message receiver
during template instantiation.

As a side-effect, we now actually perform correct method lookup
after adjusting a message-send to integral or non-ObjC pointer
types (legal outside of ARC).

rdar://13305374

llvm-svn: 176339
2013-03-01 09:20:14 +00:00
Evgeniy Stepanov 323771b3f1 [sanitizer] Fix check failure in SizeClassMap::Print.
llvm-svn: 176338
2013-03-01 08:49:14 +00:00
Alexey Samsonov 2bc1012561 Docs for llvm-symbolizer command-line tool
llvm-svn: 176337
2013-03-01 07:58:27 +00:00
John McCall 73fc0385de Attempt to not place ownership qualifiers on the result type
of block declarators.  Document the rule we use.

Also document the rule that Doug implemented a few weeks ago
which drops ownership qualifiers on function result types.

rdar://10127067

llvm-svn: 176336
2013-03-01 07:58:16 +00:00
Anna Zaks 4a8a015f13 [analyzer] Reword FAQ
Reword the FAQ to stress more that the assert should be used only in case
the developer is sure that the issue is a false positive.

llvm-svn: 176335
2013-03-01 06:38:16 +00:00
Michael Liao 53e7ef35b5 Minor coding style fix
llvm-svn: 176334
2013-03-01 04:19:34 +00:00
Argyrios Kyrtzidis 1ca7344506 Add one more sanity check in SourceManager::getFileIDLoaded().
llvm-svn: 176333
2013-03-01 03:43:33 +00:00
Argyrios Kyrtzidis 61c3d8778c [PCH] Enhance InputFile to also include whether the file is out-of-date.
Previously we would return null for an out-of-date file. This inhibited ASTReader::ReadSLocEntry
from creating a FileID to recover gracefully in such a case.

llvm-svn: 176332
2013-03-01 03:26:04 +00:00
Argyrios Kyrtzidis 7dc4f33c77 In SourceManager::getFileIDLoaded(), add some sanity checks to make sure we don't enter an infinite loop.
rdar://13120919

llvm-svn: 176331
2013-03-01 03:26:00 +00:00