platform/upstream/llvm.git
11 years ago[analyzer] SimpleStreamChecker - remove evalAssume and other refinements
Anna Zaks [Wed, 31 Oct 2012 02:32:41 +0000 (02:32 +0000)]
[analyzer] SimpleStreamChecker - remove evalAssume and other refinements

llvm-svn: 167099

11 years agoRemove really old benchmark data.
Rafael Espindola [Wed, 31 Oct 2012 02:29:15 +0000 (02:29 +0000)]
Remove really old benchmark data.

llvm-svn: 167098

11 years agoRmoved a duplicate version of SetSelectedThreadByID
Sean Callanan [Wed, 31 Oct 2012 02:12:08 +0000 (02:12 +0000)]
Rmoved a duplicate version of SetSelectedThreadByID
that confused external clients.

<rdar://problem/12599528>

llvm-svn: 167097

11 years agoRemoved some spurious files from our Copy
Sean Callanan [Wed, 31 Oct 2012 02:03:31 +0000 (02:03 +0000)]
Removed some spurious files from our Copy
Headers build phase.

llvm-svn: 167096

11 years agoFixed a crash when we couldn't create a
Sean Callanan [Wed, 31 Oct 2012 02:01:58 +0000 (02:01 +0000)]
Fixed a crash when we couldn't create a
CXXMethodDecl but tried to manipulate it
anyway.

<rdar://problem/12601996>

llvm-svn: 167095

11 years agoFix the bit pattern for vst1 in EmulateInstructionARM::GetThumbOpcodeForInstruction
Jason Molenda [Wed, 31 Oct 2012 02:00:46 +0000 (02:00 +0000)]
Fix the bit pattern for vst1 in EmulateInstructionARM::GetThumbOpcodeForInstruction
so it is recognized correctly.  The second patch needed for <rdar://problem/10652166>.

llvm-svn: 167094

11 years agoRemove the -ccc-no-clang option.
Rafael Espindola [Wed, 31 Oct 2012 01:21:20 +0000 (01:21 +0000)]
Remove the -ccc-no-clang option.

llvm-svn: 167093

11 years ago[analyzer]Don't invalidate const arguments when there is no
Anna Zaks [Wed, 31 Oct 2012 01:18:26 +0000 (01:18 +0000)]
[analyzer]Don't invalidate const arguments when there is no
IdentifierInfo.

Ee: C++ copy constructors.
llvm-svn: 167092

11 years agoAddress Jordan's review: comments, spaces.
Anna Zaks [Wed, 31 Oct 2012 01:18:22 +0000 (01:18 +0000)]
Address Jordan's review: comments, spaces.

llvm-svn: 167091

11 years agoThis patch addresses an ABI compatibility issue with empty aggregate
Bill Schmidt [Wed, 31 Oct 2012 01:15:05 +0000 (01:15 +0000)]
This patch addresses an ABI compatibility issue with empty aggregate
parameters.  Examples of these are:

  struct { } a;
  union { } b[256];
  int a[0];

An empty aggregate has an address, although dereferencing that address is
pointless.  When passed as a parameter, an empty aggregate does not consume
a protocol register, nor does it consume a doubleword in the parameter save
area.  Passing an empty aggregate by reference passes an address just as
for any other aggregate.  Returning an empty aggregate uses GPR3 as a hidden
address of the return value location, just as for any other aggregate.

The patch modifies PPCTargetLowering::LowerFormalArguments_64SVR4 and
PPCTargetLowering::LowerCall_64SVR4 to properly skip empty aggregate
parameters passed by value.  The handling of return values and by-reference
parameters was already correct.

Built on powerpc64-unknown-linux-gnu and tested with no new regressions.
A test case is included to test proper handling of empty aggregate
parameters on both sides of the function call protocol.

llvm-svn: 167090

11 years agoadd test for r167063
Seth Cantrell [Wed, 31 Oct 2012 01:03:35 +0000 (01:03 +0000)]
add test for r167063

llvm-svn: 167089

11 years agoChange signature of function RAFast::spillAll to avoid conversion between
Akira Hatanaka [Wed, 31 Oct 2012 00:56:01 +0000 (00:56 +0000)]
Change signature of function RAFast::spillAll to avoid conversion between
type MachineInstr* and MachineBasicBlock::iterator.

llvm-svn: 167088

11 years agoxlc supports __attribute__((aligned(x))), use it.
Rafael Espindola [Wed, 31 Oct 2012 00:54:26 +0000 (00:54 +0000)]
xlc supports __attribute__((aligned(x))), use it.
Patch by Kai.

