platform/upstream/llvm.git
11 years ago[scan-build] Add quotes around clang executable name to handle path withs spaces...
Ted Kremenek [Thu, 21 Feb 2013 20:28:59 +0000 (20:28 +0000)]
[scan-build] Add quotes around clang executable name to handle path withs spaces.  Fixes <rdar://problem/13254727>

llvm-svn: 175790

11 years agoMove the eliminateCallFramePseudoInstr method from TargetRegisterInfo
Eli Bendersky [Thu, 21 Feb 2013 20:05:00 +0000 (20:05 +0000)]
Move the eliminateCallFramePseudoInstr method from TargetRegisterInfo
to TargetFrameLowering, where it belongs. Incidentally, this allows us
to delete some duplicated (and slightly different!) code in TRI.

There are potentially other layering problems that can be cleaned up
as a result, or in a similar manner.

The refactoring was OK'd by Anton Korobeynikov on llvmdev.

Note: this touches the target interfaces, so out-of-tree targets may
be affected.

llvm-svn: 175788

11 years ago<rdar://problem/4529976>
Enrico Granata [Thu, 21 Feb 2013 19:57:10 +0000 (19:57 +0000)]
<rdar://problem/4529976>

Adding data formatters for iterators for std::map and std::vector (both libc++ and libstdcpp)
This does not include reverse iterators since they are both trickier (due to requirements the standard imposes on them) and much less useful

llvm-svn: 175787

11 years agoDon't assert on empty attributes.
Bill Wendling [Thu, 21 Feb 2013 19:46:51 +0000 (19:46 +0000)]
Don't assert on empty attributes.

llvm-svn: 175785

11 years agoTry to get buildbots to pass these tests.
Bill Wendling [Thu, 21 Feb 2013 19:44:18 +0000 (19:44 +0000)]
Try to get buildbots to pass these tests.

llvm-svn: 175784

11 years agoHexagon: Expand cttz, ctlz, and ctpop for now.
Anshuman Dasgupta [Thu, 21 Feb 2013 19:39:40 +0000 (19:39 +0000)]
Hexagon: Expand cttz, ctlz, and ctpop for now.

llvm-svn: 175783

11 years agoMake RAFast::UsedInInstr indexed by register units.
Jakob Stoklund Olesen [Thu, 21 Feb 2013 19:35:21 +0000 (19:35 +0000)]
Make RAFast::UsedInInstr indexed by register units.

This fixes some problems with too conservative checking where we were
marking all aliases of a register as used, and then also checking all
aliases when allocating a register.

<rdar://problem/13249625>

llvm-svn: 175782

11 years ago[scan-build] fix xcode version parsing to handle dot releases. Fixes <rdar://problem...
Ted Kremenek [Thu, 21 Feb 2013 19:33:30 +0000 (19:33 +0000)]
[scan-build] fix xcode version parsing to handle dot releases.  Fixes <rdar://problem/13265300>.

llvm-svn: 175781

11 years ago[driver] Handle the processing of the QA_OVERRIDE_GCC3_OPTIONS and CCC_ADD_ARGS
Chad Rosier [Thu, 21 Feb 2013 18:56:55 +0000 (18:56 +0000)]
[driver] Handle the processing of the QA_OVERRIDE_GCC3_OPTIONS and CCC_ADD_ARGS
before the DiagnosticsEngine is instantiated.  Otherwise, warning options are
not handled correctly.
rdar://13254743

llvm-svn: 175779

11 years agoPreprocessor: preserve whitespace in -traditional-cpp mode.
Jordan Rose [Thu, 21 Feb 2013 18:53:19 +0000 (18:53 +0000)]
Preprocessor: preserve whitespace in -traditional-cpp mode.

Note that unlike GNU cpp we currently do not preserve whitespace in macros
(even in -traditional-cpp mode).

<rdar://problem/12897179>

llvm-svn: 175778

11 years ago[driver] Add a dump method for ArgList.
Chad Rosier [Thu, 21 Feb 2013 18:40:49 +0000 (18:40 +0000)]
[driver] Add a dump method for ArgList.

llvm-svn: 175777

11 years agoMark the command as failed if parsing fails.
Jim Ingham [Thu, 21 Feb 2013 18:38:46 +0000 (18:38 +0000)]
Mark the command as failed if parsing fails.

llvm-svn: 175776

11 years agoRadar numbers don't belong in source code.
Evan Cheng [Thu, 21 Feb 2013 18:37:54 +0000 (18:37 +0000)]
Radar numbers don't belong in source code.

