Commit Graph

144802 Commits

Author SHA1 Message Date
Dmitri Gribenko f68a5280cb Added summary option to cpp11-migrate tool
Added a summary option that enables output to stdout counting the number of
changes each transform has accepted, rejected or deferred.

Patch by Ariel Bernal.

llvm-svn: 176465
2013-03-05 00:12:33 +00:00
David Sehr 4c8979cd4d The current X86 NOP padding uses one long NOP followed by the remainder in
one-byte NOPs.  If the processor actually executes those NOPs, as it sometimes
does with aligned bundling, this can have a performance impact.  From my
micro-benchmarks run on my one machine, a 15-byte NOP followed by twelve
one-byte NOPs is about 20% worse than a 15 followed by a 12.  This patch
changes NOP emission to emit as many 15-byte (the maximum) as possible followed
by at most one shorter NOP.

llvm-svn: 176464
2013-03-05 00:02:23 +00:00
Jordan Rose 85707b28e8 [analyzer] Don't let cf_audited_transfer override CFRetain semantics.
We weren't treating a cf_audited_transfer CFRetain as returning +1 because
its name doesn't contain "Create" or "Copy". Oops! Fortunately, the
standard definitions of these functions are not marked audited.

<rdar://problem/13339601>

llvm-svn: 176463
2013-03-04 23:21:32 +00:00
Daniel Malea 658fd5798b Un-skipping tests affected by llvm.org/pr15256
patch by Ashok Thirumurthi!

llvm-svn: 176462
2013-03-04 23:15:08 +00:00
Dmitri Gribenko bcf7f4d3bb Comment parsing: refactor handling of command markers in AST
* Use the term 'command marker', because the semantics of 'backslash' and 'at'
  commands are the same.  (Talking about 'at commands' makes them look like a
  special entity.)

* Sink the flag down into bitfields, reducing the size of AST nodes.

* Change the flag into an enum for clarity.  Boolean function parameters are
  not very clear.

* Add unittests for new tok::at_command tokens.

llvm-svn: 176461
2013-03-04 23:06:15 +00:00
Daniel Malea 208b5beb60 Fix makefile and re-enable test disabled due to llvm.org/pr15256
- fix is: don't pass incompatible -stdlib option when building with GCC

llvm-svn: 176460
2013-03-04 23:04:53 +00:00
Lang Hames 30be8a30cc Check isDiscardableIfUnused, rather than hasLocalLinkage, when bumping
GlobalValue linkage up to ExternalLinkage in the ExtractGV pass. This
prevents linkonce and linkonce_odr symbols from being DCE'd.

llvm-svn: 176459
2013-03-04 22:40:44 +00:00
Bob Wilson 743bf67caf Add ARM v6m, v7m, and v7em architectures for Cortex-M series processors.
<rdar://problem/11314476>

llvm-svn: 176458
2013-03-04 22:37:49 +00:00
Bob Wilson f643afcd31 Tidy up lists of Cortex-A series processors, adding entries for A7.
Also fix a missing entry for cortex-r5 in one copy of getLLVMArchSuffixForARM.

llvm-svn: 176457
2013-03-04 22:37:46 +00:00
Bob Wilson 872f04d19d Fix confused use of llvm::StringSwitch for armv7r architecture.
svn 170909 added support for cortex-r5 but in this case it was done
incorrectly. The last argument to StringSwitch.Cases() is the replacement
value, so by adding "cortex-r5" it changed the default cpu for armv7r to
cortex-r5 instead of cortex-r4.

llvm-svn: 176456
2013-03-04 22:37:43 +00:00
Akira Hatanaka c7828356aa [mips] Print move instructions.
"move $4, $5" is printed instead of "or $4, $5, $zero".

llvm-svn: 176455
2013-03-04 22:25:01 +00:00
Greg Clayton 9422dd64f8 <rdar://problem/13338643>
DWARF with .o files now uses 40-60% less memory!

