platform/upstream/llvm.git
11 years ago<rdar://problem/13459871> Allow forward declaration of enums with a fixed underlying...
Douglas Gregor [Mon, 25 Mar 2013 22:22:35 +0000 (22:22 +0000)]
<rdar://problem/13459871> Allow forward declaration of enums with a fixed underlying type in Objective-C (as well as C++11).

llvm-svn: 177930

11 years agoAdded debug tests for indexing, pop_back and both forms of erase. Added an improved...
Howard Hinnant [Mon, 25 Mar 2013 22:12:26 +0000 (22:12 +0000)]
Added debug tests for indexing, pop_back and both forms of erase.  Added an improved error message for erasing a single element with end().

llvm-svn: 177929

11 years agoAdd an optimizer-side test case for ARC bug <rdar://13195034>, fixed
John McCall [Mon, 25 Mar 2013 22:09:52 +0000 (22:09 +0000)]
Add an optimizer-side test case for ARC bug <rdar://13195034>, fixed
in the frontend with @clang.arc.use.

llvm-svn: 177928

11 years agoAdd a GetTid() implementation for Windows
Timur Iskhodzhanov [Mon, 25 Mar 2013 22:04:29 +0000 (22:04 +0000)]
Add a GetTid() implementation for Windows

llvm-svn: 177927

11 years agoFix the buildbot so a LLDB test doesn't fail looking for "<invalid usage of pointer...
Greg Clayton [Mon, 25 Mar 2013 22:04:11 +0000 (22:04 +0000)]
Fix the buildbot so a LLDB test doesn't fail looking for "<invalid usage of pointer value as object>".

llvm-svn: 177926

11 years agoRemove local path from test.
Douglas Gregor [Mon, 25 Mar 2013 21:52:42 +0000 (21:52 +0000)]
Remove local path from test.

llvm-svn: 177925

11 years agoUse <time.h> rather than <sys/time.h>
Douglas Gregor [Mon, 25 Mar 2013 21:51:16 +0000 (21:51 +0000)]
Use <time.h> rather than <sys/time.h>

llvm-svn: 177924

11 years agoUse xargs rather than
Douglas Gregor [Mon, 25 Mar 2013 21:49:54 +0000 (21:49 +0000)]
Use xargs rather than

llvm-svn: 177923

11 years agoFix a layering violation introduced in r177705.
Matt Beaumont-Gay [Mon, 25 Mar 2013 21:32:02 +0000 (21:32 +0000)]
Fix a layering violation introduced in r177705.

llvm-svn: 177922

11 years agoUse 'touch -t', which both BSD and Linux support.
Douglas Gregor [Mon, 25 Mar 2013 21:27:57 +0000 (21:27 +0000)]
Use 'touch -t', which both BSD and Linux support.

llvm-svn: 177921

11 years agoCouple more sets of tidying.
Eric Christopher [Mon, 25 Mar 2013 21:26:36 +0000 (21:26 +0000)]
Couple more sets of tidying.

llvm-svn: 177920

11 years agoTry harder to be signal-safe inside our signal handler. The most prominent behavioural
Nick Lewycky [Mon, 25 Mar 2013 21:24:30 +0000 (21:24 +0000)]
Try harder to be signal-safe inside our signal handler. The most prominent behavioural
difference is that we no longer clean the token before emitting it. This fixes a bug where
clang hangs in the middle of crashing because the crash handler calls malloc from inside
a crash that happened inside of free.

llvm-svn: 177919

11 years ago<rdar://problem/13434605> Periodically prune the module cache so that it does not...
Douglas Gregor [Mon, 25 Mar 2013 21:19:16 +0000 (21:19 +0000)]
<rdar://problem/13434605> Periodically prune the module cache so that it does not grow forever.

llvm-svn: 177918

11 years agoDisable profiling tests for Hexagon since it doesn't support JIT.
Jyotsna Verma [Mon, 25 Mar 2013 21:15:11 +0000 (21:15 +0000)]
Disable profiling tests for Hexagon since it doesn't support JIT.

llvm-svn: 177917

11 years agoCorrect indentation. No functionality change.
Nick Lewycky [Mon, 25 Mar 2013 21:10:14 +0000 (21:10 +0000)]
Correct indentation. No functionality change.

llvm-svn: 177916

11 years agoEmit an error message instead of crashing when dereferencing an incomplete pointer...
Bill Wendling [Mon, 25 Mar 2013 21:09:49 +0000 (21:09 +0000)]
Emit an error message instead of crashing when dereferencing an incomplete pointer type.