llvm-svn: 167087

11 years agoCheck that iterator I is not the end iterator.
Akira Hatanaka [Wed, 31 Oct 2012 00:50:52 +0000 (00:50 +0000)]
Check that iterator I is not the end iterator.

llvm-svn: 167086

11 years agoAdd extra declarations of hash_value needed to build llvm with xlc 12.1.
Rafael Espindola [Wed, 31 Oct 2012 00:46:18 +0000 (00:46 +0000)]
Add extra declarations of hash_value needed to build llvm with xlc 12.1.
Patch by Kai!

llvm-svn: 167085

11 years agoAdd support for loops that don't start with Zero.
Nadav Rotem [Wed, 31 Oct 2012 00:45:26 +0000 (00:45 +0000)]
Add support for loops that don't start with Zero.
This is important for loops in the LAPACK test-suite.
These loops start at 1 because they are auto-converted from fortran.

llvm-svn: 167084

11 years agoinstcombine: Migrate stpcpy optimizations
Meador Inge [Wed, 31 Oct 2012 00:20:56 +0000 (00:20 +0000)]
instcombine: Migrate stpcpy optimizations

This patch migrates the stpcpy optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.  Note that the
__stpcpy_chk simplifications were migrated in a previous commit.

llvm-svn: 167083

11 years agoinstcombine: Split out the __stpcpy_chk simplifications from StrCpyChkOpt
Meador Inge [Wed, 31 Oct 2012 00:20:51 +0000 (00:20 +0000)]
instcombine: Split out the __stpcpy_chk simplifications from StrCpyChkOpt

r166198 migrated the strcpy optimization to instcombine.  The strcpy
simplifier that was migrated from Transforms/Scalar/SimplifyLibCalls.cpp
was also doing some __strcpy_chk simplifications.  Those fortified
simplifications were migrated as well, but introduced a bug in the
__stpcpy_chk simplifier in the process.  This happened because the
__strcpy_chk and __stpcpy_chk simplifiers were both mapped to StrCpyChkOpt
which was updated with simplifications that worked for __strcpy_chk, but
not __stpcpy_chk.

This patch fixes the problem by adding proper test coverage and creating a
new simplifier for __stpcpy_chk (instead of sharing one with __strcpy_chk).

llvm-svn: 167082

11 years ago<rdar://problem/12586188> Make ImportError a special case for "command script import...
Enrico Granata [Wed, 31 Oct 2012 00:01:26 +0000 (00:01 +0000)]
<rdar://problem/12586188> Make ImportError a special case for "command script import", such that the error message for the exception becomes the error for the entire import operation
and silence the backtrace printout

In the process, refactor the Execute* commands in ScriptInterpreter to take an options object, and add a new setting to not mask out errors so that the callers can handle them directly
instead of having the default behavior

llvm-svn: 167067

11 years ago<rdar://problem/12602978>
Greg Clayton [Tue, 30 Oct 2012 23:57:32 +0000 (23:57 +0000)]
<rdar://problem/12602978>

RegisterContextKDP_i386 was not correctly writing registers due to missing "virtual" keywords. Added the virtual keywords and made the functions pure virtual to ensure subclasses can't get away without implementing these functions.

llvm-svn: 167066

11 years agoFixed build warnings.
Greg Clayton [Tue, 30 Oct 2012 23:56:14 +0000 (23:56 +0000)]
Fixed build warnings.

llvm-svn: 167065

11 years agoX86 SSE: update rsqrtss and rcpss to use two source operands and
Manman Ren [Tue, 30 Oct 2012 23:53:59 +0000 (23:53 +0000)]
X86 SSE: update rsqrtss and rcpss to use two source operands and
the first source operand is tied to the destination operand.

This is to accurately model the corresponding instructions where the upper
bits are unmodified.

rdar://12558838
PR14221

llvm-svn: 167064

11 years agoisLegalUTF8() was giving the wrong answer
Seth Cantrell [Tue, 30 Oct 2012 23:50:26 +0000 (23:50 +0000)]
isLegalUTF8() was giving the wrong answer

invalid but not caught by isLegalUTF8(): 0xED 0x75 0x84

llvm-svn: 167063

11 years agoRemove ccc-no-clang-cpp, which is also dead now.
Rafael Espindola [Tue, 30 Oct 2012 23:49:11 +0000 (23:49 +0000)]
Remove ccc-no-clang-cpp, which is also dead now.

llvm-svn: 167062