Big fixes include:
- Change line table internal representation to contain "file addresses". Since each line table is owned by a compile unit that is owned by a module, it makes address translation into lldb_private::Address easy to do when needed.
- Removed linked address members/methods from lldb_private::Section and lldb_private::Address
- lldb_private::LineTable can now relink itself using a FileRangeMap to make it easier to re-link line tables in the future
- Added ObjectFile::ClearSymtab() so that we can get rid of the object file symbol tables after we parse them once since they are not needed and kept memory allocated for no reason
- Moved the m_sections_ap (std::auto_ptr to section list) and m_symtab_ap (std::auto_ptr to the lldb_private::Symtab) out of each of the ObjectFile subclasses and put it into lldb_private::ObjectFile.
- Changed how the debug map is parsed and stored to be able to:
    - Lazily parse the debug map for each object file
    - not require the address map for a .o file until debug information is linked for a .o file

llvm-svn: 176454
2013-03-04 21:46:16 +00:00
Jack Carter 427b404d0a Mips specific inline assembler constraint 'R'
'R' An address that can be sued in a non-macro load or store.
This patch includes a positive test case.

llvm-svn: 176453
2013-03-04 21:36:11 +00:00
Jack Carter 0e149b04f6 Mips specific inline assembler constraint 'R'
'R' An address that can be sued in a non-macro load or store.
This patch includes a positive test case.

llvm-svn: 176452
2013-03-04 21:33:15 +00:00
Han Ming Ong 8764fe7d9a <rdar://problem/13338758>
Make it configurable what to profile.
For Mac, we don't use the dirty page size yet and hence there is no need to gather that. This should be way better in not draining the battery since we are operating between 0% to 0.1% on the Mac after this change.

llvm-svn: 176451
2013-03-04 21:25:51 +00:00
Argyrios Kyrtzidis 2a513e8218 [PCH] In HeaderFileInfoTrait::EqualKey(), use FileManager::getFile() to compare two filenames, instead of llvm::sys::fs::equivalent().
llvm::sys::fs::equivalent() does 2 stat calls every time it's called. Use FileManager::getFile() to take advantage
of the stat caching that FileManager is providing.

llvm-svn: 176450
2013-03-04 20:33:40 +00:00
Dmitri Gribenko 05e22f2ef0 Comment parsing tests: move a test into a group of similar tests
llvm-svn: 176449
2013-03-04 20:23:16 +00:00
Fariborz Jahanian c551ecc8f0 [comment parsing] source fidelity for tparam command too.
// rdar://13066276

llvm-svn: 176448
2013-03-04 20:08:47 +00:00
Manuel Klimek abf6e03bc1 Make sure to not split string literals at the first character.
llvm-svn: 176447
2013-03-04 20:03:38 +00:00
Tobias Grosser b2863ca2dc Print function names under --polly-report
llvm-svn: 176446
2013-03-04 19:49:51 +00:00
Dmitri Gribenko fd5ef42830 warn-documentation.cpp: reorganize tests
Tests are ordered by command in this file.  It is nice to keep it that way.

llvm-svn: 176445
2013-03-04 19:39:33 +00:00
Fariborz Jahanian 5f2a813d2a comment parsing. Missed a case of referring
to original command in diagnostic. // rdar://13066276

llvm-svn: 176444
2013-03-04 18:53:41 +00:00
Eli Bendersky 4e1db8d7f7 Reapply r176381, writing the CHECKs in a more forgiving manner to account for
running llvm-objdump on Darwin.

llvm-svn: 176443
2013-03-04 18:20:31 +00:00
Preston Gurd 485296d1e8 Bypass Slow Divides
* Only apply divide bypass optimization when not optimizing for size. 
* Fixed bug caused by constant for 0 value of type Int32,
  used dividend type to generate the constant instead.
* For atom x86-64 apply the divide bypass to use 16-bit divides instead of
  64-bit divides when operand values are small enough.
* Added lit tests for 64-bit divide bypass.

Patch by Tyler Nowicki!

llvm-svn: 176442
2013-03-04 18:13:57 +00:00
Edwin Vane 6972f6d3c7 hasQualifer() matcher should return false if there's no qualifier
Instead of passing NULL on to sub-matcher, just return false. Updated tests and
regenerated docs.

Author: Tareq A Siraj <tareq.a.siraj@intel.com>
llvm-svn: 176441
2013-03-04 17:51:00 +00:00
Tom Stellard c74b1e054c R600: Use the GPU type to determine the correct DataLayout v2
v2:
  - Add R600_DOUBLE_OPS for RV670
  - s/CPU/GPU/

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
llvm-svn: 176440
2013-03-04 17:40:53 +00:00
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