If the ASM statement is dereferencing an incomplete pointer type, issue an error
instead of crashing.
<rdar://problem/12700799>

llvm-svn: 177915

11 years agollvm/test/CodeGen/X86/atomic{32|64}.ll: Unmark them out of XFAIL:win32.
NAKAMURA Takumi [Mon, 25 Mar 2013 21:07:53 +0000 (21:07 +0000)]
llvm/test/CodeGen/X86/atomic{32|64}.ll: Unmark them out of XFAIL:win32.

I know it is incorrect and they'd fail with +Asserts for win32 targets, though.
I'll try to fix them tonight.

llvm-svn: 177914

11 years ago<rdar://problem/13498879>
Greg Clayton [Mon, 25 Mar 2013 21:06:13 +0000 (21:06 +0000)]
<rdar://problem/13498879>

C String summary is emitting "<invalid usage of pointer value as object>" for bad pointers. Now it doesn't emit anything.

llvm-svn: 177913

11 years agoXFAIL some of the generic CodeGen tests for Hexagon.
Jyotsna Verma [Mon, 25 Mar 2013 21:04:16 +0000 (21:04 +0000)]
XFAIL some of the generic CodeGen tests for Hexagon.

test/CodeGen/Generic/2008-02-20-MatchingMem.ll: Test contains inline assembly not supported by Hexagon.

Following tests are XFAILed due to multiple return values which Hexagon doesn't support.

test/CodeGen/Generic/multiple-return-values-cross-block-with-invoke.ll
test/CodeGen/Generic/select-cc.ll
test/CodeGen/Generic/vector.ll

llvm-svn: 177912

11 years agoIR-gen should not generate an MMX types unless the code is explicitly using MMX
Chad Rosier [Mon, 25 Mar 2013 21:00:27 +0000 (21:00 +0000)]
IR-gen should not generate an MMX types unless the code is explicitly using MMX
intrinsics.
rdar://13213542

llvm-svn: 177911

11 years agoX86DisassemblerDecoder.c: Make this C89-compliant.
NAKAMURA Takumi [Mon, 25 Mar 2013 20:55:49 +0000 (20:55 +0000)]
X86DisassemblerDecoder.c: Make this C89-compliant.

llvm-svn: 177910

11 years agoWhitespace.
NAKAMURA Takumi [Mon, 25 Mar 2013 20:55:43 +0000 (20:55 +0000)]
Whitespace.

llvm-svn: 177909

11 years agoRemove some erroneous code I was using to debug debug mode.
Howard Hinnant [Mon, 25 Mar 2013 20:46:07 +0000 (20:46 +0000)]
Remove some erroneous code I was using to debug debug mode.

llvm-svn: 177908

11 years ago<rdar://problem/13498504>
Han Ming Ong [Mon, 25 Mar 2013 20:44:40 +0000 (20:44 +0000)]
<rdar://problem/13498504>

 Don't hard code vm page size in profiling code

llvm-svn: 177907

11 years agoFix a bug in fast-math fadd/fsub simplification.
Shuxin Yang [Mon, 25 Mar 2013 20:43:41 +0000 (20:43 +0000)]
Fix a bug in fast-math fadd/fsub simplification.

The problem is that the code mistakenly took for granted that following constructor
is able to create an APFloat from a *SIGNED* integer:

  APFloat::APFloat(const fltSemantics &ourSemantics, integerPart value)

rdar://13486998

llvm-svn: 177906

11 years ago[analyzer] Set concrete offset bindings to UnknownVal when processing symbolic offset...
Anna Zaks [Mon, 25 Mar 2013 20:43:24 +0000 (20:43 +0000)]
[analyzer] Set concrete offset bindings to UnknownVal when processing symbolic offset binding, even if no bindings are present.

This addresses an undefined value false positive from concreteOffsetBindingIsInvalidatedBySymbolicOffsetAssignment.

Fixes PR14877; radar://12991168.

llvm-svn: 177905

11 years agoDebug mode tests for vector::front and back.
Howard Hinnant [Mon, 25 Mar 2013 20:31:25 +0000 (20:31 +0000)]
Debug mode tests for vector::front and back.

llvm-svn: 177904

11 years ago[ELF] dont compute symbolname size in every loop
Shankar Easwaran [Mon, 25 Mar 2013 20:26:47 +0000 (20:26 +0000)]
[ELF] dont compute symbolname size in every loop

