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

11 years ago[libclang] Introduce a version constant for the libclang API.
Argyrios Kyrtzidis [Mon, 29 Oct 2012 23:24:44 +0000 (23:24 +0000)]
[libclang] Introduce a version constant for the libclang API.

rdar://12587974

llvm-svn: 166980

11 years agoRevert r166971. It causes buildbot failure. To be investigated.
Jakub Staszak [Mon, 29 Oct 2012 23:13:50 +0000 (23:13 +0000)]
Revert r166971. It causes buildbot failure. To be investigated.

llvm-svn: 166979

11 years agoEnsuring that the swig typemaps for SBData set the size to 0 along with the pointer...
Enrico Granata [Mon, 29 Oct 2012 23:06:44 +0000 (23:06 +0000)]
Ensuring that the swig typemaps for SBData set the size to 0 along with the pointer to NULL
There should be no functional changes as SBData creation functions already checked for NULL regardless of size - but it ensures consistency

llvm-svn: 166978

11 years ago[analyzer] Malloc checker cleanup/refactor
Anna Zaks [Mon, 29 Oct 2012 22:51:54 +0000 (22:51 +0000)]
[analyzer] Malloc checker cleanup/refactor

No need for the auxiliary flag. No need to generate a leak node when
there is no error.

llvm-svn: 166977

11 years ago[analyzer] Add SimpleStreamChecker.
Anna Zaks [Mon, 29 Oct 2012 22:51:50 +0000 (22:51 +0000)]
[analyzer] Add SimpleStreamChecker.

This is an example checker for catching fopen fclose API misuses.

llvm-svn: 166976

11 years ago[analyzer] Add checker helpers to CheckerContext.
Anna Zaks [Mon, 29 Oct 2012 22:51:44 +0000 (22:51 +0000)]
[analyzer] Add checker helpers to CheckerContext.

- Adding Immutable Map to GDM and getIdentifierInfo helper method.

llvm-svn: 166975

11 years agollvm/test/CodeGen/X86/vec_shuffle-30.ll: Try to unbreak builds - assuming +avx.
NAKAMURA Takumi [Mon, 29 Oct 2012 22:45:18 +0000 (22:45 +0000)]
llvm/test/CodeGen/X86/vec_shuffle-30.ll: Try to unbreak builds - assuming +avx.

llvm-svn: 166974

11 years agoRemove unused variable.
Jakub Staszak [Mon, 29 Oct 2012 22:04:32 +0000 (22:04 +0000)]
Remove unused variable.

llvm-svn: 166973

11 years agoSimplify code. No functionality change.
Jakub Staszak [Mon, 29 Oct 2012 22:02:26 +0000 (22:02 +0000)]
Simplify code. No functionality change.

llvm-svn: 166972

11 years agoAllow to fold vector load if there is more than one bitcast, so in the case:
Jakub Staszak [Mon, 29 Oct 2012 21:56:35 +0000 (21:56 +0000)]
Allow to fold vector load if there is more than one bitcast, so in the case:

%0 = load <8 x i16>* %dest
%1 = shufflevector <8 x i16> %0, <8 x i16> %in,
      <8 x i32> < i32 0, i32 1, i32 2, i32 3, i32 13, i32 undef, i32 14, i32 14>
store <8 x i16> %1, <8 x i16>* %dest

We get:
  vmovlpd (%eax), %xmm0, %xmm0

instead of:
  vmovaps (%eax), %xmm1
  vmovsd  %xmm1, %xmm0, %xmm0

No extra test-case is added. I just fixed the existing one
(also it uses FileCheck now).

llvm-svn: 166971

11 years agoLoopVectorize: Update and preserve the dominator tree info.
Nadav Rotem [Mon, 29 Oct 2012 21:52:38 +0000 (21:52 +0000)]
LoopVectorize: Update and preserve the dominator tree info.

llvm-svn: 166970

11 years agoTypo.
Jakub Staszak [Mon, 29 Oct 2012 21:49:46 +0000 (21:49 +0000)]
Typo.

llvm-svn: 166969

11 years agoThis patch solves a problem with passing varargs parameters under the PPC64
Bill Schmidt [Mon, 29 Oct 2012 21:18:16 +0000 (21:18 +0000)]
This patch solves a problem with passing varargs parameters under the PPC64
ELF ABI.