llvm-svn: 175775

11 years agoConstrain bind operator()() to not exist if the call is not valid. Fixes http:/...
Howard Hinnant [Thu, 21 Feb 2013 18:16:55 +0000 (18:16 +0000)]
Constrain bind operator()() to not exist if the call is not valid.  Fixes llvm.org/bugs/show_bug.cgi?id=15295.

llvm-svn: 175774

11 years agoTrivial cleanup
Bill Schmidt [Thu, 21 Feb 2013 17:26:05 +0000 (17:26 +0000)]
Trivial cleanup

llvm-svn: 175771

11 years agoadd missing space which prevented the llvm.loop code-block from appearing in the
Paul Redmond [Thu, 21 Feb 2013 17:20:45 +0000 (17:20 +0000)]
add missing space which prevented the llvm.loop code-block from appearing in the
generated html.

llvm-svn: 175769

11 years agoLarge code model support for PowerPC.
Bill Schmidt [Thu, 21 Feb 2013 17:12:27 +0000 (17:12 +0000)]
Large code model support for PowerPC.

Large code model is identical to medium code model except that the
addis/addi sequence for "local" accesses is never used.  All accesses
use the addis/ld sequence.

The coding changes are straightforward; most of the patch is taken up
with creating variants of the medium model tests for large model.

llvm-svn: 175767

11 years ago[ASan] temporarily disable alloc_dealloc_mismatch on Mac, since the previous commit...
Alexander Potapenko [Thu, 21 Feb 2013 17:12:21 +0000 (17:12 +0000)]
[ASan] temporarily disable alloc_dealloc_mismatch on Mac, since the previous commit caused error reports in gTest.

llvm-svn: 175766

11 years agoRevert r175688 - It broke a test case (see PR15320).
Lang Hames [Thu, 21 Feb 2013 17:01:59 +0000 (17:01 +0000)]
Revert r175688 - It broke a test case (see PR15320).

llvm-svn: 175765

11 years ago[ASan] Make sure operator new/delete and friends are intercepted on OS X.
Alexander Potapenko [Thu, 21 Feb 2013 16:54:09 +0000 (16:54 +0000)]
[ASan] Make sure operator new/delete and friends are intercepted on OS X.
Because the interceptors will reside in a dylib, not the main executable, we can't just declare them,
but must use the interposition machinery.
Fix the test expectations in large_func_test.cc affected by the change.
This CL should make our Mac buildbots green.

llvm-svn: 175763

11 years agogetX86SubSuperRegister has a special mode with High=true for i64 which
Eli Bendersky [Thu, 21 Feb 2013 16:40:18 +0000 (16:40 +0000)]
getX86SubSuperRegister has a special mode with High=true for i64 which
exists solely to enable it to call itself for i8 with some registers.
The proposed patch simplifies the function somewhat to make the High
bit only meaningful for the i8 mode, which makes sense. No functional
difference (getX86SubSuperRegister is not getting called from anywhere
outside with i64 and High=true).

llvm-svn: 175762

11 years ago<rdar://problem/13259230>
Han Ming Ong [Thu, 21 Feb 2013 16:31:31 +0000 (16:31 +0000)]
<rdar://problem/13259230>

Remember to set m_profile_thread to NULL once the profile thread is turned off.

llvm-svn: 175761

11 years ago[ASan] Declare CreateThread as extern "C" to fix the Windows build.
Alexander Potapenko [Thu, 21 Feb 2013 15:32:50 +0000 (15:32 +0000)]
[ASan] Declare CreateThread as extern "C" to fix the Windows build.

llvm-svn: 175760

11 years agoDAGCombiner: Make the post-legalize vector op optimization more aggressive.
Benjamin Kramer [Thu, 21 Feb 2013 15:24:35 +0000 (15:24 +0000)]
DAGCombiner: Make the post-legalize vector op optimization more aggressive.

A legal BUILD_VECTOR goes in and gets constant folded into another legal
BUILD_VECTOR so we don't lose any legality here. The problematic PPC
optimization that made this check necessary was fixed recently.

llvm-svn: 175759

11 years agoR600/SI: inline V_ADD|SUB_F32 patterns
Christian Konig [Thu, 21 Feb 2013 15:17:41 +0000 (15:17 +0000)]
R600/SI: inline V_ADD|SUB_F32 patterns

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 175758

