platform/upstream/llvm.git
11 years agoUse ArrayRef instead of a reference to a SmallVectorImpl.
Cameron Zwarich [Sun, 17 Feb 2013 03:48:23 +0000 (03:48 +0000)]
Use ArrayRef instead of a reference to a SmallVectorImpl.

llvm-svn: 175385

11 years agoFix for ARM: functions don't have extra attributes there, so {{.*}} is ""
Dmitri Gribenko [Sun, 17 Feb 2013 03:06:16 +0000 (03:06 +0000)]
Fix for ARM: functions don't have extra attributes there, so {{.*}} is ""

While there, explicitly declare functions to remove warnings.

llvm-svn: 175384

11 years agoFix a conversion from a forward iterator to a reverse iterator in
Cameron Zwarich [Sun, 17 Feb 2013 01:45:04 +0000 (01:45 +0000)]
Fix a conversion from a forward iterator to a reverse iterator in
MachineBasicBlock::SplitCriticalEdge. Since this is an iterator rather than
an instr_iterator, the isBundled() check only passes if getFirstTerminator()
returned end() and the garbage memory happens to lean that way.

Multiple successors can be present without any terminator instructions in the
case of exception handling with a fallthrough.

llvm-svn: 175383

11 years agoAdd support for updating the LiveIntervals of registers used by 'exotic'
Cameron Zwarich [Sun, 17 Feb 2013 00:10:44 +0000 (00:10 +0000)]
Add support for updating the LiveIntervals of registers used by 'exotic'
terminators that actually have register uses when splitting critical edges.

This commit also introduces a method repairIntervalsInRange() on LiveIntervals,
which allows for repairing LiveIntervals in a small range after an arbitrary
target hook modifies, inserts, and removes instructions. It's pretty limited
right now, but I hope to extend it to support all of the things that are done
by the convertToThreeAddress() target hooks.

llvm-svn: 175382

11 years agoThe transform is:
Bill Wendling [Sat, 16 Feb 2013 23:41:36 +0000 (23:41 +0000)]
The transform is:

    (or (bool?A:B),(bool?C:D)) --> (bool?(or A,C):(or B,D))

By the time the OR is visited, both the SELECTs have been visited and not
optimized and the OR itself hasn't been transformed so we do this transform in
the hopes that the new ORs will be optimized.

The transform is explicitly disabled for vector-selects until "codegen matures
to handle them better".

Patch by Muhammad Tauqir!

llvm-svn: 175380

11 years agoClean up mips16 td file in preparation for massive pseudo lowering work.
Reed Kotler [Sat, 16 Feb 2013 23:39:52 +0000 (23:39 +0000)]
Clean up mips16 td file in preparation for massive pseudo lowering work.

llvm-svn: 175379

11 years ago<rdar://problem/13121056>
Greg Clayton [Sat, 16 Feb 2013 22:53:04 +0000 (22:53 +0000)]
<rdar://problem/13121056>

Fixed a crasher when the ConnectionFileDescriptor was used in a process with over FD_SETSIZE (1024) files open. It would corrupt the stack and cause the stack checker to assert and kill the program.

The final fix was to "#define _DARWIN_UNLIMITED_SELECT" at the top of the one and only file that uses select () in the LLDB codebase and then make an array of "fd_set" objects so they can handle more than 1024 file descriptors. The new code can handle as many file descriptors as a process can create.

llvm-svn: 175378

11 years agoAdded a kqueue class which isn't being used yet, but was part of trying to work aroun...
Greg Clayton [Sat, 16 Feb 2013 22:46:58 +0000 (22:46 +0000)]
Added a kqueue class which isn't being used yet, but was part of trying to work around the limitations with the unix select() call and how it is limited to FD_SETSIZE file descriptors.

Also added a TimeSpecTimeout class which can be used with any calls that take a "struct timespec *" as an argument. It is used by the KQueue class.

Also updated some project settings.

llvm-svn: 175377

11 years agoUse trailing documentation comments properly
Dmitri Gribenko [Sat, 16 Feb 2013 22:21:38 +0000 (22:21 +0000)]
Use trailing documentation comments properly

Patch by Alexander Zinenko.

llvm-svn: 175376

11 years agoDocumentation: correct syntax (one missing comma, one extra comma)
Dmitri Gribenko [Sat, 16 Feb 2013 20:07:40 +0000 (20:07 +0000)]
Documentation: correct syntax (one missing comma, one extra comma)

