platform/upstream/llvm.git
11 years agoMarking TestPrintStackTraces.py as expectedFailureLinux (due to lack of multi-threade...
Andrew Kaylor [Wed, 12 Dec 2012 23:12:09 +0000 (23:12 +0000)]
Marking TestPrintStackTraces.py as expectedFailureLinux (due to lack of multi-threaded debugging support).

llvm-svn: 170043

11 years agodocs: Initial Sphinx setup for Clang.
Sean Silva [Wed, 12 Dec 2012 23:02:30 +0000 (23:02 +0000)]
docs: Initial Sphinx setup for Clang.

I don't think this will be visible just yet on <clang.llvm.org/docs/>
since I don't think that the necessary server-side setup has taken
place.

Don't shoot me over the theme. I don't want to duplicate LLVM's theme
into the clang repo at the moment, so I just used one of Sphinx's
default themes.

llvm-svn: 170042

11 years agoMake the MCStreamer have a reset method and call that after finalization of the asm...
Pedro Artigas [Wed, 12 Dec 2012 22:59:46 +0000 (22:59 +0000)]
Make the MCStreamer have a reset method and call that after finalization of the asm printer,
also changed MCContext to a single reset only method for simplicity as requested on the list

llvm-svn: 170041

11 years ago[arcmt] When capturing ARC errors, have a sanity check to make sure
Argyrios Kyrtzidis [Wed, 12 Dec 2012 22:48:28 +0000 (22:48 +0000)]
[arcmt] When capturing ARC errors, have a sanity check to make sure
the diagnostic has a valid location.

llvm-svn: 170040

11 years ago[objc] For the ARC error that is emitted when a synthesized property implementation
Argyrios Kyrtzidis [Wed, 12 Dec 2012 22:48:25 +0000 (22:48 +0000)]
[objc] For the ARC error that is emitted when a synthesized property implementation
has inconsistent ownership with the backing ivar, point the error location to the
ivar.

Pointing to the ivar (instead of the @synthesize) is better since this is where a fix is needed.
Also provide the location of @synthesize via a note.

This also fixes the problem where an auto-synthesized property would emit an error without
any location.

llvm-svn: 170039

11 years ago[ms-inline asm] Test case for r170037.
Chad Rosier [Wed, 12 Dec 2012 22:46:23 +0000 (22:46 +0000)]
[ms-inline asm] Test case for r170037.

llvm-svn: 170038

11 years ago[ms-inline asm] Make sure we fail gracefully on parse errors. Parse errors
Chad Rosier [Wed, 12 Dec 2012 22:45:52 +0000 (22:45 +0000)]
[ms-inline asm] Make sure we fail gracefully on parse errors.  Parse errors
should only occur on invalid input.  Instruction matching errors aren't
unexpected, so we can't rely on the AsmParsers HadError variable directly.
rdar://12840278

llvm-svn: 170037

11 years agoYAMLIO: Remove all of the template instantiation hacks, I don't see why they're neces...
Benjamin Kramer [Wed, 12 Dec 2012 22:40:02 +0000 (22:40 +0000)]
YAMLIO: Remove all of the template instantiation hacks, I don't see why they're necessary and it breaks linking of the unit tests.

Also comes with a clang-format run on the cpp file, it had major style violations.

llvm-svn: 170036

11 years agoTemporarily disable test cases until they compile with g++ too.
Nick Kledzik [Wed, 12 Dec 2012 22:39:45 +0000 (22:39 +0000)]
Temporarily disable test cases until they compile with g++ too.

llvm-svn: 170035

11 years agoRewrite calls to bitcast unprototyped functions when emitting a definition.
John McCall [Wed, 12 Dec 2012 22:21:47 +0000 (22:21 +0000)]
Rewrite calls to bitcast unprototyped functions when emitting a definition.

My variadics patch, r169588, changed these calls to typically be
bitcasts rather than calls to a supposedly variadic function.
This totally subverted a hack where we intentionally dropped
excess arguments from such calls in order to appease the inliner
and a "warning" from the optimizer.  This patch extends the hack
to also work with bitcasts, as well as teaching it to rewrite
invokes.

llvm-svn: 170034

11 years agoUnbreak the build. Fallout from r170019.
David Blaikie [Wed, 12 Dec 2012 22:14:32 +0000 (22:14 +0000)]
Unbreak the build. Fallout from r170019.

llvm-svn: 170033

11 years agoAlignedCharArrayUnion is erroring with non-clang compilers
Nick Kledzik [Wed, 12 Dec 2012 22:03:57 +0000 (22:03 +0000)]
AlignedCharArrayUnion is erroring with non-clang compilers

llvm-svn: 170031

11 years agoFix calls to getAsSignedInteger() to use long long - not int64_t
Nick Kledzik [Wed, 12 Dec 2012 21:42:49 +0000 (21:42 +0000)]
Fix calls to getAsSignedInteger() to use long long - not int64_t

llvm-svn: 170030

11 years agoMakefile.sphinx: reST conversion is complete!
Dmitri Gribenko [Wed, 12 Dec 2012 21:35:43 +0000 (21:35 +0000)]
Makefile.sphinx: reST conversion is complete!

No need to copy HTML files anymore.

llvm-svn: 170029

11 years agoDocumentation: use paths relative to document root in links.
Dmitri Gribenko [Wed, 12 Dec 2012 21:16:29 +0000 (21:16 +0000)]
Documentation: use paths relative to document root in links.

llvm-svn: 170027

11 years agoZhang Xiongpang: Add definitions for const data members. Fixes http://llvm.org...
Howard Hinnant [Wed, 12 Dec 2012 21:14:28 +0000 (21:14 +0000)]
Zhang Xiongpang:  Add definitions for const data members.  Fixes llvm.org/bugs/show_bug.cgi?id=14585.

llvm-svn: 170026

11 years agoFix typo, which prevent test from being check.
Jakub Staszak [Wed, 12 Dec 2012 21:10:56 +0000 (21:10 +0000)]
Fix typo, which prevent test from being check.

llvm-svn: 170025

11 years agoRestore the PHI optimization I accidently removed
Michael Ilseman [Wed, 12 Dec 2012 20:59:36 +0000 (20:59 +0000)]
Restore the PHI optimization I accidently removed

llvm-svn: 170024

11 years agounHECKify test fixed by Jacob in r159003.
Jakub Staszak [Wed, 12 Dec 2012 20:58:42 +0000 (20:58 +0000)]
unHECKify test fixed by Jacob in r159003.

llvm-svn: 170023

11 years agoRemove trailing whitespace
Michael Ilseman [Wed, 12 Dec 2012 20:57:53 +0000 (20:57 +0000)]
Remove trailing whitespace

llvm-svn: 170022

11 years agoFix the build on case sensitive file systems.
Benjamin Kramer [Wed, 12 Dec 2012 20:55:44 +0000 (20:55 +0000)]
Fix the build on case sensitive file systems.

llvm-svn: 170021

11 years agoSimplify negated bit test
David Majnemer [Wed, 12 Dec 2012 20:48:54 +0000 (20:48 +0000)]
Simplify negated bit test

llvm-svn: 170020

11 years agoInitial implementation of a utility for converting native data
Nick Kledzik [Wed, 12 Dec 2012 20:46:15 +0000 (20:46 +0000)]
Initial implementation of a utility for converting native data
structures to and from YAML using traits.  The first client will
be the test suite of lld.  The documentation will show up at:

   http://llvm.org/docs/YamlIO.html

llvm-svn: 170019

11 years agoFix a logic bug in inline expansion of memcpy / memset with an overlapping
Evan Cheng [Wed, 12 Dec 2012 20:43:23 +0000 (20:43 +0000)]
Fix a logic bug in inline expansion of memcpy / memset with an overlapping
load / store pair. It's not legal to use a wider load than the size of
the remaining bytes if it's the first pair of load / store.

llvm-svn: 170018

11 years agounHECKify test. It was fixed by Chris in 2009.
Jakub Staszak [Wed, 12 Dec 2012 20:43:00 +0000 (20:43 +0000)]
unHECKify test. It was fixed by Chris in 2009.

llvm-svn: 170017

11 years agoThe ordering of two relocations on the same instruction is apparently not
Bill Schmidt [Wed, 12 Dec 2012 20:29:20 +0000 (20:29 +0000)]
The ordering of two relocations on the same instruction is apparently not
predictable when compiled on at least one non-PowerPC host.  Source of
nondeterminism not apparent.  Restrict the test to build on PowerPC hosts
for now while looking into the issue further.

llvm-svn: 170016

11 years agoFix typo in test-case.
Jakub Staszak [Wed, 12 Dec 2012 20:29:06 +0000 (20:29 +0000)]
Fix typo in test-case.

llvm-svn: 170015

11 years agoAdded a warning about using the lldb.target, etc. for anything other than convenience...
Jim Ingham [Wed, 12 Dec 2012 20:23:52 +0000 (20:23 +0000)]
Added a warning about using the lldb.target, etc. for anything other than convenience when using the
script command.

llvm-svn: 170014

11 years ago<rdar://problem/10898363>
Enrico Granata [Wed, 12 Dec 2012 20:11:05 +0000 (20:11 +0000)]
<rdar://problem/10898363>

Emitting a warning when defining a summary or a synthetic provider and the function/class name provided does not correspond to a valid scripting object

Also using this chance to edit a few error messages from weird "internal error" markers to actual user-legible data!

llvm-svn: 170013

11 years ago[mips] Fix a memory leak bug report by NAKAMURA Takumi.
Akira Hatanaka [Wed, 12 Dec 2012 20:09:58 +0000 (20:09 +0000)]
[mips] Fix a memory leak bug report by NAKAMURA Takumi.

llvm-svn: 170012

11 years agoDocumentation: SphinxQuickstartTemplate.rst: add guidelines about highlighting
Dmitri Gribenko [Wed, 12 Dec 2012 20:07:18 +0000 (20:07 +0000)]
Documentation: SphinxQuickstartTemplate.rst: add guidelines about highlighting
console sessions and add more highlighter names.

llvm-svn: 170011

11 years ago[driver] Don't warn about an unused -flto option.
Chad Rosier [Wed, 12 Dec 2012 20:06:31 +0000 (20:06 +0000)]
[driver] Don't warn about an unused -flto option.
rdar://12851905

llvm-svn: 170010

11 years agoFixed a few bugs in the "step in" thread plan logic.
Jim Ingham [Wed, 12 Dec 2012 19:58:40 +0000 (19:58 +0000)]
Fixed a few bugs in the "step in" thread plan logic.
Added a "step-in-target" flag to "thread step-in" so if you have something like:

Process 28464 stopped
* thread #1: tid = 0x1c03, function: main , stop reason = breakpoint 1.1
    frame #0: 0x0000000100000e08 a.out`main at main.c:62
   61
-> 62         int A6 = complex (a(4), b(5), c(6)); // Stop here to step targetting b and hitting breakpoint.
   63

and you want to get into "complex" skipping a, b and c, you can do:

(lldb) step -t complex
Process 28464 stopped
* thread #1: tid = 0x1c03, function: complex , stop reason = step in
    frame #0: 0x0000000100000d0d a.out`complex at main.c:44
   41
   42     int complex (int first, int second, int third)
   43     {
-> 44         return first + second + third;  // Step in targetting complex should stop here
   45     }
   46
   47     int main (int argc, char const *argv[])

llvm-svn: 170008

11 years agoMake naming consistent, add comments and sanity asserts
Eli Bendersky [Wed, 12 Dec 2012 19:54:05 +0000 (19:54 +0000)]
Make naming consistent, add comments and sanity asserts

llvm-svn: 170007

11 years agoFix typo.
Jakub Staszak [Wed, 12 Dec 2012 19:47:04 +0000 (19:47 +0000)]
Fix typo.

llvm-svn: 170006

11 years agoFix indentation.
Nadav Rotem [Wed, 12 Dec 2012 19:39:36 +0000 (19:39 +0000)]
Fix indentation.

llvm-svn: 170005

11 years agoLoopVectorizer: Use the "optsize" attribute to decide if we are allowed to increase...
Nadav Rotem [Wed, 12 Dec 2012 19:29:45 +0000 (19:29 +0000)]
LoopVectorizer: Use the "optsize" attribute to decide if we are allowed to increase the function size.

llvm-svn: 170004

11 years agoThis patch implements local-dynamic TLS model support for the 64-bit
Bill Schmidt [Wed, 12 Dec 2012 19:29:35 +0000 (19:29 +0000)]
This patch implements local-dynamic TLS model support for the 64-bit
PowerPC target.  This is the last of the four models, so we now have
full TLS support.

This is mostly a straightforward extension of the general dynamic model.
I had to use an additional Chain operand to tie ADDIS_DTPREL_HA to the
register copy following ADDI_TLSLD_L; otherwise everything above the
ADDIS_DTPREL_HA appeared dead and was removed.

As before, there are new test cases to test the assembly generation, and
the relocations output during integrated assembly.  The expected code
gen sequence can be read in test/CodeGen/PowerPC/tls-ld.ll.

There are a couple of things I think can be done more efficiently in the
overall TLS code, so there will likely be a clean-up patch forthcoming;
but for now I want to be sure the functionality is in place.

Bill

llvm-svn: 170003

11 years agoKerning.
Bill Wendling [Wed, 12 Dec 2012 19:21:53 +0000 (19:21 +0000)]
Kerning.

llvm-svn: 170002

11 years agoDocumentation: llvm-bcanalyzer.rst: cleanup.
Dmitri Gribenko [Wed, 12 Dec 2012 19:15:53 +0000 (19:15 +0000)]
Documentation: llvm-bcanalyzer.rst: cleanup.

llvm-svn: 170001

11 years ago[analyzer] Don't crash running destructors for multidimensional arrays.
Jordan Rose [Wed, 12 Dec 2012 19:13:44 +0000 (19:13 +0000)]
[analyzer] Don't crash running destructors for multidimensional arrays.

We don't handle array destructors correctly yet, but we now apply the same
hack (explicitly destroy the first element, implicitly invalidate the rest)
for multidimensional arrays that we already use for linear arrays.

<rdar://problem/12858542>

llvm-svn: 170000

11 years agoMinor grammar and style fixes in documentation.
Sean Callanan [Wed, 12 Dec 2012 18:02:47 +0000 (18:02 +0000)]
Minor grammar and style fixes in documentation.

<rdar://problem/12861963>
<rdar://problem/12861904>

llvm-svn: 169997

11 years agoMarking the objc_autoreleaseReturnValue and objc_retainAutoreleaseReturnValue
Chad Rosier [Wed, 12 Dec 2012 17:52:21 +0000 (17:52 +0000)]
Marking the objc_autoreleaseReturnValue and objc_retainAutoreleaseReturnValue
call sites 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.  See r169796 for the llvm/fast-isel side of things.
rdar://12553082

llvm-svn: 169996

11 years agoAllow LLDB to work with dSYM files that have a DWARF compile unit with nothing else...
Greg Clayton [Wed, 12 Dec 2012 17:30:52 +0000 (17:30 +0000)]
Allow LLDB to work with dSYM files that have a DWARF compile unit with nothing else to support clang's new -gline-tables-only mode of compiling.

llvm-svn: 169994

11 years agoDocumentation: AliasAnalysis.rst: improve internal and external links
Dmitri Gribenko [Wed, 12 Dec 2012 17:03:50 +0000 (17:03 +0000)]
Documentation: AliasAnalysis.rst: improve internal and external links

llvm-svn: 169993

11 years agoDocumentation: convert WritingAnLLVMPass.html to reST.
Dmitri Gribenko [Wed, 12 Dec 2012 17:02:44 +0000 (17:02 +0000)]
Documentation: convert WritingAnLLVMPass.html to reST.

Patch by Anthony Mykhailenko with small fixes by me.

llvm-svn: 169992

11 years agoDocumentation: cleanup
Dmitri Gribenko [Wed, 12 Dec 2012 16:58:13 +0000 (16:58 +0000)]
Documentation: cleanup

llvm-svn: 169990

11 years agoThe TargetData is not used for the isPowerOfTwo determination. It has never
Rafael Espindola [Wed, 12 Dec 2012 16:52:40 +0000 (16:52 +0000)]
The TargetData is not used for the isPowerOfTwo determination.  It has never
been used in the first place.  It simply was passed to the function and to the
recursive invocations.  Simply drop the parameter and update the callers for the
new signature.

Patch by Saleem Abdulrasool!

llvm-svn: 169988

11 years ago[ASan] Fix test expectations for strcat/strncat.
Alexander Potapenko [Wed, 12 Dec 2012 16:10:46 +0000 (16:10 +0000)]
[ASan] Fix test expectations for strcat/strncat.

llvm-svn: 169987

11 years agoAdd cpp11-migrate to autoconf build
Edwin Vane [Wed, 12 Dec 2012 16:08:10 +0000 (16:08 +0000)]
Add cpp11-migrate to autoconf build

llvm-svn: 169986

11 years ago[sanitizer] add OnMap/OnUmap callbacks to the allocator interface
Kostya Serebryany [Wed, 12 Dec 2012 14:32:18 +0000 (14:32 +0000)]
[sanitizer] add OnMap/OnUmap callbacks to the allocator interface

llvm-svn: 169985

11 years agoImprove debug info generated with enabled AddressSanitizer.
Alexey Samsonov [Wed, 12 Dec 2012 14:31:53 +0000 (14:31 +0000)]
Improve debug info generated with enabled AddressSanitizer.

When ASan replaces <alloca instruction> with
<offset into a common large alloca>, it should also patch
llvm.dbg.declare calls and replace debug info descriptors to mark
that we've replaced alloca with a value that stores an address
of the user variable, not the user variable itself.

See PR11818 for more context.

llvm-svn: 169984

11 years agoInitial commit for cpp11-migrate tool
Edwin Vane [Wed, 12 Dec 2012 14:30:57 +0000 (14:30 +0000)]
Initial commit for cpp11-migrate tool

- Added directory structures and build system files for the new tool.
- Extremely basic implementation of tool performs only an initial syntax check.
- Basic tests ensure syntax test works as expected.

llvm-svn: 169983

11 years ago[tsan] fix cmake build
Kostya Serebryany [Wed, 12 Dec 2012 14:26:06 +0000 (14:26 +0000)]
[tsan] fix cmake build

llvm-svn: 169982

11 years agoDocumentation: use a 'console' highlighter for terminal output examples. This
Dmitri Gribenko [Wed, 12 Dec 2012 14:23:14 +0000 (14:23 +0000)]
Documentation: use a 'console' highlighter for terminal output examples.  This
gives a nicer output than 'bash'.

llvm-svn: 169981

11 years agoPR14581: Make SourceLocation::printToString work, or it will always return an empty...
Benjamin Kramer [Wed, 12 Dec 2012 14:17:17 +0000 (14:17 +0000)]
PR14581: Make SourceLocation::printToString work, or it will always return an empty string.

No test case, this is debugging code.

llvm-svn: 169980

11 years agoDocumentation: use a 'console' highlighter for terminal output examples. This
Dmitri Gribenko [Wed, 12 Dec 2012 13:56:37 +0000 (13:56 +0000)]
Documentation: use a 'console' highlighter for terminal output examples.  This
gives a nicer output than 'bash'.

llvm-svn: 169979

11 years agollvm/test/CodeGen/X86/atom-bypass-slow-division.ll: Fix possible typo(s) in CHECK...
NAKAMURA Takumi [Wed, 12 Dec 2012 13:34:20 +0000 (13:34 +0000)]
llvm/test/CodeGen/X86/atom-bypass-slow-division.ll: Fix possible typo(s) in CHECK-NOT lines.

Found by Alexander Zinenko, thanks!

llvm-svn: 169978

11 years agollvm/test/CodeGen/X86/atom-bypass-slow-division.ll: Rename symbols, s/test_/Test...
NAKAMURA Takumi [Wed, 12 Dec 2012 13:34:14 +0000 (13:34 +0000)]
llvm/test/CodeGen/X86/atom-bypass-slow-division.ll: Rename symbols, s/test_/Test/g, not to mismatch "CHECK(-NOT): test".

llvm-svn: 169977

11 years agoSpeeds up parsing of global declarations in cases where the warning
Manuel Klimek [Wed, 12 Dec 2012 13:26:54 +0000 (13:26 +0000)]
Speeds up parsing of global declarations in cases where the warning
is switched of by about 0.8% (tested with int i<N>).

Additionally, this puts computing the diagnostic class into the hot
path more when parsing, in preparation for upcoming optimizations
in this area.

llvm-svn: 169976

11 years agotsan: explain why pthread_cond_init() interceptor is commented out
Dmitry Vyukov [Wed, 12 Dec 2012 13:11:44 +0000 (13:11 +0000)]
tsan: explain why pthread_cond_init() interceptor is commented out

llvm-svn: 169975

11 years ago[ASan] Enhance OOB tests to check for access type (read or write).
Alexander Potapenko [Wed, 12 Dec 2012 12:59:47 +0000 (12:59 +0000)]
[ASan] Enhance OOB tests to check for access type (read or write).

llvm-svn: 169974

11 years agotsan: add comment to tsan_fd.h file
Dmitry Vyukov [Wed, 12 Dec 2012 12:45:07 +0000 (12:45 +0000)]
tsan: add comment to tsan_fd.h file

llvm-svn: 169973

11 years ago[ASan] Fixed a compiler warning.
Alexander Potapenko [Wed, 12 Dec 2012 12:32:57 +0000 (12:32 +0000)]
[ASan] Fixed a compiler warning.

llvm-svn: 169972

11 years agotsan: add missing files
Dmitry Vyukov [Wed, 12 Dec 2012 12:27:00 +0000 (12:27 +0000)]
tsan: add missing files

llvm-svn: 169971

11 years agotsan: more precise handling of IO synchronization
Dmitry Vyukov [Wed, 12 Dec 2012 11:59:30 +0000 (11:59 +0000)]
tsan: more precise handling of IO synchronization

llvm-svn: 169970

11 years ago[ASan] fix compilation on Mac.
Alexander Potapenko [Wed, 12 Dec 2012 11:52:26 +0000 (11:52 +0000)]
[ASan] fix compilation on Mac.

llvm-svn: 169969

11 years ago[asan] fix android build and lint
Kostya Serebryany [Wed, 12 Dec 2012 11:37:23 +0000 (11:37 +0000)]
[asan] fix android build and lint

llvm-svn: 169968

11 years ago[msan] Remove an extra semicolon.
Evgeniy Stepanov [Wed, 12 Dec 2012 10:50:48 +0000 (10:50 +0000)]
[msan] Remove an extra semicolon.

llvm-svn: 169967

11 years ago[asan] add sanitizer_common/sanitizer_common_interceptors.h with pread/pread64/read...
Kostya Serebryany [Wed, 12 Dec 2012 09:54:35 +0000 (09:54 +0000)]
[asan] add sanitizer_common/sanitizer_common_interceptors.h with pread/pread64/read interceptors. Use it in asan. Add asan tests for pread/etc. Add FIXME to tsan/msan interceptors

llvm-svn: 169966

11 years agoAdd ARM NONE and PREL31 relocation types.
Logan Chien [Wed, 12 Dec 2012 07:14:46 +0000 (07:14 +0000)]
Add ARM NONE and PREL31 relocation types.

Add R_ARM_NONE and R_ARM_PREL31 relocation types
to MCExpr.  Both of them will be used while
generating .ARM.extab and .ARM.exidx sections.

llvm-svn: 169965

11 years agoclang/lib/Driver/Driver.cpp: Split COMPILER_PATH according to llvm::sys::PathSeparato...
NAKAMURA Takumi [Wed, 12 Dec 2012 06:22:22 +0000 (06:22 +0000)]
clang/lib/Driver/Driver.cpp: Split COMPILER_PATH according to llvm::sys::PathSeparator, that is ';' in Win32 hosts.

Thanks to Bogon Kim!

llvm-svn: 169964

11 years agoRemove some dead code.
Rafael Espindola [Wed, 12 Dec 2012 06:18:15 +0000 (06:18 +0000)]
Remove some dead code.

llvm-svn: 169963

11 years ago[CMake] Fixup R600.
NAKAMURA Takumi [Wed, 12 Dec 2012 03:34:26 +0000 (03:34 +0000)]
[CMake] Fixup R600.

llvm-svn: 169962

11 years agoOption changes:
Enrico Granata [Wed, 12 Dec 2012 03:23:37 +0000 (03:23 +0000)]
Option changes:
the option to print the runtime-specific description has been modified in the frame variable, memory read and expression command.

All three commands now support a --object-description option, with a shortcut of -O (uppercase letter o)

This is a breaking change:
frame variable used --objc as the long option name
expression used -o as a shortcut
memory read uses --objd as the long option name

Hopefully, most users won't be affected by the change since people tend to access "expression --object-description" under the alias "po" which still works

The test suite has been tweaked accordingly.

llvm-svn: 169961

11 years agoDon't warn about disabled macro expansion if we see the name of a function-like macro...
Richard Smith [Wed, 12 Dec 2012 02:46:14 +0000 (02:46 +0000)]
Don't warn about disabled macro expansion if we see the name of a function-like macro which isn't immediately followed by '('. FreeBSD's stdio.h #defines foo(x) to (foo)(x), apparently.

llvm-svn: 169960

11 years agoSorry about the churn. One more change to getOptimalMemOpType() hook. Did I
Evan Cheng [Wed, 12 Dec 2012 02:34:41 +0000 (02:34 +0000)]
Sorry about the churn. One more change to getOptimalMemOpType() hook. Did I
mention the inline memcpy / memset expansion code is a mess?

This patch split the ZeroOrLdSrc argument into two: IsMemset and ZeroMemset.
The first indicates whether it is expanding a memset or a memcpy / memmove.
The later is whether the memset is a memset of zero. It's totally possible
(likely even) that targets may want to do different things for memcpy and
memset of zero.

llvm-svn: 169959

11 years agoAdd a LOG_TARGET log to Target::SetDefaultArchitecture
Jason Molenda [Wed, 12 Dec 2012 02:23:56 +0000 (02:23 +0000)]
Add a LOG_TARGET log to Target::SetDefaultArchitecture
to track any architecture setting there.

llvm-svn: 169958

11 years agollvm/test/CodeGen/X86/store_op_load_fold.ll: Fix typo, s/CHECK_NEXT/CHECK-NEXT/
NAKAMURA Takumi [Wed, 12 Dec 2012 01:41:01 +0000 (01:41 +0000)]
llvm/test/CodeGen/X86/store_op_load_fold.ll: Fix typo, s/CHECK_NEXT/CHECK-NEXT/

llvm-svn: 169957

11 years agollvm/test/CodeGen/X86/store_op_load_fold.ll: Add explicit triple.
NAKAMURA Takumi [Wed, 12 Dec 2012 01:40:56 +0000 (01:40 +0000)]
llvm/test/CodeGen/X86/store_op_load_fold.ll: Add explicit triple.

llvm-svn: 169956

11 years agoFix the ascii drawing that was ruined when I split the H and CPP
Nadav Rotem [Wed, 12 Dec 2012 01:33:47 +0000 (01:33 +0000)]
Fix the ascii drawing that was ruined when I split the H and CPP

llvm-svn: 169955

11 years ago- Rename isLegalMemOpType to isSafeMemOpType. "Legal" is a very overloade term.
Evan Cheng [Wed, 12 Dec 2012 01:32:07 +0000 (01:32 +0000)]
- Rename isLegalMemOpType to isSafeMemOpType. "Legal" is a very overloade term.
Also added more comments to explain why it is generally ok to return true.
- Rename getOptimalMemOpType argument IsZeroVal to ZeroOrLdSrc. It's meant to
be true for loaded source (memcpy) or zero constants (memset). The poor name
choice is probably some kind of legacy issue.

llvm-svn: 169954

11 years agofix a typo.
Nadav Rotem [Wed, 12 Dec 2012 01:31:10 +0000 (01:31 +0000)]
fix a typo.

llvm-svn: 169953

11 years ago<rdar://problem/12780507>
Greg Clayton [Wed, 12 Dec 2012 01:15:30 +0000 (01:15 +0000)]
<rdar://problem/12780507>

Fix add-dsym ("target symbols add") to correctly add a dSYM file when the target arch doesn't match the arch of the module.

llvm-svn: 169952

11 years agoDAGCombine: clamp hi bit in APInt::getBitsSet to avoid assertion
Manman Ren [Wed, 12 Dec 2012 01:13:50 +0000 (01:13 +0000)]
DAGCombine: clamp hi bit in APInt::getBitsSet to avoid assertion

rdar://12838504

llvm-svn: 169951

11 years agoLoopVectorizer: When -Os is used, vectorize only loops that dont require a tail loop...
Nadav Rotem [Wed, 12 Dec 2012 01:11:46 +0000 (01:11 +0000)]
LoopVectorizer: When -Os is used, vectorize only loops that dont require a tail loop. There is no testcase because I dont know of a way to initialize the loop vectorizer pass without adding an additional hidden flag.

llvm-svn: 169950

11 years ago[libclang] Make sure tokens from preprocessor directives are annotated as such,
Argyrios Kyrtzidis [Wed, 12 Dec 2012 01:05:25 +0000 (01:05 +0000)]
[libclang] Make sure tokens from preprocessor directives are annotated as such,
even if the directive is inside a declaration.

Fixes rdar://11548788 & http://llvm.org/PR12970

llvm-svn: 169949

11 years agoFix line ending is tests. No functional change.
Richard Trieu [Wed, 12 Dec 2012 00:52:15 +0000 (00:52 +0000)]
Fix line ending is tests.  No functional change.

llvm-svn: 169947

11 years agoclang/test: Suppress two tests on win32 for now, since, not sure, in r169829 to r169831.
NAKAMURA Takumi [Wed, 12 Dec 2012 00:51:38 +0000 (00:51 +0000)]
clang/test: Suppress two tests on win32 for now, since, not sure, in r169829 to r169831.

"ansi-escape-sequences" is easy convenient to exclude win32. Please be patient.

llvm-svn: 169945

11 years agoAvoid using lossy load / stores for memcpy / memset expansion. e.g.
Evan Cheng [Wed, 12 Dec 2012 00:42:09 +0000 (00:42 +0000)]
Avoid using lossy load / stores for memcpy / memset expansion. e.g.
f64 load / store on non-SSE2 x86 targets.

llvm-svn: 169944

11 years agoHave SimplifyBinOp call the new FAdd/FSub/FMul helpers, with fast-math flags off
Michael Ilseman [Wed, 12 Dec 2012 00:29:16 +0000 (00:29 +0000)]
Have SimplifyBinOp call the new FAdd/FSub/FMul helpers, with fast-math flags off

llvm-svn: 169943

11 years ago- Fix a problematic way in creating all-the-1 APInt.
Shuxin Yang [Wed, 12 Dec 2012 00:29:03 +0000 (00:29 +0000)]
- Fix a problematic way in creating all-the-1 APInt.
- Propagate "exact" bit of [l|a]shr instruction.

llvm-svn: 169942

11 years agoRemove redunant optimizations from InstCombine, instead call the appropriate function...
Michael Ilseman [Wed, 12 Dec 2012 00:28:32 +0000 (00:28 +0000)]
Remove redunant optimizations from InstCombine, instead call the appropriate functions from SimplifyInstruction

llvm-svn: 169941

11 years agoAdded a slew of SimplifyInstruction floating-point optimizations, many of which take...
Michael Ilseman [Wed, 12 Dec 2012 00:27:46 +0000 (00:27 +0000)]
Added a slew of SimplifyInstruction floating-point optimizations, many of which take advantage of fast-math flags. Test cases included.

  fsub X, +0 ==> X
  fsub X, -0 ==> X, when we know X is not -0
  fsub +/-0.0, (fsub -0.0, X) ==> X
  fsub nsz +/-0.0, (fsub +/-0.0, X) ==> X
  fsub nnan ninf X, X ==> 0.0
  fadd nsz X, 0 ==> X
  fadd [nnan ninf] X, (fsub [nnan ninf] 0, X) ==> 0
    where nnan and ninf have to occur at least once somewhere in this expression
  fmul X, 1.0 ==> X

llvm-svn: 169940

11 years agoPattern matchers for floating point values
Michael Ilseman [Wed, 12 Dec 2012 00:23:43 +0000 (00:23 +0000)]
Pattern matchers for floating point values

m_ConstantFP - match and bind a float constant
m_SpecificConstantFP - match a specific floating point value or vector of floats of that value
m_FPOne - match a floating point 1.0 or vector of 1.0s
m_NegZero - match -0.0
m_AnyZero - match 0 or -0.0

llvm-svn: 169939

11 years agoRemove FIXMEs surrounding Constant[Data]Vectors, instead
Michael Ilseman [Wed, 12 Dec 2012 00:21:43 +0000 (00:21 +0000)]
Remove FIXMEs surrounding Constant[Data]Vectors, instead

llvm-svn: 169938

11 years agoTrim unneeded header #include.
Jim Grosbach [Tue, 11 Dec 2012 23:39:51 +0000 (23:39 +0000)]
Trim unneeded header #include.

llvm-svn: 169933

11 years agoDocumentation: cleanup: remove useless anchors and write :ref:s explicitly.
Dmitri Gribenko [Tue, 11 Dec 2012 23:35:23 +0000 (23:35 +0000)]
Documentation: cleanup: remove useless anchors and write :ref:s explicitly.

llvm-svn: 169932

11 years agoARM: Remove old testing option.
Jim Grosbach [Tue, 11 Dec 2012 23:31:12 +0000 (23:31 +0000)]
ARM: Remove old testing option.

Pre-regalloc frame allocation and referencing has been on by default
for ages. No need for the testing option that disables it.

llvm-svn: 169931

11 years agoARM: Remove old testing options.
Jim Grosbach [Tue, 11 Dec 2012 23:31:10 +0000 (23:31 +0000)]
ARM: Remove old testing options.

Base pointer referencing has been enabled for ages.

llvm-svn: 169930