platform/upstream/llvm.git
11 years agomove X86-specific test
Paul Redmond [Tue, 11 Dec 2012 00:36:43 +0000 (00:36 +0000)]
move X86-specific test

This test case uses -mcpu=corei7 so it belongs in CodeGen/X86

Reviewed by: Nadav

llvm-svn: 169801

11 years agoRemoved debugging code.
Han Ming Ong [Tue, 11 Dec 2012 00:24:58 +0000 (00:24 +0000)]
Removed debugging code.

llvm-svn: 169799

11 years agoFix grammar-o.
Bill Wendling [Tue, 11 Dec 2012 00:23:07 +0000 (00:23 +0000)]
Fix grammar-o.

llvm-svn: 169798

11 years agoFall back to the selection dag isel to select tail calls.
Chad Rosier [Tue, 11 Dec 2012 00:18:02 +0000 (00:18 +0000)]
Fall back to the selection dag isel to select tail calls.

This shouldn't affect codegen for -O0 compiles as tail call markers are not
emitted in unoptimized compiles.  Testing with the external/internal nightly
test suite reveals no change in compile time performance.  Testing with -O1,
-O2 and -O3 with fast-isel enabled did not cause any compile-time or
execution-time failures.  All tests were performed on my x86 machine.
I'll monitor our arm testers to ensure no regressions occur there.

In an upcoming clang patch I will be marking the objc_autoreleaseReturnValue
and objc_retainAutoreleaseReturnValue as tail calls unconditionally.  While
it's theoretically true that this is just an optimization, it's an
optimization that we very much want to happen even at -O0, or else ARC
applications become substantially harder to debug.

Part of rdar://12553082

llvm-svn: 169796

11 years ago[analyzer] Don't generate a summary for "freeWhenDone" if method is
Anna Zaks [Tue, 11 Dec 2012 00:17:53 +0000 (00:17 +0000)]
[analyzer] Don't generate a summary for "freeWhenDone" if method is
inlined.

Fixes a false positive that occurs if a user writes their own
initWithBytesNoCopy:freeWhenDone wrapper.

llvm-svn: 169795

11 years ago[CMake] Fix external llvm build. It needs to know where llvm-tblgen is.
Michael J. Spencer [Mon, 10 Dec 2012 23:52:34 +0000 (23:52 +0000)]
[CMake] Fix external llvm build. It needs to know where llvm-tblgen is.

llvm-svn: 169794

11 years agoRefactor out the abbreviation handling into a separate class that
Eric Christopher [Mon, 10 Dec 2012 23:34:43 +0000 (23:34 +0000)]
Refactor out the abbreviation handling into a separate class that
controls each of the abbreviation sets (only a single one at the
moment) and computes offsets separately as well for each set
of DIEs.

No real function change, ordering of abbreviations for the skeleton
CU changed but only because we're computing in a separate order. Fix
the testcase not to care.

llvm-svn: 169793

11 years ago<rdar://problem/12709976>
Enrico Granata [Mon, 10 Dec 2012 23:30:25 +0000 (23:30 +0000)]
<rdar://problem/12709976>

Adding a summary for NSError

llvm-svn: 169792

11 years agoSome enhancements for memcpy / memset inline expansion.
Evan Cheng [Mon, 10 Dec 2012 23:21:26 +0000 (23:21 +0000)]
Some enhancements for memcpy / memset inline expansion.
1. Teach it to use overlapping unaligned load / store to copy / set the trailing
   bytes. e.g. On 86, use two pairs of movups / movaps for 17 - 31 byte copies.
2. Use f64 for memcpy / memset on targets where i64 is not legal but f64 is. e.g.
   x86 and ARM.
3. When memcpy from a constant string, do *not* replace the load with a constant
   if it's not possible to materialize an integer immediate with a single
   instruction (required a new target hook: TLI.isIntImmLegal()).
4. Use unaligned load / stores more aggressively if target hooks indicates they
   are "fast".
5. Update ARM target hooks to use unaligned load / stores. e.g. vld1.8 / vst1.8.
   Also increase the threshold to something reasonable (8 for memset, 4 pairs
   for memcpy).

This significantly improves Dhrystone, up to 50% on ARM iOS devices.

rdar://12760078

llvm-svn: 169791

11 years agoOptimistically analyse Phi cycles
Arnold Schwaighofer [Mon, 10 Dec 2012 23:02:41 +0000 (23:02 +0000)]
Optimistically analyse Phi cycles

Analyse Phis under the starting assumption that they are NoAlias. Recursively
look at their inputs.
If they MayAlias/MustAlias there must be an input that makes them so.

Addresses bug 14351.

llvm-svn: 169788

11 years ago<rdar://problem/12850287>
Han Ming Ong [Mon, 10 Dec 2012 23:02:33 +0000 (23:02 +0000)]
<rdar://problem/12850287>