11 years agoR600/SI: replace IMPLICIT_DEF with SIOperand.ZERO
Christian Konig [Thu, 21 Feb 2013 15:17:36 +0000 (15:17 +0000)]
R600/SI: replace IMPLICIT_DEF with SIOperand.ZERO

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 175757

11 years agoR600/SI: replace SI_V_CNDLT with a pattern
Christian Konig [Thu, 21 Feb 2013 15:17:32 +0000 (15:17 +0000)]
R600/SI: replace SI_V_CNDLT with a pattern

It actually fixes quite a bunch of piglit tests.

This is a candidate for the mesa-stable branch.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 175756

11 years agoR600/SI: use patterns for clamp, fabs, fneg
Christian Konig [Thu, 21 Feb 2013 15:17:27 +0000 (15:17 +0000)]
R600/SI: use patterns for clamp, fabs, fneg

Instead of using custom inserters, it's simpler and
should make DAG folding easier.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 175755

11 years agoR600/SI: add all the other missing asm operands v2
Christian Konig [Thu, 21 Feb 2013 15:17:22 +0000 (15:17 +0000)]
R600/SI: add all the other missing asm operands v2

v2: put implicit parameters in []

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 175754

11 years agoR600/SI: add the missing M*BUF|IMG asm operands
Christian Konig [Thu, 21 Feb 2013 15:17:17 +0000 (15:17 +0000)]
R600/SI: add the missing M*BUF|IMG asm operands

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 175753

11 years agoR600/SI: add the missing S_* asm operands
Christian Konig [Thu, 21 Feb 2013 15:17:13 +0000 (15:17 +0000)]
R600/SI: add the missing S_* asm operands

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 175752

11 years agoR600/SI: rework VOP3 classes
Christian Konig [Thu, 21 Feb 2013 15:17:09 +0000 (15:17 +0000)]
R600/SI: rework VOP3 classes

Order the classes and add asm operands.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 175751

11 years agoR600/SI: simplify VOPC_* pattern v2
Christian Konig [Thu, 21 Feb 2013 15:17:04 +0000 (15:17 +0000)]
R600/SI: simplify VOPC_* pattern v2

Fixing asm operation names.

v2: fix name of the e64 encoding, also add asm operands

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 175750

11 years agoR600/SI: rework VOP2_* pattern v2
Christian Konig [Thu, 21 Feb 2013 15:16:58 +0000 (15:16 +0000)]
R600/SI: rework VOP2_* pattern v2

Fixing asm operation names.

v2: use ZERO constant, also add asm operands

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 175749

11 years agoR600/SI: rework VOP1_* patterns v2
Christian Konig [Thu, 21 Feb 2013 15:16:53 +0000 (15:16 +0000)]
R600/SI: rework VOP1_* patterns v2

Fixing asm operation names.

v2: use ZERO constant, also add asm operands

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 175748

11 years agoR600/SI: add constant for inline zero operand
Christian Konig [Thu, 21 Feb 2013 15:16:49 +0000 (15:16 +0000)]
R600/SI: add constant for inline zero operand

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 175747

11 years agoR600/SI: cleanup SIInstrInfo.td and SIInstrFormat.td
Christian Konig [Thu, 21 Feb 2013 15:16:44 +0000 (15:16 +0000)]
R600/SI: cleanup SIInstrInfo.td and SIInstrFormat.td

Those two files got mixed up.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 175746

11 years ago[ASan] Revert the incorrect macro on Linux.
Alexander Potapenko [Thu, 21 Feb 2013 15:15:43 +0000 (15:15 +0000)]
[ASan] Revert the incorrect macro on Linux.

llvm-svn: 175745

11 years agoFixing a "multiple rules generate X" warning from ninja
Edwin Vane [Thu, 21 Feb 2013 15:12:01 +0000 (15:12 +0000)]
Fixing a "multiple rules generate X" warning from ninja

CMake's Ninja generator was not detecting that test/lit.site.cfg.in and
test/subdir/../lit.site.cfg.in were really the same file. Ninja noticed this
and complained as both appeared as targets (for the missing file rule). Now
canonicalizing the path to ensure the paths presented to CMake are identical
and the duplication is now fixed.

llvm-svn: 175744

11 years ago[ASan] Put several function prototypes back under #ifdef _WIN32 to fix the Windows...
Alexander Potapenko [Thu, 21 Feb 2013 15:10:03 +0000 (15:10 +0000)]
[ASan] Put several function prototypes back under #ifdef _WIN32 to fix the Windows build.

llvm-svn: 175743

