platform/upstream/llvm.git
11 years agoIf an unimported submodule of an imported module contains a declaration of a
Richard Smith [Sun, 14 Jul 2013 02:01:48 +0000 (02:01 +0000)]
If an unimported submodule of an imported module contains a declaration of a
global allocation or deallocation function, that should not cause that global
allocation or deallocation function to become unavailable.

llvm-svn: 186270

11 years agoCatch more CHECK that can be converted to CHECK-LABEL in Transforms for easier debugg...
Stephen Lin [Sun, 14 Jul 2013 01:50:49 +0000 (01:50 +0000)]
Catch more CHECK that can be converted to CHECK-LABEL in Transforms for easier debugging. No functionality change.

This conversion was done with the following bash script:

  find test/Transforms -name "*.ll" | \
  while read NAME; do
    echo "$NAME"
    if ! grep -q "^; *RUN: *llc" $NAME; then
      TEMP=`mktemp -t temp`
      cp $NAME $TEMP
      sed -n "s/^define [^@]*@\([A-Za-z0-9_]*\)(.*$/\1/p" < $NAME | \
      while read FUNC; do
        sed -i '' "s/;\(.*\)\([A-Za-z0-9_]*\):\( *\)define\([^@]*\)@$FUNC\([( ]*\)\$/;\1\2-LABEL:\3define\4@$FUNC(/g" $TEMP
      done
      mv $TEMP $NAME
    fi
  done

llvm-svn: 186269

11 years agoUpdate Transforms tests to use CHECK-LABEL for easier debugging. No functionality...
Stephen Lin [Sun, 14 Jul 2013 01:42:54 +0000 (01:42 +0000)]
Update Transforms tests to use CHECK-LABEL for easier debugging. No functionality change.

This update was done with the following bash script:

  find test/Transforms -name "*.ll" | \
  while read NAME; do
    echo "$NAME"
    if ! grep -q "^; *RUN: *llc" $NAME; then
      TEMP=`mktemp -t temp`
      cp $NAME $TEMP
      sed -n "s/^define [^@]*@\([A-Za-z0-9_]*\)(.*$/\1/p" < $NAME | \
      while read FUNC; do
        sed -i '' "s/;\(.*\)\([A-Za-z0-9_]*\):\( *\)@$FUNC\([( ]*\)\$/;\1\2-LABEL:\3@$FUNC(/g" $TEMP
      done
      mv $TEMP $NAME
    fi
  done

llvm-svn: 186268

11 years agoModify two Transforms tests to explicitly check for full function names in some cases...
Stephen Lin [Sun, 14 Jul 2013 01:38:19 +0000 (01:38 +0000)]
Modify two Transforms tests to explicitly check for full function names in some cases, rather than just a common prefix. No functionality change.

(This is to avoid confusing a scripted mass update of these tests to use CHECK-LABEL)

llvm-svn: 186267

11 years agoSerialization support for TagDecl::IsCompleteDefinitionRequired
David Blaikie [Sun, 14 Jul 2013 01:07:41 +0000 (01:07 +0000)]
Serialization support for TagDecl::IsCompleteDefinitionRequired

Requested by Richard Smith in post-commit review of r186262

llvm-svn: 186266

11 years agoInitialize the "IsCompleteDefinitionRequired" field in the ASTContext ctor
David Blaikie [Sat, 13 Jul 2013 22:29:32 +0000 (22:29 +0000)]
Initialize the "IsCompleteDefinitionRequired" field in the ASTContext ctor

Introduced in r186262 & found by the hexagon buildbots (but owing to
this being UB, that's random chance - so there's no additional test case
here)

llvm-svn: 186265

11 years agoConvert Windows to Unix line endings, no functionality change.
Stephen Lin [Sat, 13 Jul 2013 22:08:55 +0000 (22:08 +0000)]
Convert Windows to Unix line endings, no functionality change.

llvm-svn: 186264

11 years agoAdd newlines at end of test files, no functionality change
Stephen Lin [Sat, 13 Jul 2013 22:00:58 +0000 (22:00 +0000)]
Add newlines at end of test files, no functionality change

llvm-svn: 186263

11 years agoPR16214, PR14467: DebugInfo: use "RequireCompleteType" to decide when to emit the...
David Blaikie [Sat, 13 Jul 2013 21:08:14 +0000 (21:08 +0000)]
PR16214, PR14467: DebugInfo: use "RequireCompleteType" to decide when to emit the full definition of a type in -flimit-debug-info

This simplifies the core benefit of -flimit-debug-info by taking a more
systematic approach to avoid emitting debug info definitions for types
that only require declarations. The previous ad-hoc approach (3 cases
removed in this patch) had many holes.

The general approach (adding a bit to TagDecl and callback through
ASTConsumer) has been discussed with Richard Smith - though always open
to revision.