llvm-svn: 175375

11 years agoUse the correct type to hold enumeration values
Dmitri Gribenko [Sat, 16 Feb 2013 20:03:26 +0000 (20:03 +0000)]
Use the correct type to hold enumeration values

llvm-svn: 175374

11 years agoGCC doesn't like ++ on enums.
Benjamin Kramer [Sat, 16 Feb 2013 19:22:28 +0000 (19:22 +0000)]
GCC doesn't like ++ on enums.

llvm-svn: 175373

11 years agoRemove comma at the end of enum. Still my favourite C++11 feature.
Benjamin Kramer [Sat, 16 Feb 2013 19:15:28 +0000 (19:15 +0000)]
Remove comma at the end of enum. Still my favourite C++11 feature.

llvm-svn: 175372

11 years agoTypo
Renato Golin [Sat, 16 Feb 2013 19:14:59 +0000 (19:14 +0000)]
Typo

llvm-svn: 175371

11 years agoTurn the enum attributes DenseSet in AttrBuilder into a set of bits.
Benjamin Kramer [Sat, 16 Feb 2013 19:13:18 +0000 (19:13 +0000)]
Turn the enum attributes DenseSet in AttrBuilder into a set of bits.

Avoids malloc and is a lot denser. We lose iteration over target independent
attributes, but that's a strange interface anyways and didn't have any users
outside of AttrBuilder.

llvm-svn: 175370

11 years agoOne more try to make this look nice. I have lots of pseudo lowering
Reed Kotler [Sat, 16 Feb 2013 19:04:29 +0000 (19:04 +0000)]
One more try to make this look nice. I have lots of pseudo lowering
as well as 16/32 bit variants to do and so I want this to look nice
when I do it. I've been experimenting with this. No new test cases
are needed.

llvm-svn: 175369

11 years agoReplace erase loop with std::remove_if.
Benjamin Kramer [Sat, 16 Feb 2013 17:06:38 +0000 (17:06 +0000)]
Replace erase loop with std::remove_if.

This avoids unnecessary copies. No functionality change.

llvm-svn: 175367

11 years agoReplace loop with std::find.
Benjamin Kramer [Sat, 16 Feb 2013 17:06:32 +0000 (17:06 +0000)]
Replace loop with std::find.

No functionality change.

llvm-svn: 175366

11 years agoLegalizeDAG.cpp doesn't need DenseMap.
Jakub Staszak [Sat, 16 Feb 2013 16:15:42 +0000 (16:15 +0000)]
LegalizeDAG.cpp doesn't need DenseMap.

llvm-svn: 175365

11 years agoReduce indents in LSRInstance::NarrowSearchSpaceByCollapsingUnrolledCode method.
Jakub Staszak [Sat, 16 Feb 2013 16:08:15 +0000 (16:08 +0000)]
Reduce indents in LSRInstance::NarrowSearchSpaceByCollapsingUnrolledCode method.
No functionality change.

llvm-svn: 175364

11 years ago[msvc x64] Update X86CompilationCallback_Win64.asm corresponding to r175267.
NAKAMURA Takumi [Sat, 16 Feb 2013 16:04:29 +0000 (16:04 +0000)]
[msvc x64] Update X86CompilationCallback_Win64.asm corresponding to r175267.

llvm-svn: 175363

11 years agoUse const reference instead of vector object when passing an argument to
Jakub Staszak [Sat, 16 Feb 2013 15:47:26 +0000 (15:47 +0000)]
Use const reference instead of vector object when passing an argument to
updateScheduledPressure method.

llvm-svn: 175362

11 years agoTarget/R600/CMakeLists.txt: Prune SILowerLiteralConstants.cpp corresponding to r175354.
NAKAMURA Takumi [Sat, 16 Feb 2013 15:30:28 +0000 (15:30 +0000)]
Target/R600/CMakeLists.txt: Prune SILowerLiteralConstants.cpp corresponding to r175354.

llvm-svn: 175361

11 years agoMCParser: Reject .balign with non-pow2 alignments.
Benjamin Kramer [Sat, 16 Feb 2013 15:00:16 +0000 (15:00 +0000)]
MCParser: Reject .balign with non-pow2 alignments.

GNU as rejects them and there are configure scripts in the wild that check if
the assembler rejects ".align 3" to determine whether the alignment is in bytes
or powers of two.