llvm-svn: 177903

11 years agoXFAIL DebugInfo tests for Hexagon.
Jyotsna Verma [Mon, 25 Mar 2013 20:20:34 +0000 (20:20 +0000)]
XFAIL DebugInfo tests for Hexagon.

Hexagon does not support -filetype=obj(direct object generation) flag. Therefore,
the following tests are being XFAILed:

test/DebugInfo/dwarf-public-names.ll
test/DebugInfo/member-pointers.ll
test/DebugInfo/two-cus-from-same-file.ll

llvm-svn: 177901

11 years ago<rdar://problem/13404009>
Han Ming Ong [Mon, 25 Mar 2013 20:11:18 +0000 (20:11 +0000)]
<rdar://problem/13404009>

Only get the attach_info's user ID if the supplied user info is invalid.

llvm-svn: 177900

11 years agoFix comment.
Akira Hatanaka [Mon, 25 Mar 2013 20:11:16 +0000 (20:11 +0000)]
Fix comment.

llvm-svn: 177899

11 years agoFormatting.
Eric Christopher [Mon, 25 Mar 2013 20:05:35 +0000 (20:05 +0000)]
Formatting.

llvm-svn: 177898

11 years agoMore vector::iterator debug mode tests. Run by adding to OPTIONS -D_LIBCPP_DEBUG2=1.
Howard Hinnant [Mon, 25 Mar 2013 20:03:19 +0000 (20:03 +0000)]
More vector::iterator debug mode tests.  Run by adding to OPTIONS -D_LIBCPP_DEBUG2=1.

llvm-svn: 177897

11 years agoDisable Execution Engine tests not supported by Hexagon.
Jyotsna Verma [Mon, 25 Mar 2013 20:02:14 +0000 (20:02 +0000)]
Disable Execution Engine tests not supported by Hexagon.

llvm-svn: 177896

11 years agoreflect comment to the official reference
Shankar Easwaran [Mon, 25 Mar 2013 19:50:40 +0000 (19:50 +0000)]
reflect comment to the official reference

llvm-svn: 177895

11 years agoDisable, for now, llvm/test/Transforms/GCOVProfiling on win32. I'll investigate them...
NAKAMURA Takumi [Mon, 25 Mar 2013 19:47:20 +0000 (19:47 +0000)]
Disable, for now, llvm/test/Transforms/GCOVProfiling on win32. I'll investigate them later.

llvm-svn: 177894

11 years ago<rdar://problem/13365424>
Enrico Granata [Mon, 25 Mar 2013 19:46:48 +0000 (19:46 +0000)]
<rdar://problem/13365424>

Ensure that option -Y also works for expression as it does for frame variable
Also, if the user passes an explicit format specifier when printing a variable, override the summary's decision to hide the value.

This is required for scenarios like this to work:
(lldb) p/x c
(Class) $0 = 0x0000000100adb7f8 NSObject

Previously this would say:
(lldb) p/x c
(Class) $0 = NSObject

ignoring the explicit format specifier

llvm-svn: 177893

11 years agoDebug mode: learning to crawl. I need to set up some tests that actually test that...
Howard Hinnant [Mon, 25 Mar 2013 19:29:35 +0000 (19:29 +0000)]
Debug mode: learning to crawl.  I need to set up some tests that actually test that the debug mode is working, but that won't cause problems when debug mode isn't on.  This is my first prototype of such a test.  It should call std::terminate() because it's comparing iterators from different containers.  And std::terminate() is rigged up to exit normally.  If debug mode fails, and doesn't call terminate, then the program asserts.  The test is a no-op if _LIBCPP_DEBUG2 is not defined or is defined to be 0.

llvm-svn: 177892

11 years agoAdding a failing test case for cpp11-migrate's Loop Convert Transform
Edwin Vane [Mon, 25 Mar 2013 19:24:24 +0000 (19:24 +0000)]
Adding a failing test case for cpp11-migrate's Loop Convert Transform

Related to PR15589.

llvm-svn: 177891

11 years agoUse direct types in PowerPC instruction patterns.
Ulrich Weigand [Mon, 25 Mar 2013 19:05:30 +0000 (19:05 +0000)]
Use direct types in PowerPC instruction patterns.

This commit updates the PowerPC back-end (PPCInstrInfo.td and
PPCInstr64Bit.td) to use types instead of register classes in
instruction patterns, along the lines of Jakob Stoklund Olesen's
changes in r177835 for Sparc.