llvm-svn: 186262

11 years agoCorrectly classify pack expansions as NON_CANONICAL_UNLESS_DEPENDENT
David Blaikie [Sat, 13 Jul 2013 21:08:08 +0000 (21:08 +0000)]
Correctly classify pack expansions as NON_CANONICAL_UNLESS_DEPENDENT

Test coverage for non-dependent pack expansions doesn't demonstrate a
failure prior to this patch (a follow-up commit improving debug info
will cover this commit specifically) but covers a related hole in our
test coverage.

Reviewed by Richard Smith & Eli Friedman.

llvm-svn: 186261

11 years agoSimplify getTypeInfoImpl handling of 'non-canonical unless dependent' types.
David Blaikie [Sat, 13 Jul 2013 21:08:03 +0000 (21:08 +0000)]
Simplify getTypeInfoImpl handling of 'non-canonical unless dependent' types.

These types are not dependent in this context, so just look through
the sugar.

Review by Richard Smith & Eli Friedman.

llvm-svn: 186260

11 years agoScopInfo: Add getTupe() method to MemoryAccess
Tobias Grosser [Sat, 13 Jul 2013 20:41:24 +0000 (20:41 +0000)]
ScopInfo: Add getTupe() method to MemoryAccess

We also move the enum to UPPERCASE.

llvm-svn: 186259

11 years agoConvert CodeGen/*/*.ll tests to use the new CHECK-LABEL for easier debugging. No...
Stephen Lin [Sat, 13 Jul 2013 20:38:47 +0000 (20:38 +0000)]
Convert CodeGen/*/*.ll tests to use the new CHECK-LABEL for easier debugging. No functionality change and all tests pass after conversion.