llvm-svn: 175360

11 years agoMinor cleanups. No functionality change.
Jakub Staszak [Sat, 16 Feb 2013 13:34:26 +0000 (13:34 +0000)]
Minor cleanups. No functionality change.

llvm-svn: 175359

11 years agoAdd even more constatness in MachineDominators.h.
Jakub Staszak [Sat, 16 Feb 2013 12:36:32 +0000 (12:36 +0000)]
Add even more constatness in MachineDominators.h.

llvm-svn: 175358

11 years agoReplace "check:" wth "CHECK:".
Jakub Staszak [Sat, 16 Feb 2013 12:16:56 +0000 (12:16 +0000)]
Replace "check:" wth "CHECK:".
Also fix one test by changing "vpermilps" to "vpshufd".

llvm-svn: 175357

11 years agoR600/SI: Add pattern to simplify i64 loading
Christian Konig [Sat, 16 Feb 2013 11:28:36 +0000 (11:28 +0000)]
R600/SI: Add pattern to simplify i64 loading

This is a candidate for the stable branch.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 175356

11 years agoR600/SI: nuke SReg_1 v3
Christian Konig [Sat, 16 Feb 2013 11:28:30 +0000 (11:28 +0000)]
R600/SI: nuke SReg_1 v3

It's completely unnecessary and can be replace with proper
SReg_64 handling instead.

This actually fixes a piglit test on SI.

v2: use correct register class in addRegisterClass,
    set special classes as not allocatable
v3: revert setting special classes as not allocateable

This is a candidate for the stable branch.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 175355

11 years agoR600/SI: cleanup literal handling v3
Christian Konig [Sat, 16 Feb 2013 11:28:22 +0000 (11:28 +0000)]
R600/SI: cleanup literal handling v3

Seems to be allot simpler, and also paves the
way for further improvements.

v2: rebased on master, use 0 in BUFFER_LOAD_FORMAT_XYZW,
    use VGPR0 in dummy EXP, avoid compiler warning, break
    after encoding the first literal.
v3: correctly use V_ADD_F32_e64

This is a candidate for the stable branch.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 175354

11 years agoR600/SI: replace AllReg_* with [SV]Src_* v2
Christian Konig [Sat, 16 Feb 2013 11:28:13 +0000 (11:28 +0000)]
R600/SI: replace AllReg_* with [SV]Src_* v2

Mark all the operands that can also have an immediate.

v2: SOFFSET is also an SSrc_32 operand

This is a candidate for the stable branch.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 175353

11 years agoR600/SI: fix VOPC encoding v2
Christian Konig [Sat, 16 Feb 2013 11:28:07 +0000 (11:28 +0000)]
R600/SI: fix VOPC encoding v2

Previously it only worked because of coincident.

v2: fix 64bit versions, use 0x80 (inline 0) instead of SGPR0
    for the unused SRC2

This is a candidate for the stable branch.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 175352

11 years agoR600/SI: move *_Helper definitions to SIInstrFormat.td
Christian Konig [Sat, 16 Feb 2013 11:28:02 +0000 (11:28 +0000)]
R600/SI: move *_Helper definitions to SIInstrFormat.td

This is a candidate for the stable branch.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 175351

11 years agoR600/SI: remove some more unused code
Christian Konig [Sat, 16 Feb 2013 11:27:56 +0000 (11:27 +0000)]
R600/SI: remove some more unused code

This is a candidate for the stable branch.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 175350

11 years agoR600/structurizer: improve inverting conditions
Christian Konig [Sat, 16 Feb 2013 11:27:50 +0000 (11:27 +0000)]
R600/structurizer: improve inverting conditions

Stop adding more instructions than necessary.

This is a candidate for the stable branch.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 175349

11 years agoR600/structurizer: improve loop handling
Christian Konig [Sat, 16 Feb 2013 11:27:45 +0000 (11:27 +0000)]
R600/structurizer: improve loop handling

Generate more than one loop if it seems to make sense.

This is a candidate for the stable branch.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 175348

11 years agoR600/structurizer: improve finding condition values
Christian Konig [Sat, 16 Feb 2013 11:27:40 +0000 (11:27 +0000)]
R600/structurizer: improve finding condition values

Using the new NearestCommonDominator class.

This is a candidate for the stable branch.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 175347

11 years agoR600/structurizer: improve PHI value finding
Christian Konig [Sat, 16 Feb 2013 11:27:35 +0000 (11:27 +0000)]
R600/structurizer: improve PHI value finding

