platform/upstream/llvm.git
11 years ago[ms-inline asm] Remove a redundant call to the setHasMSInlineAsm function.
Chad Rosier [Mon, 18 Feb 2013 20:13:59 +0000 (20:13 +0000)]
[ms-inline asm] Remove a redundant call to the setHasMSInlineAsm function.

llvm-svn: 175456

11 years agolibclang: don't store nul-terminated strings as StringRefs,
Dmitri Gribenko [Mon, 18 Feb 2013 19:50:38 +0000 (19:50 +0000)]
libclang: don't store nul-terminated strings as StringRefs,
if the nul-terminatedness property is important for clients.

Also, don't return the same CXString multiple times.  This did not create a
correctness issue in practice because the CXString was of an CXS_Unmanaged
kind, and destruction was a no-op.

llvm-svn: 175455

11 years agoClean up last use of dyn_cast on TypeLoc in ASTMatchers
David Blaikie [Mon, 18 Feb 2013 19:04:16 +0000 (19:04 +0000)]
Clean up last use of dyn_cast on TypeLoc in ASTMatchers

llvm-svn: 175454

11 years agoTest for my last patch. // rdar://13178483
Fariborz Jahanian [Mon, 18 Feb 2013 19:02:44 +0000 (19:02 +0000)]
Test for my last patch. // rdar://13178483

llvm-svn: 175453

11 years agoUse llvm::cast instead of reinterpret_cast.
Jakub Staszak [Mon, 18 Feb 2013 18:49:44 +0000 (18:49 +0000)]
Use llvm::cast instead of reinterpret_cast.
Also, GetElementPtrInst::getType() method returns SequentialType now, instead of
PointerType. There wasn't any issue yet, so no testcase attached.

llvm-svn: 175452

11 years agoAdd include guards for CommentVisitor.h
Argyrios Kyrtzidis [Mon, 18 Feb 2013 18:31:16 +0000 (18:31 +0000)]
Add include guards for CommentVisitor.h

llvm-svn: 175451

