platform/upstream/llvm.git
11 years agoHighlight caret in bold green, to match Clang diagnostics.
Richard Smith [Tue, 12 Feb 2013 22:12:10 +0000 (22:12 +0000)]
Highlight caret in bold green, to match Clang diagnostics.

llvm-svn: 175013

11 years agoclang-format a file
Tobias Grosser [Tue, 12 Feb 2013 22:05:48 +0000 (22:05 +0000)]
clang-format a file

llvm-svn: 175012

11 years agoUse documented isl function
Tobias Grosser [Tue, 12 Feb 2013 22:05:43 +0000 (22:05 +0000)]
Use documented isl function

llvm-svn: 175011

11 years ago[preprocessing record] Add some sanity checks for the preprocessed entity index
Argyrios Kyrtzidis [Tue, 12 Feb 2013 21:41:23 +0000 (21:41 +0000)]
[preprocessing record] Add some sanity checks for the preprocessed entity index
to make sure we don't crash on release if the index is not valid.

rdar://13089714

llvm-svn: 175010

11 years ago[ms-inline-asm] Add test cases for the align/emit directives.
Chad Rosier [Tue, 12 Feb 2013 21:34:14 +0000 (21:34 +0000)]
[ms-inline-asm] Add test cases for the align/emit directives.
Part of rdar://13200215

llvm-svn: 175009

11 years ago[ms-inline-asm] Implement align directive (which is roughly equivalent to .align).
Chad Rosier [Tue, 12 Feb 2013 21:33:51 +0000 (21:33 +0000)]
[ms-inline-asm] Implement align directive (which is roughly equivalent to .align).

Also, allow _EMIT and __EMIT for the emit directive.  We already do the same
for TYPE, SIZE, and LENGTH.
rdar://13200215

llvm-svn: 175008

11 years agoThis patch just fixes up various llvm formatting
Jack Carter [Tue, 12 Feb 2013 21:29:39 +0000 (21:29 +0000)]
This patch just fixes up various llvm formatting
violations such as tabs, blanks at eol and long
lines.

llvm-svn: 175007

11 years agoAdd static cast to unsigned char whenever a character classification function is...
Guy Benyei [Tue, 12 Feb 2013 21:21:59 +0000 (21:21 +0000)]
Add static cast to unsigned char whenever a character classification function is called with a signed char argument, in order to avoid assertions in Windows Debug configuration.

llvm-svn: 175006

11 years agoAdd a test for r174980, that we used to accept
Dmitri Gribenko [Tue, 12 Feb 2013 20:43:41 +0000 (20:43 +0000)]
Add a test for r174980, that we used to accept

llvm-svn: 175005

11 years agoFix crash for incomplete labels in macros.
Daniel Jasper [Tue, 12 Feb 2013 20:17:17 +0000 (20:17 +0000)]
Fix crash for incomplete labels in macros.

Still the formatting can be improved, but at least we don't assert any
more. This happened when trying to format lib/Sema/SemaType.cpp.

llvm-svn: 175003

11 years agoFix document typos, indentation in python code, and API examples.
Daniel Malea [Tue, 12 Feb 2013 20:01:49 +0000 (20:01 +0000)]
Fix document typos, indentation in python code, and API examples.

Patch by Bruce Mitchener!

llvm-svn: 175002

11 years agoRecord PRE predecessors with a SmallVector instead of a DenseMap, and
Dan Gohman [Tue, 12 Feb 2013 19:49:10 +0000 (19:49 +0000)]
Record PRE predecessors with a SmallVector instead of a DenseMap, and
avoid a second pred_iterator traversal.

llvm-svn: 175001

11 years ago[ms-inline asm] Update test case now that we are correctly parsing __emit directives.
Chad Rosier [Tue, 12 Feb 2013 19:42:57 +0000 (19:42 +0000)]
[ms-inline asm] Update test case now that we are correctly parsing __emit directives.

llvm-svn: 175000

11 years ago[ms-inline asm] Pass the length of the IDVal, so we can do a proper AsmRewrite.
Chad Rosier [Tue, 12 Feb 2013 19:42:32 +0000 (19:42 +0000)]
[ms-inline asm] Pass the length of the IDVal, so we can do a proper AsmRewrite.

llvm-svn: 174999

11 years ago[ms-inline asm] Accept the emit directive as either _emit or __emit.
Chad Rosier [Tue, 12 Feb 2013 19:31:23 +0000 (19:31 +0000)]
[ms-inline asm] Accept the emit directive as either _emit or __emit.

llvm-svn: 174998