11 years agoMake blocks that capture their containing method's object pointer look like methods of
Jim Ingham [Tue, 30 Oct 2012 23:35:54 +0000 (23:35 +0000)]
Make blocks that capture their containing method's object pointer look like methods of
the containing class so that direct ivar access will work in the expression parser.

<rdar://problem/9797999>

llvm-svn: 167061

11 years agoChange a couple of raw printf's to expression log output.
Jim Ingham [Tue, 30 Oct 2012 23:34:07 +0000 (23:34 +0000)]
Change a couple of raw printf's to expression log output.

llvm-svn: 167060

11 years agoHandle string encoding diagnostics when there are too many invalid ranges.
David Blaikie [Tue, 30 Oct 2012 23:22:22 +0000 (23:22 +0000)]
Handle string encoding diagnostics when there are too many invalid ranges.

llvm-svn: 167059

11 years agoARM AAPCS-VFP: fix handling of homogeneous aggreate.
Manman Ren [Tue, 30 Oct 2012 23:21:41 +0000 (23:21 +0000)]
ARM AAPCS-VFP: fix handling of homogeneous aggreate.

If HA can only partially fit into VFP registers, we add padding to make sure
HA will be on stack and later VFP CPRCs will be on stack as well.

llvm-svn: 167058

11 years agoFix regression in old-style JIT.
Eli Friedman [Tue, 30 Oct 2012 22:21:55 +0000 (22:21 +0000)]
Fix regression in old-style JIT.

llvm-svn: 167057

11 years agoX86 MMX: optimize transfer from mmx to i32
Manman Ren [Tue, 30 Oct 2012 22:15:38 +0000 (22:15 +0000)]
X86 MMX: optimize transfer from mmx to i32
We used to generate a store (movq) + a load.
Now we use movd.

rdar://9946746

llvm-svn: 167056

11 years agoAdd documentation.
Nadav Rotem [Tue, 30 Oct 2012 22:06:26 +0000 (22:06 +0000)]
Add documentation.

llvm-svn: 167055

11 years ago[driver] Older versions of ld expect '-L<dir>' not '-L <dir>'. In Xcode4 and
Chad Rosier [Tue, 30 Oct 2012 21:42:09 +0000 (21:42 +0000)]
[driver] Older versions of ld expect '-L<dir>' not '-L <dir>'.  In Xcode4 and
later, '-L <dir>' is allowed, but rewrite these in the driver as '-L<dir>' to
maintain backward compatibility.  The same is true for the -I option.
rdar://12366753

llvm-svn: 167054

11 years agoReformat and 80-column this. It's not strictly conforming
Eric Christopher [Tue, 30 Oct 2012 21:36:43 +0000 (21:36 +0000)]
Reformat and 80-column this. It's not strictly conforming
yet, but it's better.

llvm-svn: 167053

11 years agoChange the MacOSX Symbols::DownloadObjectAndSymbolFile to look up
Jason Molenda [Tue, 30 Oct 2012 21:26:30 +0000 (21:26 +0000)]
Change the MacOSX Symbols::DownloadObjectAndSymbolFile to look up
"~rc" via getpwnam() instead of doing tilde expansion and doing soft-link
dereferencing via realpath() - if we're pointing to a softlink, leave it
as-is.
<rdar://problem/12597698>

llvm-svn: 167052

11 years agoFix PR14212: For some strange reason I treated vectors differently from
Chandler Carruth [Tue, 30 Oct 2012 20:52:40 +0000 (20:52 +0000)]
Fix PR14212: For some strange reason I treated vectors differently from
integers in that the code to handle split alloca-wide integer loads or
stores doesn't come first. It should, for the same reasons as with
integers, and the PR attests to that. Also had to fix a busted assert in
that this test case also covers.

llvm-svn: 167051

11 years ago[inline asm] Get the mayLoad/mayStore directly from the MIOp_ExtraInfo operand.
Chad Rosier [Tue, 30 Oct 2012 20:39:19 +0000 (20:39 +0000)]
[inline asm] Get the mayLoad/mayStore directly from the MIOp_ExtraInfo operand.

llvm-svn: 167050

11 years agoBBVectorize: Cache fixed-order pairs instead of recomputing pointer info.
Hal Finkel [Tue, 30 Oct 2012 20:17:37 +0000 (20:17 +0000)]
BBVectorize: Cache fixed-order pairs instead of recomputing pointer info.