When there is XPC connection error, we will report it now.

llvm-svn: 169787

11 years agoDefer call to InitSections until after MCContext has been initialized. If
Lang Hames [Mon, 10 Dec 2012 22:49:11 +0000 (22:49 +0000)]
Defer call to InitSections until after MCContext has been initialized. If
InitSections is called before the MCContext is initialized it could cause
duplicate temporary symbols to be emitted later (after context initialization
resets the temporary label counter).

llvm-svn: 169785

11 years agoFix PR14568: Avoid the DFA packetizer from making an invalid read
Anshuman Dasgupta [Mon, 10 Dec 2012 22:45:57 +0000 (22:45 +0000)]
Fix PR14568: Avoid the DFA packetizer from making an invalid read
beyond array bounds.

No test case since I cannot reproduce an ICE with this bug. According
to Carlos -- the bug reporter -- a segfault occurs only when LLVM is
compiled with a specific version of GCC.

llvm-svn: 169783

11 years ago<rdar://problem/11844604>
Greg Clayton [Mon, 10 Dec 2012 22:26:34 +0000 (22:26 +0000)]
<rdar://problem/11844604>

When displaying function.name-with-args format will now print "varname=<unavailable>" instead of omitting argument names and values when there is an error reading the value.

llvm-svn: 169781

11 years agoRearrange vars and make comments more obvious.
Eric Christopher [Mon, 10 Dec 2012 22:25:41 +0000 (22:25 +0000)]
Rearrange vars and make comments more obvious.

llvm-svn: 169780

11 years agoRemove blank line at top of file.
Eric Christopher [Mon, 10 Dec 2012 22:25:38 +0000 (22:25 +0000)]
Remove blank line at top of file.

llvm-svn: 169779

11 years agoRemove until I can fix this.
Bill Wendling [Mon, 10 Dec 2012 22:10:53 +0000 (22:10 +0000)]
Remove until I can fix this.

llvm-svn: 169778

11 years agoFix a coding style nit.
Eric Christopher [Mon, 10 Dec 2012 22:00:20 +0000 (22:00 +0000)]
Fix a coding style nit.

llvm-svn: 169776

11 years agoAdd support to Darwin for the -export_dynamic' flag to the linker.
Bill Wendling [Mon, 10 Dec 2012 21:48:41 +0000 (21:48 +0000)]
Add support to Darwin for the -export_dynamic' flag to the linker.

llvm-svn: 169775

11 years agoEnable the loop vectorizer only on O2 and above. (Still disabled by default)
Nadav Rotem [Mon, 10 Dec 2012 21:45:01 +0000 (21:45 +0000)]
Enable the loop vectorizer only on O2 and above. (Still disabled by default)

llvm-svn: 169774

11 years agoLegalizeDAG: Allow type promotion of scalar loads
Tom Stellard [Mon, 10 Dec 2012 21:41:58 +0000 (21:41 +0000)]
LegalizeDAG: Allow type promotion of scalar loads

llvm-svn: 169773

11 years agoLegalizeDAG: Allow type promotion for scalar stores
Tom Stellard [Mon, 10 Dec 2012 21:41:54 +0000 (21:41 +0000)]
LegalizeDAG: Allow type promotion for scalar stores

llvm-svn: 169772

11 years agoSplit the LoopVectorizer into H and CPP.
Nadav Rotem [Mon, 10 Dec 2012 21:39:02 +0000 (21:39 +0000)]
Split the LoopVectorizer into H and CPP.

llvm-svn: 169771

11 years agoRevert r169656.
Bill Wendling [Mon, 10 Dec 2012 21:33:45 +0000 (21:33 +0000)]
Revert r169656.