11 years agoPrevent crash on multiple user errors (which I cannot reproduce in
Fariborz Jahanian [Mon, 18 Feb 2013 17:22:23 +0000 (17:22 +0000)]
Prevent crash on multiple user errors (which I cannot reproduce in
a small test case). // rdar://13178483.

llvm-svn: 175450

11 years agoAdd front/back/erase to MapVector.
Douglas Gregor [Mon, 18 Feb 2013 16:03:04 +0000 (16:03 +0000)]
Add front/back/erase to MapVector.

llvm-svn: 175449

11 years agoCodeGenFunction::CurFuncDecl can be NULL; fix crash introduced in r175386.
Douglas Gregor [Mon, 18 Feb 2013 15:59:24 +0000 (15:59 +0000)]
CodeGenFunction::CurFuncDecl can be NULL; fix crash introduced in r175386.

llvm-svn: 175448

11 years agoEnsure that the identifier chains have the most recent declaration after module deser...
Douglas Gregor [Mon, 18 Feb 2013 15:53:43 +0000 (15:53 +0000)]
Ensure that the identifier chains have the most recent declaration after module deserialization.

This commit introduces a set of related changes to ensure that the
declaration that shows up in the identifier chain after deserializing
declarations with a given identifier is, in fact, the most recent
declaration. The primary change involves waiting until after we
deserialize and wire up redeclaration chains before updating the
identifier chains. There is a minor optimization in here to avoid
recursively deserializing names as part of looking to see whether
top-level declarations for a given name exist.

A related change that became suddenly more urgent is to property
record a merged declaration when an entity first declared in the
current translation unit is later deserialized from a module (that had
not been loaded at the time of the original declaration). Since we key
off the canonical declaration (which is parsed, not from an AST file)
for emitted redeclarations, we simply record this as a merged
declaration during AST writing and let the readers merge them.

Re-fixes <rdar://problem/13189985>, presumably for good this time.

llvm-svn: 175447

11 years agoR600/SI: Use MULADD_IEEE/V_MAD_F32 instruction for mad pattern
Vincent Lejeune [Mon, 18 Feb 2013 14:11:28 +0000 (14:11 +0000)]
R600/SI: Use MULADD_IEEE/V_MAD_F32 instruction for mad pattern

llvm-svn: 175446

11 years agoR600: Support for TBO
Vincent Lejeune [Mon, 18 Feb 2013 14:11:19 +0000 (14:11 +0000)]
R600: Support for TBO

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

Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
llvm-svn: 175445

11 years agoImprove indentation of builder type calls.
Daniel Jasper [Mon, 18 Feb 2013 13:52:06 +0000 (13:52 +0000)]
Improve indentation of builder type calls.

In builder-type calls, it can be very confusing to just indent
parameters from the start of the line. Instead, indent 4 from the
correct function call.

Before:
aaaaaaaaaaaaaaaaaaa()->aaaaaa(bbbbb)->aaaaaaaaaaaaaaaaaaa( // break
    aaaaaaaaaaaaaa);
aaaaaaaaaaaaaaaaaaaaaaa *aaaaaaaaa = aaaaaa->aaaaaaaaaaaa()->aaaaaaaaaaaaaaaa(
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)
    ->aaaaaaaaaaaaaaaaa();

After:
aaaaaaaaaaaaaaaaaaa()->aaaaaa(bbbbb)->aaaaaaaaaaaaaaaaaaa( // break
                                        aaaaaaaaaaaaaa);
aaaaaaaaaaaaaaaaaaaaaaa *aaaaaaaaa = aaaaaa->aaaaaaaaaaaa()
    ->aaaaaaaaaaaaaaaa(
        aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)
    ->aaaaaaaaaaaaaaaaa();

llvm-svn: 175444

11 years agoR600: Increase number of ArrayBase Reg to 32
Vincent Lejeune [Mon, 18 Feb 2013 13:48:09 +0000 (13:48 +0000)]
R600: Increase number of ArrayBase Reg to 32

Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
llvm-svn: 175443

11 years ago[asan] revert r175266 as it breaks code with packed structures. supporting long doubl...
Kostya Serebryany [Mon, 18 Feb 2013 13:47:02 +0000 (13:47 +0000)]
[asan] revert r175266 as it breaks code with packed structures. supporting long double will require a more general solution

llvm-svn: 175442

11 years agoImprove formatting of builder-type calls.
Daniel Jasper [Mon, 18 Feb 2013 13:24:21 +0000 (13:24 +0000)]
Improve formatting of builder-type calls.

Before:
aaaaaaa->aaaaaaa->aaaaaaaaaaaaaaaa(
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)->aaaaaaaa(aaaaaaaaaaaaaaa);

After:
aaaaaaa->aaaaaaa
    ->aaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)
    ->aaaaaaaa(aaaaaaaaaaaaaaa);

llvm-svn: 175441

11 years agoReformat lines if they were "moved around".
Daniel Jasper [Mon, 18 Feb 2013 13:08:03 +0000 (13:08 +0000)]
Reformat lines if they were "moved around".

An unwrapped line can get moved around if there is no newline before
it and the previous line was formatted.

Example:

  template<typename T>  // Cursor is on this line when hitting "format"
  T *getFETokenInfo() const { return static_cast<T*>(FETokenInfo); }

"return .." is the second unwrapped line in this scenario. I does not
touch any reformatted region. Thus, the result of formatting is:

  template <typename T> T *getFETokenInfo() const { return static_cast<T *>(FETokenInfo); }

After second format (and arguably desired end-result):

  template <typename T> T *getFETokenInfo() const {
      return static_cast<T *>(FETokenInfo);
  }

This fixes: llvm.org/PR15060.

llvm-svn: 175440

11 years agoCorrectly determine */& usage in more cases.
Daniel Jasper [Mon, 18 Feb 2013 12:44:35 +0000 (12:44 +0000)]
Correctly determine */& usage in more cases.

This fixes llvm.org/PR15248.

Before:
Test::Test(int b) : a(b *b) {}
for (int i = 0; i < a *a; ++i) {}

After:
Test::Test(int b) : a(b * b) {}
for (int i = 0; i < a * a; ++i) {}

llvm-svn: 175439

11 years agoAArch64: add atomic support parameters to TargetInfo
Tim Northover [Mon, 18 Feb 2013 12:11:32 +0000 (12:11 +0000)]
AArch64: add atomic support parameters to TargetInfo

This allows Clang to detect and deal wih __atomic_* operations properly on
AArch64. Previously we produced an error when encountering them at high
optimisation levels.

llvm-svn: 175438

11 years agoFutureproof AttrBuild if we ever have more than 64 attr enum values.
Benjamin Kramer [Mon, 18 Feb 2013 12:09:51 +0000 (12:09 +0000)]
Futureproof AttrBuild if we ever have more than 64 attr enum values.