Instead of recomputing relative pointer information just prior to fusing,
cache this information (which also needs to be computed during the
candidate-pair selection process). This cuts down on the total number of
SE queries made, and also is a necessary intermediate step on the road toward
including shuffle costs in the pair selection procedure.

No functionality change is intended.

llvm-svn: 167049

11 years ago[mips] Allow tail-call optimization for vararg functions and functions which
Akira Hatanaka [Tue, 30 Oct 2012 20:16:31 +0000 (20:16 +0000)]
[mips] Allow tail-call optimization for vararg functions and functions which
use the caller's stack.

llvm-svn: 167048

11 years agoobjective-C arc/mrr: Another patch for the new captured block variable
Fariborz Jahanian [Tue, 30 Oct 2012 20:05:29 +0000 (20:05 +0000)]
objective-C arc/mrr: Another patch for the new captured block variable
layout meta-data.  It is currently off (so no tests). This is wip.

llvm-svn: 167047

11 years agoAdd a comment for r167040.
Chad Rosier [Tue, 30 Oct 2012 20:01:12 +0000 (20:01 +0000)]
Add a comment for r167040.

llvm-svn: 167046

11 years agoLoopIdiom: Fix a serious missed optimization: we only turned top-level loops into...
Benjamin Kramer [Tue, 30 Oct 2012 19:49:39 +0000 (19:49 +0000)]
LoopIdiom: Fix a serious missed optimization: we only turned top-level loops into memmove.

Thanks to Preston Briggs for catching this!

llvm-svn: 167045

11 years agoBBVectorize: Fix a small bug introduced in r167042.
Hal Finkel [Tue, 30 Oct 2012 19:47:37 +0000 (19:47 +0000)]
BBVectorize: Fix a small bug introduced in r167042.

We need to make sure that we take the correct load/store alignment
when the inputs are flipped.

llvm-svn: 167044

11 years agoAdd code for saving formal argument information to MipsFunctionInfo. This
Akira Hatanaka [Tue, 30 Oct 2012 19:37:25 +0000 (19:37 +0000)]
Add code for saving formal argument information to MipsFunctionInfo. This
information will be used by IsEligibleForTailCallOptimization to determine
whether a call can be tail-call optimized.

llvm-svn: 167043

11 years agoBBVectorize: Simplify how input swapping is handled.
Hal Finkel [Tue, 30 Oct 2012 19:35:29 +0000 (19:35 +0000)]
BBVectorize: Simplify how input swapping is handled.

Stop propagating the FlipMemInputs variable into the routines that
create the replacement instructions. Instead, just flip the arguments
of those routines. This allows for some associated cleanup (not all
of which is done here). No functionality change is intended.

llvm-svn: 167042

11 years agoAdd definition of function MipsTargetLowering::passArgOnStack which emits nodes
Akira Hatanaka [Tue, 30 Oct 2012 19:23:25 +0000 (19:23 +0000)]
Add definition of function MipsTargetLowering::passArgOnStack which emits nodes
for passing a function call argument on a stack.

llvm-svn: 167041

11 years ago[inline asm] Implement mayLoad and mayStore for inline assembly. In general,
Chad Rosier [Tue, 30 Oct 2012 19:11:54 +0000 (19:11 +0000)]
[inline asm] Implement mayLoad and mayStore for inline assembly.  In general,
the MachineInstr MayLoad/MayLoad flags are based on the tablegen implementation.
For inline assembly, however, we need to compute these based on the constraints.

Revert r166929 as this is no longer needed, but leave the test case in place.
rdar://12033048 and PR13504

llvm-svn: 167040

11 years agoDo not do tail-call optimization if target is mips16.
Akira Hatanaka [Tue, 30 Oct 2012 19:07:58 +0000 (19:07 +0000)]
Do not do tail-call optimization if target is mips16.

llvm-svn: 167039

11 years agoRename uses of _ and __ because these are getting stepped on by macros from other...
Howard Hinnant [Tue, 30 Oct 2012 19:06:59 +0000 (19:06 +0000)]
Rename uses of _ and __ because these are getting stepped on by macros from other system code.

llvm-svn: 167038

11 years agoBBVectorize: Don't make calls to SE when the result is unused.
Hal Finkel [Tue, 30 Oct 2012 18:55:49 +0000 (18:55 +0000)]
BBVectorize: Don't make calls to SE when the result is unused.

SE was being called during the instruction-fusion process (when the result
is unreliable, and thus ignored). No functionality change is intended.

llvm-svn: 167037

11 years ago80-col
Nadav Rotem [Tue, 30 Oct 2012 18:37:43 +0000 (18:37 +0000)]
80-col

