platform/upstream/llvm.git
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

11 years ago[scan-build] Add missing comma to ccc-analyzer.
Jordan Rose [Fri, 12 Jul 2013 16:07:33 +0000 (16:07 +0000)]
[scan-build] Add missing comma to ccc-analyzer.

Thanks, Dmitry!

llvm-svn: 186167

11 years agoFix gcc buildbot failures, re-enable tests disabled due to llvm.org/pr16575
Daniel Malea [Fri, 12 Jul 2013 16:02:25 +0000 (16:02 +0000)]
Fix gcc buildbot failures, re-enable tests disabled due to llvm.org/pr16575

llvm-svn: 186166

11 years agoX86: fold SSE2/AVX2 logical shift by immediate amount into zero vector when possible
Stephen Lin [Fri, 12 Jul 2013 15:31:36 +0000 (15:31 +0000)]
X86: fold SSE2/AVX2 logical shift by immediate amount into zero vector when possible

Patch by Andrea Di Biagio

llvm-svn: 186165

11 years agoclang-format: Improve <<-formatting.
Daniel Jasper [Fri, 12 Jul 2013 15:14:05 +0000 (15:14 +0000)]
clang-format: Improve <<-formatting.

This fixes a regression caused by r186115.

Before:
  Diag(aaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
       bbbbbbbbb) << aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                  << aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;

After:
  Diag(aaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbb)
      << aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
      << aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;

llvm-svn: 186164

11 years agoStart using CHECK-LABEL in some tests.
Stephen Lin [Fri, 12 Jul 2013 14:54:12 +0000 (14:54 +0000)]
Start using CHECK-LABEL in some tests.

llvm-svn: 186163

11 years agoAdd new directive called CHECK-LABEL to FileCheck.
Stephen Lin [Fri, 12 Jul 2013 14:51:05 +0000 (14:51 +0000)]
Add new directive called CHECK-LABEL to FileCheck.

CHECK-LABEL is meant to be used in place on CHECK on lines containing identifiers or other unique labels (they need not actually be labels in the source or output language, though.) This is used to break up the input stream into separate blocks delineated by CHECK-LABEL lines, each of which is checked independently. This greatly improves the accuracy of errors and fix-it hints in many cases, and allows for FileCheck to recover from errors in one block by continuing to subsequent blocks.

Some tests will be converted to use this new directive in forthcoming patches.

llvm-svn: 186162

11 years agocpp11-migrate: FileOverrides/Transform refactoring.
Tareq A. Siraj [Fri, 12 Jul 2013 14:36:20 +0000 (14:36 +0000)]
cpp11-migrate: FileOverrides/Transform refactoring.

This commit include the following changes:
 - SourceOverrides is now a class
   - it simplifies the usage for the Transform class, since now the
     replacements can be applied directly to the file overrides with
     SourceOverrides::applyReplacements().
   - it contains a method applyRewrites() which was previously named
     collectResults() in Transform.cpp. The method has been "optimized"
     a bit to re-use the allocated buffer (std::string::clear() is called).
   - since the class has some logic it's now unit tested
 - Now FileOverrides is a class (not a std::map typedef) and store pointers
   to the SourceOverrides. The reason is that the SourceOverrides can't be
   copied anymore (which was already something to avoid since it's can be a
   quite large object).

Author: Guillaume Papin <guillaume.papin@epitech.eu>

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

llvm-svn: 186161

11 years agoTypeHierarchyNavigator was removed in r186130
Ed Maste [Fri, 12 Jul 2013 13:41:18 +0000 (13:41 +0000)]
TypeHierarchyNavigator was removed in r186130

llvm-svn: 186160

11 years agoDon't reject an empty archive.
Rafael Espindola [Fri, 12 Jul 2013 13:32:28 +0000 (13:32 +0000)]
Don't reject an empty archive.

llvm-svn: 186159

11 years agoCompletely revert all mbstowcs-and-friends changes from r186109. They were unintentional
Alexey Samsonov [Fri, 12 Jul 2013 12:33:23 +0000 (12:33 +0000)]
Completely revert all mbstowcs-and-friends changes from r186109. They were unintentional

llvm-svn: 186158

11 years ago[lsan] Increase the hardcoded limit on number of leaks.
Sergey Matveev [Fri, 12 Jul 2013 12:31:22 +0000 (12:31 +0000)]
[lsan] Increase the hardcoded limit on number of leaks.

We never expected to see so many leaks in the real world. Until we did.

llvm-svn: 186157

11 years agoMark MDNode::getOperand as readonly.
Benjamin Kramer [Fri, 12 Jul 2013 12:05:13 +0000 (12:05 +0000)]
Mark MDNode::getOperand as readonly.

We can't inline it but we can still CSE calls to it.

llvm-svn: 186156