Currently we're at 34. Bitset should compile into virtually the same code as
uint64_t here.

llvm-svn: 175437

11 years agoAlways break after multi-line string literals.
Daniel Jasper [Mon, 18 Feb 2013 11:59:17 +0000 (11:59 +0000)]
Always break after multi-line string literals.

Otherwise, other parameters can be quite hidden.
Reformatted unittests/Format/FormatTest.cpp after this.

Before:
someFunction("Always break between multi-line"
             " string literals", and, other, parameters);

After:
someFunction("Always break between multi-line"
             " string literals",
             and, other, parameters);

llvm-svn: 175436

11 years agoRevert CMake version bump since we don't actually need 2.8.6 any more.
Tim Northover [Mon, 18 Feb 2013 11:53:37 +0000 (11:53 +0000)]
Revert CMake version bump since we don't actually need 2.8.6 any more.

The problem call was removed in the interim. Apologies.

llvm-svn: 175435

11 years agoNote minimum required version of CMake
Tim Northover [Mon, 18 Feb 2013 11:41:04 +0000 (11:41 +0000)]
Note minimum required version of CMake

We already use features from 2.8.6, this just gives a slightly more friendly
message when the dependency isn't met.

Patch from Keith Walker.

llvm-svn: 175434

11 years agoAArch64: adjust tests which rely on a default JIT
Tim Northover [Mon, 18 Feb 2013 11:08:37 +0000 (11:08 +0000)]
AArch64: adjust tests which rely on a default JIT

Profiling tests *do* need a JIT. They'll pass if a cross-compiler targetting
AArch64 by default has been built, but fail if a native AArch64 compiler has
been build. Therefore XFAIL is inappropriate and we mark them unsupported.

ExecutionEngine tests are JIT by definition, they should also be unsupported.

Transforms/LICM only uses the interpreter to check the output is still sane
after optimisation. It can be switched to use an interpreter.

llvm-svn: 175433

11 years agoPrevent line breaks that make stuff hard to read.
Daniel Jasper [Mon, 18 Feb 2013 11:05:07 +0000 (11:05 +0000)]
Prevent line breaks that make stuff hard to read.

Before:
aaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaa).aaaaaaaaaaaaaaaaa(
    aaaaaaaaaaaaaaaaaaaaa).aaaaaaaaaaaaaaaaaaa(
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa);

After:
aaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaa)
    .aaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaa)
    .aaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaa,
                         aaaaaaaaaaaaaaaaaaa,
                         aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa);

llvm-svn: 175432