llvm-svn: 167036

11 years agoLoopVectorize: Add support for write-only loops when the write destination is a singl...
Nadav Rotem [Tue, 30 Oct 2012 18:36:45 +0000 (18:36 +0000)]
LoopVectorize: Add support for write-only loops when the write destination is a single pointer.
Speedup SciMark by 1%

llvm-svn: 167035

11 years agoPowerPC: Expand FSRQT for vector types
Adhemerval Zanella [Tue, 30 Oct 2012 18:29:42 +0000 (18:29 +0000)]
PowerPC: Expand FSRQT for vector types

This patch expands FSQRT for floating point vector types when altivec is
used.

llvm-svn: 167034

11 years agoPath from Ashok Thirumurthi:
Greg Clayton [Tue, 30 Oct 2012 18:18:43 +0000 (18:18 +0000)]
Path from Ashok Thirumurthi:

The attached patch adds eValueTypeVector to lldb_private::Value.  The nested struct Vector is patterned after RegisterValue::m_data.buffer.  This change to Value allows ClangExpressionDeclMap::LookupDecl to return vector register data for consumption by InterpreterStackFrame::ResolveValue.  Note that ResolveValue was tweaked slightly to allocate enough memory for vector registers.

An immediate result of this patch is that "expr $xmm0" generates the same results on Linux as on the Mac, which is good enough for TestRegisters.py.  In addition, the log of m_memory.PrintData(data_region.m_base, data_region.m_extent) shows that the register content has been resolved successfully.  On the other hand, the output is glaringly empty:
    runCmd: expr $xmm0
    output: (unsigned char __attribute__((ext_vector_type(16)))) $0 = {}
    Expecting sub string: vector_type
    Matched

llvm-svn: 167033

11 years agoLoopVectorize: Fix a bug in the initialization of reduction variables. AND needs...
Nadav Rotem [Tue, 30 Oct 2012 18:12:36 +0000 (18:12 +0000)]
LoopVectorize: Fix a bug in the initialization of reduction variables. AND needs to start at all-one
while XOR, and OR need to start at zero.

llvm-svn: 167032

11 years agoSet %defaultjit to use MCJIT for PowerPC targets.
Ulrich Weigand [Tue, 30 Oct 2012 18:07:58 +0000 (18:07 +0000)]
Set %defaultjit to use MCJIT for PowerPC targets.
Update Transforms/LICM/2003-12-11-SinkingToPHI.ll test to use
%defaultjit as well.

llvm-svn: 167031

11 years agoReplace printf with result.Printf, so that the plugin shows its output with any confi...
Enrico Granata [Tue, 30 Oct 2012 18:01:15 +0000 (18:01 +0000)]
Replace printf with result.Printf, so that the plugin shows its output with any configuration of the LLDB I/O streams (esp. useful in graphic environments such as Xcode)

llvm-svn: 167030

11 years agoFix grammar.
Bill Wendling [Tue, 30 Oct 2012 17:51:02 +0000 (17:51 +0000)]
Fix grammar.

llvm-svn: 167029

11 years agoPatch from Matt Kopec <matt.kopec@intel.com> to handle stepping into multiply-nested...
Jim Ingham [Tue, 30 Oct 2012 17:44:49 +0000 (17:44 +0000)]
Patch from Matt Kopec <matt.kopec@intel.com> to handle stepping into multiply-nested inlined code.

llvm-svn: 167028

11 years agoEnable ELF machine type to be specified explicitly in X86 backend
Michael Liao [Tue, 30 Oct 2012 17:33:39 +0000 (17:33 +0000)]
Enable ELF machine type to be specified explicitly in X86 backend

llvm-svn: 167027

11 years agoPatch from Matt Kopec:
Greg Clayton [Tue, 30 Oct 2012 17:11:34 +0000 (17:11 +0000)]
Patch from Matt Kopec:

This patch switches support on Linux from JIT to MCJIT.

llvm-svn: 167026

11 years agoFixed File::SeekFromEnd() to use SEEK_END insted of SEEK_CUR.
Greg Clayton [Tue, 30 Oct 2012 17:04:45 +0000 (17:04 +0000)]
Fixed File::SeekFromEnd() to use SEEK_END insted of SEEK_CUR.

llvm-svn: 167025

11 years agoUse the "data()" accessor on the std::vector<clang_type_t> in case it is empty.
Greg Clayton [Tue, 30 Oct 2012 17:02:18 +0000 (17:02 +0000)]
Use the "data()" accessor on the std::vector<clang_type_t> in case it is empty.