11 years ago[tests] Add support for a link_flags lit parameter.
Daniel Dunbar [Tue, 12 Feb 2013 19:28:51 +0000 (19:28 +0000)]
[tests] Add support for a link_flags lit parameter.
 - This is useful for testing with custom ABI libraries.
 - Patch by Michael van der Westhuizen.

llvm-svn: 174997

11 years agoFixing the MSVC compiler warning a different way; removed use of static_cast and...
Aaron Ballman [Tue, 12 Feb 2013 19:20:48 +0000 (19:20 +0000)]
Fixing the MSVC compiler warning a different way; removed use of static_cast and instead used a signed integer parameter.

llvm-svn: 174996

11 years agoTypo.
Chad Rosier [Tue, 12 Feb 2013 19:15:05 +0000 (19:15 +0000)]
Typo.

llvm-svn: 174995

11 years agoWhen disabling PRE for a value is directly redundant with itself
Dan Gohman [Tue, 12 Feb 2013 19:05:10 +0000 (19:05 +0000)]
When disabling PRE for a value is directly redundant with itself
(through a loop), don't continue to iterate through the reamining
predecessors.

llvm-svn: 174994

11 years agoAdded new "env" regular expression alias into the evironment settings section of...
Greg Clayton [Tue, 12 Feb 2013 18:54:34 +0000 (18:54 +0000)]
Added new "env" regular expression alias into the evironment settings section of the GDB/LLDB commands.

llvm-svn: 174993

11 years agoRemove target-specific info from the testcase for DWARF/pubnames.
Krzysztof Parzyszek [Tue, 12 Feb 2013 18:53:21 +0000 (18:53 +0000)]
Remove target-specific info from the testcase for DWARF/pubnames.

llvm-svn: 174992

11 years ago<rdar://problem/13178743>
Greg Clayton [Tue, 12 Feb 2013 18:52:24 +0000 (18:52 +0000)]
<rdar://problem/13178743>

Added a new "env" regular expression alias. If "env" is typed on its own "settings show target.env-vars" will be run. Otherwise it can be used to set and environment variable: "env FOO=BAR".

llvm-svn: 174991

11 years agoadd support for merging common strings
Shankar Easwaran [Tue, 12 Feb 2013 18:46:53 +0000 (18:46 +0000)]
add support for merging common strings

llvm-svn: 174990

11 years ago[ms-inline asm] Add a few test cases for the parsing of hexidecimal integers.
Chad Rosier [Tue, 12 Feb 2013 18:45:21 +0000 (18:45 +0000)]
[ms-inline asm] Add a few test cases for the parsing of hexidecimal integers.

llvm-svn: 174989

11 years agoCheck that pointers are removed from maps before calling delete on the pointers,
Dan Gohman [Tue, 12 Feb 2013 18:44:43 +0000 (18:44 +0000)]
Check that pointers are removed from maps before calling delete on the pointers,
for tidiness' sake.

llvm-svn: 174988

11 years ago<rdar://problem/13184389>
Greg Clayton [Tue, 12 Feb 2013 18:42:05 +0000 (18:42 +0000)]
<rdar://problem/13184389>

_regexp-list needs to treat "list -" as "source list -r"

llvm-svn: 174987

11 years agoRemoving a signed/unsigned mismatch warning triggered in MSVC 11.
Aaron Ballman [Tue, 12 Feb 2013 18:39:15 +0000 (18:39 +0000)]
Removing a signed/unsigned mismatch warning triggered in MSVC 11.

llvm-svn: 174986

11 years agoMinor code simplification.
Dan Gohman [Tue, 12 Feb 2013 18:38:36 +0000 (18:38 +0000)]
Minor code simplification.

llvm-svn: 174985

11 years agoFix ELF parsing where undefined symbols were being added to the symbol table with...
Matt Kopec [Tue, 12 Feb 2013 18:30:30 +0000 (18:30 +0000)]
Fix ELF parsing where undefined symbols were being added to the symbol table with the incorrect symbol type.

llvm-svn: 174984

11 years ago[ms-inline asm] Add support for lexing binary integers with a [bB] suffix.
Chad Rosier [Tue, 12 Feb 2013 18:29:02 +0000 (18:29 +0000)]
[ms-inline asm] Add support for lexing binary integers with a [bB] suffix.

This is complicated by backward labels (e.g., 0b can be both a backward label
and a binary zero).  The current implementation assumes [0-9]b is always a
label and thus it's possible for 0b and 1b to not be interpreted correctly for
ms-style inline assembly.  However, this is relatively simple to fix in the
inline assembly (i.e., drop the [bB]).