11 years agoR600: Fix for Unigine when MachineSched is enabled
Tom Stellard [Thu, 21 Feb 2013 15:06:59 +0000 (15:06 +0000)]
R600: Fix for Unigine when MachineSched is enabled

Fixes for-loop.cl piglit test

Patch By: Vincent Lejeune

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
NOTE: This is a candidate for the Mesa stable branch.
llvm-svn: 175742

11 years agoAllow breaking between type and name in for loops.
Daniel Jasper [Thu, 21 Feb 2013 15:00:29 +0000 (15:00 +0000)]
Allow breaking between type and name in for loops.

This fixes llvm.org/PR15033.

Also: Always break before a parameter, if the previous parameter was
split over multiple lines. This was necessary to make the right
decisions in for-loops, almost always makes the code more readable and
also fixes llvm.org/PR14873.

Before:
for (llvm::ArrayRef<NamedDecl *>::iterator I = FD->getDeclsInPrototypeScope()
         .begin(), E = FD->getDeclsInPrototypeScope().end();
     I != E; ++I) {
}
foo(bar(bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb,
        ccccccccccccccccccccccccccccc), d, bar(e, f));

After:
for (llvm::ArrayRef<NamedDecl *>::iterator
         I = FD->getDeclsInPrototypeScope().begin(),
         E = FD->getDeclsInPrototypeScope().end();
     I != E; ++I) {
}
foo(bar(bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb,
        ccccccccccccccccccccccccccccc),
    d, bar(e, f));

llvm-svn: 175741

11 years ago[ASan] Refactoring: nuke the redundant function declarations in asan_intercepted_func...
Alexander Potapenko [Thu, 21 Feb 2013 14:41:16 +0000 (14:41 +0000)]
[ASan] Refactoring: nuke the redundant function declarations in asan_intercepted_functions.h
that had been used on OS X only.
The INTERCEPTOR() macro on OS X is now responsible for declaring the wrapped function, the wrapper and the
pair of pointers to them in __DATA,__interposition section. Thus adding an interceptor requires editing a single file now.

llvm-svn: 175740

11 years agoCode review cleanup for r175697
Bill Schmidt [Thu, 21 Feb 2013 14:35:42 +0000 (14:35 +0000)]
Code review cleanup for r175697

llvm-svn: 175739

11 years agoAdd MSan to the list of targets in Makefile-based builds.
Evgeniy Stepanov [Thu, 21 Feb 2013 13:59:14 +0000 (13:59 +0000)]
Add MSan to the list of targets in Makefile-based builds.

llvm-svn: 175738

11 years ago[sanitizer] Add MSan to Makefile-based build rules.
Evgeniy Stepanov [Thu, 21 Feb 2013 13:55:54 +0000 (13:55 +0000)]
[sanitizer] Add MSan to Makefile-based build rules.

llvm-svn: 175737

11 years agoAdd a 64-bit triple to these tests, to fix 32-bit bots.
Joey Gouly [Thu, 21 Feb 2013 13:42:33 +0000 (13:42 +0000)]
Add a 64-bit triple to these tests, to fix 32-bit bots.

llvm-svn: 175736

11 years agoFix an OpenCL test case. Pointer arguments to kernels must be declared with the
Joey Gouly [Thu, 21 Feb 2013 12:06:32 +0000 (12:06 +0000)]
Fix an OpenCL test case. Pointer arguments to kernels must be declared with the
__global, __constant or __local qualifier.

llvm-svn: 175735

11 years agoAdd support to Sema and CodeGen for floating point vector types in OpenCL.
Joey Gouly [Thu, 21 Feb 2013 11:49:56 +0000 (11:49 +0000)]
Add support to Sema and CodeGen for floating point vector types in OpenCL.

llvm-svn: 175734

11 years agoR600/SI: Make sure M0 is loaded for V_INTERP_MOV_F32
Michel Danzer [Thu, 21 Feb 2013 08:57:10 +0000 (08:57 +0000)]
R600/SI: Make sure M0 is loaded for V_INTERP_MOV_F32

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

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 175733

11 years agoDon't rely on the isDead() MachineOperand flag when updating LiveIntervals.
Cameron Zwarich [Thu, 21 Feb 2013 08:51:58 +0000 (08:51 +0000)]
Don't rely on the isDead() MachineOperand flag when updating LiveIntervals.

llvm-svn: 175732

11 years agoUse getInterval() instead of getOrCreateInterval().
Cameron Zwarich [Thu, 21 Feb 2013 08:51:55 +0000 (08:51 +0000)]
Use getInterval() instead of getOrCreateInterval().