This was done with the following sed invocation to catch label lines demarking function boundaries:
    sed -i '' "s/^;\( *\)\([A-Z0-9_]*\):\( *\)test\([A-Za-z0-9_-]*\):\( *\)$/;\1\2-LABEL:\3test\4:\5/g" test/CodeGen/*/*.ll
which was written conservatively to avoid false positives rather than false negatives. I scanned through all the changes and everything looks correct.

llvm-svn: 186258

11 years agoRevert "Revert "PR16540: ASTVector::insert(Context, Iter, Element) doesn't compile""
David Blaikie [Sat, 13 Jul 2013 19:23:35 +0000 (19:23 +0000)]
Revert "Revert "PR16540: ASTVector::insert(Context, Iter, Element) doesn't compile""

This reverts commit b18b043a5a37f76803d89467e46bcac286c0ecae.

Reapply with fix for the configure+make build (missing include of
ASTContext.h).

llvm-svn: 186257

11 years agoLoopVectorizer: Disallow reductions whose header phi is used outside the loop
Arnold Schwaighofer [Sat, 13 Jul 2013 19:09:29 +0000 (19:09 +0000)]
LoopVectorizer: Disallow reductions whose header phi is used outside the loop

If an outside loop user of the reduction value uses the header phi node we
cannot just reduce the vectorized phi value in the vector code epilog because
we would loose VF-1 reductions.

lp:
  p = phi (0, lv)
  lv = lv + 1
  ...
  brcond , lp, outside

outside:
  usr = add 0, p

(Say the loop iterates two times, the value of p coming out of the loop is one).

We cannot just transform this to:

vlp:
  p = phi (<0,0>, lv)
  lv = lv + <1,1>
  ..
  brcond , lp, outside

outside:
  p_reduced = p[0] + [1];
  usr = add 0, p_reduced

(Because the original loop iterated two times the vectorized loop would iterate
one time, but p_reduced ends up being zero instead of one).

We would have to execute VF-1 iterations in the scalar remainder loop in such
cases. For now, just disable vectorization.

PR16522

llvm-svn: 186256

11 years agoRevert "PR16540: ASTVector::insert(Context, Iter, Element) doesn't compile"
David Blaikie [Sat, 13 Jul 2013 18:54:56 +0000 (18:54 +0000)]
Revert "PR16540: ASTVector::insert(Context, Iter, Element) doesn't compile"

This reverts commit r186253.

This is failing to link under Configure+Make on the buildbots for
reasons I don't immediately understand.

llvm-svn: 186255

11 years agoDependences: Add a couple of basic test cases
Tobias Grosser [Sat, 13 Jul 2013 18:31:46 +0000 (18:31 +0000)]
Dependences: Add a couple of basic test cases

llvm-svn: 186254

11 years agoPR16540: ASTVector::insert(Context, Iter, Element) doesn't compile
David Blaikie [Sat, 13 Jul 2013 18:08:59 +0000 (18:08 +0000)]
PR16540: ASTVector::insert(Context, Iter, Element) doesn't compile

Fix some uninstantiable code in ASTVector::insert. I've added a
cheap-and-dirty compile test for this, because I don't have the time to
figure out a nice way to get a real ASTContext to implement executable
tests - but we probably should have them for this ADT.

llvm-svn: 186253

11 years agoReduce large list of macros to the primary platform macros. Distingiush
Joerg Sonnenberger [Sat, 13 Jul 2013 17:59:55 +0000 (17:59 +0000)]
Reduce large list of macros to the primary platform macros. Distingiush
between ELF (Linux, FreeBSD, NetBSD) and OSX as platform for the
assembler dialect.

llvm-svn: 186252

11 years agoDependences: Clarify difference between value and memory based dependences
Tobias Grosser [Sat, 13 Jul 2013 17:37:55 +0000 (17:37 +0000)]
Dependences: Clarify difference between value and memory based dependences

We make the option a clear choice between the two analysis types and add
descriptions about the difference between the two.

llvm-svn: 186251

11 years agoConvert a couple of grep tests to FileCheck.
Benjamin Kramer [Sat, 13 Jul 2013 17:30:25 +0000 (17:30 +0000)]
Convert a couple of grep tests to FileCheck.

llvm-svn: 186250

11 years agoFixes a typo caught by Arthur O'Dwyer
Fariborz Jahanian [Sat, 13 Jul 2013 17:16:41 +0000 (17:16 +0000)]
Fixes a typo caught by Arthur O'Dwyer

llvm-svn: 186249

11 years agoSmall style improvements
Tobias Grosser [Sat, 13 Jul 2013 16:58:07 +0000 (16:58 +0000)]
Small style improvements

llvm-svn: 186248

11 years agoOnly verify the length in archive test, we can't make assumptions on the spacing.
Benjamin Kramer [Sat, 13 Jul 2013 15:21:39 +0000 (15:21 +0000)]
Only verify the length in archive test, we can't make assumptions on the spacing.

And .* did just match about anything anyways.

llvm-svn: 186246

11 years agoAttempt at fixing a mingw bot.
Rafael Espindola [Sat, 13 Jul 2013 12:36:30 +0000 (12:36 +0000)]
Attempt at fixing a mingw bot.

It is failing with

YAMLTest.cpp:38:   instantiated from here
YAMLTraits.h:226: error: 'llvm::yaml::MappingTraits<<unnamed>::BinaryHolder>::mapping' is not a valid template argument for type 'void (*)(llvm::yaml::IO&, <unnamed>::BinaryHolder&)' because function 'static void llvm::yaml::MappingTraits<<unnamed>::BinaryHolder>::mapping(llvm::yaml::IO&, <unnamed>::BinaryHolder&)' has not external linkage

llvm-svn: 186245

11 years agoRemove unneeded forward declarations.
Craig Topper [Sat, 13 Jul 2013 08:28:45 +0000 (08:28 +0000)]
Remove unneeded forward declarations.

llvm-svn: 186244

11 years agoPass SmallVector by const reference instead of by value.
Craig Topper [Sat, 13 Jul 2013 07:43:40 +0000 (07:43 +0000)]
Pass SmallVector by const reference instead of by value.

llvm-svn: 186243

11 years agoMake the new vectorizer test immune to TTI
Andrew Trick [Sat, 13 Jul 2013 06:40:33 +0000 (06:40 +0000)]
Make the new vectorizer test immune to TTI

llvm-svn: 186242

11 years agoLoopVectorize fix: LoopInfo must be valid when invoking utils like SCEVExpander.
Andrew Trick [Sat, 13 Jul 2013 06:20:06 +0000 (06:20 +0000)]
LoopVectorize fix: LoopInfo must be valid when invoking utils like SCEVExpander.

In general, one should always complete CFG modifications first, update
CFG-based analyses, like Dominatores and LoopInfo, then generate
instruction sequences.

LoopVectorizer was creating a new loop, calling SCEVExpander to
generate checks, then updating LoopInfo. I just changed the order.

llvm-svn: 186241

11 years agoTry to open the file before use data from stat.
Rafael Espindola [Sat, 13 Jul 2013 05:07:22 +0000 (05:07 +0000)]
Try to open the file before use data from stat.

Looks like on mingw we get bogus last modification times on directories.
Should fix the mingw bots.

llvm-svn: 186240

11 years agoRemove unused file. Thanks to Sean Silva for noticing it.
Rafael Espindola [Sat, 13 Jul 2013 04:24:33 +0000 (04:24 +0000)]
Remove unused file. Thanks to Sean Silva for noticing it.

llvm-svn: 186239

11 years agoAdd r186216 back, but make the test tolerant of different uids and gids.
Rafael Espindola [Sat, 13 Jul 2013 04:14:13 +0000 (04:14 +0000)]
Add r186216 back, but make the test tolerant of different uids and gids.

original message:
Fix a off by one error about which members need to use the string table.

llvm-svn: 186238

11 years agoImplement n3584 - Addressing Tuples by Type
Marshall Clow [Sat, 13 Jul 2013 02:54:05 +0000 (02:54 +0000)]
Implement n3584 - Addressing Tuples by Type

llvm-svn: 186237

11 years agoC++ modules: Don't call DeclContext::lookup when half-way through deserializing
Richard Smith [Sat, 13 Jul 2013 02:00:19 +0000 (02:00 +0000)]
C++ modules: Don't call DeclContext::lookup when half-way through deserializing
decls. That can reenter deserialization and explode horribly by trying to merge
a declaration that we've not got very far through deserializing yet.

llvm-svn: 186236

11 years agoAdd a microoptimization for urem.
Nick Lewycky [Sat, 13 Jul 2013 01:16:47 +0000 (01:16 +0000)]
Add a microoptimization for urem.

llvm-svn: 186235

11 years agoRevert commit r186217 -- this is breaking bots:
Chandler Carruth [Sat, 13 Jul 2013 01:00:17 +0000 (01:00 +0000)]
Revert commit r186217 -- this is breaking bots:

  http://lab.llvm.org:8013/builders/clang-x86_64-darwin11-nobootstrap-RAincremental/builds/4328

Original commit log:
  Use the function attributes to pass along the stack protector buffer
  size.

llvm-svn: 186234

11 years ago[ms-cxxabi] Don't consider function templates for name backrefs
Reid Kleckner [Sat, 13 Jul 2013 00:43:39 +0000 (00:43 +0000)]
[ms-cxxabi] Don't consider function templates for name backrefs

They don't seem to be used for back references, presumably because a
function template is unlikely to reoccur, while a class template name
may reoccur as a type.

This fixes a mangling issue for llvm::hash_combine() in Hashing.h.

Reviewers: timurrrr

Differential Revision: http://llvm-reviews.chandlerc.com/D1078

llvm-svn: 186233

11 years agoRevert commit r186216 -- it's breaking bots:
Chandler Carruth [Sat, 13 Jul 2013 00:42:56 +0000 (00:42 +0000)]
Revert commit r186216 -- it's breaking bots:

  http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/6897/steps/check-all/logs/LLVM%3A%3Aarchive-format.test

Original commit log:
  Fix a off by one error about which members need to use the string
  table.

llvm-svn: 186232

11 years agoObjC migrator: More knobs for migrating
Fariborz Jahanian [Sat, 13 Jul 2013 00:04:20 +0000 (00:04 +0000)]
ObjC migrator: More knobs for migrating
conforming protocols to each class. wip.

llvm-svn: 186231

11 years ago[mips] Remove trailing whitespace.
Akira Hatanaka [Fri, 12 Jul 2013 23:47:38 +0000 (23:47 +0000)]
[mips] Remove trailing whitespace.

llvm-svn: 186230

11 years agoFix logic error optimizing "icmp pred (urem X, Y), Y" where pred is signed.
Nick Lewycky [Fri, 12 Jul 2013 23:42:57 +0000 (23:42 +0000)]
Fix logic error optimizing "icmp pred (urem X, Y), Y" where pred is signed.
Fixes PR16605.

llvm-svn: 186229

11 years agoModified the expression parser to only try to
Sean Callanan [Fri, 12 Jul 2013 23:35:21 +0000 (23:35 +0000)]
Modified the expression parser to only try to
write to registers if they were modified in the
expression.  This eliminates spurious errors if
the register can't be written to but the
expression didn't write to it anyway.

Also improved error handling for the materializer
to make "couldn't materialize struct" errors more
informative.

<rdar://problem/14322579>

llvm-svn: 186228

11 years ago[mips] Implement MipsTargetMachine::getInstrItineraryData().
Akira Hatanaka [Fri, 12 Jul 2013 23:33:22 +0000 (23:33 +0000)]
[mips] Implement MipsTargetMachine::getInstrItineraryData().

llvm-svn: 186227

11 years agoFix ARM paired GPR COPY lowering
JF Bastien [Fri, 12 Jul 2013 23:33:03 +0000 (23:33 +0000)]
Fix ARM paired GPR COPY lowering

ARM paired GPR COPY was being lowered to two MOVr without CC. This
patch puts the CC back.

My test is a reduction of the case where I encountered the issue,
64-bit atomics use paired GPRs.

The issue only occurs with selectionDAG, FastISel doesn't encounter it
so I didn't bother calling it.

llvm-svn: 186226

11 years agoFixed 80+ violation and added C++ to header.
Michael Gottesman [Fri, 12 Jul 2013 23:09:43 +0000 (23:09 +0000)]
Fixed 80+ violation and added C++ to header.

llvm-svn: 186225

11 years agoFix a crash in EvaluateInDifferentElementOrder where it would generate an
Joey Gouly [Fri, 12 Jul 2013 23:08:06 +0000 (23:08 +0000)]
Fix a crash in EvaluateInDifferentElementOrder where it would generate an
undef vector of the wrong type.

LGTM'd by Nick Lewycky on IRC.

llvm-svn: 186224

11 years agoRevert the ELF core file support until a few things can be worked out:
Greg Clayton [Fri, 12 Jul 2013 22:52:22 +0000 (22:52 +0000)]
Revert the ELF core file support until a few things can be worked out:

RegisterContextCoreLinux_x86_64 inherits from RegisterContextLinux_x86_64 which inherits from RegisterContext_x86_64 which uses has:

   ProcessMonitor &GetMonitor();

This register context used by the core file can't use this since the process plug-in will be ProcessElfCore and the implementation of GetMonitor() does:

ProcessMonitor &
RegisterContext_x86_64::GetMonitor()
{
   ProcessSP base = CalculateProcess();
   ProcessPOSIX *process = static_cast<ProcessPOSIX*>(base.get());
   return process->GetMonitor();
}

ProcessELFCore doesn't, nor should it inherit from ProcessPOSIX and any call to GetMonitor() will fail for ELF core files.

Suggested cleanups:
- Make a register context class that is a base class that doesn't have any reading smarts, then make one that uses ProcessPOSIX and the has the GetMonitor() call, and one that gets its data straight from the core file.

llvm-svn: 186223

11 years ago[mips] Add instruction itinerary classes for mult, seb and slt instructions.
Akira Hatanaka [Fri, 12 Jul 2013 22:43:20 +0000 (22:43 +0000)]
[mips] Add instruction itinerary classes for mult, seb and slt instructions.

llvm-svn: 186222

11 years agoMissed a checking that should have been checked in with 186211.
Greg Clayton [Fri, 12 Jul 2013 22:40:04 +0000 (22:40 +0000)]
Missed a checking that should have been checked in with 186211.

llvm-svn: 186221

11 years agoObjC migrator: early work for migrating implicitly conforming
Fariborz Jahanian [Fri, 12 Jul 2013 22:32:19 +0000 (22:32 +0000)]
ObjC migrator: early work for migrating implicitly conforming
protocols to classes. This is wip.

llvm-svn: 186220

11 years agoChanges so that a few tests do not fail when running under guarded malloc.
Argyrios Kyrtzidis [Fri, 12 Jul 2013 22:30:03 +0000 (22:30 +0000)]
Changes so that a few tests do not fail when running under guarded malloc.

Guarded malloc emits some messages at the beginning in stderr when enabled.
These messages caused a few tests to fail.

llvm-svn: 186219

11 years agoUse function attributes to pass along the stack protector buffer size instead of...
Bill Wendling [Fri, 12 Jul 2013 22:26:07 +0000 (22:26 +0000)]
Use function attributes to pass along the stack protector buffer size instead of making it a target option.

llvm-svn: 186218

11 years agoUse the function attributes to pass along the stack protector buffer size.
Bill Wendling [Fri, 12 Jul 2013 22:25:20 +0000 (22:25 +0000)]
Use the function attributes to pass along the stack protector buffer size.

Now that we have robust function attributes, don't use a command line option to
specify the stack protecto buffer size.

llvm-svn: 186217

11 years agoFix a off by one error about which members need to use the string table.
Rafael Espindola [Fri, 12 Jul 2013 22:22:34 +0000 (22:22 +0000)]
Fix a off by one error about which members need to use the string table.

llvm-svn: 186216

11 years agoLFTR improvement to avoid truncation.
Andrew Trick [Fri, 12 Jul 2013 22:08:48 +0000 (22:08 +0000)]
LFTR improvement to avoid truncation.

This is a reimplemntation of the patch originally in r186107.

llvm-svn: 186215

11 years agoCleanup LFTR logic.
Andrew Trick [Fri, 12 Jul 2013 22:08:44 +0000 (22:08 +0000)]
Cleanup LFTR logic.

llvm-svn: 186214

11 years agoCleanup: rename a variable to make the logic easier to follow.
Andrew Trick [Fri, 12 Jul 2013 22:08:41 +0000 (22:08 +0000)]
Cleanup: rename a variable to make the logic easier to follow.

llvm-svn: 186213

11 years agoRemove extraneous braces.
Eric Christopher [Fri, 12 Jul 2013 22:08:24 +0000 (22:08 +0000)]
Remove extraneous braces.

llvm-svn: 186212

11 years agoFixed GetModuleSpecifications() to work better overall:
Greg Clayton [Fri, 12 Jul 2013 22:07:46 +0000 (22:07 +0000)]
Fixed GetModuleSpecifications() to work better overall:
- MachO files now correctly extract the UUID all the time
- More file size and offset verification done for universal mach-o files to watch for truncated files
- ObjectContainerBSDArchive now supports enumerating all objects in BSD archives (.a files)
- lldb_private::Module() can not be properly constructed using a ModuleSpec for a .o file in a .a file
- The BSD archive plug-in shares its cache for GetModuleSpecifications() and the create callback
- Improved printing for ModuleSpec objects

llvm-svn: 186211

11 years agoCompute 'this' correctly for block in lambda.
Eli Friedman [Fri, 12 Jul 2013 22:05:26 +0000 (22:05 +0000)]
Compute 'this' correctly for block in lambda.

Using CurFuncDecl is both correct and simple compared to crawling
the DeclContexts of the block.

Fixes <rdar://problem/14415072>.

llvm-svn: 186210

11 years agoR600: Reapply testcase from r186178, the big endian issue should be fixed by r186196.
Benjamin Kramer [Fri, 12 Jul 2013 21:54:43 +0000 (21:54 +0000)]
R600: Reapply testcase from r186178, the big endian issue should be fixed by r186196.

llvm-svn: 186209

11 years agoProvide a better diagnostic and a fixit for a '.' or '->' before the left paren
Kaelyn Uhrain [Fri, 12 Jul 2013 21:43:02 +0000 (21:43 +0000)]
Provide a better diagnostic and a fixit for a '.' or '->' before the left paren
of a function call.

This fixes PR5898 and means we now have a better diagnostic here than GCC.

llvm-svn: 186208

11 years agoIntroduces core file support for Linux x86-64 using 'lldb a.out -c core'.
Ashok Thirumurthi [Fri, 12 Jul 2013 21:25:02 +0000 (21:25 +0000)]
Introduces core file support for Linux x86-64 using 'lldb a.out -c core'.
  TODO: Support for RegisterContext_x86_64::ReadFPR.

Patch by Samuel Jacob!

llvm-svn: 186207

11 years agoChange archive-update.test to create a new file on the fly.
Rafael Espindola [Fri, 12 Jul 2013 21:17:17 +0000 (21:17 +0000)]
Change archive-update.test to create a new file on the fly.

llvm-svn: 186206

11 years agoAdded Repr() and Str() member functions to our PythonObject class to allow easy conve...
Enrico Granata [Fri, 12 Jul 2013 21:11:02 +0000 (21:11 +0000)]
Added Repr() and Str() member functions to our PythonObject class to allow easy conversion to-string of every PythonObject

llvm-svn: 186205

11 years agoRemove empty directory.
Rafael Espindola [Fri, 12 Jul 2013 20:54:34 +0000 (20:54 +0000)]
Remove empty directory.

llvm-svn: 186203

11 years agoRename directory to avoid problems on windows.
Rafael Espindola [Fri, 12 Jul 2013 20:53:23 +0000 (20:53 +0000)]
Rename directory to avoid problems on windows.

llvm-svn: 186202

11 years agoAdding information on the scriptable keywords ${target|process|thread|frame.script...
Enrico Granata [Fri, 12 Jul 2013 20:46:02 +0000 (20:46 +0000)]
Adding information on the scriptable keywords ${target|process|thread|frame.script:function} to the LLDB documentation

llvm-svn: 186201

11 years agofix autoconf build
Rafael Espindola [Fri, 12 Jul 2013 20:45:01 +0000 (20:45 +0000)]
fix autoconf build

llvm-svn: 186200

11 years agoUnrevert r186040, reverted in r186185, with fix for PR16597.
Richard Smith [Fri, 12 Jul 2013 20:38:49 +0000 (20:38 +0000)]
Unrevert r186040, reverted in r186185, with fix for PR16597.

Original commit log:
  If we friend a declaration twice, that should not make it visible to
  name lookup in the surrounding context. Slightly rework how we handle
  friend declarations to inherit the visibility of the prior
  declaration, rather than setting a friend declaration to be visible
  whenever there was a prior declaration.

llvm-svn: 186199

11 years agoFix the build with c++03.
Rafael Espindola [Fri, 12 Jul 2013 20:28:02 +0000 (20:28 +0000)]
Fix the build with c++03.

llvm-svn: 186198

11 years agoChange llvm-ar to use lib/Object.
Rafael Espindola [Fri, 12 Jul 2013 20:21:39 +0000 (20:21 +0000)]
Change llvm-ar to use lib/Object.

This fixes two bugs is lib/Object that the use in llvm-ar found:
* In OS X created archives, the name can be padded with nulls. Strip them.
* In the constructor, remember the first non special member and use that in
  begin_children. This makes sure we skip all special members, not just the
  first one.

The change to llvm-ar itself consist of
* Using lib/Object for reading archives instead of ArchiveReader.cpp.
* Writing the modified archive directly, instead of creating an in memory
  representation.

The old Archive library was way more general than what is needed, as can
be seen by the diffstat of this patch.

Having llvm-ar using lib/Object now opens the way for creating regular symbol
tables for both native objects and bitcode files so that we can use those
archives for LTO.

llvm-svn: 186197

11 years agoR600: Remove unsafe type punning. No intended functionality change.
Benjamin Kramer [Fri, 12 Jul 2013 20:18:05 +0000 (20:18 +0000)]
R600: Remove unsafe type punning. No intended functionality change.

llvm-svn: 186196

11 years agoFix the linux gcc 4.6.3 buildbot failures that happened after my recent types checkin.
Greg Clayton [Fri, 12 Jul 2013 20:08:35 +0000 (20:08 +0000)]
Fix the linux gcc 4.6.3 buildbot failures that happened after my recent types checkin.

llvm-svn: 186195

11 years agoEnabled the "--debug" option functionality that will SIGSTOP the current process...
Greg Clayton [Fri, 12 Jul 2013 20:08:00 +0000 (20:08 +0000)]
Enabled the "--debug" option functionality that will SIGSTOP the current process allowing a debugger to attach.

llvm-svn: 186194

11 years agoWork-around for GCC issue where setting a breakpoint on a vector definition also...
Daniel Malea [Fri, 12 Jul 2013 19:46:47 +0000 (19:46 +0000)]
Work-around for GCC issue where setting a breakpoint on a vector definition also adds a breakpoint on the d'tor call

llvm-svn: 186193

11 years agoAdd a test for llvm-ar's u option.
Rafael Espindola [Fri, 12 Jul 2013 19:34:24 +0000 (19:34 +0000)]
Add a test for llvm-ar's u option.

llvm-svn: 186192

11 years agoR600: Remove the fpconst64.ll test which was failing on non-x86 buildbots
Tom Stellard [Fri, 12 Jul 2013 19:29:54 +0000 (19:29 +0000)]
R600: Remove the fpconst64.ll test which was failing on non-x86 buildbots

I'm guessing the failure had something to do with the double precision
floating point constant used in the test.

llvm-svn: 186191

11 years agoHandle BreakNotify for threads whose tid doesn't match the ThreadSpec of the Breakpoi...
Ashok Thirumurthi [Fri, 12 Jul 2013 19:19:15 +0000 (19:19 +0000)]
Handle BreakNotify for threads whose tid doesn't match the ThreadSpec of the BreakpointSite
to avoid asserts when stepping in a multi-threaded application.

Note: Test to follow shortly.
llvm-svn: 186190

11 years agoX86 cost model: Add cost for vectorized gather/scather
Arnold Schwaighofer [Fri, 12 Jul 2013 19:16:07 +0000 (19:16 +0000)]
X86 cost model: Add cost for vectorized gather/scather

radar://14351991

llvm-svn: 186189

11 years agoARM cost model: Add cost for gather/scather
Arnold Schwaighofer [Fri, 12 Jul 2013 19:16:04 +0000 (19:16 +0000)]
ARM cost model: Add cost for gather/scather

Fixes a 35% degradation compared to unvectorized code in
MiBench/automotive-susan and an equally serious regression on a private
image processing benchmark.

radar://14351991

llvm-svn: 186188

11 years agoTargetTransformInfo: address calculation parameter for gather/scather
Arnold Schwaighofer [Fri, 12 Jul 2013 19:16:02 +0000 (19:16 +0000)]
TargetTransformInfo: address calculation parameter for gather/scather

Address calculation for gather/scather in vectorized code can incur a
significant cost making vectorization unbeneficial. Add infrastructure to add
cost.
Tests and cost model for targets will be in follow-up commits.

radar://14351991

llvm-svn: 186187

11 years agoRelax the test a bit more to handle different UIDs and GIDs.
Rafael Espindola [Fri, 12 Jul 2013 19:13:16 +0000 (19:13 +0000)]
Relax the test a bit more to handle different UIDs and GIDs.

llvm-svn: 186186

11 years agoRevert r186040 to fix PR16597 while Richard investigates what the best
Chandler Carruth [Fri, 12 Jul 2013 18:54:40 +0000 (18:54 +0000)]
Revert r186040 to fix PR16597 while Richard investigates what the best
fix is.

Original commit log:
  If we friend a declaration twice, that should not make it visible to
  name lookup in the surrounding context. Slightly rework how we handle
  friend declarations to inherit the visibility of the prior
  declaration, rather than setting a friend declaration to be visible
  whenever there was a prior declaration.

llvm-svn: 186185

11 years agoRelax test a bit to handle umask differences.
Rafael Espindola [Fri, 12 Jul 2013 18:54:28 +0000 (18:54 +0000)]
Relax test a bit to handle umask differences.

llvm-svn: 186184

11 years agoAdd a test for the 'o' option in llvm-ar.
Rafael Espindola [Fri, 12 Jul 2013 18:51:25 +0000 (18:51 +0000)]
Add a test for the 'o' option in llvm-ar.

llvm-svn: 186183

11 years agoR600/SI: Add support for f64 kernel arguments
Tom Stellard [Fri, 12 Jul 2013 18:15:26 +0000 (18:15 +0000)]
R600/SI: Add support for f64 kernel arguments

Patch by: Niels Ole Salscheider

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

11 years agoR600/SI: Implement select and compares for SI
Tom Stellard [Fri, 12 Jul 2013 18:15:19 +0000 (18:15 +0000)]
R600/SI: Implement select and compares for SI

Patch by: Niels Ole Salscheider

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

11 years agoR600/SI: Add fsqrt pattern for SI
Tom Stellard [Fri, 12 Jul 2013 18:15:13 +0000 (18:15 +0000)]
R600/SI: Add fsqrt pattern for SI

Patch by: Niels Ole Salscheider

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

11 years agoR600/SI: Add double precision fsub pattern for SI
Tom Stellard [Fri, 12 Jul 2013 18:15:08 +0000 (18:15 +0000)]
R600/SI: Add double precision fsub pattern for SI

Patch by: Niels Ole Salscheider

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

11 years agoR600/SI: SI support for 64bit ConstantFP
Tom Stellard [Fri, 12 Jul 2013 18:15:02 +0000 (18:15 +0000)]
R600/SI: SI support for 64bit ConstantFP

Patch by: Niels Ole Salscheider

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

11 years agoR600/SI: Add initial double precision support for SI
Tom Stellard [Fri, 12 Jul 2013 18:14:56 +0000 (18:14 +0000)]
R600/SI: Add initial double precision support for SI

Patch by: Niels Ole Salscheider

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

11 years agoR600: Add ISA documents to the CompilerWriterInfo page
Tom Stellard [Fri, 12 Jul 2013 18:14:40 +0000 (18:14 +0000)]
R600: Add ISA documents to the CompilerWriterInfo page

llvm-svn: 186176

11 years agoFixed comment in header of Block Frequency Impl and added text for C++ mode.
Michael Gottesman [Fri, 12 Jul 2013 18:11:14 +0000 (18:11 +0000)]
Fixed comment in header of Block Frequency Impl and added text for C++ mode.

This is a generic block implementation that works on more than machine blocks.
The C++ mode addition is a bonus due to the extra space provided.

llvm-svn: 186175

11 years agoX86: Shrink certain forms of movsx.
Benjamin Kramer [Fri, 12 Jul 2013 18:06:44 +0000 (18:06 +0000)]
X86: Shrink certain forms of movsx.

In particular:
movsbw %al, %ax   --> cbtw
movswl %ax, %eax  --> cwtl
movslq %eax, %rax --> cltq

According to Intel's manual those have the same performance characteristics but
come with a smaller encoding.

llvm-svn: 186174

11 years ago[analyzer] Treat nullPtrType as a location type.
Anna Zaks [Fri, 12 Jul 2013 17:58:33 +0000 (17:58 +0000)]
[analyzer] Treat nullPtrType as a location type.

Fixes PR16584 (radar://14415223).

llvm-svn: 186172

11 years agofixes a typo caught by Jordan.
Fariborz Jahanian [Fri, 12 Jul 2013 16:41:56 +0000 (16:41 +0000)]
fixes a typo caught by Jordan.

llvm-svn: 186171

11 years agoAdd static.
Rafael Espindola [Fri, 12 Jul 2013 16:29:27 +0000 (16:29 +0000)]
Add static.

llvm-svn: 186170

11 years agoObjective-C: Produce gcc compatible encoding of
Fariborz Jahanian [Fri, 12 Jul 2013 16:19:11 +0000 (16:19 +0000)]
Objective-C: Produce gcc compatible encoding of
ivar type in meta-data while preventing recursive
encoding in a corner case. // rdar://14408244

llvm-svn: 186169

11 years agoThe correct max value for size_t variables is SIZE_MAX not UINT64_MAX. Removes lots...
Jim Ingham [Fri, 12 Jul 2013 16:16:44 +0000 (16:16 +0000)]
The correct max value for size_t variables is SIZE_MAX not UINT64_MAX.  Removes lots of warnings when building on 32 bit hosts.

llvm-svn: 186168