This patch also limits backward labels to [0-9]b, so that only 0b and 1b are
ambiguous.
Part of rdar://12470373

llvm-svn: 174983

11 years agoDocumentation: HowToUseAttributes: formatting (use monospaced font)
Dmitri Gribenko [Tue, 12 Feb 2013 18:26:08 +0000 (18:26 +0000)]
Documentation: HowToUseAttributes: formatting (use monospaced font)

llvm-svn: 174982

11 years agoAllow optionally generating pubnames section in DWARF info. Introduce
Krzysztof Parzyszek [Tue, 12 Feb 2013 18:00:14 +0000 (18:00 +0000)]
Allow optionally generating pubnames section in DWARF info.  Introduce
option "generate-dwarf-pubnames" to control it, set to "false" by default.

llvm-svn: 174981

11 years agoAccept over-qualified constructor in MSVC emulation mode
Dmitri Gribenko [Tue, 12 Feb 2013 17:27:41 +0000 (17:27 +0000)]
Accept over-qualified constructor in MSVC emulation mode

MSVC accepts this:

class A {
  A::A();
};

Clang accepts regular member functions with extra qualification as an MS
extension, but not constructors.  This changes the parser to defer rejecting
qualified constructors so that the same Sema logic can apply to constructors as
regular member functions.  This also improves the error message when MS
extensions are disabled (in my opinion). Before it was:

/Users/jason/Desktop/test.cpp:2:8: error: expected member name or ';' after declaration specifiers
  A::A();
  ~~~~ ^
1 error generated.

After:

/Users/jason/Desktop/test.cpp:2:6: error: extra qualification on member 'A'
  A::A();
  ~~~^
1 error generated.

Patch by Jason Haslam.

llvm-svn: 174980

11 years agoadded test cases for r174920 (prefetch disassembly)
Kay Tiong Khoo [Tue, 12 Feb 2013 17:07:44 +0000 (17:07 +0000)]
added test cases for r174920 (prefetch disassembly)

llvm-svn: 174979

11 years agoFix bug in the adjustment to existing lines.
Daniel Jasper [Tue, 12 Feb 2013 16:51:23 +0000 (16:51 +0000)]
Fix bug in the adjustment to existing lines.

Before (if only the second line was reformatted):
void f() {}
          void g() {}

After:
void f() {}
void g() {}

llvm-svn: 174978

11 years agoEqual treatment of labels and other terminators in MI DAG construction.
Sergei Larin [Tue, 12 Feb 2013 16:36:03 +0000 (16:36 +0000)]
Equal treatment of labels and other terminators in MI DAG construction.

MI sched DAG construction allows targets to include terminators into scheduling DAG.
Extend this functionality to labels as well.

llvm-svn: 174977

11 years agoAdd support for the pubnames section to llvm-dwarfdump.
Krzysztof Parzyszek [Tue, 12 Feb 2013 16:20:28 +0000 (16:20 +0000)]
Add support for the pubnames section to llvm-dwarfdump.

llvm-svn: 174976

11 years agoFormatter: Correctly format stars in `sizeof(int**)` and similar places.
Nico Weber [Tue, 12 Feb 2013 16:17:07 +0000 (16:17 +0000)]
Formatter: Correctly format stars in `sizeof(int**)` and similar places.

This redoes how '*' and '&' are classified as pointer / reference markers when
followed by ')', '>', or ','.

Previously, determineStarAmpUsage() marked a single '*' and '&' followed by
')', '>', or ',' as pointer or reference marker. Now, all '*'s and '&'s
preceding ')', '>', or ',' are marked as pointer / reference markers. Fixes
PR14884.