llvm-svn: 177890

11 years agoUse direct types in PowerPC Pat patterns.
Ulrich Weigand [Mon, 25 Mar 2013 19:04:58 +0000 (19:04 +0000)]
Use direct types in PowerPC Pat patterns.

This commit updates the PowerPC back-end (PPCInstrInfo.td and
PPCInstr64Bit.td) to use types instead of register classes in
Pat patterns, along the lines of Jakob Stoklund Olesen's
changes in r177829 for Sparc.

llvm-svn: 177889

11 years agox86 -- add the XTEST instruction
Dave Zarzycki [Mon, 25 Mar 2013 18:59:43 +0000 (18:59 +0000)]
x86 -- add the XTEST instruction

llvm-svn: 177888

11 years agox86 -- disassemble the REP/REPNE prefix when needed
Dave Zarzycki [Mon, 25 Mar 2013 18:59:38 +0000 (18:59 +0000)]
x86 -- disassemble the REP/REPNE prefix when needed

This fixes Apple bug: 13493622

llvm-svn: 177887

11 years agoAdded PR number for failing win64 tests.
Fariborz Jahanian [Mon, 25 Mar 2013 18:56:45 +0000 (18:56 +0000)]
Added PR number for failing win64 tests.

llvm-svn: 177886

11 years ago<rdar://problem/13434476>
Enrico Granata [Mon, 25 Mar 2013 18:53:07 +0000 (18:53 +0000)]
<rdar://problem/13434476>

Making value objects properly iterable in constructs of the form
[ x for x in value_with_children ]

This would previously cause an endless loop because lacking a proper iterator object, Python will keep calling __getitem__() with increasing values of the index until it gets an IndexError
since SBValue::GetValueForExpressionPath() supports synthetic array members, no array index will ever really cause an IndexError to be raised, hence the endless iteration

class value_iter is an implementation of __iter__() that provides a terminating iterator over a value

llvm-svn: 177885

11 years agoRemove unnecessary attributes from test case.
Chad Rosier [Mon, 25 Mar 2013 18:36:19 +0000 (18:36 +0000)]
Remove unnecessary attributes from test case.

llvm-svn: 177882

11 years agoFixed a potential crash if layout for a structure
Sean Callanan [Mon, 25 Mar 2013 18:27:07 +0000 (18:27 +0000)]
Fixed a potential crash if layout for a structure
went wrong and we tried to get layout information
that wasn't there.

<rdar://problem/13490170>

llvm-svn: 177880

11 years agoThese test cases fail on the buildbot - skip on Linux for now, will figure out why
Enrico Granata [Mon, 25 Mar 2013 17:51:58 +0000 (17:51 +0000)]
These test cases fail on the buildbot - skip on Linux for now, will figure out why

llvm-svn: 177879

11 years agoRemove assert. There may be target-dependent attributes left.
Bill Wendling [Mon, 25 Mar 2013 17:42:20 +0000 (17:42 +0000)]
Remove assert. There may be target-dependent attributes left.

llvm-svn: 177878

11 years ago- Masking out SBCommandReturnObject::Printf() from the Python layer because SWIG...
Enrico Granata [Mon, 25 Mar 2013 17:37:39 +0000 (17:37 +0000)]
- Masking out SBCommandReturnObject::Printf() from the Python layer because SWIG and varargs do not get along well.
It is replaced by a Print("str") call which is equivalent to Printf("%s","str")
- Providing file-like behavior for SBStream with appropriate extension write() and flush() calls, plus documenting that these are only meant and only exist for Python
Documenting the file-like behavior on our website

llvm-svn: 177877

11 years agoDocumentation: Replace dead link for binfmt_misc
Dmitri Gribenko [Mon, 25 Mar 2013 17:08:25 +0000 (17:08 +0000)]
Documentation: Replace dead link for binfmt_misc

Patch by Thomas Schwinge.

llvm-svn: 177876

11 years ago[ELF] fix dynamic symbol table entries and update tests
Shankar Easwaran [Mon, 25 Mar 2013 16:41:14 +0000 (16:41 +0000)]
[ELF] fix dynamic symbol table entries and update tests

llvm-svn: 177875

11 years ago[arm load/store optimizer] When trying to merge a base update load/store, make
Chad Rosier [Mon, 25 Mar 2013 16:29:20 +0000 (16:29 +0000)]
[arm load/store optimizer] When trying to merge a base update load/store, make
sure the base register and would-be writeback register don't conflict for
stores.  This was already being done for loads.