Using the new NearestCommonDominator class.

This is a candidate for the stable branch.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 175346

11 years agoR600/structurizer: add class to find the Nearest Common Dominator
Christian Konig [Sat, 16 Feb 2013 11:27:29 +0000 (11:27 +0000)]
R600/structurizer: add class to find the Nearest Common Dominator

This is a candidate for the stable branch.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 175345

11 years agoAdd some constantness in Machine Dominators.
Jakub Staszak [Sat, 16 Feb 2013 11:08:16 +0000 (11:08 +0000)]
Add some constantness in Machine Dominators.

llvm-svn: 175344

11 years agoRemove trailing spaces.
Jakub Staszak [Sat, 16 Feb 2013 11:02:28 +0000 (11:02 +0000)]
Remove trailing spaces.

llvm-svn: 175343

11 years agoUse a different scheme to chose 16/32 variants. This scheme is more
Reed Kotler [Sat, 16 Feb 2013 09:47:57 +0000 (09:47 +0000)]
Use a different scheme to chose 16/32 variants. This scheme is more
consistent with how BuildMI works. No new tests needed. All should work
the same as before.

llvm-svn: 175342

11 years agoInclude a small argparse compatibility layer for Python < 2.7
Filipe Cabecinhas [Sat, 16 Feb 2013 09:05:23 +0000 (09:05 +0000)]
Include a small argparse compatibility layer for Python < 2.7

llvm-svn: 175341

11 years agoDocumentation cleanup: make a \brief be brief, and fix a bad use of \see.
James Dennett [Sat, 16 Feb 2013 08:16:47 +0000 (08:16 +0000)]
Documentation cleanup: make a \brief be brief, and fix a bad use of \see.

llvm-svn: 175340

11 years agoDocumentation cleanup: use \brief, and don't repeat the identifier being
James Dennett [Sat, 16 Feb 2013 07:45:22 +0000 (07:45 +0000)]
Documentation cleanup: use \brief, and don't repeat the identifier being
declared.

llvm-svn: 175339

11 years ago[ELF] Add STN_UNDEF.
Michael J. Spencer [Sat, 16 Feb 2013 01:56:36 +0000 (01:56 +0000)]
[ELF] Add STN_UNDEF.

llvm-svn: 175338

11 years agoGet rid of a warning.
Greg Clayton [Sat, 16 Feb 2013 01:47:52 +0000 (01:47 +0000)]
Get rid of a warning.

llvm-svn: 175337

11 years agoReinitialize the ivars in the subtarget so that they can be reset with the new features.
Bill Wendling [Sat, 16 Feb 2013 01:36:26 +0000 (01:36 +0000)]
Reinitialize the ivars in the subtarget so that they can be reset with the new features.

llvm-svn: 175336

11 years agolibAnalysis: Add a case for TypeAliasDecl in CFGRecStmtDeclVisitor.
Jordan Rose [Sat, 16 Feb 2013 01:33:16 +0000 (01:33 +0000)]
libAnalysis: Add a case for TypeAliasDecl in CFGRecStmtDeclVisitor.

Neither of the current clients of CFGRecStmtDeclVisitor are doing
anything with typedefs, so I assume type aliases (C++11 "using")
can be safely ignored. This was causing assertion failures in
the analyzer.

<rdar://problem/13228440>

llvm-svn: 175335

11 years ago[ms-inline asm] Do not omit the frame pointer if we have ms-inline assembly.
Chad Rosier [Sat, 16 Feb 2013 01:25:28 +0000 (01:25 +0000)]
[ms-inline asm] Do not omit the frame pointer if we have ms-inline assembly.

If the frame pointer is omitted, and any stack changes occur in the inline
assembly, e.g.: "pusha", then any C local variable or C argument references
will be incorrect.

I pass no judgement on anyone who would do such a thing. ;)
rdar://13218191

llvm-svn: 175334

11 years agolibclang: remove reinterpret_casts by using SourceLocation::getPtrEncoding
Dmitri Gribenko [Sat, 16 Feb 2013 01:07:48 +0000 (01:07 +0000)]
libclang: remove reinterpret_casts by using SourceLocation::getPtrEncoding

llvm-svn: 175333

11 years agoRemove unused forward declarations
Dmitri Gribenko [Sat, 16 Feb 2013 01:06:07 +0000 (01:06 +0000)]
Remove unused forward declarations