llvm-svn: 175731

11 years agoOnly include move-related Optional<T> tests when rvalue references are available.
David Blaikie [Thu, 21 Feb 2013 07:58:45 +0000 (07:58 +0000)]
Only include move-related Optional<T> tests when rvalue references are available.

llvm-svn: 175730

11 years agoAdd move ctor/assignment to Optional<T>
David Blaikie [Thu, 21 Feb 2013 07:55:39 +0000 (07:55 +0000)]
Add move ctor/assignment to Optional<T>

Code review feedback for r175580 by Jordan Rose.

llvm-svn: 175729

11 years ago[asan] speedup by more than 2x handling of the small memset/memcpy/etc calls
Kostya Serebryany [Thu, 21 Feb 2013 07:07:39 +0000 (07:07 +0000)]
[asan] speedup by more than 2x handling of the small memset/memcpy/etc calls

llvm-svn: 175728

11 years agoMake another kill check LiveIntervals-aware.
Cameron Zwarich [Thu, 21 Feb 2013 07:02:30 +0000 (07:02 +0000)]
Make another kill check LiveIntervals-aware.

This brings the number of remaining failures in 'make check' without
LiveVariables down to 39, with 1 unexpectedly passing test.

llvm-svn: 175727

11 years agoSplit part of isKilled() into a separate function for use elsewhere.
Cameron Zwarich [Thu, 21 Feb 2013 07:02:28 +0000 (07:02 +0000)]
Split part of isKilled() into a separate function for use elsewhere.

llvm-svn: 175726

11 years agoCorrect spelling of 'enumerator'.
David Blaikie [Thu, 21 Feb 2013 06:12:38 +0000 (06:12 +0000)]
Correct spelling of 'enumerator'.

Post commit code review feedback to r175705 from Jordan Rose.

llvm-svn: 175725

11 years agoCorrect spelling of 'enumerator'.
David Blaikie [Thu, 21 Feb 2013 06:08:22 +0000 (06:08 +0000)]
Correct spelling of 'enumerator'.

Post commit code review feedback to r175705 from Jordan Rose.

llvm-svn: 175724

11 years agoMake Optional<T>'s operator bool 'explicit' in C++11
David Blaikie [Thu, 21 Feb 2013 06:05:57 +0000 (06:05 +0000)]
Make Optional<T>'s operator bool 'explicit' in C++11

Provides a general way to add 'explicit' for conversion operators (a no-op when
compiling as C++98).

llvm-svn: 175723

11 years agoAvoid implicit conversions of Optional<T> to bool.
David Blaikie [Thu, 21 Feb 2013 06:05:05 +0000 (06:05 +0000)]
Avoid implicit conversions of Optional<T> to bool.

This is a precursor to making Optional<T>'s operator bool 'explicit' when
building Clang & LLVM as C++11.

llvm-svn: 175722

11 years agoStaticAnalyzer/Core: Suppress warnings. [-Wunused-variable, -Wunused-function]
NAKAMURA Takumi [Thu, 21 Feb 2013 04:40:10 +0000 (04:40 +0000)]
StaticAnalyzer/Core: Suppress warnings. [-Wunused-variable, -Wunused-function]

llvm-svn: 175721

11 years agoWhitespace.
NAKAMURA Takumi [Thu, 21 Feb 2013 04:40:04 +0000 (04:40 +0000)]
Whitespace.

llvm-svn: 175720

11 years agoUpdate isKilledAt in TwoAddressInstructionPass.cpp to use LiveIntervals when
Cameron Zwarich [Thu, 21 Feb 2013 04:33:02 +0000 (04:33 +0000)]
Update isKilledAt in TwoAddressInstructionPass.cpp to use LiveIntervals when
available.

With this commit there are no longer any assertion or verifier failures when
running 'make check' without LiveVariables. There are still 56 failing tests
with codegen differences and 1 unexpectedly passing test.

llvm-svn: 175719

11 years agoExpand the sel pseudo/macro. This generates basic blocks where previously
Reed Kotler [Thu, 21 Feb 2013 04:22:38 +0000 (04:22 +0000)]
Expand the sel pseudo/macro. This generates basic blocks where previously
there were inline br .+4 instructions. Soon everything can enjoy the
full instruction scheduling experience.

llvm-svn: 175718

11 years agoAdd some documentation on how HandleCommand work.
Jim Ingham [Thu, 21 Feb 2013 03:17:20 +0000 (03:17 +0000)]
Add some documentation on how HandleCommand work.