A varargs parameter consisting of a single-precision floating-point value,
or of a single-element aggregate containing a single-precision floating-point
value, must be passed in the low-order (rightmost) four bytes of the
doubleword stack slot reserved for that parameter.  If there are GPR protocol
registers remaining, the parameter must also be mirrored in the low-order
four bytes of the reserved GPR.

Prior to this patch, such parameters were being passed in the high-order
four bytes of the stack slot and the mirrored GPR.

The patch adds a new test case to verify the correct code generation.

llvm-svn: 166968

11 years ago<rdar://problem/11449953> Change Debugger::SetOutputFileHandle() so that it does...
Enrico Granata [Mon, 29 Oct 2012 21:18:03 +0000 (21:18 +0000)]
<rdar://problem/11449953> Change Debugger::SetOutputFileHandle() so that it does not automatically initialize the script interpreter in order to transfer its output file handle to it
This should delay initialization of Python until strictly necessary and speed-up debugger startup
Also, convert formatters for SEL and BOOL ObjC data-types from Python to C++, in order to reap more performance benefits from the above changes

llvm-svn: 166967

11 years agoConsistently declare 'extern "C"' variable in namespace __ubsan. No functionality...
Richard Smith [Mon, 29 Oct 2012 21:01:59 +0000 (21:01 +0000)]
Consistently declare 'extern "C"' variable in namespace __ubsan. No functionality change.

llvm-svn: 166966

11 years agoDon't define an extern "C" variable in its first declaration, to appease a
Richard Smith [Mon, 29 Oct 2012 20:54:34 +0000 (20:54 +0000)]
Don't define an extern "C" variable in its first declaration, to appease a
bogus gcc warning. Take this opportunity to move the declaration to the header,
since it's part of the API of this file.

llvm-svn: 166965

11 years ago<rdar://problem/12500785>
Greg Clayton [Mon, 29 Oct 2012 20:52:08 +0000 (20:52 +0000)]
<rdar://problem/12500785>

I tracked down a leak that could happen when detaching from a process where the lldb_private::Process objects would stay around forever. This was caused by a eStateDetached event that was queued up on the lldb_private::Process private state thread listener. Since process events contain shared pointers to the process, this is dangerous if they don't get consume or cleared as having the lldb_private::Process class contain a collection of things that have a shared pointer to yourself is obviously bad.

To fix this I modified the Process::Finalize() function to clear this list. The actual thing that was holding onto the ModuleSP and thus the static archive, was a stack frame. Since the process wasn't going away, it still had thread objects and they still had frames. I modified the Thread::Destroy() to clear the stack frames to ensure this further doesn't happen.

llvm-svn: 166964

11 years agoAdd mips64-* and mips64el-* triples to configure scripts
Simon Atanasyan [Mon, 29 Oct 2012 19:49:45 +0000 (19:49 +0000)]
Add mips64-* and mips64el-* triples to configure scripts
as valid triples denote  Mips target.

llvm-svn: 166961

11 years agoImplement patterns for extloadi8 and extloadi16
Reed Kotler [Mon, 29 Oct 2012 19:39:04 +0000 (19:39 +0000)]
Implement patterns for extloadi8 and extloadi16

llvm-svn: 166960

11 years agoFix an incorrect comment...
Jim Ingham [Mon, 29 Oct 2012 19:24:56 +0000 (19:24 +0000)]
Fix an incorrect comment...

llvm-svn: 166959

11 years agoIn various places throughout the code generator, there were special
Ulrich Weigand [Mon, 29 Oct 2012 18:35:49 +0000 (18:35 +0000)]
In various places throughout the code generator, there were special
checks to avoid performing compile-time arithmetic on PPCDoubleDouble.

Now that APFloat supports arithmetic on PPCDoubleDouble, those checks
are no longer needed, and we can treat the type like any other.

llvm-svn: 166958

11 years agoRevert commit r166946
Quentin Colombet [Mon, 29 Oct 2012 18:28:57 +0000 (18:28 +0000)]
Revert commit r166946

llvm-svn: 166957

11 years agoPartially roll back r166898; it exposed a bug in the standard.
Richard Smith [Mon, 29 Oct 2012 18:26:47 +0000 (18:26 +0000)]
Partially roll back r166898; it exposed a bug in the standard.

The problem is as follows: C++11 has contexts which are not
potentially-evaluated, and yet in which we are required or encouraged to
perform constant evaluation. In such contexts, we are not permitted to
implicitly define special member functions for literal types, therefore
we cannot evalaute those constant expressions.