The linker will call `lto_codegen_add_must_preserve_symbol' on all globals that
should be kept around. The linker will pretend that a dylib is being created.
<rdar://problem/12528059>

llvm-svn: 169770

11 years agoUse correct flags for this test.
Bill Wendling [Mon, 10 Dec 2012 21:15:22 +0000 (21:15 +0000)]
Use correct flags for this test.

llvm-svn: 169768

11 years agoEnable RTTI for liblldbCore.a when GCC is the compiler
Daniel Malea [Mon, 10 Dec 2012 21:05:57 +0000 (21:05 +0000)]
Enable RTTI for liblldbCore.a when GCC is the compiler
- gcc does not like -fno-rtti mixed with dynamic_cast<> (in cxa_demangle.cpp)

llvm-svn: 169767

11 years agoAdd a test for explicitly exercising the mc-relax-all flag.
Eli Bendersky [Mon, 10 Dec 2012 20:36:01 +0000 (20:36 +0000)]
Add a test for explicitly exercising the mc-relax-all flag.

llvm-svn: 169764

11 years agoFixup test case from r169755. These are driver options, not frontend options.
Chad Rosier [Mon, 10 Dec 2012 20:16:17 +0000 (20:16 +0000)]
Fixup test case from r169755.  These are driver options, not frontend options.
Also, add the -S option.

llvm-svn: 169763

11 years agoCleanup formatting, comments and naming.
Eli Bendersky [Mon, 10 Dec 2012 20:13:43 +0000 (20:13 +0000)]
Cleanup formatting, comments and naming.

llvm-svn: 169762

11 years agoReturn true from HeaderSearch::isFileMultipleIncludeGuarded if the file
Argyrios Kyrtzidis [Mon, 10 Dec 2012 20:08:37 +0000 (20:08 +0000)]
Return true from HeaderSearch::isFileMultipleIncludeGuarded if the file
was #import'ed.

llvm-svn: 169761

11 years ago[mips] Set HWEncoding field of registers. Use delete function
Akira Hatanaka [Mon, 10 Dec 2012 20:04:40 +0000 (20:04 +0000)]
[mips] Set HWEncoding field of registers. Use delete function
getMipsRegisterNumbering and use MCRegisterInfo::getEncodingValue instead.

llvm-svn: 169760

11 years ago<rdar://problem/12848118>
Enrico Granata [Mon, 10 Dec 2012 19:55:53 +0000 (19:55 +0000)]
<rdar://problem/12848118>

Making MightHaveChildren() always return true regardless for our own data formatters
This is meant to optimize performance for common most-often-not-empty container classes

llvm-svn: 169759

11 years agoUse the somewhat semantic term "split dwarf" it more matches what's
Eric Christopher [Mon, 10 Dec 2012 19:51:21 +0000 (19:51 +0000)]
Use the somewhat semantic term "split dwarf" it more matches what's
going on and makes a lot of the terminology in comments make more sense.

llvm-svn: 169758

11 years agoDelete the FissionCU.
Eric Christopher [Mon, 10 Dec 2012 19:51:18 +0000 (19:51 +0000)]
Delete the FissionCU.

llvm-svn: 169757

11 years agoReorder fission variables.
Eric Christopher [Mon, 10 Dec 2012 19:51:13 +0000 (19:51 +0000)]
Reorder fission variables.

llvm-svn: 169756

11 years agoSpecify if `-mno-red-zone' was used when creating the GCOV instrucmentation pass.
Bill Wendling [Mon, 10 Dec 2012 19:47:53 +0000 (19:47 +0000)]
Specify if `-mno-red-zone' was used when creating the GCOV instrucmentation pass.

This prevents the functions generated by that pass from using the red zone.
<rdar://problem/12843084>

llvm-svn: 169755

11 years agoDon't use a red zone for code coverage if the user specified `-mno-red-zone'.
Bill Wendling [Mon, 10 Dec 2012 19:46:49 +0000 (19:46 +0000)]
Don't use a red zone for code coverage if the user specified `-mno-red-zone'.