Unfortunately, it is rather difficult to create a test case for this issue.  It
was exposed in 450.soplex at LTO and requires unlucky register allocation.
<rdar://13394908>

llvm-svn: 177874

11 years ago[tools][llvm-readobj] print the name of the section when iterating the symbol table...
Shankar Easwaran [Mon, 25 Mar 2013 16:06:51 +0000 (16:06 +0000)]
[tools][llvm-readobj] print the name of the section when iterating the symbol table / dynamic symbol table

llvm-svn: 177873

11 years ago[ELF] add elf_hash function to compute the hash value of a symbol in the dynamic...
Shankar Easwaran [Mon, 25 Mar 2013 16:02:10 +0000 (16:02 +0000)]
[ELF] add elf_hash function to compute the hash value of a symbol in the dynamic symbol table

llvm-svn: 177872

11 years agoAdding clang-headers as dependency of cpp11-migrate
Edwin Vane [Mon, 25 Mar 2013 15:19:43 +0000 (15:19 +0000)]
Adding clang-headers as dependency of cpp11-migrate

Fix build dependency. Now can say 'make cpp11-migrate' (with cmake anyway) from
a clean build and result will be usable.

Author: Ariel J Bernal <ariel.j.bernal@intel.com>
llvm-svn: 177871

11 years agoAdd basic support for building profile compiler-rt library in CMake build on Darwin
Alexey Samsonov [Mon, 25 Mar 2013 14:20:11 +0000 (14:20 +0000)]
Add basic support for building profile compiler-rt library in CMake build on Darwin

llvm-svn: 177870

11 years agoTeach cmake about the new Erlang GC files.
Duncan Sands [Mon, 25 Mar 2013 14:12:21 +0000 (14:12 +0000)]
Teach cmake about the new Erlang GC files.

llvm-svn: 177869

11 years ago[ASan] Use dynamic symbol table when checking exported ASan runtime symbols
Alexey Samsonov [Mon, 25 Mar 2013 13:47:53 +0000 (13:47 +0000)]
[ASan] Use dynamic symbol table when checking exported ASan runtime symbols

llvm-svn: 177868

11 years agoAdd a GC plugin for Erlang
Yiannis Tsiouris [Mon, 25 Mar 2013 13:47:46 +0000 (13:47 +0000)]
Add a GC plugin for Erlang

llvm-svn: 177867

11 years agoDon't use add_llvm_definitions for adding warning flags. It makes it too hard
Duncan Sands [Mon, 25 Mar 2013 13:25:34 +0000 (13:25 +0000)]
Don't use add_llvm_definitions for adding warning flags.  It makes it too hard
to have them appear in the right order.  Instead append all warnings explicitly
to the language flags.  This was already the case for many warnings.  Fixes the
issue of -Wno-maybe-uninitialized not being effective because -Wall was being
placed after it rather than before.

llvm-svn: 177866

11 years agoRefine fenv.h handling: check if the desired macros exist, before using
Joerg Sonnenberger [Mon, 25 Mar 2013 13:13:33 +0000 (13:13 +0000)]
Refine fenv.h handling: check if the desired macros exist, before using
it. NetBSD/ARM and TILE-Gx are examples for platforms that have an
unusable fenv.h and this avoids the need for a blacklist.

llvm-svn: 177865

11 years agoasan/tsan: add Printf/Report hook
Dmitry Vyukov [Mon, 25 Mar 2013 12:58:09 +0000 (12:58 +0000)]
asan/tsan: add Printf/Report hook
The hook can be overriden in frontend to print to e.g. a file.

llvm-svn: 177864

11 years agoAddress issues found by Duncan during post-commit review of r177856.
Arnaud A. de Grandmaison [Mon, 25 Mar 2013 11:47:38 +0000 (11:47 +0000)]
Address issues found by Duncan during post-commit review of r177856.

llvm-svn: 177863

11 years ago[ASan] mark local function as static
Alexey Samsonov [Mon, 25 Mar 2013 11:38:42 +0000 (11:38 +0000)]
[ASan] mark local function as static

llvm-svn: 177862

11 years ago[Sanitizer] Compile sanitizer runtimes with -Wno-non-virtual-dtor. Virtual dtors...
Alexey Samsonov [Mon, 25 Mar 2013 10:31:49 +0000 (10:31 +0000)]
[Sanitizer] Compile sanitizer runtimes with -Wno-non-virtual-dtor. Virtual dtors may be a problem for us, as sanitizer runtime should not generally assume libstdc++ presence.