llvm-svn: 167024

11 years agoAdded the ability to get function return and argument types to SBType():
Greg Clayton [Tue, 30 Oct 2012 16:57:17 +0000 (16:57 +0000)]
Added the ability to get function return and argument types to SBType():

     bool
     SBType::IsFunctionType ();

     lldb::SBType
     SBType::GetFunctionReturnType ();

     lldb::SBTypeList
     SBType::GetFunctionArgumentTypes ();

llvm-svn: 167023

11 years agoChange ForceSizeOpt attribute into MinSize attribute
Quentin Colombet [Tue, 30 Oct 2012 16:33:19 +0000 (16:33 +0000)]
Change ForceSizeOpt attribute into MinSize attribute

llvm-svn: 167021

11 years agoChange ForceSizeOpt attribute into MinSize attribute
Quentin Colombet [Tue, 30 Oct 2012 16:32:52 +0000 (16:32 +0000)]
Change ForceSizeOpt attribute into MinSize attribute

llvm-svn: 167020

11 years agoAdd missing return to SBAddress::GetOffset(). This was caught by Carlo Kok.
Greg Clayton [Tue, 30 Oct 2012 16:32:38 +0000 (16:32 +0000)]
Add missing return to SBAddress::GetOffset(). This was caught by Carlo Kok.

llvm-svn: 167019

11 years agoFix isEliminableCastPair to work correctly in the presence of pointers
Duncan Sands [Tue, 30 Oct 2012 16:03:32 +0000 (16:03 +0000)]
Fix isEliminableCastPair to work correctly in the presence of pointers
with different sizes.

llvm-svn: 167018

11 years agoImplement descendant matchers for NestedNamespecifiers
Daniel Jasper [Tue, 30 Oct 2012 15:42:00 +0000 (15:42 +0000)]
Implement descendant matchers for NestedNamespecifiers

This implements has(), hasDescendant(), forEach() and
forEachDescendant() for NestedNameSpecifier and NestedNameSpecifierLoc
matchers.

Review: http://llvm-reviews.chandlerc.com/D86
llvm-svn: 167017

11 years agoswitch_to_lookup_table.ll: Remove some unnecessary lines, comments,
Hans Wennborg [Tue, 30 Oct 2012 15:11:52 +0000 (15:11 +0000)]
switch_to_lookup_table.ll: Remove some unnecessary lines, comments,
function attributes, etc.

llvm-svn: 167016

11 years agoPowerPC: More support for Altivec compare operations
Adhemerval Zanella [Tue, 30 Oct 2012 13:50:19 +0000 (13:50 +0000)]
PowerPC: More support for Altivec compare operations

This patch adds more support for vector type comparisons using altivec.
It adds correct support for v16i8, v8i16, v4i32, and v4f32 vector
types for comparison operators ==, !=, >, >=, <, and <=.

llvm-svn: 167015

11 years agoAdd a helper for telling whether a type is a pointer or vector of pointer type.
Duncan Sands [Tue, 30 Oct 2012 13:38:54 +0000 (13:38 +0000)]
Add a helper for telling whether a type is a pointer or vector of pointer type.
Simplify the implementation of the corresponding integer and float functions and
move them inline while there.

llvm-svn: 167014

11 years agoEnable some additional constant folding for PPCDoubleDouble.
Ulrich Weigand [Tue, 30 Oct 2012 12:33:18 +0000 (12:33 +0000)]
Enable some additional constant folding for PPCDoubleDouble.
This fixes Clang :: CodeGen/complex-builtints.c on PowerPC.

llvm-svn: 167013

11 years agoUse TargetTransformInfo to control switch-to-lookup table transformation
Hans Wennborg [Tue, 30 Oct 2012 11:23:25 +0000 (11:23 +0000)]
Use TargetTransformInfo to control switch-to-lookup table transformation

When the switch-to-lookup tables transform landed in SimplifyCFG, it
was pointed out that this could be inappropriate for some targets.
Since there was no way at the time for the pass to know anything about
the target, an awkward reverse-transform was added in CodeGenPrepare
that turned lookup tables back into switches for some targets.

This patch uses the new TargetTransformInfo to determine if a
switch should be transformed, and removes
CodeGenPrepare::ConvertLoadToSwitch.

llvm-svn: 167011

11 years agoFlag -ccc-clang-cxx was removed in r166986, remove it from compiler-rt lit configs
Alexey Samsonov [Tue, 30 Oct 2012 10:06:42 +0000 (10:06 +0000)]
Flag -ccc-clang-cxx was removed in r166986, remove it from compiler-rt lit configs