clang/AST/Decl.h is included to see the TypeSourceInfo definition anyway.

llvm-svn: 175332

11 years agoDon't warn on conversion from NULL to nullptr_t
David Blaikie [Sat, 16 Feb 2013 00:56:22 +0000 (00:56 +0000)]
Don't warn on conversion from NULL to nullptr_t

llvm-svn: 175331

11 years agoEmit vtables for an extern template class as available_externally, not as
Richard Smith [Sat, 16 Feb 2013 00:51:21 +0000 (00:51 +0000)]
Emit vtables for an extern template class as available_externally, not as
linkonce_odr. Emit construction vtables as internal in this case, since the ABI
does not guarantee that they will be availble externally.

llvm-svn: 175330

11 years ago[PCH] Deserializing the DeclContext of a template parameter is not safe
Argyrios Kyrtzidis [Sat, 16 Feb 2013 00:48:59 +0000 (00:48 +0000)]
[PCH] Deserializing the DeclContext of a template parameter is not safe
until recursive loading is finished.

Otherwise we may end up with a template trying to deserialize a template
parameter that is in the process of getting loaded.

rdar://13135282

llvm-svn: 175329

11 years agoRemove unused forward declarations
Dmitri Gribenko [Sat, 16 Feb 2013 00:41:34 +0000 (00:41 +0000)]
Remove unused forward declarations

llvm-svn: 175328

11 years agoDerive ELF section type from the name in some cases where GNU as does
Joerg Sonnenberger [Sat, 16 Feb 2013 00:32:53 +0000 (00:32 +0000)]
Derive ELF section type from the name in some cases where GNU as does
so.

llvm-svn: 175327

11 years agoRework the visibility computation algorithm in preparation
John McCall [Sat, 16 Feb 2013 00:17:33 +0000 (00:17 +0000)]
Rework the visibility computation algorithm in preparation
for distinguishing type vs. value visibility.

The changes to the visibility of explicit specializations
are intentional.  The change to the "ugly" test case is
a consequence of a sensible implementation, and I am happy
to argue that this is better behavior.  Other changes may
or may not be intended;  it is quite difficult to divine
intent from some of the code I altered.

I've left behind a comment which I hope explains the
philosophy behind visibility computation.

llvm-svn: 175326

11 years ago[mips] Remove SDNPWantParent from the list of SDNodeProperties.
Akira Hatanaka [Sat, 16 Feb 2013 00:14:37 +0000 (00:14 +0000)]
[mips] Remove SDNPWantParent from the list of SDNodeProperties.

No functionality change intended.

llvm-svn: 175325

11 years agoPacify -Wnon-virtual-dtor
Matt Beaumont-Gay [Fri, 15 Feb 2013 23:51:59 +0000 (23:51 +0000)]
Pacify -Wnon-virtual-dtor

llvm-svn: 175324

11 years agoNSSet formatter is now C++ code
Enrico Granata [Fri, 15 Feb 2013 23:38:37 +0000 (23:38 +0000)]
NSSet formatter is now C++ code
Split some NS* formatters in their own source files
Refactored a utility function for the C++ formatters to use
Fixed the skip-summary test case to be explicit about requiring libstdc++ for operation

llvm-svn: 175323

11 years agoTemporary revert of 175320.
Bill Wendling [Fri, 15 Feb 2013 23:22:32 +0000 (23:22 +0000)]
Temporary revert of 175320.

llvm-svn: 175322

11 years agoReinitialize the ivars in the subtarget.
Bill Wendling [Fri, 15 Feb 2013 23:18:01 +0000 (23:18 +0000)]
Reinitialize the ivars in the subtarget.

When we're recalculating the feature set of the subtarget, we need to have the
ivars in their initial state.

llvm-svn: 175320

11 years agoSuppress a GCC -Wunused-variable warning in -Asserts builds
Matt Beaumont-Gay [Fri, 15 Feb 2013 23:12:33 +0000 (23:12 +0000)]
Suppress a GCC -Wunused-variable warning in -Asserts builds

llvm-svn: 175319

11 years agoFixes in the IRInterpreter:
Sean Callanan [Fri, 15 Feb 2013 23:07:52 +0000 (23:07 +0000)]
Fixes in the IRInterpreter:

- removed an unnecessary variable
- fixed an issue where we sometimes
  wrote too much data into a buffer