llvm-svn: 177860

11 years ago[TSan] Build TSan unit tests with the same compile flags as TSan runtime
Alexey Samsonov [Mon, 25 Mar 2013 10:23:20 +0000 (10:23 +0000)]
[TSan] Build TSan unit tests with the same compile flags as TSan runtime

llvm-svn: 177859

11 years agotsan: intercept setjmp/longjmp
Dmitry Vyukov [Mon, 25 Mar 2013 10:10:44 +0000 (10:10 +0000)]
tsan: intercept setjmp/longjmp

llvm-svn: 177858

11 years agotsan: add SetEnv() function that can be used in frontends
Dmitry Vyukov [Mon, 25 Mar 2013 09:56:45 +0000 (09:56 +0000)]
tsan: add SetEnv() function that can be used in frontends

llvm-svn: 177857

11 years agoInstCombine: simplify comparisons to zero of (shl %x, Cst) or (mul %x, Cst)
Arnaud A. de Grandmaison [Mon, 25 Mar 2013 09:48:49 +0000 (09:48 +0000)]
InstCombine: simplify comparisons to zero of (shl %x, Cst) or (mul %x, Cst)

This simplification happens at 2 places :
 - using the nsw attribute when the shl / mul is used by a sign test
 - when the shl / mul is compared for (in)equality to zero

llvm-svn: 177856

11 years agoChanged isNullOrUndef => IsNullOrUndef and isNoopInstruction => IsNoopInstruction...
Michael Gottesman [Mon, 25 Mar 2013 09:27:43 +0000 (09:27 +0000)]
Changed isNullOrUndef => IsNullOrUndef and isNoopInstruction => IsNoopInstruction so that all helper functions are named similarly in ObjCARC.h.

llvm-svn: 177855

11 years ago[Sanitizer] First effort to implement atomic_compare_exchange for 1-byte vars on...
Alexey Samsonov [Mon, 25 Mar 2013 09:23:30 +0000 (09:23 +0000)]
[Sanitizer] First effort to implement atomic_compare_exchange for 1-byte vars on Windows

llvm-svn: 177854

11 years agoRe-add clang-format tests to clang/test.
Daniel Jasper [Mon, 25 Mar 2013 09:14:25 +0000 (09:14 +0000)]
Re-add clang-format tests to clang/test.

Also now use -strict-whitespace as the tests are confusing otherwise.

llvm-svn: 177853

11 years agoRemove clang-format tests from tools/extra.
Daniel Jasper [Mon, 25 Mar 2013 09:14:14 +0000 (09:14 +0000)]
Remove clang-format tests from tools/extra.

These will be re-added to clang/test.

llvm-svn: 177852

11 years ago[Sanitizer] Add basic test for atomic_compare_exchange implementation
Alexey Samsonov [Mon, 25 Mar 2013 08:48:16 +0000 (08:48 +0000)]
[Sanitizer] Add basic test for atomic_compare_exchange implementation

llvm-svn: 177851

11 years ago[analyzer] Adds cplusplus.NewDelete checker that check for memory leaks, double free...
Anton Yartsev [Mon, 25 Mar 2013 01:35:45 +0000 (01:35 +0000)]
[analyzer] Adds cplusplus.NewDelete checker that check for memory leaks, double free, and use-after-free problems of memory managed by new/delete.

llvm-svn: 177849

11 years agoMention the new TableGen pattern format in the release notes.
Jakob Stoklund Olesen [Mon, 25 Mar 2013 00:36:53 +0000 (00:36 +0000)]
Mention the new TableGen pattern format in the release notes.

Make threats about removing the old syntax.

llvm-svn: 177848

11 years ago[NVPTX] Fix handling of vector arguments
Justin Holewinski [Sun, 24 Mar 2013 21:17:47 +0000 (21:17 +0000)]
[NVPTX] Fix handling of vector arguments

llvm-svn: 177847

11 years ago[analyzer] Teach ConstraintManager to ignore NonLoc <> NonLoc comparisons.
Jordan Rose [Sun, 24 Mar 2013 20:25:22 +0000 (20:25 +0000)]
[analyzer] Teach ConstraintManager to ignore NonLoc <> NonLoc comparisons.

These aren't generated by default, but they are needed when either side of
the comparison is tainted.