llvm-svn: 167010

11 years agoremove duplicate data array
Seth Cantrell [Tue, 30 Oct 2012 06:13:52 +0000 (06:13 +0000)]
remove duplicate data array

llvm-svn: 167007

11 years agofix calculation of end pointer
Seth Cantrell [Tue, 30 Oct 2012 06:13:50 +0000 (06:13 +0000)]
fix calculation of end pointer

llvm-svn: 167006

11 years agoUpdate test case.
Ted Kremenek [Tue, 30 Oct 2012 05:28:33 +0000 (05:28 +0000)]
Update test case.

llvm-svn: 167005

11 years ago[asan docs] explain why asan exits on the first error
Kostya Serebryany [Tue, 30 Oct 2012 05:07:05 +0000 (05:07 +0000)]
[asan docs] explain why asan exits on the first error

llvm-svn: 167004

11 years agoChange -Wcompare-distinct-pointer-type to -Wcompare-distinct-pointer-types, as
Ted Kremenek [Tue, 30 Oct 2012 04:43:57 +0000 (04:43 +0000)]
Change -Wcompare-distinct-pointer-type to -Wcompare-distinct-pointer-types, as
the warning is about comparing different types (plural).

llvm-svn: 167003

11 years agoTrim #includes.
Ted Kremenek [Tue, 30 Oct 2012 04:43:51 +0000 (04:43 +0000)]
Trim #includes.

llvm-svn: 167002

11 years ago[analyzer]SimpleStreamChecker: add a TODO for better leak report.
Anna Zaks [Tue, 30 Oct 2012 04:18:21 +0000 (04:18 +0000)]
[analyzer]SimpleStreamChecker: add a TODO for better leak report.

llvm-svn: 167001

11 years ago[analyzer] Fix a bug in REGISTER_MAP_WITH_PROGRAMSTATE
Anna Zaks [Tue, 30 Oct 2012 04:17:40 +0000 (04:17 +0000)]
[analyzer] Fix a bug in REGISTER_MAP_WITH_PROGRAMSTATE

The ImmutableMap should not be the key into the GDM map as there could
be several entries with the same map type. Thanks, Jordan.

This complicates the usage of the macro a bit. When we want to retrieve
the whole map, we need to use another name. Currently, I set it to be
Name ## Ty as in "type of the map we are storing in the ProgramState".

llvm-svn: 167000

11 years ago[analyzer] Rename REGISTER_MAP_WITH_GDM ->REGISTER_MAP_WITH_PROGRAMSTATE
Anna Zaks [Tue, 30 Oct 2012 04:17:18 +0000 (04:17 +0000)]
[analyzer] Rename REGISTER_MAP_WITH_GDM ->REGISTER_MAP_WITH_PROGRAMSTATE

llvm-svn: 166999

11 years agoRemove an invalid assert in TargetTransformImpl
Hal Finkel [Tue, 30 Oct 2012 02:41:57 +0000 (02:41 +0000)]
Remove an invalid assert in TargetTransformImpl

getCastInstrCost had an assert prohibiting scalar to vector casts. Such casts,
however, are allowed. This should make the vectorizer buildbot happier.

llvm-svn: 166998

11 years ago * Add e_flags enum for Hexagon
Sid Manning [Tue, 30 Oct 2012 02:26:15 +0000 (02:26 +0000)]
  * Add e_flags enum for Hexagon
  * Add Hexagon specific section indexes for small data
- Reviewed by Michael Spencer

llvm-svn: 166997

11 years agoRemove leftover const.
Rafael Espindola [Tue, 30 Oct 2012 01:49:46 +0000 (01:49 +0000)]
Remove leftover const.

llvm-svn: 166996

11 years ago[analyzer] Warn about reallocf with an allocation size of 0, like realloc.
Jordan Rose [Tue, 30 Oct 2012 01:37:16 +0000 (01:37 +0000)]
[analyzer] Warn about reallocf with an allocation size of 0, like realloc.

Patch by Sean McBride!

llvm-svn: 166995

11 years ago[analyzer] New checker for missing super calls in UIViewController subclasses.
Jordan Rose [Tue, 30 Oct 2012 01:21:35 +0000 (01:21 +0000)]
[analyzer] New checker for missing super calls in UIViewController subclasses.

This is a syntactic checker aimed at helping iOS programmers correctly
subclass and override the methods of UIViewController. While this should
eventually be covered by the 'objc_requires_super' attribute, this
checker can be used with the existing iOS SDKs without any header changes.