- made the recognition of variables
  as "this" a little more conservative

<rdar://problem/13216268>

llvm-svn: 175318

11 years agoc[ms-inline asm] It's possible to have a SizeDirective rewrite and an
Chad Rosier [Fri, 15 Feb 2013 22:54:16 +0000 (22:54 +0000)]
c[ms-inline asm] It's possible to have a SizeDirective rewrite and an
Input/Output rewrite to the same location.  Make sure the SizeDirective rewrite
is performed first.  This also ensure the sort algorithm is stable.

llvm-svn: 175317

11 years agoIf bundle alignment is enabled, do not add data to a fragment with instructions
Derek Schuff [Fri, 15 Feb 2013 22:50:52 +0000 (22:50 +0000)]
If bundle alignment is enabled, do not add data to a fragment with instructions

With bundle alignment, instructions all get their own MCFragments
(unless they are in a bundle-locked group). For instructions with
fixups, this is an MCDataFragment. Emitting actual data (e.g. for
.long) attempts to re-use MCDataFragments, which we don't want int
this case since it leads to fragments which exceed the bundle size.
So, don't reuse them in this case.
Also adds a test and fixes some formatting.

llvm-svn: 175316

11 years agoSupport changing the subtarget features in ARM.
Bill Wendling [Fri, 15 Feb 2013 22:41:25 +0000 (22:41 +0000)]
Support changing the subtarget features in ARM.

llvm-svn: 175315

11 years agoUse the 'target-features' and 'target-cpu' attributes to reset the subtarget features.
Bill Wendling [Fri, 15 Feb 2013 22:31:27 +0000 (22:31 +0000)]
Use the 'target-features' and 'target-cpu' attributes to reset the subtarget features.