11 years ago[asan] enable asan_prelink_test when gold is the default linker (gold and bfd linker...
Kostya Serebryany [Mon, 18 Feb 2013 08:37:49 +0000 (08:37 +0000)]
[asan] enable asan_prelink_test when gold is the default linker (gold and bfd linker have different flag syntax)

llvm-svn: 175431

11 years agoAdd `unsigned DISubprogram::getFlags() const` for DragonEgg.
David Blaikie [Mon, 18 Feb 2013 08:04:16 +0000 (08:04 +0000)]
Add `unsigned DISubprogram::getFlags() const` for DragonEgg.

llvm-svn: 175430

11 years ago[asan] added flag -d|--demangle to asan_symbolize.py, makes addr2line/llvm-symbolizer...
Kostya Serebryany [Mon, 18 Feb 2013 08:02:16 +0000 (08:02 +0000)]
[asan] added flag -d|--demangle to asan_symbolize.py, makes addr2line/llvm-symbolizer demangle the functions names

llvm-svn: 175429

11 years agoAdd `DIFile DISubprogram::getFile() const` for DragonEgg.
David Blaikie [Mon, 18 Feb 2013 07:54:55 +0000 (07:54 +0000)]
Add `DIFile DISubprogram::getFile() const` for DragonEgg.

llvm-svn: 175428

11 years agoUpdate test cases to account for DIBuilder type changes.
David Blaikie [Mon, 18 Feb 2013 07:27:35 +0000 (07:27 +0000)]
Update test cases to account for DIBuilder type changes.

Paired commit with LLVM, may produce temporary build breakage.

llvm-svn: 175427

11 years agoDIBuilder: Correct the null/0 type of trailing fields in struct debug info.
David Blaikie [Mon, 18 Feb 2013 07:27:30 +0000 (07:27 +0000)]
DIBuilder: Correct the null/0 type of trailing fields in struct debug info.

Paired with an Clang commit so this may cause temporary build failures.

llvm-svn: 175426

11 years agoDisable dead stores checker for template instantations. Fixes <rdar://problem/13213575>.
Ted Kremenek [Mon, 18 Feb 2013 07:18:28 +0000 (07:18 +0000)]
Disable dead stores checker for template instantations.  Fixes <rdar://problem/13213575>.

llvm-svn: 175425

11 years ago[Sanitizer] Make temporary filename depend on user ID
Alexey Samsonov [Mon, 18 Feb 2013 07:17:12 +0000 (07:17 +0000)]
[Sanitizer] Make temporary filename depend on user ID

llvm-svn: 175424

11 years agoDIBuilder: Add function and method definitions to the list of all subprograms
David Blaikie [Mon, 18 Feb 2013 07:10:22 +0000 (07:10 +0000)]
DIBuilder: Add function and method definitions to the list of all subprograms

Previously we seemed to be assuming that all functions were definitions and all
methods were declarations. This may be consistent with how Clang uses DIBuilder
but doesn't have to be true of all clients (such as DragonEgg).

llvm-svn: 175423

11 years ago[ms-inline asm] Fix undefined behavior to reset hasMSInlineAsm in advance of SelectAl...
NAKAMURA Takumi [Mon, 18 Feb 2013 07:06:48 +0000 (07:06 +0000)]
[ms-inline asm] Fix undefined behavior to reset hasMSInlineAsm in advance of SelectAllBasicBlocks().

llvm-svn: 175422

11 years agoNarrow the return types of a few DIBuilder utility functions.
David Blaikie [Mon, 18 Feb 2013 06:41:57 +0000 (06:41 +0000)]
Narrow the return types of a few DIBuilder utility functions.

llvm-svn: 175421

11 years agoExpand macro/pseudo instructions BtnezT8SltX16 and BtnezT8SltuX16.
Reed Kotler [Mon, 18 Feb 2013 05:43:03 +0000 (05:43 +0000)]
Expand macro/pseudo instructions BtnezT8SltX16 and BtnezT8SltuX16.

llvm-svn: 175420

11 years agoExpand pseudo/macro BteqzT8SltuX16 . There is no test case because
Reed Kotler [Mon, 18 Feb 2013 04:55:38 +0000 (04:55 +0000)]
Expand pseudo/macro BteqzT8SltuX16 . There is no test case because
at this time, llvm is generating a different but equivalent pattern
that would lead to this instruction. I am trying to think of a way
to get it to generate this. If I can't, I may just remove the pseudo.

llvm-svn: 175419

11 years agoFix up grammar a bit.
Eric Christopher [Mon, 18 Feb 2013 04:38:06 +0000 (04:38 +0000)]
Fix up grammar a bit.

llvm-svn: 175418

11 years agoExpand pseudo/macro BteqzT8SltX16.
Reed Kotler [Mon, 18 Feb 2013 04:04:26 +0000 (04:04 +0000)]
Expand pseudo/macro BteqzT8SltX16.

llvm-svn: 175417

11 years agoExpand macro/pseudo BteqzT8CmpX16.
Reed Kotler [Mon, 18 Feb 2013 03:06:29 +0000 (03:06 +0000)]
Expand macro/pseudo BteqzT8CmpX16.

llvm-svn: 175416

11 years agoSpelling corrections
Alex Rosenberg [Mon, 18 Feb 2013 02:44:09 +0000 (02:44 +0000)]
Spelling corrections

llvm-svn: 175415

11 years agoUnify some "kernel or kext" conditionals.
Eric Christopher [Mon, 18 Feb 2013 01:16:37 +0000 (01:16 +0000)]
Unify some "kernel or kext" conditionals.

llvm-svn: 175414

11 years agoBeginning of expanding all current mips16 macro/pseudo instruction sequences.
Reed Kotler [Mon, 18 Feb 2013 00:59:04 +0000 (00:59 +0000)]
Beginning of expanding all current mips16 macro/pseudo instruction sequences.
This expansion will be moved to expandISelPseudos as soon as I can figure
out how to do that. There are other instructions which use this
ExpandFEXT_T8I816_ins and as soon as I have finished expanding them all,
I will delete the macro asm string text so it has no way to be used
in the future.

llvm-svn: 175413

11 years agoAdd a comment.
Eric Christopher [Mon, 18 Feb 2013 00:38:34 +0000 (00:38 +0000)]
Add a comment.

llvm-svn: 175412

11 years agoClean up comment.
Eric Christopher [Mon, 18 Feb 2013 00:38:31 +0000 (00:38 +0000)]
Clean up comment.

llvm-svn: 175411

11 years agoGrammar.
Eric Christopher [Mon, 18 Feb 2013 00:38:28 +0000 (00:38 +0000)]
Grammar.

llvm-svn: 175410

11 years agoUnify some code. No functional change.
Eric Christopher [Mon, 18 Feb 2013 00:38:25 +0000 (00:38 +0000)]
Unify some code. No functional change.

llvm-svn: 175409

11 years agoX86: Add a note.
Benjamin Kramer [Sun, 17 Feb 2013 23:34:14 +0000 (23:34 +0000)]
X86: Add a note.

llvm-svn: 175408

11 years ago[XCore] Add missing 2r instructions.
Richard Osborne [Sun, 17 Feb 2013 22:38:05 +0000 (22:38 +0000)]
[XCore] Add missing 2r instructions.

These instructions are not targeted by the compiler but it is needed for
the MC layer.

llvm-svn: 175407

11 years ago[XCore] Add TSETR instruction.
Richard Osborne [Sun, 17 Feb 2013 22:32:41 +0000 (22:32 +0000)]
[XCore] Add TSETR instruction.

This instruction is not targeted by the compiler but it is needed for the
MC layer.

llvm-svn: 175406

11 years agoAdded a host call to get the number of CPUs. It should work on all POSIX unixes,...
Greg Clayton [Sun, 17 Feb 2013 20:46:30 +0000 (20:46 +0000)]
Added a host call to get the number of CPUs. It should work on all POSIX unixes, linux and Windows.

llvm-svn: 175405

11 years ago[XCore] Add missing u10 / lu10 instructions.
Richard Osborne [Sun, 17 Feb 2013 20:44:48 +0000 (20:44 +0000)]
[XCore] Add missing u10 / lu10 instructions.

These instructions are not targeted by the compiler but they are
needed for the MC layer.

llvm-svn: 175404

11 years ago[XCore] Add missing u6 / lu6 instructions.
Richard Osborne [Sun, 17 Feb 2013 20:43:17 +0000 (20:43 +0000)]
[XCore] Add missing u6 / lu6 instructions.

These instructions are not targeted by the compiler but they are
needed for the MC layer.

llvm-svn: 175403

11 years agoReturn false instead of 0.
Jakub Staszak [Sun, 17 Feb 2013 18:35:25 +0000 (18:35 +0000)]
Return false instead of 0.

llvm-svn: 175402

11 years agoForce a cpu for test. It failed on atom due to different scheduling decisions.
Benjamin Kramer [Sun, 17 Feb 2013 18:26:11 +0000 (18:26 +0000)]
Force a cpu for test. It failed on atom due to different scheduling decisions.

llvm-svn: 175401

11 years agoAArch64: Avoid shifts by 64, that's undefined behavior.
Benjamin Kramer [Sun, 17 Feb 2013 17:55:32 +0000 (17:55 +0000)]
AArch64: Avoid shifts by 64, that's undefined behavior.

No functionality change.

llvm-svn: 175400

11 years agoFix -use-nullptr problems with assert()
Edwin Vane [Sun, 17 Feb 2013 16:45:54 +0000 (16:45 +0000)]
Fix -use-nullptr problems with assert()

If a cast expression (NullToPointer) is detected in a function-like macro
parameter, we should use the spelling location instead of the expansion
location. Using SourceManager::getFileLoc() fixes this problem.

Also added testcases for this bug.

Fixes: PR15279
Author: Tareq A Siraj <tareq.a.siraj@intel.com>
Reviewer: klimek
llvm-svn: 175399

11 years agoAdd multithreading functions and shutdown to the C API. Patch by Moritz
Duncan Sands [Sun, 17 Feb 2013 16:35:51 +0000 (16:35 +0000)]
Add multithreading functions and shutdown to the C API.  Patch by Moritz
Maxeiner.

llvm-svn: 175398

11 years agoBBVectorize: Fix an invalid reference bug
Hal Finkel [Sun, 17 Feb 2013 15:59:26 +0000 (15:59 +0000)]
BBVectorize: Fix an invalid reference bug

This fixes PR15289. This bug was introduced (recently) in r175215; collecting
all std::vector references for candidate pairs to delete at once is invalid
because subsequent lookups in the owning DenseMap could invalidate the
references.

bugpoint was able to reduce a useful test case. Unfortunately, because whether
or not this asserts depends on memory layout, this test case will sometimes
appear to produce valid output. Nevertheless, running under valgrind will
reveal the error.

llvm-svn: 175397

11 years agoTest ivar-invariant.m: use a more idiomatic RUN line and tighten the test
Dmitri Gribenko [Sun, 17 Feb 2013 14:59:41 +0000 (14:59 +0000)]
Test ivar-invariant.m: use a more idiomatic RUN line and tighten the test
by matching the function name first

llvm-svn: 175395

11 years agoMake the visibility of LLVMPPCCompilationCallback work with GCC.
Benjamin Kramer [Sun, 17 Feb 2013 14:30:32 +0000 (14:30 +0000)]
Make the visibility of LLVMPPCCompilationCallback work with GCC.

GCC warns about the attribute being ignored if it occurs after void*.
There seems to be some kind of incompatibility between clang and gcc here, but
I can't fathom who's right.

void* LLVM_LIBRARY_VISIBILITY foo(); // clang: hidden, gcc: default
LLVM_LIBRARY_VISIBILITY void *bar(); // clang: hidden, gcc: hidden
void LLVM_LIBRARY_VISIBILITY qux();  // clang: hidden, gcc: hidden

llvm-svn: 175394

11 years agoRemove use of reverse iterators in repairIntervalsInRange(). While they were
Cameron Zwarich [Sun, 17 Feb 2013 11:09:00 +0000 (11:09 +0000)]
Remove use of reverse iterators in repairIntervalsInRange(). While they were
arguably better than forward iterators for this use case, they are confusing and
there are some implementation problems with reverse iterators and MI bundles.

llvm-svn: 175393

11 years agoRemove block names from test case to unbreak release builds.
Lang Hames [Sun, 17 Feb 2013 10:18:28 +0000 (10:18 +0000)]
Remove block names from test case to unbreak release builds.

Thanks Chandler. :)