Since only the last '*' in 'int ***' was marked as pointer before (the rest
were unary operators, which don't reach spaceRequiredBetween()),
spaceRequiredBetween() now had to be thought about handing multiple '*'s in
sequence.

Before:
  return sizeof(int * *);
  Type **A = static_cast<Type * *>(P);

Now:
  return sizeof(int**);
  Type **A = static_cast<Type **>(P);

While here, also make all methods of AnnotatingParser except parseLine()
private.

Review URL: http://llvm-reviews.chandlerc.com/D384

llvm-svn: 174975

11 years agoFix the lit test added in r174972
Paul Redmond [Tue, 12 Feb 2013 16:07:27 +0000 (16:07 +0000)]
Fix the lit test added in r174972

Patch by: Kevin Schoedel

llvm-svn: 174974

11 years agoHexagon: Add support to generate predicated absolute addressing mode
Jyotsna Verma [Tue, 12 Feb 2013 16:06:23 +0000 (16:06 +0000)]
Hexagon: Add support to generate predicated absolute addressing mode
instructions.

llvm-svn: 174973

11 years agoPR14562 - Truncation of left shift became undef
Paul Redmond [Tue, 12 Feb 2013 15:21:21 +0000 (15:21 +0000)]
PR14562 - Truncation of left shift became undef

DAGCombiner::ReduceLoadWidth was converting (trunc i32 (shl i64 v, 32))
into (shl i32 v, 32) into undef. To prevent this, check the shift count
against the final result size.

Patch by: Kevin Schoedel
Reviewed by: Nadav Rotem

llvm-svn: 174972

11 years ago[sanitizer] Tests for scanf parser in allowGnuMalloc=false mode.
Evgeniy Stepanov [Tue, 12 Feb 2013 14:37:55 +0000 (14:37 +0000)]
[sanitizer] Tests for scanf parser in allowGnuMalloc=false mode.

llvm-svn: 174971

11 years ago[msan] Allow zero buf pointer in getcwd() interceptor.
Evgeniy Stepanov [Tue, 12 Feb 2013 14:36:22 +0000 (14:36 +0000)]
[msan] Allow zero buf pointer in getcwd() interceptor.

llvm-svn: 174970

11 years ago[sanitizer] More accurate scanf parsing without GNU extensions.
Evgeniy Stepanov [Tue, 12 Feb 2013 14:29:34 +0000 (14:29 +0000)]
[sanitizer] More accurate scanf parsing without GNU extensions.

In __isoc99_*scanf we don't have to worry about GNUisms, and can parse
%a accurately.

Patch by Jakub Jelinek.

llvm-svn: 174969

11 years ago[NVPTX] Disable vector registers
Justin Holewinski [Tue, 12 Feb 2013 14:18:49 +0000 (14:18 +0000)]
[NVPTX] Disable vector registers

Vectors were being manually scalarized by the backend.  Instead,
let the target-independent code do all of the work.  The manual
scalarization was from a time before good target-independent support
for scalarization in LLVM. However, this forces us to specially-handle
vector loads and stores, which we can turn into PTX instructions that
produce/consume multiple operands.

llvm-svn: 174968

11 years agoAdding more overloads for allOf matcher
Edwin Vane [Tue, 12 Feb 2013 13:55:40 +0000 (13:55 +0000)]
Adding more overloads for allOf matcher

Adding overloads of allOf accepting 4 and 5 arguments.

Reviewer: klimek

llvm-svn: 174967

11 years agoRename -constructors test to just -structors as in fact it tests dtors too. Also...
Timur Iskhodzhanov [Tue, 12 Feb 2013 13:22:47 +0000 (13:22 +0000)]
Rename -constructors test to just -structors as in fact it tests dtors too. Also, fix a minor typo in the test.

llvm-svn: 174966

11 years ago[asan] Add new __isoc99_*scanf to ASan intercepted functions list.
Evgeniy Stepanov [Tue, 12 Feb 2013 12:45:29 +0000 (12:45 +0000)]
[asan] Add new __isoc99_*scanf to ASan intercepted functions list.

llvm-svn: 174965

11 years ago[ASan] Do not use kDefaultShort64bitShadowOffset on Mac, where the binaries may get...
Alexander Potapenko [Tue, 12 Feb 2013 12:41:12 +0000 (12:41 +0000)]
[ASan] Do not use kDefaultShort64bitShadowOffset on Mac, where the binaries may get mapped at 0x100000000+ and thus may interleave with the shadow.

llvm-svn: 174964

11 years agoR600: Fix regression with shadow array sampler on pre-SI GPUs.
Michel Danzer [Tue, 12 Feb 2013 12:11:23 +0000 (12:11 +0000)]
R600: Fix regression with shadow array sampler on pre-SI GPUs.

'R600/SI: Use proper instructions for array/shadow samplers.' removed two
cases from TEX_SHADOW. Vincent Lejeune reported on IRC that this broke some
shadow array piglit tests with the r600g driver. Reinstating the removed
cases should fix this, and still works with radeonsi as well.

I will follow up with some lit tests which would have caught the regression.

NOTE: This is a candidate for the Mesa stable branch.

Tested-by: Vincent Lejeune <vljn@ovi.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 174963

11 years ago[sanitizer] Missing changes from r174960.
Evgeniy Stepanov [Tue, 12 Feb 2013 12:02:49 +0000 (12:02 +0000)]
[sanitizer] Missing changes from r174960.

llvm-svn: 174962

11 years agoAdding a HowTo for Attributes.
Joe Abbey [Tue, 12 Feb 2013 11:45:22 +0000 (11:45 +0000)]
Adding a HowTo for Attributes.

This is based on Bill Wendling's email.  No additional content has been added,
but now there's a place for Attributes to capture future information.

llvm-svn: 174961

11 years ago[sanitizer] Intercept __isoc99_*scanf.
Evgeniy Stepanov [Tue, 12 Feb 2013 11:34:52 +0000 (11:34 +0000)]
[sanitizer] Intercept __isoc99_*scanf.

llvm-svn: 174960

11 years ago[asan] fix tests for the new ABI
Kostya Serebryany [Tue, 12 Feb 2013 11:14:24 +0000 (11:14 +0000)]
[asan] fix tests for the new ABI

llvm-svn: 174959

11 years ago[asan] change the default mapping offset on x86_64 to 0x7fff8000. This gives roughly...
Kostya Serebryany [Tue, 12 Feb 2013 11:11:58 +0000 (11:11 +0000)]
[asan] change the default mapping offset on x86_64 to 0x7fff8000. This gives roughly 5% speedup. Since this is an ABI change, bump the asan ABI version by renaming __asan_init to __asan_init_v1. compiler-rt part

llvm-svn: 174958

11 years ago[asan] change the default mapping offset on x86_64 to 0x7fff8000. This gives roughly...
Kostya Serebryany [Tue, 12 Feb 2013 11:11:02 +0000 (11:11 +0000)]
[asan] change the default mapping offset on x86_64 to 0x7fff8000. This gives roughly 5% speedup. Since this is an ABI change, bump the asan ABI version by renaming __asan_init to __asan_init_v1. llvm part, compiler-rt part will follow

llvm-svn: 174957

11 years ago[MSan] symbolize correct PC when printing Summary message
Alexey Samsonov [Tue, 12 Feb 2013 10:46:39 +0000 (10:46 +0000)]
[MSan] symbolize correct PC when printing Summary message

llvm-svn: 174956

11 years agoMerge the collected attributes into the call instruction's attributes.
Bill Wendling [Tue, 12 Feb 2013 10:13:06 +0000 (10:13 +0000)]
Merge the collected attributes into the call instruction's attributes.

llvm-svn: 174955

11 years agoTest for string attributes and for attribute group output.
Bill Wendling [Tue, 12 Feb 2013 09:14:20 +0000 (09:14 +0000)]
Test for string attributes and for attribute group output.

llvm-svn: 174954

11 years agoAttempt to fix this test on i686 targets.
Nick Lewycky [Tue, 12 Feb 2013 08:59:01 +0000 (08:59 +0000)]
Attempt to fix this test on i686 targets.

llvm-svn: 174953

11 years agoHave the bitcode writer and reader handle the new attribute references.
Bill Wendling [Tue, 12 Feb 2013 08:13:50 +0000 (08:13 +0000)]
Have the bitcode writer and reader handle the new attribute references.

The bitcode writer emits a reference to the attribute group that the object at
the given index refers to. The bitcode reader is modified to read this in and
map it back to the attribute group.

llvm-svn: 174952

11 years agoThe meat of this patch is in BuildCXXMemberCalLExpr where we make it use
Nick Lewycky [Tue, 12 Feb 2013 08:08:54 +0000 (08:08 +0000)]
The meat of this patch is in BuildCXXMemberCalLExpr where we make it use
MarkMemberReferenced instead of marking functions referenced directly. An audit
of callers to MarkFunctionReferenced and DiagnoseUseOfDecl also caused a few
other changes:
 * don't mark functions odr-used when considering them for an initialization
   sequence. Do mark them referenced though.
 * the function nominated by the cleanup attribute should be diagnosed.
 * operator new/delete should be diagnosed when building a 'new' expression.

llvm-svn: 174951

11 years agoUse the AttributeSet as the 'key' to the map instead of the 'raw' pointer.
Bill Wendling [Tue, 12 Feb 2013 08:01:22 +0000 (08:01 +0000)]
Use the AttributeSet as the 'key' to the map instead of the 'raw' pointer.

llvm-svn: 174950

11 years agoMade LLDB build with the latest Clang. This meant
Sean Callanan [Tue, 12 Feb 2013 08:01:13 +0000 (08:01 +0000)]
Made LLDB build with the latest Clang.  This meant
changing the ClangASTSource to return a bool instead
of returning a list of results.  Our testsuite mostly
works with this change, but some minor issues may
remain both on LLDB's side and on Clang's side.

llvm-svn: 174949

11 years agoSupport string attributes in the AttrBuilder.
Bill Wendling [Tue, 12 Feb 2013 07:56:49 +0000 (07:56 +0000)]
Support string attributes in the AttrBuilder.

llvm-svn: 174948

11 years agoFixed the way the ClangExpressionDeclMap looks
Sean Callanan [Tue, 12 Feb 2013 07:56:36 +0000 (07:56 +0000)]
Fixed the way the ClangExpressionDeclMap looks
up variables in the current stack frame to avoid
mutual recursion between the expression parser
and the synthetic child providers.  Variables
should only be looked up in a very simple way,
using no synthetic anything.

<rdar://problem/13173454>

llvm-svn: 174947

11 years agoProperly assemble PHIs after a null-checked invoke of objc_msgSend.
John McCall [Tue, 12 Feb 2013 05:53:35 +0000 (05:53 +0000)]
Properly assemble PHIs after a null-checked invoke of objc_msgSend.
rdar://12046763

llvm-svn: 174946

11 years agoDon't consider definitions by other PHIs live-in when trimming a PHI source's
Cameron Zwarich [Tue, 12 Feb 2013 05:48:58 +0000 (05:48 +0000)]
Don't consider definitions by other PHIs live-in when trimming a PHI source's
live range after inserting a copy at the end of a block.

llvm-svn: 174945

11 years agoFix indentation.
Cameron Zwarich [Tue, 12 Feb 2013 05:48:56 +0000 (05:48 +0000)]
Fix indentation.

llvm-svn: 174944

11 years agoFix a bug reduced from a crash when trying to use modules with libc++. We check
Richard Smith [Tue, 12 Feb 2013 05:48:23 +0000 (05:48 +0000)]
Fix a bug reduced from a crash when trying to use modules with libc++. We check
the linkage of functions and variables while merging declarations from modules,
and we don't necessarily have enough of the rest of the AST loaded at that
point to allow us to compute linkage, so serialize it instead.

llvm-svn: 174943

11 years ago+ specified progress information
Anton Yartsev [Tue, 12 Feb 2013 05:02:54 +0000 (05:02 +0000)]
+ specified progress information

llvm-svn: 174942

11 years ago+ centered progress cells
Anton Yartsev [Tue, 12 Feb 2013 04:45:48 +0000 (04:45 +0000)]
+ centered progress cells
+ added progress information for several checkers

llvm-svn: 174941

11 years agoCall __cxa_begin_catch with the current exception before
John McCall [Tue, 12 Feb 2013 03:51:46 +0000 (03:51 +0000)]
Call __cxa_begin_catch with the current exception before
calling std::terminate().  rdar://11904428

llvm-svn: 174940

11 years agoChange some CGF parameters to CGMs.
John McCall [Tue, 12 Feb 2013 03:51:38 +0000 (03:51 +0000)]
Change some CGF parameters to CGMs.

llvm-svn: 174939

11 years agoAdd a hidden option to PHIElimination to split all critical edges. This is
Cameron Zwarich [Tue, 12 Feb 2013 03:49:25 +0000 (03:49 +0000)]
Add a hidden option to PHIElimination to split all critical edges. This is
particularly useful for catching issues with architectures that have exotic
terminators like MIPS.

llvm-svn: 174938

11 years agoRenumber SlotIndexes locally when a new block is inserted.
Cameron Zwarich [Tue, 12 Feb 2013 03:49:22 +0000 (03:49 +0000)]
Renumber SlotIndexes locally when a new block is inserted.

llvm-svn: 174937

11 years agoAdd blocks to the LiveIntervalAnalysis RegMaskBlocks array when splitting
Cameron Zwarich [Tue, 12 Feb 2013 03:49:20 +0000 (03:49 +0000)]
Add blocks to the LiveIntervalAnalysis RegMaskBlocks array when splitting
a critical edge.

llvm-svn: 174936

11 years agoFix the updating of LiveIntervals after splitting a critical edge. PHI operand
Cameron Zwarich [Tue, 12 Feb 2013 03:49:17 +0000 (03:49 +0000)]
Fix the updating of LiveIntervals after splitting a critical edge. PHI operand
live ranges should always be extended, and the only successor that should be
considered for extension of other ranges is the target of the split edge.

llvm-svn: 174935

11 years agoCheck type for legality before forming a select from loads.
Pete Cooper [Tue, 12 Feb 2013 03:14:50 +0000 (03:14 +0000)]
Check type for legality before forming a select from loads.

Sorry for the lack of a test case.  I tried writing one for i386 as i know selects are illegal on this target, but they are actually considered legal by isel and expanded later.

I can't see any targets to trigger this, but checking for the legality of a node before forming it is general goodness.

llvm-svn: 174934

11 years agoARM cost model: Add vector reverse shuffle costs
Arnold Schwaighofer [Tue, 12 Feb 2013 02:40:39 +0000 (02:40 +0000)]
ARM cost model: Add vector reverse shuffle costs

A reverse shuffle is lowered to a vrev and possibly a vext instruction (quad
word).

radar://13171406

llvm-svn: 174933

11 years agoCost model: Add check for reverse shuffles to CostModel analysis
Arnold Schwaighofer [Tue, 12 Feb 2013 02:40:37 +0000 (02:40 +0000)]
Cost model: Add check for reverse shuffles to CostModel analysis

Check for reverse shuffles in the CostModel analysis pass and query
TargetTransform info accordingly. This allows us we can write test cases for
reverse shuffles.

radar://13171406

llvm-svn: 174932

11 years agoRemove an assert which triggers when a decl context in a module hits the 'has
Richard Smith [Tue, 12 Feb 2013 02:32:35 +0000 (02:32 +0000)]
Remove an assert which triggers when a decl context in a module hits the 'has
lexical storage but not visible storage' case in C++. It's unclear whether we
even need the special-case handling for C++, since it seems to be working
around our not serializing a lookup table for the TU in C. But in any case,
the assertion is incorrect.

llvm-svn: 174931

11 years agoPerform placeholder conversions on the controller of a _Generic
John McCall [Tue, 12 Feb 2013 02:08:12 +0000 (02:08 +0000)]
Perform placeholder conversions on the controller of a _Generic
expression.

llvm-svn: 174930

11 years agoARM NEON: Handle v16i8 and v8i16 reverse shuffles
Arnold Schwaighofer [Tue, 12 Feb 2013 01:58:32 +0000 (01:58 +0000)]
ARM NEON: Handle v16i8 and v8i16 reverse shuffles

Lower reverse shuffles to a vrev64 and a vext instruction instead of the default
legalization of storing and loading to the stack. This is important because we
generate reverse shuffles in the loop vectorizer when we reverse store to an
array.

  uint8_t Arr[N];
  for (i = 0; i < N; ++i)
    Arr[N - i - 1] = ...

radar://13171760

llvm-svn: 174929

11 years agoDiagnose loads of 'half' l-values in OpenCL.
John McCall [Tue, 12 Feb 2013 01:29:43 +0000 (01:29 +0000)]
Diagnose loads of 'half' l-values in OpenCL.
Patch by Joey Gouly!

llvm-svn: 174928

11 years agoUpdate error message due to previous commit, r174926.
Chad Rosier [Tue, 12 Feb 2013 01:12:24 +0000 (01:12 +0000)]
Update error message due to previous commit, r174926.

llvm-svn: 174927

11 years ago[ms-inline asm] Add support for lexing hexidecimal integers with a [hH] suffix.
Chad Rosier [Tue, 12 Feb 2013 01:00:01 +0000 (01:00 +0000)]
[ms-inline asm] Add support for lexing hexidecimal integers with a [hH] suffix.
Part of rdar://12470373

llvm-svn: 174926

11 years agoBacking out r174919 while I investigate a self-host bug on Takumi's builder.
Lang Hames [Tue, 12 Feb 2013 00:44:43 +0000 (00:44 +0000)]
Backing out r174919 while I investigate a self-host bug on Takumi's builder.

llvm-svn: 174925

11 years agoDIBuilder: make the return type of createBasicType more specific
David Blaikie [Tue, 12 Feb 2013 00:40:41 +0000 (00:40 +0000)]
DIBuilder: make the return type of createBasicType more specific

llvm-svn: 174924

11 years agoMinor update to Vim frontend: simplify breakpoints display (and list unresolved break...
Daniel Malea [Tue, 12 Feb 2013 00:31:40 +0000 (00:31 +0000)]
Minor update to Vim frontend: simplify breakpoints display (and list unresolved breakpoints)

llvm-svn: 174923

11 years agoIn ARC, emit non-peepholed +1s within the full-expression instead
John McCall [Tue, 12 Feb 2013 00:25:08 +0000 (00:25 +0000)]
In ARC, emit non-peepholed +1s within the full-expression instead
of immediately afterwards.

llvm-svn: 174922

11 years agoSplit a couple of tests out into their own file.
John McCall [Tue, 12 Feb 2013 00:25:02 +0000 (00:25 +0000)]
Split a couple of tests out into their own file.

llvm-svn: 174921

11 years agoAdded 0x0D to 2-byte opcode extension table for prefetch* variants
Kay Tiong Khoo [Tue, 12 Feb 2013 00:19:12 +0000 (00:19 +0000)]
Added 0x0D to 2-byte opcode extension table for prefetch* variants
Fixed decode of existing 3dNow prefetchw instruction
Intel is scheduled to add a compatible prefetchw (same encoding) to future CPUs

llvm-svn: 174920

11 years agoWhen generating IR for default copy-constructors, copy-assignment operators,
Lang Hames [Mon, 11 Feb 2013 23:44:11 +0000 (23:44 +0000)]
When generating IR for default copy-constructors, copy-assignment operators,
move-constructors and move-assignment operators, use memcpy to copy adjacent
POD members.

Previously, classes with one or more Non-POD members would fall back on
element-wise copies for all members, including POD members. This often
generated a lot of IR. Without padding metadata, it wasn't often possible
for the LLVM optimizers to turn the element-wise copies into a memcpy.

This code hasn't yet received any serious tuning. I didn't see any serious
regressions on a self-hosted clang build, or any of the nightly tests, but
I think it's important to get this out in the wild to get more testing.
Insights, feedback and comments welcome.

Many thanks to David Blaikie, Richard Smith, and especially John McCall for
their help and feedback on this work.

llvm-svn: 174919

11 years agoTiming data was removed years ago. Remove these links.
Tanya Lattner [Mon, 11 Feb 2013 23:32:10 +0000 (23:32 +0000)]
Timing data was removed years ago. Remove these links.

llvm-svn: 174918

11 years ago[ELF] Add support for reading dynamic libraries.
Michael J. Spencer [Mon, 11 Feb 2013 23:03:35 +0000 (23:03 +0000)]
[ELF] Add support for reading dynamic libraries.

llvm-svn: 174916

11 years agoBBVectorize: Don't over-search when building the dependency map
Hal Finkel [Mon, 11 Feb 2013 23:02:17 +0000 (23:02 +0000)]
BBVectorize: Don't over-search when building the dependency map

When building the pairable-instruction dependency map, don't search
past the last pairable instruction. For large blocks that have been
divided into multiple instruction groups, searching past the last
instruction in each group is very wasteful. This gives a 32% speedup
on the csa.ll test case from PR15222 (when using 50 instructions
in each group).

No functionality change intended.

llvm-svn: 174915

11 years agoBBVectorize: Omit unnecessary entries in PairableInstUsers
Hal Finkel [Mon, 11 Feb 2013 23:02:09 +0000 (23:02 +0000)]
BBVectorize: Omit unnecessary entries in PairableInstUsers

This map is queried only for instructions in pairs of pairable
instructions; so make sure that only pairs of pairable
instructions are added to the map. This gives a 3.5% speedup
on the csa.ll test case from PR15222.

No functionality change intended.

llvm-svn: 174914

11 years ago[Support][Compiler] Add LLVM_HAS_VARIADIC_TEMPLATES.
Michael J. Spencer [Mon, 11 Feb 2013 22:51:07 +0000 (22:51 +0000)]
[Support][Compiler] Add LLVM_HAS_VARIADIC_TEMPLATES.

llvm-svn: 174913

11 years ago[mips] Expand pseudo instructions before they are emitted in
Akira Hatanaka [Mon, 11 Feb 2013 22:35:40 +0000 (22:35 +0000)]
[mips] Expand pseudo instructions before they are emitted in
MipsCodeEmitter.cpp.

JALR and NOP are expanded by function emitPseudoExpansionLowering, which is not
called when the old JIT is used.

This fixes the following tests which have been failing on
llvm-mips-linux builder:

LLVM :: ExecutionEngine__2003-01-04-LoopTest.ll
LLVM :: ExecutionEngine__2003-05-06-LivenessClobber.ll
LLVM :: ExecutionEngine__2003-06-04-bzip2-bug.ll
LLVM :: ExecutionEngine__2005-12-02-TailCallBug.ll
LLVM :: ExecutionEngine__2003-10-18-PHINode-ConstantExpr-CondCode-Failure.ll
LLVM :: ExecutionEngine__hello2.ll
LLVM :: ExecutionEngine__stubs.ll
LLVM :: ExecutionEngine__test-branch.ll
LLVM :: ExecutionEngine__test-call.ll
LLVM :: ExecutionEngine__test-common-symbols.ll
LLVM :: ExecutionEngine__test-loadstore.ll
LLVM :: ExecutionEngine__test-loop.ll

llvm-svn: 174912