llvm-svn: 175717

11 years ago[analyzer] Record whether a base object region represents a virtual base.
Jordan Rose [Thu, 21 Feb 2013 03:12:32 +0000 (03:12 +0000)]
[analyzer] Record whether a base object region represents a virtual base.

This allows MemRegion and MemRegionManager to avoid asking over and over
again whether an class is a virtual base or a non-virtual base.

Minor optimization/cleanup; no functionality change.

llvm-svn: 175716

11 years ago[analyzer] Add another reinterpret_cast behavior test.
Jordan Rose [Thu, 21 Feb 2013 03:12:26 +0000 (03:12 +0000)]
[analyzer] Add another reinterpret_cast behavior test.

The test is similar to <rdar://problem/13239840> but doesn't actually test
the case that fails there. It's still a good test, though.

llvm-svn: 175715

11 years ago[analyzer] Tidy up a few uses of Optional in RegionStore.
Jordan Rose [Thu, 21 Feb 2013 03:12:21 +0000 (03:12 +0000)]
[analyzer] Tidy up a few uses of Optional in RegionStore.

Some that I just added needed conversion to use 'None', others looked
better using Optional<SVal>::create.

No functionality change.

llvm-svn: 175714

11 years agoCIndex.cpp: Appease g++-4.4. "if (Optional<unsigned> Minor = In.getMinor())" did...
NAKAMURA Takumi [Thu, 21 Feb 2013 02:32:34 +0000 (02:32 +0000)]
CIndex.cpp: Appease g++-4.4. "if (Optional<unsigned> Minor = In.getMinor())" did not work as expected.

llvm-svn: 175711

11 years agoADT/Optional.h: Appease msvc. It reapplies r175626.
NAKAMURA Takumi [Thu, 21 Feb 2013 02:32:25 +0000 (02:32 +0000)]
ADT/Optional.h: Appease msvc. It reapplies r175626.

llvm-svn: 175710

11 years ago[objdump] Add PT_PHDR.
Michael J. Spencer [Thu, 21 Feb 2013 02:21:29 +0000 (02:21 +0000)]
[objdump] Add PT_PHDR.

llvm-svn: 175709

11 years agolibstdc++'s <cstdalign> #includes <stdalign.h> and expects it to guard against
Richard Smith [Thu, 21 Feb 2013 02:17:58 +0000 (02:17 +0000)]
libstdc++'s <cstdalign> #includes <stdalign.h> and expects it to guard against
being included in C++. Don't define alignof or alignas in this case. Note that
the C++11 standard is broken in various ways here (it refers to the contents
of <stdalign.h> in C99, where that header did not exist, and doesn't mention
the alignas macro at all), but we do our best to do what it intended.

llvm-svn: 175708

11 years agoMips specific standalone assembler addressing mode %hi and %lo.
Jack Carter [Thu, 21 Feb 2013 02:09:31 +0000 (02:09 +0000)]
Mips specific standalone assembler addressing mode %hi and %lo.

The constructs %hi() and %lo() represent the high and low 16
bits of the address.
Because the 16 bit offset field of an LW instruction is
interpreted as signed, if bit 15 of the low part is 1 then the
low part will act as a negative and 1 needs to be added to the
high part.

Contributer: Vladimir Medic
llvm-svn: 175707

11 years agoRespect -fno-canonical-prefixes when deciding where to generate .gcno and .gcda
Nick Lewycky [Thu, 21 Feb 2013 02:02:50 +0000 (02:02 +0000)]
Respect -fno-canonical-prefixes when deciding where to generate .gcno and .gcda
files.

llvm-svn: 175706

11 years agoUse None rather than Optional<T>() where possible.
David Blaikie [Thu, 21 Feb 2013 01:47:18 +0000 (01:47 +0000)]
Use None rather than Optional<T>() where possible.

llvm-svn: 175705

11 years agoRename TypeLoc's isType to isKind
David Blaikie [Thu, 21 Feb 2013 01:47:08 +0000 (01:47 +0000)]
Rename TypeLoc's isType to isKind

Matches changes made to SVal's similar functions based on Jordan Rose's review
feedback to r175594.

Also change isKind to take a reference rather than a non-null pointer, while I'm
at it. (& make TypeLoc::isKind private)

llvm-svn: 175704

11 years ago[analyzer] Tighten up safety in the use of lazy bindings.
Jordan Rose [Thu, 21 Feb 2013 01:34:51 +0000 (01:34 +0000)]
[analyzer] Tighten up safety in the use of lazy bindings.