Should fix our internal buildbot.

llvm-svn: 177846

11 years agoClean up Sparc patterns.
Jakob Stoklund Olesen [Sun, 24 Mar 2013 19:37:04 +0000 (19:37 +0000)]
Clean up Sparc patterns.

The types of register variables no longer need to be specified in output
patterns.

llvm-svn: 177845

11 years agoAllow types to be omitted in output patterns.
Jakob Stoklund Olesen [Sun, 24 Mar 2013 19:37:00 +0000 (19:37 +0000)]
Allow types to be omitted in output patterns.

This syntax is now preferred:

  def : Pat<(subc i32:$b, i32:$c), (SUBCCrr $b, $c)>;

There is no reason to repeat the types in the output pattern.

llvm-svn: 177844

11 years agoAllow TableGen DAG arguments to be just a name.
Jakob Stoklund Olesen [Sun, 24 Mar 2013 19:36:51 +0000 (19:36 +0000)]
Allow TableGen DAG arguments to be just a name.

DAG arguments can optionally be named:

  (dag node, node:$name)

With this change, the node is also optional:

  (dag node, node:$name, $name)

The missing node is treated as an UnsetInit, so the above is equivalent
to:

  (dag node, node:$name, ?:$name)

This syntax is useful in output patterns where we currently require the
types of variables to be repeated:

  def : Pat<(subc i32:$b, i32:$c), (SUBCCrr i32:$b, i32:$c)>;

This is preferable:

  def : Pat<(subc i32:$b, i32:$c), (SUBCCrr $b, $c)>;

llvm-svn: 177843

11 years agoSimplify code. No functionality change.
Benjamin Kramer [Sun, 24 Mar 2013 16:04:55 +0000 (16:04 +0000)]
Simplify code. No functionality change.

llvm-svn: 177842

11 years agoGettingStarted: Add Git clone instructions for compiler-rt and test-suite
Tobias Grosser [Sun, 24 Mar 2013 15:15:19 +0000 (15:15 +0000)]
GettingStarted: Add Git clone instructions for compiler-rt and test-suite

Contributed-by: Thomas Schwinge <thomas@codesourcery.com>
llvm-svn: 177841

11 years agoReject -no-integrated-as on windows.
Rafael Espindola [Sun, 24 Mar 2013 15:06:53 +0000 (15:06 +0000)]
Reject -no-integrated-as on windows.

llvm-svn: 177840

11 years agoGenerate metadata to implement the -cl-kernel-arg-info option.
Guy Benyei [Sun, 24 Mar 2013 13:58:12 +0000 (13:58 +0000)]
Generate metadata to implement the -cl-kernel-arg-info option.
OpenCL 1.2 spec. 5.7.3.

llvm-svn: 177839

11 years agoDon't actually invoke codegen in driver test.
Benjamin Kramer [Sun, 24 Mar 2013 11:30:15 +0000 (11:30 +0000)]
Don't actually invoke codegen in driver test.

llvm-svn: 177838

11 years agoMinor cleanups. No functionality change.
Jakub Staszak [Sun, 24 Mar 2013 09:56:28 +0000 (09:56 +0000)]
Minor cleanups. No functionality change.

llvm-svn: 177837

11 years agoUse dyn_cast instead of isa && cast.
Jakub Staszak [Sun, 24 Mar 2013 09:25:47 +0000 (09:25 +0000)]
Use dyn_cast instead of isa && cast.
No functionality change.

llvm-svn: 177836

11 years agoGive Sparc instruction patterns direct types instead of register classes.
Jakob Stoklund Olesen [Sun, 24 Mar 2013 00:56:20 +0000 (00:56 +0000)]
Give Sparc instruction patterns direct types instead of register classes.

Also update the documentation since Sparc is the nicest backend, and
used as an example in WritingAnLLVMBackend.

llvm-svn: 177835

11 years agoAllow direct value types to be used in instruction 'set' patterns.
Jakob Stoklund Olesen [Sun, 24 Mar 2013 00:56:16 +0000 (00:56 +0000)]
Allow direct value types to be used in instruction 'set' patterns.

This makes it possible to define instruction patterns like this:

def LDri : F3_2<3, 0b000000,
                (outs IntRegs:$dst), (ins MEMri:$addr),
                "ld [$addr], $dst",
                [(set i32:$dst, (load ADDRri:$addr))]>;
                      ~~~

llvm-svn: 177834