This new checker is currently named 'alpha.osx.cocoa.MissingSuperCall'.
Patch by Julian Mayer!

llvm-svn: 166993

11 years agoDon't crash on bad atomic operations. PR14176.
Eli Friedman [Tue, 30 Oct 2012 01:15:28 +0000 (01:15 +0000)]
Don't crash on bad atomic operations.  PR14176.

llvm-svn: 166992

11 years agoARM: Better disassembly for pc-relative LDR.
Jim Grosbach [Tue, 30 Oct 2012 01:04:51 +0000 (01:04 +0000)]
ARM: Better disassembly for pc-relative LDR.

When the operand is a plain immediate rather than a label, print it
as [pc, #imm] like we do for the Thumb2 wide encoding variant.

rdar://12154503

llvm-svn: 166991

11 years agoChange mips16 delay slot jumps to non delay slot forms by default.
Reed Kotler [Tue, 30 Oct 2012 00:54:49 +0000 (00:54 +0000)]
Change mips16 delay slot jumps to non delay slot forms by default.
We will make them delay slot forms if there is something that can be
placed in the delay slot during a separate pass. Mips16 extended instructions
cannot be placed in delay slots.

llvm-svn: 166990

11 years agoLoopVectorizer: change debug prints: Print the module identifier when deciding to...
Nadav Rotem [Tue, 30 Oct 2012 00:40:39 +0000 (00:40 +0000)]
LoopVectorizer: change debug prints: Print the module identifier when deciding to vectorize. When deciding not to vectorize do not print the called function name because it can be null.

llvm-svn: 166989

11 years agogetOriginalSourceFileName and getOriginalSourceFile can return a StringRef.
Rafael Espindola [Tue, 30 Oct 2012 00:38:13 +0000 (00:38 +0000)]
getOriginalSourceFileName and getOriginalSourceFile can return a StringRef.
MaybeAddSystemRootToFilename doesn't need to return anything, it modifies
its argument.

llvm-svn: 166988

11 years ago[PCH] The diagnostic state points can refer to previously created
Argyrios Kyrtzidis [Tue, 30 Oct 2012 00:27:21 +0000 (00:27 +0000)]
[PCH] The diagnostic state points can refer to previously created
diagnostic states; make sure the ASTReader sets the diagnostic state
properly instead of always recreating it.

Fixes rdar://12581618 & http://llvm.org/PR14181

llvm-svn: 166987

11 years agoIn the past "production" clang builds would not be used for c++, and
Rafael Espindola [Tue, 30 Oct 2012 00:13:16 +0000 (00:13 +0000)]
In the past "production" clang builds would not be used for c++, and
we had the -ccc-clang-cxx and -ccc-no-clang-cxx options to force them
on or off for testing.

Clang c++ support is now production quality and these options are dead.

llvm-svn: 166986

11 years agoRe-commit r166971. I reverted it to quickly, when buildbots didn't have a chance
Jakub Staszak [Tue, 30 Oct 2012 00:01:57 +0000 (00:01 +0000)]
Re-commit r166971. I reverted it to quickly, when buildbots didn't have a chance
to test it with chapni's fix (-mattr=+avx).

llvm-svn: 166985

11 years ago[libclang] Bump the version number of the libclang API.
Argyrios Kyrtzidis [Mon, 29 Oct 2012 23:53:52 +0000 (23:53 +0000)]
[libclang] Bump the version number of the libclang API.

llvm-svn: 166984

11 years agoRemove a bit of dead code.
Rafael Espindola [Mon, 29 Oct 2012 23:41:43 +0000 (23:41 +0000)]
Remove a bit of dead code.

llvm-svn: 166983

11 years agoFix ARM's b.w instruction for thumb 2 and the encoding T4. The branch target
Kevin Enderby [Mon, 29 Oct 2012 23:27:20 +0000 (23:27 +0000)]
Fix ARM's b.w instruction for thumb 2 and the encoding T4.  The branch target
is 24 bits not 20 and the decoding needed to correctly handle converting the
J1 and J2 bits to their I1 and I2 values to reconstruct the displacement.

llvm-svn: 166982

11 years agoMove getOriginalSourceFileName inline. Patch by Laszlo Nagy.
Rafael Espindola [Mon, 29 Oct 2012 23:26:40 +0000 (23:26 +0000)]
Move getOriginalSourceFileName inline. Patch by Laszlo Nagy.

llvm-svn: 166981