If two functions require different features (e.g., `-mno-sse' vs. `-msse') then
we want to honor that, especially during LTO. We can do that by resetting the
subtarget's features depending upon the 'target-feature' attribute.

llvm-svn: 175314

11 years agoAdd test case for r175312.
Chad Rosier [Fri, 15 Feb 2013 21:58:41 +0000 (21:58 +0000)]
Add test case for r175312.

llvm-svn: 175313

11 years ago[ms-inline asm] Adjust the EndLoc to account for the ']'.
Chad Rosier [Fri, 15 Feb 2013 21:58:13 +0000 (21:58 +0000)]
[ms-inline asm] Adjust the EndLoc to account for the ']'.

llvm-svn: 175312

11 years agoForgot to 'svn add' the LoopVectorizer tests for the new parallel loop metadata,...
Pekka Jaaskelainen [Fri, 15 Feb 2013 21:50:19 +0000 (21:50 +0000)]
Forgot to 'svn add' the LoopVectorizer tests for the new parallel loop metadata, sorry.

llvm-svn: 175311

11 years ago[mips] Clean up class MipsCCInfo.
Akira Hatanaka [Fri, 15 Feb 2013 21:45:11 +0000 (21:45 +0000)]
[mips] Clean up class MipsCCInfo.

No functionality change intended.

llvm-svn: 175310

11 years agoImprove test harness for the buildbots
Daniel Malea [Fri, 15 Feb 2013 21:31:37 +0000 (21:31 +0000)]
Improve test harness for the buildbots
- Add a "parsable" mode to dotest.py that outputs test results in exactly the same format as clang's lit tests
- Improve dosep script to output list of failing tests (output should look like clang test failure summaries)
- Cleanup lldb/test/Makefile to remove needless parameters and environment variables
- Switch makefile tests to use parsable-mode output; should make the buildbot results parsable
- Switch makefile tests to use dosep to log catch crashing tests (instead of halting the test suite)

llvm-svn: 175309

11 years agoAdd the 'target-cpu' and 'target-features' attributes to functions.
Bill Wendling [Fri, 15 Feb 2013 21:30:01 +0000 (21:30 +0000)]
Add the 'target-cpu' and 'target-features' attributes to functions.

The back-end will use these values to reconfigure code generation for different
features.

llvm-svn: 175308

11 years agoMore test case cleanup (Linux and Mac):
Daniel Malea [Fri, 15 Feb 2013 21:27:14 +0000 (21:27 +0000)]
More test case cleanup (Linux and Mac):
- remove expectedFailure decorator from resolved rdar 12566646 and 10887661
- remove expectedFailure from TestBitfields testcase not actually affected by bug
- skip the (non-deterministic) TestStopHookMechanism.py to avoid a noisy suite on Linux

llvm-svn: 175307

11 years agocapitalize SCEV to match the current naming convention
Sebastian Pop [Fri, 15 Feb 2013 21:26:53 +0000 (21:26 +0000)]
capitalize SCEV to match the current naming convention

llvm-svn: 175306

11 years agocheck that clang-format exists
Sebastian Pop [Fri, 15 Feb 2013 21:26:50 +0000 (21:26 +0000)]
check that clang-format exists

llvm-svn: 175305

11 years agodon't store a pointer to the loop in IVS
Sebastian Pop [Fri, 15 Feb 2013 21:26:48 +0000 (21:26 +0000)]
don't store a pointer to the loop in IVS

llvm-svn: 175304

11 years agoadd NestLoops to remove some uses of IVS
Sebastian Pop [Fri, 15 Feb 2013 21:26:44 +0000 (21:26 +0000)]
add NestLoops to remove some uses of IVS

llvm-svn: 175303

11 years agocapitalize SCEV to match the current naming convention
Sebastian Pop [Fri, 15 Feb 2013 21:26:36 +0000 (21:26 +0000)]
capitalize SCEV to match the current naming convention

llvm-svn: 175302

11 years agoFix misuse of python subprocess module (caused "leaking" processes and garbling the...
Daniel Malea [Fri, 15 Feb 2013 21:21:52 +0000 (21:21 +0000)]
Fix misuse of python subprocess module (caused "leaking" processes and garbling the terminal)
- fixed cleanup of Popen objects by pushing spawn logic into test Base and out of test cases
- connect subprocess stdin to PIPE (rather than the parent's STDIN) to fix silent terminal issue

Tested on Linux and Mac OS X

llvm-svn: 175301

11 years ago[mips] Split SelectAddr, which was used to match address patterns, into two
Akira Hatanaka [Fri, 15 Feb 2013 21:20:45 +0000 (21:20 +0000)]
[mips] Split SelectAddr, which was used to match address patterns, into two
functions. Set AddedComplexity to determine the order in which patterns are
matched.

This simplifies selection of floating point loads/stores.

No functionality change intended.

llvm-svn: 175300

11 years agolibclang: add clang_getTypeSpelling(CXType CT)
Dmitri Gribenko [Fri, 15 Feb 2013 21:15:49 +0000 (21:15 +0000)]
libclang: add clang_getTypeSpelling(CXType CT)

Adds a function clang_getTypeSpelling(CXType CT) that returns
a CXString containing the underlying type.

Patch by Ben Gertzfield.

llvm-svn: 175299

11 years agoobjective-C: Fixes a compiler crash when encoding
Fariborz Jahanian [Fri, 15 Feb 2013 21:14:50 +0000 (21:14 +0000)]
objective-C: Fixes a compiler crash when encoding
an ivar of type pointer to a typedef'ed object.
// rdar://13190095

llvm-svn: 175298

11 years agoRemove a final dependency on the form field in tablegen; which is a remnant
Reed Kotler [Fri, 15 Feb 2013 21:05:58 +0000 (21:05 +0000)]
Remove a final dependency on the form field in tablegen; which is a remnant
of the old jit and which we don't intend to support in mips16 or micromips.
This dependency is for the testing of whether an instruction is a pseudo.

llvm-svn: 175297

11 years agouse apply and ScevParameterRewriter::rewrite instead of SCEVRewriter
Sebastian Pop [Fri, 15 Feb 2013 20:56:01 +0000 (20:56 +0000)]
use apply and ScevParameterRewriter::rewrite instead of SCEVRewriter

llvm-svn: 175296

11 years agoadd LoopToScev maps
Sebastian Pop [Fri, 15 Feb 2013 20:55:59 +0000 (20:55 +0000)]
add LoopToScev maps

llvm-svn: 175295

11 years agoadd ScevApplyRewriter
Sebastian Pop [Fri, 15 Feb 2013 20:55:36 +0000 (20:55 +0000)]
add ScevApplyRewriter

llvm-svn: 175294

11 years agoadd SCEVParameterRewriter
Sebastian Pop [Fri, 15 Feb 2013 20:55:33 +0000 (20:55 +0000)]
add SCEVParameterRewriter

llvm-svn: 175293

11 years agoAsmParser: Reformat the MS asm parser to reduce nesting.
Benjamin Kramer [Fri, 15 Feb 2013 20:37:21 +0000 (20:37 +0000)]
AsmParser: Reformat the MS asm parser to reduce nesting.

While there postpone register name printing after uniquing.
No intended functionality change.

llvm-svn: 175292

11 years agoRecognize < and > as binary expressions in builder-type calls.
Daniel Jasper [Fri, 15 Feb 2013 20:33:06 +0000 (20:33 +0000)]
Recognize < and > as binary expressions in builder-type calls.

The current heuristic assumes that there can't be binary operators in
builder-type calls (excluding assigments). However, it also excluded
< and > in general, which is wrong. Now they are only excluded if they
are template parameters.

Before:
return aaaaaaaaaaaaaaaaa->aaaaa().aaaaaaaaaaaaa()i
       .aaaaaa() < aaaaaaaaaaaaaaaaaaa->aaaaa().aaaaaaaaaaaaa().aaaaaa();

After:
return aaaaaaaaaaaaaaaaa->aaaaa().aaaaaaaaaaaaa().aaaaaa() <
       aaaaaaaaaaaaaaaaaaa->aaaaa().aaaaaaaaaaaaa().aaaaaa();

llvm-svn: 175291

11 years agoRename [Enable|Disable]Breakpoint() to [Enable|Disable]BreakpointSite() in POSIX...
Daniel Malea [Fri, 15 Feb 2013 20:23:25 +0000 (20:23 +0000)]
Rename [Enable|Disable]Breakpoint() to [Enable|Disable]BreakpointSite() in POSIX plugin
- needed due to r175241

llvm-svn: 175290

11 years agoFixed diagnostic nondeterministic order bug (pr14901).
Enea Zaffanella [Fri, 15 Feb 2013 20:09:55 +0000 (20:09 +0000)]
Fixed diagnostic nondeterministic order bug (pr14901).

llvm-svn: 175289

11 years agoPropagate changes through no-op transforms
Edwin Vane [Fri, 15 Feb 2013 19:38:28 +0000 (19:38 +0000)]
Propagate changes through no-op transforms

Currently, changes made by previous transforms are not kept if a transform
doesn't make any changes itself to a given file. Now file states are propagated
properly through transforms that don't make changes.

Fixes: PR15281
Author: Jack Yang <jack.yang@intel.com>
Reviewer: klimek
llvm-svn: 175288

11 years agoLinux test case cleanup:
Daniel Malea [Fri, 15 Feb 2013 19:37:48 +0000 (19:37 +0000)]
Linux test case cleanup:
- Enable TestFormatters.py: expressions with "new" work
- Enable TestChangeValueAPI.py: llvm.org/PR15039 fixed
- Disable expression_command/call-restarts due to llvm.org/PR15278
- Disable expression_command/call-throws due to ObjC test program

llvm-svn: 175287

11 years agoDone break between 'operator' and '<<'.
Daniel Jasper [Fri, 15 Feb 2013 19:24:08 +0000 (19:24 +0000)]
Done break between 'operator' and '<<'.

Before:
ostream &operator
    <<(ostream &out, some::ns::SomeReallyLongType WithSomeReallyLongValue);

After:
ostream &operator<<(ostream &out,
                    some::ns::SomeReallyLongType WithSomeReallyLongValue);

llvm-svn: 175286

11 years ago[ASan] make variables unsigned to silence warnings - attempt 2
Alexey Samsonov [Fri, 15 Feb 2013 19:22:49 +0000 (19:22 +0000)]
[ASan] make variables unsigned to silence warnings - attempt 2

llvm-svn: 175285

11 years ago[ASan] make variable unsigned to silence the warning
Alexey Samsonov [Fri, 15 Feb 2013 19:02:32 +0000 (19:02 +0000)]
[ASan] make variable unsigned to silence the warning

llvm-svn: 175284

11 years agoenable SDISel sincos optimization for GNU environments
Paul Redmond [Fri, 15 Feb 2013 18:45:18 +0000 (18:45 +0000)]
enable SDISel sincos optimization for GNU environments

- add sincos to runtime library if target triple environment is GNU
- added canCombineSinCosLibcall() which checks that sincos is in the RTL and
  if the environment is GNU then unsafe fpmath is enabled (required to
  preserve errno)
- extended sincos-opt lit test

Reviewed by: Hal Finkel

llvm-svn: 175283