llvm-svn: 175392

11 years agoDocumentation: use \brief and don't duplicate the name of the declared entity
James Dennett [Sun, 17 Feb 2013 08:24:19 +0000 (08:24 +0000)]
Documentation: use \brief and don't duplicate the name of the declared entity
at the start of the doc comment.

llvm-svn: 175391

11 years agoDocumentation cleanup: fix a typo ("////" for "///") and suppress Doxygen's
James Dennett [Sun, 17 Feb 2013 08:19:35 +0000 (08:19 +0000)]
Documentation cleanup: fix a typo ("////" for "///") and suppress Doxygen's
automatic link generation for "file:", as it's not used as a URL here.

llvm-svn: 175390

11 years agoRe-apply r174919 - smarter copy/move assignment/construction, with fixes for
Lang Hames [Sun, 17 Feb 2013 07:22:09 +0000 (07:22 +0000)]
Re-apply r174919 - smarter copy/move assignment/construction, with fixes for
bitfield related issues.

The original commit broke Takumi's builder. The bug was caused by bitfield sizes
being determined by their underlying type, rather than the field info. A similar
issue with bitfield alignments showed up on closer testing. Both have been fixed
in this patch.

llvm-svn: 175389

11 years ago[clang] fix test execution command
Saleem Abdulrasool [Sun, 17 Feb 2013 04:13:35 +0000 (04:13 +0000)]
[clang] fix test execution command

Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org>
llvm-svn: 175387

11 years ago[CodeGen] tighten objc ivar invariant.load attribution
Saleem Abdulrasool [Sun, 17 Feb 2013 04:03:34 +0000 (04:03 +0000)]
[CodeGen] tighten objc ivar invariant.load attribution

An ivar ofset cannot be marked as invariant load in all cases.  The ivar offset
is a lazily initialised constant, which is dependent on an objc_msgSend
invocation to perform a fixup of the offset.  If the load is being performed on
a method implemented by the class then this load can safely be marked as an
inviarant because a message must have been passed to the class at some point,
forcing the ivar offset to be resolved.

An additional heuristic that can be used to identify an invariant load would be
if the ivar offset base is a parameter to an objc method.  However, without the
parameters available at hand, this is currently not possible.

Reviewed-by: John McCall <rjmccall@apple.com>
Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org>
llvm-svn: 175386

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