Punt on this in one more context for now by skipping checking constexpr
variable initializers if they occur in dependent contexts.

llvm-svn: 166956

11 years agoAPFloat cleanup: Remove now unused "arithmeticOK" logic.
Ulrich Weigand [Mon, 29 Oct 2012 18:18:44 +0000 (18:18 +0000)]
APFloat cleanup: Remove now unused "arithmeticOK" logic.

llvm-svn: 166954

11 years agoRemove redundant test case from r166949, per Eli's suggestion.
Chad Rosier [Mon, 29 Oct 2012 18:18:26 +0000 (18:18 +0000)]
Remove redundant test case from r166949, per Eli's suggestion.

llvm-svn: 166953

11 years agoAPFloat cleanup: Remove now unused fields "sign2" and "exponent2".
Ulrich Weigand [Mon, 29 Oct 2012 18:17:42 +0000 (18:17 +0000)]
APFloat cleanup: Remove now unused fields "sign2" and "exponent2".

llvm-svn: 166952

11 years agoImplement arithmetic on APFloat with PPCDoubleDouble semantics by
Ulrich Weigand [Mon, 29 Oct 2012 18:09:01 +0000 (18:09 +0000)]
Implement arithmetic on APFloat with PPCDoubleDouble semantics by
treating it as if it were an IEEE floating-point type with 106-bit
mantissa.

This makes compile-time arithmetic on "long double" for PowerPC
in clang (in particular parsing of floating point constants)
work, and fixes all "long double" related failures in the test
suite.

llvm-svn: 166951

11 years agoImprove the broadcast event dumping.
Greg Clayton [Mon, 29 Oct 2012 18:08:18 +0000 (18:08 +0000)]
Improve the broadcast event dumping.

llvm-svn: 166950

11 years ago[ms-inline asm] Add support for the [] operator. Essentially, [expr1][expr2] is
Chad Rosier [Mon, 29 Oct 2012 18:01:54 +0000 (18:01 +0000)]
[ms-inline asm] Add support for the [] operator.  Essentially, [expr1][expr2] is
equivalent to [expr1 + expr2].  See test cases for more examples.
rdar://12470392

llvm-svn: 166949

11 years agoRename the BB-vectorize flag to match the dragonegg name
Nadav Rotem [Mon, 29 Oct 2012 18:01:14 +0000 (18:01 +0000)]
Rename the BB-vectorize flag to match the dragonegg name

llvm-svn: 166948

11 years agoFix PR14204
Michael Liao [Mon, 29 Oct 2012 17:57:12 +0000 (17:57 +0000)]
Fix PR14204

- Add missing pattern on X86ISD::VZEXT from VR256 to VR256 when AVX2 is enabled.

llvm-svn: 166947

11 years agoMake forcesizeopt attribute available to the end user
Quentin Colombet [Mon, 29 Oct 2012 17:56:23 +0000 (17:56 +0000)]
Make forcesizeopt attribute available to the end user

llvm-svn: 166946

11 years agoFix typo
Joerg Sonnenberger [Mon, 29 Oct 2012 17:56:15 +0000 (17:56 +0000)]
Fix typo

llvm-svn: 166945

11 years agoCompletely disallow partial copies in adjustCopiesBackFrom().
Jakob Stoklund Olesen [Mon, 29 Oct 2012 17:51:52 +0000 (17:51 +0000)]
Completely disallow partial copies in adjustCopiesBackFrom().

Partial copies can show up even when CoalescerPair.isPartial() returns
false. For example:

   %vreg24:dsub_0<def> = COPY %vreg31:dsub_0; QPR:%vreg24,%vreg31

Such a partial-partial copy is not good enough for the transformation
adjustCopiesBackFrom() needs to do.

llvm-svn: 166944

11 years agoAllow i32/i64 for 'f' constraint on PowerPC.
Ulrich Weigand [Mon, 29 Oct 2012 17:49:34 +0000 (17:49 +0000)]
Allow i32/i64 for 'f' constraint on PowerPC.
This fixes PR12757.

llvm-svn: 166943

11 years ago-Warc-repeated-use-of-weak: allow single reads in loops from local variables.
Jordan Rose [Mon, 29 Oct 2012 17:46:47 +0000 (17:46 +0000)]
-Warc-repeated-use-of-weak: allow single reads in loops from local variables.