11 years agoPPC ZERO register needs a register number of 0.
Hal Finkel [Sat, 23 Mar 2013 22:06:07 +0000 (22:06 +0000)]
PPC ZERO register needs a register number of 0.

In order for the new ZERO register to be used with MC, etc. we need to specify
its register number (0).

Thanks to Kai for reporting the problem!

llvm-svn: 177833

11 years agoNote in PPCFunctionInfo VRSAVE spills
Hal Finkel [Sat, 23 Mar 2013 22:06:03 +0000 (22:06 +0000)]
Note in PPCFunctionInfo VRSAVE spills

In preparation for using the new register scavenger capability for providing
more than one register simultaneously, specifically note functions that have
spilled VRSAVE (currently, this can happen only in functions that use the
setjmp intrinsic). As with CR spilling, such functions will need to provide two
emergency spill slots to the scavenger.

No functionality change intended.

llvm-svn: 177832

11 years agoRegisterPasses: Improve comments
Tobias Grosser [Sat, 23 Mar 2013 21:35:52 +0000 (21:35 +0000)]
RegisterPasses: Improve comments

llvm-svn: 177831

11 years agoMCize the bcl instruction in PPCAsmPrinter
Hal Finkel [Sat, 23 Mar 2013 20:53:15 +0000 (20:53 +0000)]
MCize the bcl instruction in PPCAsmPrinter

I recently added a BCL instruction definition as part of implementing SjLj
support. This can also be used to MCize bcl emission in the asm printer.

No functionality change intended.

llvm-svn: 177830

11 years agoUse direct types in Sparc def : Pat patterns.
Jakob Stoklund Olesen [Sat, 23 Mar 2013 20:35:05 +0000 (20:35 +0000)]
Use direct types in Sparc def : Pat patterns.

The SelectionDAG graph has MVT type labels, not register classes, so
this makes it clearer what is happening.

This notation is also robust against adding more types to the IntRegs
register class.

llvm-svn: 177829

11 years agoAllow direct value types in pattern definitions.
Jakob Stoklund Olesen [Sat, 23 Mar 2013 20:35:01 +0000 (20:35 +0000)]
Allow direct value types in pattern definitions.

Just like register classes, value types can be used in two ways in
patterns:

  (sext_inreg i32:$src, i16)

In a named leaf node like i32:$src, the value type simply provides the
type of the node directly. This simplifies type inference a lot compared
to the current practice of specifiying types indirectly with register
classes.

As an unnamed leaf node, like i16 above, the value type represents
itself as an MVT::Other immediate.

llvm-svn: 177828

11 years agoCleanup some unused reg. scavenger parameters in PPCRegisterInfo
Hal Finkel [Sat, 23 Mar 2013 19:36:47 +0000 (19:36 +0000)]
Cleanup some unused reg. scavenger parameters in PPCRegisterInfo

These spilling functions will eventually make use of the register scavenger,
however, they'll do so by taking advantage of PEI's virtual-register-based
delayed scavenging mechanism. As a result, these function parameters will not
be used, and can be removed.

No functionality change intended.

llvm-svn: 177827

11 years agoMarshall Clow found some divide-by-zero warnings with UBSan in rand's binomial_distri...
Howard Hinnant [Sat, 23 Mar 2013 19:29:45 +0000 (19:29 +0000)]
Marshall Clow found some divide-by-zero warnings with UBSan in rand's binomial_distribution test.  This eliminates the divide-by-zeros and describes in comments the numerical difficulties the test is having.  Each of the problematic tests are exploring edge cases of the distribution.

llvm-svn: 177826

11 years agoMake all unnamed RegisterClass TreePatternNodes typed MVT::i32.
Jakob Stoklund Olesen [Sat, 23 Mar 2013 18:08:44 +0000 (18:08 +0000)]
Make all unnamed RegisterClass TreePatternNodes typed MVT::i32.

A register class can appear as a leaf TreePatternNode with and without a
name:

  (COPY_TO_REGCLASS GPR:$src, F8RC)

In a named leaf node like GPR:$src, the register class provides type
information for the named variable represented by the node. The TypeSet
for such a node is the set of value types that the register class can
represent.

In an unnamed leaf node like F8RC above, the register class represents
itself as a kind of immediate. Such a node has the type MVT::i32,
we'll never create a virtual register representing it.

This change makes it possible to remove the special handling of
COPY_TO_REGCLASS in CodeGenDAGPatterns.cpp.

llvm-svn: 177825