- When deciding if we can reuse a lazy binding, make sure to check if there
  are additional bindings in the sub-region.
- When reading from a lazy binding, don't accidentally strip off casts or
  base object regions. This slows down lazy binding reading a bit but is
  necessary for type sanity when treating one class as another.

A bit of minor refactoring allowed these two checks to be unified in a nice
early-return-using helper function.

<rdar://problem/13239840>

llvm-svn: 175703

11 years agoIf you say
Enrico Granata [Thu, 21 Feb 2013 01:29:04 +0000 (01:29 +0000)]
If you say
(lldb) frame variable
without first launching the inferior, you get:
error: invalid frame

this is misleading and should probably hint that there is no process. Adding this flag makes sure that we get:
error: invalid process

The difference between eFlagRequiresProcess and eFlagProcessMustBeLaunched is an open question.

llvm-svn: 175702

11 years agoStrip 'llvm' from 'llvm::Optional' uses.
Ted Kremenek [Thu, 21 Feb 2013 01:29:01 +0000 (01:29 +0000)]
Strip 'llvm' from 'llvm::Optional' uses.

llvm-svn: 175701

11 years agoFixed a bug where certain vector code didn't
Sean Callanan [Thu, 21 Feb 2013 01:04:23 +0000 (01:04 +0000)]
Fixed a bug where certain vector code didn't
work on i386.  Now we let the JIT emit SSE/SSE2
instructions on i386.

<rdar://problem/13240476>

llvm-svn: 175700

11 years agoRemove commented out code.
Richard Trieu [Thu, 21 Feb 2013 00:50:43 +0000 (00:50 +0000)]
Remove commented out code.

llvm-svn: 175699

11 years agoobjective-C arc IR-gen. Retaining of strong
Fariborz Jahanian [Thu, 21 Feb 2013 00:40:10 +0000 (00:40 +0000)]
objective-C arc IR-gen. Retaining of strong
arguments in function prologue is done
with objc_StoreStrong to pair it with
similar objc_StoreStrong for release in function
epilogue. This is done with -O0 only.
// rdar://13145317

llvm-svn: 175698

11 years agoPPCDAGToDAGISel::PostprocessISelDAG()
Bill Schmidt [Thu, 21 Feb 2013 00:38:25 +0000 (00:38 +0000)]
PPCDAGToDAGISel::PostprocessISelDAG()

This patch implements the PPCDAGToDAGISel::PostprocessISelDAG virtual
method to perform post-selection peephole optimizations on the DAG
representation.

One optimization is implemented here:  folds to clean up complex
addressing expressions for thread-local storage and medium code
model.  It will also be useful for large code model sequences when
those are added later.  I originally thought about doing this on the
MI representation prior to register assignment, but it's difficult to
do effective global dead code elimination at that point.  DCE is
trivial on the DAG representation.

A typical example of a candidate code sequence in assembly:

   addis 3, 2, globalvar@toc@ha
   addi  3, 3, globalvar@toc@l
   lwz   5, 0(3)

When the final instruction is a load or store with an immediate offset
of zero, the offset from the add-immediate can replace the zero,
provided the relocation information is carried along:

   addis 3, 2, globalvar@toc@ha
   lwz   5, globalvar@toc@l(3)

Since the addi can in general have multiple uses, we need to only
delete the instruction when the last use is removed.

llvm-svn: 175697

11 years agoProvide a "None" value for convenience when using Optional<T>()
David Blaikie [Thu, 21 Feb 2013 00:27:28 +0000 (00:27 +0000)]
Provide a "None" value for convenience when using Optional<T>()

This implementation of NoneType/None does have some holes but I haven't
found one that doesn't - open to improvement.

llvm-svn: 175696

11 years agoMark unimplemented function with LLVM_DELETED_FUNCTION
David Blaikie [Thu, 21 Feb 2013 00:26:17 +0000 (00:26 +0000)]
Mark unimplemented function with LLVM_DELETED_FUNCTION

llvm-svn: 175695

11 years agoDoxycomment SVal's getAs/castAs.
David Blaikie [Thu, 21 Feb 2013 00:26:14 +0000 (00:26 +0000)]
Doxycomment SVal's getAs/castAs.

Also document TypeLoc's operations similarly, since it's a good idea.

Post-commit CR feedback from Anna Zaks regarding r175594.

llvm-svn: 175694