Previously, the warning would erroneously fire on this:

for (Test *a in someArray)
  use(a.weakProp);

...because it looks like the same property is being accessed over and over.
However, clearly this is not the case. We now ignore loops like this for
local variables, but continue to warn if the base object is a parameter,
global variable, or instance variable, on the assumption that these are
not repeatedly usually assigned to within loops.

Additionally, do-while loops where the condition is 'false' are not really
loops at all; usually they're just used for semicolon-swallowing macros or
using "break" like "goto".

<rdar://problem/12578785&12578849>

llvm-svn: 166942

11 years ago[analyzer] New option to not suppress null return paths if an argument is null.
Jordan Rose [Mon, 29 Oct 2012 17:31:59 +0000 (17:31 +0000)]
[analyzer] New option to not suppress null return paths if an argument is null.

Our one basic suppression heuristic is to assume that functions do not
usually return NULL. However, when one of the arguments is NULL it is
suddenly much more likely that NULL is a valid return value. In this case,
we don't suppress the report here, but we do attach /another/ visitor to
go find out if this NULL argument also comes from an inlined function's
error path.

This new behavior, controlled by the 'avoid-suppressing-null-argument-paths'
analyzer-config option, is turned off by default. Turning it on produced
two false positives and no new true positives when running over LLVM/Clang.

This is one of the possible refinements to our suppression heuristics.
<rdar://problem/12350829>

llvm-svn: 166941

11 years ago[analyzer] Use the CallEnter node to get a value for tracked null arguments.
Jordan Rose [Mon, 29 Oct 2012 17:31:53 +0000 (17:31 +0000)]
[analyzer] Use the CallEnter node to get a value for tracked null arguments.

Additionally, don't collect PostStore nodes -- they are often used in
path diagnostics.

Previously, we tried to track null arguments in the same way as any other
null values, but in many cases the necessary nodes had already been
collected (a memory optimization in ExplodedGraph). Now, we fall back to
using the value of the argument at the time of the call, which may not
always match the actual contents of the region, but often will.

This is a precursor to improving our suppression heuristic.
<rdar://problem/12350829>

llvm-svn: 166940

11 years agoRemove a wrapper around getIntPtrType added to GVN by Hal in commit 166624 (the
Duncan Sands [Mon, 29 Oct 2012 17:31:46 +0000 (17:31 +0000)]
Remove a wrapper around getIntPtrType added to GVN by Hal in commit 166624 (the
wrapper returns a vector of integers when passed a vector of pointers) by having
getIntPtrType itself return a vector of integers in this case.  Outside of this
wrapper, I didn't find anywhere in the codebase that was relying on the old
behaviour for vectors of pointers, so give this a whirl through the buildbots.

llvm-svn: 166939

11 years agoRemove code to saturate profile counts.
Bob Wilson [Mon, 29 Oct 2012 17:27:39 +0000 (17:27 +0000)]
Remove code to saturate profile counts.

We may need to change the way profile counter values are stored, but
saturation is the wrong thing to do.  Just remove it for now.

Patch by Alastair Murray!

llvm-svn: 166938

11 years agoChange the PassManagerBuilder (used by -O3) loop vectorizer flag from -vectorize...
Nadav Rotem [Mon, 29 Oct 2012 16:36:25 +0000 (16:36 +0000)]
Change the PassManagerBuilder (used by -O3) loop vectorizer flag from -vectorize to -vectorize-loops because we dont want to share the same flag as the bb-vectorizer.

llvm-svn: 166937

11 years agoMinor style fixes for TargetTransformationInfo and TargetTransformImpl
Hans Wennborg [Mon, 29 Oct 2012 16:26:52 +0000 (16:26 +0000)]
Minor style fixes for TargetTransformationInfo and TargetTransformImpl

llvm-svn: 166936

11 years agoExpand all atomic ops for mips16.
Reed Kotler [Mon, 29 Oct 2012 16:16:54 +0000 (16:16 +0000)]
Expand all atomic ops for mips16.

llvm-svn: 166935

11 years agollvm/Config/config.h.cmake: Good bye, Kevin! We won't honor authors in comments.
NAKAMURA Takumi [Mon, 29 Oct 2012 16:07:28 +0000 (16:07 +0000)]
llvm/Config/config.h.cmake: Good bye, Kevin! We won't honor authors in comments.

llvm-svn: 166934