The `-mno-red-zone' flag wasn't being propagated to the functions that code
coverage generates. This allowed some of them to use the red zone when that
wasn't allowed.
<rdar://problem/12843084>

llvm-svn: 169754

11 years ago<rdar://problem/12827031>
Greg Clayton [Mon, 10 Dec 2012 19:43:43 +0000 (19:43 +0000)]
<rdar://problem/12827031>

Fix the OptionValueFileSpec option value to correctly get the file path when trailing spaces are on the path. The "settings set" command uses the OptionValueFileSpec class to set file paths and if extra spaces are at the end it will include those in the paths. Now we chop up the value send to to OptionValueFileSpec::SetValueFromCString(...) function with "lldb_private::Args" and give an appropriate error if more than one path is used. It also allows for quotes to be used when specifying the path.

llvm-svn: 169753

11 years agoAdd support for reverse induction variables. For example:
Nadav Rotem [Mon, 10 Dec 2012 19:25:06 +0000 (19:25 +0000)]
Add support for reverse induction variables. For example:

while (i--)
 sum+=A[i];

llvm-svn: 169752

11 years ago<rdar://problem/12817233>
Enrico Granata [Mon, 10 Dec 2012 19:23:00 +0000 (19:23 +0000)]
<rdar://problem/12817233>

Change the wording of NSNumber summary from absurd value to unexpected value when a tagged pointer shows up that does not match our knowledge of the internals

llvm-svn: 169751

11 years agoMake sure that the lldb globals:
Greg Clayton [Mon, 10 Dec 2012 19:18:23 +0000 (19:18 +0000)]
Make sure that the lldb globals:
    lldb.target
    lldb.process
    lldb.thread
    lldb.frame

are initialized to at least contain empty lldb classes in case some python gets imported that uses them.

llvm-svn: 169750

11 years agoCMake: Don't run 'git svn' if there is no .git/svn directory.
Jim Grosbach [Mon, 10 Dec 2012 19:03:37 +0000 (19:03 +0000)]
CMake: Don't run 'git svn' if there is no .git/svn directory.

If the local checkout does not have 'git svn' references set up, don't try
to use 'git svn' for version information.

llvm-svn: 169749

11 years agoThis patch adds statistics for other non-DWARF fragments emitted by
Eli Bendersky [Mon, 10 Dec 2012 18:59:39 +0000 (18:59 +0000)]
This patch adds statistics for other non-DWARF fragments emitted by
the assembler. This is useful in order to know how the numbers add up,
since in particular the Align fragments account for a non-trivial
portion of the emitted fragments (especially on -O0 which sets
relax-all).

llvm-svn: 169747

11 years agoAddi formatting tests for pointer template parameters.
Daniel Jasper [Mon, 10 Dec 2012 18:59:13 +0000 (18:59 +0000)]
Addi formatting tests for pointer template parameters.

Fix spacing before ",".

llvm-svn: 169746

11 years agoUse GetUnderlyingObjects in misched
Hal Finkel [Mon, 10 Dec 2012 18:49:16 +0000 (18:49 +0000)]
Use GetUnderlyingObjects in misched

misched used GetUnderlyingObject in order to break false load/store
dependencies, and the -enable-aa-sched-mi feature similarly relied on
GetUnderlyingObject in order to ensure it is safe to use the aliasing analysis.
Unfortunately, GetUnderlyingObject does not recurse through phi nodes, and so
(especially due to LSR) all of these mechanisms failed for
induction-variable-dependent loads and stores inside loops.

This change replaces uses of GetUnderlyingObject with GetUnderlyingObjects
(which will recurse through phi and select instructions) in misched.

Andy reviewed, tested and simplified this patch; Thanks!

llvm-svn: 169744

11 years agoRemove unneeded typedef and volatile
Michael Ilseman [Mon, 10 Dec 2012 18:48:08 +0000 (18:48 +0000)]
Remove unneeded typedef and volatile

llvm-svn: 169743

11 years agoFix funky copy-pasted grammatical error.
Sean Silva [Mon, 10 Dec 2012 18:37:26 +0000 (18:37 +0000)]
Fix funky copy-pasted grammatical error.

PR14343

llvm-svn: 169742

11 years agoRevert "Make '-mtune=x86_64' assume fast unaligned memory accesses."
Chandler Carruth [Mon, 10 Dec 2012 18:23:52 +0000 (18:23 +0000)]
Revert "Make '-mtune=x86_64' assume fast unaligned memory accesses."

Accidental commit... git svn betrayed me. Sorry for the noise.

llvm-svn: 169741

11 years agoMake '-mtune=x86_64' assume fast unaligned memory accesses.
Chandler Carruth [Mon, 10 Dec 2012 18:22:42 +0000 (18:22 +0000)]
Make '-mtune=x86_64' assume fast unaligned memory accesses.

Summary:
Not all chips targeted by x86_64 have this feature, but a dramatically
increasing number do. Specifying a chip-specific tuning parameter will
continue to turn the feature on or off as appropriate for that
particular chip, but the generic flag should try to achieve the best
performance on the most widely available hardware. Today, the number of
chips with fast UA access dwarfs those without in the x86-64 space.

Note that this also brings LLVM's code generation for this '-march' flag
more in line with that of modern GCCs.

CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D195

llvm-svn: 169740

11 years agoFix a typo in my previous commit -- bloomfield is 0x1A not 0x2A.
Chandler Carruth [Mon, 10 Dec 2012 18:22:40 +0000 (18:22 +0000)]
Fix a typo in my previous commit -- bloomfield is 0x1A not 0x2A.

Thanks to the PaX folks for noticing in review! We need some tests here,
any sugestions welcome...

llvm-svn: 169739

11 years agoClang-format: error recovery for access specifiers
Alexander Kornienko [Mon, 10 Dec 2012 16:34:48 +0000 (16:34 +0000)]
Clang-format: error recovery for access specifiers

Reviewers: klimek

Reviewed By: klimek

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D198

llvm-svn: 169738

11 years agoClarifying comments for the MatchFinder and matchesNames matcher.
Manuel Klimek [Mon, 10 Dec 2012 16:13:06 +0000 (16:13 +0000)]
Clarifying comments for the MatchFinder and matchesNames matcher.

llvm-svn: 169737

11 years ago[ASan] Typo fix in memcpy() and memmove() interceptors: ASAN_WRITE_RANGE and ASAN_REA...
Alexander Potapenko [Mon, 10 Dec 2012 16:02:13 +0000 (16:02 +0000)]
[ASan] Typo fix in memcpy() and memmove() interceptors: ASAN_WRITE_RANGE and ASAN_READ_RANGE were swapped.
This has been spotted by Anna Zaks (ganna@apple.com)

llvm-svn: 169736

11 years ago[asan] move FakeStack into a separate file
Kostya Serebryany [Mon, 10 Dec 2012 14:19:15 +0000 (14:19 +0000)]
[asan] move FakeStack into a separate file

llvm-svn: 169734

11 years ago[asan] introduce asan_allocator2.cc, which will have the replacement for asan allocat...
Kostya Serebryany [Mon, 10 Dec 2012 13:52:55 +0000 (13:52 +0000)]
[asan] introduce asan_allocator2.cc, which will have the replacement for asan allocator (now, just a bit of boilerplate)

llvm-svn: 169733

11 years agoAdd a libsanitizer API __sanitizer_sandbox_on_notify(void* reserved), which should...
Alexander Potapenko [Mon, 10 Dec 2012 13:10:40 +0000 (13:10 +0000)]
Add a libsanitizer API __sanitizer_sandbox_on_notify(void* reserved), which should be used by
the client programs to notify the tools that sandboxing is about to be turned on.

llvm-svn: 169732

11 years agoAddress a FIXME and update the fast unaligned memory feature for newer
Chandler Carruth [Mon, 10 Dec 2012 09:18:44 +0000 (09:18 +0000)]
Address a FIXME and update the fast unaligned memory feature for newer
Intel chips.

The model number rules were determined by inspecting Intel's
documentation for their newer chip model numbers. My understanding is
that all of the newer Intel chips have fast unaligned memory access, but
if anyone is concerned about a particular chip, just shout.

No tests updated; it's not clear we have dedicated tests for the chips'
various features, but if anyone would like tests (or can point me at
some existing ones), I'm happy to oblige.

llvm-svn: 169730

11 years agotsan: exclude flaky test
Dmitry Vyukov [Mon, 10 Dec 2012 09:16:17 +0000 (09:16 +0000)]
tsan: exclude flaky test

llvm-svn: 169729

11 years agoAdd a new visitor for walking the uses of a pointer value.
Chandler Carruth [Mon, 10 Dec 2012 08:28:39 +0000 (08:28 +0000)]
Add a new visitor for walking the uses of a pointer value.

This visitor provides infrastructure for recursively traversing the
use-graph of a pointer-producing instruction like an alloca or a malloc.
It maintains a worklist of uses to visit, so it can handle very deep
recursions. It automatically looks through instructions which simply
translate one pointer to another (bitcasts and GEPs). It tracks the
offset relative to the original pointer as long as that offset remains
constant and exposes it during the visit as an APInt offset. Finally, it
performs conservative escape analysis.

However, currently it has some limitations that should be addressed
going forward:
1) It doesn't handle vectors of pointers.
2) It doesn't provide a cheaper visitor when the constant offset
   tracking isn't needed.
3) It doesn't support non-instruction pointer values.

The current functionality is exactly what is required to implement the
SROA pointer-use visitors in terms of this one, rather than in terms of
their own ad-hoc base visitor, which was always very poorly specified.
SROA has been converted to use this, and the code there deleted which
this utility now provides.

Technically speaking, using this new visitor allows SROA to handle a few
more cases than it previously did. It is now more aggressive in ignoring
chains of instructions which look like they would defeat SROA, but in
fact do not because they never result in a read or write of memory.
While this is "neat", it shouldn't be interesting for real programs as
any such chains should have been removed by others passes long before we
get to SROA. As a consequence, I've not added any tests for these
features -- it shouldn't be part of SROA's contract to perform such
heroics.

The goal is to extend the functionality of this visitor going forward,
and re-use it from passes like ASan that can benefit from doing
a detailed walk of the uses of a pointer.

Thanks to Ben Kramer for the code review rounds and lots of help
reviewing and debugging this patch.

llvm-svn: 169728

11 years agoTeach DAG combine to handle vector add/sub with vectors of all 0s.
Craig Topper [Mon, 10 Dec 2012 08:12:29 +0000 (08:12 +0000)]
Teach DAG combine to handle vector add/sub with vectors of all 0s.

llvm-svn: 169727

11 years ago[CMake] TARGET_TRIPLE may be internal alias of LLVM_DEFAULT_TARGET_TRIPLE.
NAKAMURA Takumi [Mon, 10 Dec 2012 07:14:29 +0000 (07:14 +0000)]
[CMake] TARGET_TRIPLE may be internal alias of LLVM_DEFAULT_TARGET_TRIPLE.

llvm-svn: 169726

11 years agoAdding tests since when I was asked whether this works I wasn't
Manuel Klimek [Mon, 10 Dec 2012 07:08:53 +0000 (07:08 +0000)]
Adding tests since when I was asked whether this works I wasn't
100% sure.

llvm-svn: 169725

11 years ago[CMake] Update dependencies to intrinsics_gen corresponding to r169711.
NAKAMURA Takumi [Mon, 10 Dec 2012 05:27:15 +0000 (05:27 +0000)]
[CMake] Update dependencies to intrinsics_gen corresponding to r169711.

llvm-svn: 169724

11 years ago[Driver] Add test.
Michael J. Spencer [Mon, 10 Dec 2012 02:53:10 +0000 (02:53 +0000)]
[Driver] Add test.

llvm-svn: 169721

11 years agoRevert to old behavior until linker can pass export-dynamic option.
Bill Wendling [Mon, 10 Dec 2012 02:51:16 +0000 (02:51 +0000)]
Revert to old behavior until linker can pass export-dynamic option.

llvm-svn: 169720

11 years agoFix PR14548: SROA was crashing on a mixture of i1 and i8 loads and stores.
Chandler Carruth [Mon, 10 Dec 2012 00:54:45 +0000 (00:54 +0000)]
Fix PR14548: SROA was crashing on a mixture of i1 and i8 loads and stores.

When SROA was evaluating a mixture of i1 and i8 loads and stores, in
just a particular case, it would tickle a latent bug where we compared
bits to bytes rather than bits to bits. As a consequence of the latent
bug, we would allow integers through which were not byte-size multiples,
a situation the later rewriting code was never intended to handle.

In release builds this could trigger all manner of oddities, but the
reported issue in PR14548 was forming invalid bitcast instructions.

The only downside of this fix is that it makes it more clear that SROA
in its current form is not capable of handling mixed i1 and i8 loads and
stores. Sometimes with the previous code this would work by luck, but
usually it would crash, so I'm not terribly worried. I'll watch the LNT
numbers just to be sure.

llvm-svn: 169719

11 years ago[Driver] Properly handle -entry for X86 Linux.
Michael J. Spencer [Sun, 9 Dec 2012 23:56:37 +0000 (23:56 +0000)]
[Driver] Properly handle -entry for X86 Linux.

llvm-svn: 169718

11 years ago[Driver] Add -### support for printing out the core command line.
Michael J. Spencer [Sun, 9 Dec 2012 23:56:26 +0000 (23:56 +0000)]
[Driver] Add -### support for printing out the core command line.

llvm-svn: 169717

11 years agoRemove left over debugging output.
Michael J. Spencer [Sun, 9 Dec 2012 23:56:03 +0000 (23:56 +0000)]
Remove left over debugging output.

llvm-svn: 169716

11 years ago[Driver] Make the X86Linux target use X86 (not x64) and properly initalize WriterOptions.
Michael J. Spencer [Sun, 9 Dec 2012 23:55:52 +0000 (23:55 +0000)]
[Driver] Make the X86Linux target use X86 (not x64) and properly initalize WriterOptions.

llvm-svn: 169715

11 years agoDocumentation: convert ReleaseNotes.html to reST.
Dmitri Gribenko [Sun, 9 Dec 2012 23:14:26 +0000 (23:14 +0000)]
Documentation: convert ReleaseNotes.html to reST.

Patch by Anthony Mykhailenko with small fixes by me.

llvm-svn: 169714

11 years agoUnbreak the clang build after r169712.
Benjamin Kramer [Sun, 9 Dec 2012 21:58:24 +0000 (21:58 +0000)]
Unbreak the clang build after r169712.

llvm-svn: 169713

11 years agoReorganize FastMathFlags to be a wrapper around unsigned, and streamline some interfaces.
Michael Ilseman [Sun, 9 Dec 2012 21:12:04 +0000 (21:12 +0000)]
Reorganize FastMathFlags to be a wrapper around unsigned, and streamline some interfaces.

llvm-svn: 169712

11 years agoLoopVectorize: support vectorizing intrinsic calls
Paul Redmond [Sun, 9 Dec 2012 20:42:17 +0000 (20:42 +0000)]
LoopVectorize: support vectorizing intrinsic calls

- added function to VectorTargetTransformInfo to query cost of intrinsics
- vectorize trivially vectorizable intrinsic calls such as sin, cos, log, etc.

Reviewed by: Nadav

llvm-svn: 169711

11 years agoHave the bitcode reader/writer just use FPMathOperator's fast math enum directly
Michael Ilseman [Sun, 9 Dec 2012 20:23:16 +0000 (20:23 +0000)]
Have the bitcode reader/writer just use FPMathOperator's fast math enum directly

llvm-svn: 169710

11 years agotest commit.
Paul Redmond [Sun, 9 Dec 2012 19:46:31 +0000 (19:46 +0000)]
test commit.

llvm-svn: 169709

11 years agoVirtual method overrides can no longer have mismatched calling conventions. This...
Aaron Ballman [Sun, 9 Dec 2012 17:45:41 +0000 (17:45 +0000)]
Virtual method overrides can no longer have mismatched calling conventions.  This fixes PR14339.

llvm-svn: 169705

11 years agoSo many people have touched this, it doesn't make sense to ascribe authorship anymore.
Chris Lattner [Sun, 9 Dec 2012 16:55:39 +0000 (16:55 +0000)]
So many people have touched this, it doesn't make sense to ascribe authorship anymore.

llvm-svn: 169704

11 years agoUse m_OneUse pattern instead of hasOneUse() method.
Jakub Staszak [Sun, 9 Dec 2012 16:06:44 +0000 (16:06 +0000)]
Use m_OneUse pattern instead of hasOneUse() method.
No functionality change.

llvm-svn: 169703

11 years agodocs: Convert GarbageCollection.html to reST
Sean Silva [Sun, 9 Dec 2012 15:52:47 +0000 (15:52 +0000)]
docs: Convert GarbageCollection.html to reST

Patch by Alexander Zinenko!

llvm-svn: 169702

11 years agoRemove trailing spaces.
Jakub Staszak [Sun, 9 Dec 2012 15:37:46 +0000 (15:37 +0000)]
Remove trailing spaces.

llvm-svn: 169701

11 years agoDocumentation: HowToReleaseLLVM.rst: remove trailing whitespace.
Dmitri Gribenko [Sun, 9 Dec 2012 15:33:26 +0000 (15:33 +0000)]
Documentation: HowToReleaseLLVM.rst: remove trailing whitespace.

llvm-svn: 169700

11 years agoDocumentation: don't create TOCs manually.
Dmitri Gribenko [Sun, 9 Dec 2012 15:29:56 +0000 (15:29 +0000)]
Documentation: don't create TOCs manually.

Thanks to Sean Silva for pointing out!

llvm-svn: 169699

11 years agoSwitch SROA to pop Uses off the back of its visitors' queues.
Chandler Carruth [Sun, 9 Dec 2012 11:56:01 +0000 (11:56 +0000)]
Switch SROA to pop Uses off the back of its visitors' queues.

This will more closely match the behavior of the new PtrUseVisitor that
I am adding. Hopefully this will not change the actual behavior in any
way, but by making the processing order more similar help in debugging.

llvm-svn: 169697

11 years agoAdd a triple to this test. It depends on little-endian bitfield layout.
Chandler Carruth [Sun, 9 Dec 2012 10:39:18 +0000 (10:39 +0000)]
Add a triple to this test. It depends on little-endian bitfield layout.

llvm-svn: 169696

11 years agoDrop the address space limit for tests in the makefile build.
Benjamin Kramer [Sun, 9 Dec 2012 10:34:22 +0000 (10:34 +0000)]
Drop the address space limit for tests in the makefile build.

The limit seems to break newer pythons (see PR13598) so just drop it for now.
Eventually lit should learn to set limits for its children instead of a global
limit in the makefile.

If some PPC bots fail after this change: That's a good thing, they actually run
clang tests now.

llvm-svn: 169695

11 years agoCleanup and fix an assert that was mis-firing.
Chandler Carruth [Sun, 9 Dec 2012 10:33:27 +0000 (10:33 +0000)]
Cleanup and fix an assert that was mis-firing.

Note that there is no test suite update. This was found by a couple of
tests failing when the test suite was run on a powerpc64 host (thanks
Roman!). The tests don't specify a triple, which might seem surprising
for a codegen test. But in fact, these tests don't even inspect their
output. Not at all. I could add a bunch of triples to these tests so
that we'd get the test coverage for normal builds, but really someone
needs to go through and add actual *tests* to these tests. =[ The ones
in question are:

  test/CodeGen/bitfield-init.c
  test/CodeGen/union.c

llvm-svn: 169694

11 years agoAdd a test case that I've been using to clarify the bitfield layout for
Chandler Carruth [Sun, 9 Dec 2012 10:08:22 +0000 (10:08 +0000)]
Add a test case that I've been using to clarify the bitfield layout for
both LE and BE targets.

AFAICT, Clang get's this correct for PPC64. I've compared it to GCC 4.8
output for PPC64 (thanks Roman!) and to my limited ability to read power
assembly, it looks functionally equivalent. It would be really good to
fill in the assertions on this test case for x86-32, PPC32, ARM, etc.,
but I've reached the limit of my time and energy... Hopefully other
folks can chip in as it would be good to have this in place to test any
subsequent changes.

To those who care about PPC64 performance, a side note: there is some
*obnoxiously* bad code generated for these test cases. It would be worth
someone's time to sit down and teach the PPC backend to pattern match
these IR constructs better. It appears that things like '(shr %foo,
<imm>)' turn into 'rldicl R, R, 64-<imm>, <imm>' or some such. They
don't even get combined with other 'rldicl' instructions *immediately
adjacent*. I'll add a couple of these patterns to the README, but
I think it would be better to look at all the patterns produced by this
and other bitfield access code, and systematically build up a collection
of patterns that efficiently reduce them to the minimal code.

llvm-svn: 169693

11 years agoRemove extra blank line.
Craig Topper [Sun, 9 Dec 2012 08:20:52 +0000 (08:20 +0000)]
Remove extra blank line.

llvm-svn: 169692

11 years agoFix the bitfield record layout in codegen for big endian targets.
Chandler Carruth [Sun, 9 Dec 2012 07:26:04 +0000 (07:26 +0000)]
Fix the bitfield record layout in codegen for big endian targets.

This was an egregious bug due to the several iterations of refactorings
that took place. Size no longer meant what it original did by the time
I finished, but this line of code never got updated. Unfortunately we
had essentially zero tests for this in the regression test suite. =[

I've added a PPC64 run over the bitfield test case I've been primarily
using. I'm still looking at adding more tests and making sure this is
the *correct* bitfield access code on PPC64 linux, but it looks pretty
close to me, and it is *worlds* better than before this patch as it no
longer asserts! =] More commits to follow with at least additional tests
and maybe more fixes.

Sorry for the long breakage due to this....

llvm-svn: 169691

11 years agoFix overload resolution for the initialization of a multi-dimensional
Richard Smith [Sun, 9 Dec 2012 06:48:56 +0000 (06:48 +0000)]
Fix overload resolution for the initialization of a multi-dimensional
array from a braced-init-list. There seems to be a core wording wart
here (it suggests we should be testing whether the elements of the init
list are implicitly convertible to the array element type, not whether
there is an implicit conversion sequence) but our prior behavior appears
to be a bug, not a deliberate effort to implement the standard as written.

llvm-svn: 169690

11 years agoPR14550: If a system header contains a bogus constexpr function definition,
Richard Smith [Sun, 9 Dec 2012 05:55:43 +0000 (05:55 +0000)]
PR14550: If a system header contains a bogus constexpr function definition,
don't mark the function as invalid, since we suppress the error.

llvm-svn: 169689

11 years agoPR14549. Don't assert if we see an incomplete decltype specifier at the end of the...
Richard Smith [Sun, 9 Dec 2012 04:17:57 +0000 (04:17 +0000)]
PR14549. Don't assert if we see an incomplete decltype specifier at the end of the file.

llvm-svn: 169688

11 years ago- Re-enable population count loop idiom recognization
Shuxin Yang [Sun, 9 Dec 2012 03:12:46 +0000 (03:12 +0000)]
- Re-enable population count loop idiom recognization
- fix a bug which cause sigfault.
- add two testing cases which was causing crash

llvm-svn: 169687

11 years agoModify testit to use the local headers and lib. Thanks go to Jeffrey Yasskin.
Howard Hinnant [Sun, 9 Dec 2012 00:12:14 +0000 (00:12 +0000)]
Modify testit to use the local headers and lib.  Thanks go to Jeffrey Yasskin.

llvm-svn: 169686

11 years agoTeach DAG combine to handle vector logical operations with vectors of all 1s or all...
Craig Topper [Sat, 8 Dec 2012 22:49:19 +0000 (22:49 +0000)]
Teach DAG combine to handle vector logical operations with vectors of all 1s or all 0s. These cases can show up when vectors are split for legalizing. Fix some tests that were dependent on these cases not being combined.

llvm-svn: 169684

11 years agoRevert the patches adding a popcount loop idiom recognition pass.
Chandler Carruth [Sat, 8 Dec 2012 22:18:29 +0000 (22:18 +0000)]
Revert the patches adding a popcount loop idiom recognition pass.

There are still bugs in this pass, as well as other issues that are
being worked on, but the bugs are crashers that occur pretty easily in
the wild. Test cases have been sent to the original commit's review
thread.

This reverts the commits:
  r169671: Fix a logic error.
  r169604: Move the popcnt tests to an X86 subdirectory.
  r168931: Initial commit adding the pass.

llvm-svn: 169683

11 years agoEscape % in the TextDiagnosticBuffer so they aren't interpreted twice when fed into...
Benjamin Kramer [Sat, 8 Dec 2012 12:42:30 +0000 (12:42 +0000)]
Escape % in the TextDiagnosticBuffer so they aren't interpreted twice when fed into the diagnostic formatting machinery again.

Fixes PR14543.

llvm-svn: 169677

11 years agoSimplify code. Sort includes. No functionality change.
Benjamin Kramer [Sat, 8 Dec 2012 10:45:24 +0000 (10:45 +0000)]
Simplify code. Sort includes. No functionality change.

llvm-svn: 169676

11 years agolong double should be 64 bits on FreeBSD/MIPS64. It possibly should be on
David Chisnall [Sat, 8 Dec 2012 09:06:08 +0000 (09:06 +0000)]
long double should be 64 bits on FreeBSD/MIPS64.  It possibly should be on
Linux too, as I think we inherited it from there.  The ABI spec says 128-bit,
although I think SGI's compiler on IRIX may be the only thing ever to support
this.

llvm-svn: 169674