11 years agoRelocation enablement for PPC DAG postprocessing pass
Bill Schmidt [Thu, 21 Feb 2013 00:05:29 +0000 (00:05 +0000)]
Relocation enablement for PPC DAG postprocessing pass

llvm-svn: 175693

11 years agoFormatting.
Chad Rosier [Wed, 20 Feb 2013 23:57:30 +0000 (23:57 +0000)]
Formatting.

llvm-svn: 175692

11 years ago*ahem* Enrico.
Jason Molenda [Wed, 20 Feb 2013 23:51:13 +0000 (23:51 +0000)]
*ahem* Enrico.

llvm-svn: 175691

11 years agoDon't allocate memory in LiveInterval::join().
Jakob Stoklund Olesen [Wed, 20 Feb 2013 23:51:10 +0000 (23:51 +0000)]
Don't allocate memory in LiveInterval::join().

Rewrite value numbers directly in the 'Other' LiveInterval which is
moribund anyway. This avoids allocating the OtherAssignments vector.

llvm-svn: 175690

11 years agoMention "return" -> "thread return"
Jim Ingham [Wed, 20 Feb 2013 23:38:37 +0000 (23:38 +0000)]
Mention "return" -> "thread return"

llvm-svn: 175689

11 years agoKill of TransferDeadFlag - Dead copies and subreg-to-reg instructions should
Lang Hames [Wed, 20 Feb 2013 23:36:57 +0000 (23:36 +0000)]
Kill of TransferDeadFlag - Dead copies and subreg-to-reg instructions should
just be turned into kills on the spot.

llvm-svn: 175688

11 years agoas the allocator is reset zero out the number of bytes allocated, this was just
Pedro Artigas [Wed, 20 Feb 2013 23:30:56 +0000 (23:30 +0000)]
as the allocator is reset zero out the number of bytes allocated, this was just
missed before but probably what was intended.

llvm-svn: 175687

11 years agoELF symbol table field st_other support,
Jack Carter [Wed, 20 Feb 2013 23:11:17 +0000 (23:11 +0000)]
ELF symbol table field st_other support,
excluding visibility bits.

Mips specific standalone assembler directive "set at".

This directive changes the general purpose register
that the assembler will use when given the symbolic
register name $at.

This does not include negative testing. That will come
in a future patch.

A side affect of this patch recognizes the different
GPR register names for temporaries between old abi
and new abi so a test case for that is included.

Contributer: Vladimir Medic
llvm-svn: 175686

11 years agoCopy single reaching defs directly into the LiveInterval.
Jakob Stoklund Olesen [Wed, 20 Feb 2013 23:08:26 +0000 (23:08 +0000)]
Copy single reaching defs directly into the LiveInterval.

When findReachingDefs() finds that only one value can reach the basic
block, just copy the work list of visited blocks directly into the live
interval.

Sort the block list and use a LiveRangeUpdater to make the bulk add
fast.

When multiple reaching defs are found, transfer the work list to the
updateSSA() work list as before. Also use LiveRangeUpdater in
updateLiveIns() following updateSSA().

This makes live interval analysis more than 3x faster on one huge test
case.

llvm-svn: 175685

11 years agoAdd and remove the attribute from the correct slot.
Bill Wendling [Wed, 20 Feb 2013 23:04:11 +0000 (23:04 +0000)]
Add and remove the attribute from the correct slot.

The slot that we're adding/removing the attribute from may not be the same as
the attribute coming in. Make sure that they match up before we try to
add/remove them.
PR15313

llvm-svn: 175684

11 years agoStabilize vec_constants.ll
Bill Schmidt [Wed, 20 Feb 2013 22:43:03 +0000 (22:43 +0000)]
Stabilize vec_constants.ll

llvm-svn: 175683

11 years agoFix accidental concatenation for "outputuntil" in the -debug-buffer-size option descr...
Erik Verbruggen [Wed, 20 Feb 2013 22:33:46 +0000 (22:33 +0000)]
Fix accidental concatenation for "outputuntil" in the -debug-buffer-size option description.

llvm-svn: 175682

11 years agoRevert "intmax_t is long long on Darwin, not long."
Jordan Rose [Wed, 20 Feb 2013 22:28:41 +0000 (22:28 +0000)]
Revert "intmax_t is long long on Darwin, not long."

'long' and 'long long' are different for the purposes of mangling.
This caused <rdar://problem/13254874>.

This reverts commit c2f994d31ec85e9af811af38eb1b28709aef0b2c.

llvm-svn: 175681