platform/upstream/llvm.git
11 years agofixes a typo in my last patch.
Fariborz Jahanian [Mon, 8 Apr 2013 19:14:15 +0000 (19:14 +0000)]
fixes a typo in my last patch.
// rdar://12379114

llvm-svn: 179042

11 years agoChange <cwchar> and <cstring> to look out for flags which may or may not be set by...
Howard Hinnant [Mon, 8 Apr 2013 18:59:28 +0000 (18:59 +0000)]
Change <cwchar> and <cstring> to look out for flags which may or may not be set by the C headers <wchar.h> and <string.h> indicating C support for the C++-altered wcschr, wcspbrk, wcsrchr, wcsstr, wmemchr, strchr, strpbrk, strrchr, memchr, and strstr.  This was already done in <cstring> for other platforms using other flags, so just had to add one more flag to the list there.

llvm-svn: 179041

11 years agoIn the comparison, both clang and GCC are popular and widely adopted. This is no...
Chris Lattner [Mon, 8 Apr 2013 18:56:15 +0000 (18:56 +0000)]
In the comparison, both clang and GCC are popular and widely adopted.  This is no longer a win of GCC.

This whole doc should really be looked at.

llvm-svn: 179040

11 years agodoce parsing: adding few more headerdoc tags.
Fariborz Jahanian [Mon, 8 Apr 2013 18:53:25 +0000 (18:53 +0000)]
doce parsing: adding few more headerdoc tags.
// rdar://12379114

llvm-svn: 179039

11 years agoUpdate documentation.
Matt Arsenault [Mon, 8 Apr 2013 18:52:58 +0000 (18:52 +0000)]
Update documentation.

First feature is not CPU subtype anymore since r134127

llvm-svn: 179038

11 years ago<rdar://problem/13540921> Cope with instantiations of the C++11 range-based for loop...
Douglas Gregor [Mon, 8 Apr 2013 18:40:13 +0000 (18:40 +0000)]
<rdar://problem/13540921> Cope with instantiations of the C++11 range-based for loop that end up being Objective-C fast enumeration loops.

llvm-svn: 179037

11 years agoRewrite test/Verifier tests to use FileCheck instead of grep
Eli Bendersky [Mon, 8 Apr 2013 18:33:51 +0000 (18:33 +0000)]
Rewrite test/Verifier tests to use FileCheck instead of grep

llvm-svn: 179036

11 years ago<rdar://problem/13540921> Cope with deduced 'auto' in a C++11 for-range loop that...
Douglas Gregor [Mon, 8 Apr 2013 18:25:02 +0000 (18:25 +0000)]
<rdar://problem/13540921> Cope with deduced 'auto' in a C++11 for-range loop that is actually an Objective-C fast enumeration loop.

llvm-svn: 179035

11 years agoTweak warning text for nil value in ObjC container warning.
Ted Kremenek [Mon, 8 Apr 2013 18:09:16 +0000 (18:09 +0000)]
Tweak warning text for nil value in ObjC container warning.

llvm-svn: 179034

11 years agoX86 cost model: Model cost for uitofp and sitofp on SSE2
Arnold Schwaighofer [Mon, 8 Apr 2013 18:05:48 +0000 (18:05 +0000)]
X86 cost model: Model cost for uitofp and sitofp on SSE2

The costs are overfitted so that I can still use the legalization factor.

For example the following kernel has about half the throughput vectorized than
unvectorized when compiled with SSE2. Before this patch we would vectorize it.

unsigned short A[1024];
double B[1024];
void f() {
  int i;
  for (i = 0; i < 1024; ++i) {
    B[i] = (double) A[i];
  }
}

radar://13599001

llvm-svn: 179033

11 years ago[libsymbolized] If we can't find an address in the list of shared libraries, try...
Alexander Potapenko [Mon, 8 Apr 2013 17:46:34 +0000 (17:46 +0000)]
[libsymbolized] If we can't find an address in the list of shared libraries, try to reload it.

Add a regression test for the case where such behavior helps TSan:
  1. race is reported in the main module
  2. new shared library is loaded
  3. race is reported in the shared library

llvm-svn: 179032

11 years agoTest case for r179030.
Chad Rosier [Mon, 8 Apr 2013 17:44:05 +0000 (17:44 +0000)]
Test case for r179030.

llvm-svn: 179031

11 years ago[ms-inline asm] Add support for ImmDisp [ Symbol ] memory operands.
Chad Rosier [Mon, 8 Apr 2013 17:43:47 +0000 (17:43 +0000)]
[ms-inline asm] Add support for ImmDisp [ Symbol ] memory operands.
rdar://13521249

llvm-svn: 179030

11 years ago<rdar://problem/12806802> Propagate access specifiers for conversion functions to...
Douglas Gregor [Mon, 8 Apr 2013 17:12:58 +0000 (17:12 +0000)]
<rdar://problem/12806802> Propagate access specifiers for conversion functions to the conversion function set eagerly.

This slightly propagates an existing hack that delays when we provide
access specifiers for the visible conversion functions of a class by
copying the available access specifier early. The only client this
affects is LLDB, which tends to discover and add conversion functions
after the class is technically "complete". As such, the only
observable difference is in LLDB, so the testing will go there.

llvm-svn: 179029

11 years agoAdd matcher for NamespaceDecls.
Daniel Jasper [Mon, 8 Apr 2013 16:44:05 +0000 (16:44 +0000)]
Add matcher for NamespaceDecls.

llvm-svn: 179027

11 years agoGenerate PPC early conditional returns
Hal Finkel [Mon, 8 Apr 2013 16:24:03 +0000 (16:24 +0000)]
Generate PPC early conditional returns

PowerPC has a conditional branch to the link register (return) instruction: BCLR.
This should be used any time when we'd otherwise have a conditional branch to a
return. This adds a small pass, PPCEarlyReturn, which runs just prior to the
branch selection pass (and, importantly, after block placement) to generate
these conditional returns when possible. It will also eliminate unconditional
branches to returns (these happen rarely; most of the time these have already
been tail duplicated by the time PPCEarlyReturn is invoked). This is a nice
optimization for small functions that do not maintain a stack frame.

llvm-svn: 179026

11 years agoDWARF parser: remove duplicated code and fix code style in DIE extractors.
Alexey Samsonov [Mon, 8 Apr 2013 14:37:16 +0000 (14:37 +0000)]
DWARF parser: remove duplicated code and fix code style in DIE extractors.

llvm-svn: 179023

11 years ago[msan] Interceptors for pipe2 and socketpair.
Evgeniy Stepanov [Mon, 8 Apr 2013 13:45:12 +0000 (13:45 +0000)]
[msan] Interceptors for pipe2 and socketpair.

llvm-svn: 179022

11 years agoAdd all 4 MachO object types. Use the stored type to implement is64Bits().
Rafael Espindola [Mon, 8 Apr 2013 13:25:33 +0000 (13:25 +0000)]
Add all 4 MachO object types. Use the stored type to implement is64Bits().

llvm-svn: 179021

11 years agoR600: Control Flow support for pre EG gen
Vincent Lejeune [Mon, 8 Apr 2013 13:05:49 +0000 (13:05 +0000)]
R600: Control Flow support for pre EG gen

llvm-svn: 179020

11 years agoIndependentBlocks: translate out of SSA all uses escaping the region
Sebastian Pop [Mon, 8 Apr 2013 13:05:41 +0000 (13:05 +0000)]
IndependentBlocks: translate out of SSA all uses escaping the region

llvm-svn: 179019

11 years agoSCEVCodegen should not run createIndVarSimplifyPass
Sebastian Pop [Mon, 8 Apr 2013 13:05:37 +0000 (13:05 +0000)]
SCEVCodegen should not run createIndVarSimplifyPass

llvm-svn: 179018

11 years agoRemove outdated part of help message.
Daniel Jasper [Mon, 8 Apr 2013 10:50:02 +0000 (10:50 +0000)]
Remove outdated part of help message.

The styles are now documented with the -style option. This fixes
llvm.org/PR15689.

llvm-svn: 179017

11 years agoRevert accidental commit r179015.
Daniel Jasper [Mon, 8 Apr 2013 10:45:44 +0000 (10:45 +0000)]
Revert accidental commit r179015.

llvm-svn: 179016

11 years agox
Daniel Jasper [Mon, 8 Apr 2013 10:36:32 +0000 (10:36 +0000)]
x

llvm-svn: 179015

11 years agoSimplify the quoting here. Our lit emulator doesn't deal well with the
Chandler Carruth [Mon, 8 Apr 2013 10:07:50 +0000 (10:07 +0000)]
Simplify the quoting here. Our lit emulator doesn't deal well with the
nested quoting schemes, and they're not important here...

llvm-svn: 179014

11 years ago[msan] Intercept glob().
Evgeniy Stepanov [Mon, 8 Apr 2013 09:03:00 +0000 (09:03 +0000)]
[msan] Intercept glob().

llvm-svn: 179012

11 years agoRemove a global 'endl' variable from the other file as well.
Chandler Carruth [Mon, 8 Apr 2013 08:55:18 +0000 (08:55 +0000)]
Remove a global 'endl' variable from the other file as well.

llvm-svn: 179010

11 years agoClean up namespaces in obj2yaml.cpp.
Chandler Carruth [Mon, 8 Apr 2013 08:55:14 +0000 (08:55 +0000)]
Clean up namespaces in obj2yaml.cpp.

llvm-svn: 179009

11 years ago[tsan] Fix build.
Evgeniy Stepanov [Mon, 8 Apr 2013 08:46:25 +0000 (08:46 +0000)]
[tsan] Fix build.

llvm-svn: 179008

11 years ago[sanitizer] Fix boundary condition in LargeMmapAllocator::GetBlockBegin. Patch by...
Kostya Serebryany [Mon, 8 Apr 2013 08:43:22 +0000 (08:43 +0000)]
[sanitizer] Fix boundary condition in LargeMmapAllocator::GetBlockBegin. Patch by Sergey Matveev

llvm-svn: 179007

11 years agoAdd ACLE link to ARM documentation sections
Tim Northover [Mon, 8 Apr 2013 08:42:24 +0000 (08:42 +0000)]
Add ACLE link to ARM documentation sections

llvm-svn: 179006

11 years agoAArch64: remove barriers from AArch64 atomic operations.
Tim Northover [Mon, 8 Apr 2013 08:40:41 +0000 (08:40 +0000)]
AArch64: remove barriers from AArch64 atomic operations.

I've managed to convince myself that AArch64's acquire/release
instructions are sufficient to guarantee C++11's required semantics,
even in the sequentially-consistent case.

llvm-svn: 179005

11 years agoCleanup the formatting of obj2yaml.cpp.
Chandler Carruth [Mon, 8 Apr 2013 08:39:59 +0000 (08:39 +0000)]
Cleanup the formatting of obj2yaml.cpp.

I couldn't touch this file and not clean it up some. These reformattings
brought to you by clang-format, with some minor adjustments by me. More
spring cleaning to follow here.

llvm-svn: 179004

11 years agoDon't define our own global 'endl' variable. While technically it had
Chandler Carruth [Mon, 8 Apr 2013 08:30:47 +0000 (08:30 +0000)]
Don't define our own global 'endl' variable. While technically it had
internal linkage and so wasn't a patent bug, it doesn't make any sense
here. We can avoid even calling operator<< by just embedding the newline
in the string literals that were already being streamed out. It also
gives the impression of some line-ending agnosticisms which is not
present, and that flushing happens when it doesn't.

If we want to use std::endl, we could do that, but honestly it doesn't
seem remotely worth it. Using '\n' directly is much more clear when
working with raw_ostream.

It also happens to fix builds with old crufty GCC STL implementations
that include std::endl into the global namespace (or headers written to
be compatible with such atrocities).

llvm-svn: 179003

11 years ago[msan] Intercept time().
Evgeniy Stepanov [Mon, 8 Apr 2013 08:25:22 +0000 (08:25 +0000)]
[msan] Intercept time().

llvm-svn: 179002

11 years agoARM: Remove unused variable.
Benjamin Kramer [Mon, 8 Apr 2013 08:07:35 +0000 (08:07 +0000)]
ARM: Remove unused variable.

llvm-svn: 179001

11 years agoCleanup and improve PPC fsel generation
Hal Finkel [Sun, 7 Apr 2013 22:11:09 +0000 (22:11 +0000)]
Cleanup and improve PPC fsel generation

First, we should not cheat: fsel-based lowering of select_cc is a
finite-math-only optimization (the ISA manual, section F.3 of v2.06, makes
this clear, as does a note in our own README).

This also adds fsel-based lowering of EQ and NE condition codes. As it turned
out, fsel generation was covered by a grand total of zero regression test
cases. I've added some test cases to cover the existing behavior (which is now
finite-math only), as well as the new EQ cases.

llvm-svn: 179000

11 years agoTargetLowering: Fix getTypeConversion handling of extended vector types
Arnold Schwaighofer [Sun, 7 Apr 2013 20:22:56 +0000 (20:22 +0000)]
TargetLowering: Fix getTypeConversion handling of extended vector types

The code in getTypeConversion attempts to promote the element vector type
before it trys to split or widen the vector.
After it failed finding a legal vector type by promoting it would continue using
the promoted vector element type. Thereby missing legal splitted vector types.
For example the type v32i32 that has a legal split of 4 x v3i32 on x86/sse2
would be transformed to: v32i256 and from there on successively split to:
v16i256, v8i256, v1i256 and then finally ends up as an i64 type.
By resetting the vector element type to the original vector element type that
existed before the promotion the code will attempt to split the vector type to
smaller vector widths of the same type.

llvm-svn: 178999

11 years agoMake MachOObjectFile independent from MachOObject.
Rafael Espindola [Sun, 7 Apr 2013 20:01:29 +0000 (20:01 +0000)]
Make MachOObjectFile independent from MachOObject.

llvm-svn: 178998

11 years agoImplement MachOObjectFile::getData directly.
Rafael Espindola [Sun, 7 Apr 2013 19:42:15 +0000 (19:42 +0000)]
Implement MachOObjectFile::getData directly.

llvm-svn: 178997

11 years agoImplement MachOObjectFile::is64Bit directly.
Rafael Espindola [Sun, 7 Apr 2013 19:38:15 +0000 (19:38 +0000)]
Implement MachOObjectFile::is64Bit directly.

llvm-svn: 178996

11 years agoImplement MachOObjectFile::getHeaderSize directly.
Rafael Espindola [Sun, 7 Apr 2013 19:31:49 +0000 (19:31 +0000)]
Implement MachOObjectFile::getHeaderSize directly.

llvm-svn: 178995

11 years agoImplement MachOObjectFile::getHeader directly.
Rafael Espindola [Sun, 7 Apr 2013 19:26:57 +0000 (19:26 +0000)]
Implement MachOObjectFile::getHeader directly.

llvm-svn: 178994

11 years agoImplement LowerCall_64 for the SPARC v9 64-bit ABI.
Jakob Stoklund Olesen [Sun, 7 Apr 2013 19:10:57 +0000 (19:10 +0000)]
Implement LowerCall_64 for the SPARC v9 64-bit ABI.

There is still no support for byval arguments (which I don't think are
needed) and varargs.

llvm-svn: 178993

11 years agoImplement MachOObjectFile::getHeaderSize and MachOObjectFile::getData.
Rafael Espindola [Sun, 7 Apr 2013 19:05:30 +0000 (19:05 +0000)]
Implement MachOObjectFile::getHeaderSize and MachOObjectFile::getData.

These were the last missing forwarding functions. Also consistently use
the forwarding functions instead of using MachOObj directly.

llvm-svn: 178992

11 years agoRemove LoadCommandInfo now that we always have a pointer to the command.
Rafael Espindola [Sun, 7 Apr 2013 18:42:06 +0000 (18:42 +0000)]
Remove LoadCommandInfo now that we always have a pointer to the command.

LoadCommandInfo was needed to keep a command and its offset in the file. Now
that we always have a pointer to the command, we don't need the offset.

llvm-svn: 178991

11 years agoAdd MachOObjectFile::LoadCommandInfo.
Rafael Espindola [Sun, 7 Apr 2013 18:08:12 +0000 (18:08 +0000)]
Add MachOObjectFile::LoadCommandInfo.

This avoids using MachOObject::getLoadCommandInfo.

llvm-svn: 178990

11 years agoUse getLoadCommandInfo instead of MachOObj->getLoadCommandInfo.
Rafael Espindola [Sun, 7 Apr 2013 17:41:59 +0000 (17:41 +0000)]
Use getLoadCommandInfo instead of MachOObj->getLoadCommandInfo.

llvm-svn: 178989

11 years agoConstruct MachOObject in MachOObjectFile's constructor.
Rafael Espindola [Sun, 7 Apr 2013 16:58:48 +0000 (16:58 +0000)]
Construct MachOObject in MachOObjectFile's constructor.

llvm-svn: 178988

11 years agoRemove unused argument.
Rafael Espindola [Sun, 7 Apr 2013 16:40:00 +0000 (16:40 +0000)]
Remove unused argument.

llvm-svn: 178987

11 years agoRemove MachOObjectFile::getObject.
Rafael Espindola [Sun, 7 Apr 2013 16:07:35 +0000 (16:07 +0000)]
Remove MachOObjectFile::getObject.

llvm-svn: 178986

11 years agoRemove two uses of getObject.
Rafael Espindola [Sun, 7 Apr 2013 15:46:05 +0000 (15:46 +0000)]
Remove two uses of getObject.

llvm-svn: 178985

11 years agoRemove usage of InMemoryStruct in getSymbol.
Rafael Espindola [Sun, 7 Apr 2013 15:35:18 +0000 (15:35 +0000)]
Remove usage of InMemoryStruct in getSymbol.

llvm-svn: 178984

11 years agoPPC Altivec load/store intrinsics can be marked IntrRead[Write]ArgMem
Hal Finkel [Sun, 7 Apr 2013 15:32:40 +0000 (15:32 +0000)]
PPC Altivec load/store intrinsics can be marked IntrRead[Write]ArgMem

llvm-svn: 178983

11 years agoPPC rotate instructions don't have unmodeled side effcts
Hal Finkel [Sun, 7 Apr 2013 15:06:53 +0000 (15:06 +0000)]
PPC rotate instructions don't have unmodeled side effcts

llvm-svn: 178982

11 years agoRemove a use of InMemoryStruct in llvm-readobj.
Rafael Espindola [Sun, 7 Apr 2013 15:05:12 +0000 (15:05 +0000)]
Remove a use of InMemoryStruct in llvm-readobj.

llvm-svn: 178981

11 years agoMake getObject const. Remove a const_cast.
Rafael Espindola [Sun, 7 Apr 2013 14:50:40 +0000 (14:50 +0000)]
Make getObject const. Remove a const_cast.

llvm-svn: 178980

11 years agoRemove last use of InMemoryStruct in llvm-objdump.
Rafael Espindola [Sun, 7 Apr 2013 14:40:18 +0000 (14:40 +0000)]
Remove last use of InMemoryStruct in llvm-objdump.

llvm-svn: 178979

11 years agoMost PPC M[TF]CR instructions do not have side effects
Hal Finkel [Sun, 7 Apr 2013 14:33:13 +0000 (14:33 +0000)]
Most PPC M[TF]CR instructions do not have side effects

llvm-svn: 178978

11 years agoRemove dead code.
Rafael Espindola [Sun, 7 Apr 2013 14:30:21 +0000 (14:30 +0000)]
Remove dead code.

llvm-svn: 178977

11 years agoRemove unused argument.
Rafael Espindola [Sun, 7 Apr 2013 14:25:39 +0000 (14:25 +0000)]
Remove unused argument.

llvm-svn: 178976

11 years agoSema: Don't crash when trying to emit a warning for a duplicate value in an invalid...
Benjamin Kramer [Sun, 7 Apr 2013 14:10:40 +0000 (14:10 +0000)]
Sema: Don't crash when trying to emit a warning for a duplicate value in an invalid enum.

Fixes PR15693. A null check on a pointer returned from cast<> is a very dubious
construct, do we have a checker for this somewhere?

llvm-svn: 178975

11 years agoFix PR15674 (and PR15603): a SROA think-o.
Chandler Carruth [Sun, 7 Apr 2013 11:47:54 +0000 (11:47 +0000)]
Fix PR15674 (and PR15603): a SROA think-o.

The fix for PR14972 in r177055 introduced a real think-o in the *store*
side, likely because I was much more focused on the load side. While we
can arbitrarily widen (or narrow) a loaded value, we can't arbitrarily
widen a value to be stored, as that changes the width of memory access!
Lock down the code path in the store rewriting which would do this to
only handle the intended circumstance.

All of the existing tests continue to pass, and I've added a test from
the PR.

llvm-svn: 178974

11 years agoPPC pre-increment load instructions do not have side effects
Hal Finkel [Sun, 7 Apr 2013 06:30:47 +0000 (06:30 +0000)]
PPC pre-increment load instructions do not have side effects

A few were missed in r178972.

llvm-svn: 178973

11 years agoPPC pre-increment load instructions do not have side effects
Hal Finkel [Sun, 7 Apr 2013 05:46:58 +0000 (05:46 +0000)]
PPC pre-increment load instructions do not have side effects

llvm-svn: 178972

11 years agoPPC MCRF instruction does not have side effects
Hal Finkel [Sun, 7 Apr 2013 05:16:57 +0000 (05:16 +0000)]
PPC MCRF instruction does not have side effects

llvm-svn: 178971

11 years agoPPC FMR instruction does not have side effects
Hal Finkel [Sun, 7 Apr 2013 04:56:16 +0000 (04:56 +0000)]
PPC FMR instruction does not have side effects

llvm-svn: 178970

11 years agoDW_FORM_sec_offset should be a relocation on platforms that use
Eric Christopher [Sun, 7 Apr 2013 03:43:09 +0000 (03:43 +0000)]
DW_FORM_sec_offset should be a relocation on platforms that use
a relocation across sections. Do this for DW_AT_stmt list in the
skeleton CU and check the relocations in the debug_info section.

Add a FIXME for multiple CUs.

llvm-svn: 178969

11 years ago[cmake] Avoid rel+asserts warnings when passing -UNDEBUG
Reid Kleckner [Sun, 7 Apr 2013 01:45:01 +0000 (01:45 +0000)]
[cmake] Avoid rel+asserts warnings when passing -UNDEBUG

MSVC 2012 gives warning D9025, "overriding /D NDEBUG with -UNDEBUG".
Removing the original definition of NDEBUG silences this.

llvm-svn: 178967

11 years agoImplement LowerReturn_64 for SPARC v9.
Jakob Stoklund Olesen [Sat, 6 Apr 2013 23:57:33 +0000 (23:57 +0000)]
Implement LowerReturn_64 for SPARC v9.

Integer return values are sign or zero extended by the callee, and
structs up to 32 bytes in size can be returned in registers.

The CC_Sparc64 CallingConv definition is shared between
LowerFormalArguments_64 and LowerReturn_64. Function arguments and
return values are passed in the same registers.

The inreg flag is also used for return values. This is required to handle
C functions returning structs containing floats and ints:

  struct ifp {
    int i;
    float f;
  };

  struct ifp f(void);

LLVM IR:

  define inreg { i32, float } @f() {
     ...
     ret { i32, float } %retval
  }

The ABI requires that %retval.i is returned in the high bits of %i0
while %retval.f goes in %f1.

Without the inreg return value attribute, %retval.i would go in %i0 and
%retval.f would go in %f3 which is a more efficient way of returning
%multiple values, but it is not ABI compliant for returning C structs.

llvm-svn: 178966

11 years agoSPARC v9 stack pointer bias.
Jakob Stoklund Olesen [Sat, 6 Apr 2013 21:38:57 +0000 (21:38 +0000)]
SPARC v9 stack pointer bias.

64-bit SPARC v9 processes use biased stack and frame pointers, so the
current function's stack frame is located at %sp+BIAS .. %fp+BIAS where
BIAS = 2047.

This makes more local variables directly accessible via [%fp+simm13]
addressing.

llvm-svn: 178965

11 years agoCache the VM page size that we get from task_vm_info so we don't
Jason Molenda [Sat, 6 Apr 2013 20:30:59 +0000 (20:30 +0000)]
Cache the VM page size that we get from task_vm_info so we don't
re-fetch the value.

llvm-svn: 178962

11 years agoImplement PPCInstrInfo::FoldImmediate
Hal Finkel [Sat, 6 Apr 2013 19:30:30 +0000 (19:30 +0000)]
Implement PPCInstrInfo::FoldImmediate

There are certain PPC instructions into which we can fold a zero immediate
operand. We can detect such cases by looking at the register class required
by the using operand (so long as it is not otherwise constrained).

llvm-svn: 178961

11 years agoPPC ISEL is a select and never has side effects
Hal Finkel [Sat, 6 Apr 2013 19:30:28 +0000 (19:30 +0000)]
PPC ISEL is a select and never has side effects

llvm-svn: 178960

11 years agoAdd a comment to TargetInstrInfo about FoldImmediate
Hal Finkel [Sat, 6 Apr 2013 19:30:20 +0000 (19:30 +0000)]
Add a comment to TargetInstrInfo about FoldImmediate

This comment documents the current behavior of the ARM implementation of this
callback, and also the soon-to-be-committed PPC version.

llvm-svn: 178959

11 years agoComplete formal arguments for the SPARC v9 64-bit ABI.
Jakob Stoklund Olesen [Sat, 6 Apr 2013 18:32:12 +0000 (18:32 +0000)]
Complete formal arguments for the SPARC v9 64-bit ABI.

All arguments are formally assigned to stack positions and then promoted
to floating point and integer registers. Since there are more floating
point registers than integer registers, this can cause situations where
floating point arguments are assigned to registers after integer
arguments that where assigned to the stack.

Use the inreg flag to indicate 32-bit fragments of structs containing
both float and int members.

The three-way shadowing between stack, integer, and floating point
registers requires custom argument lowering. The good news is that
return values are passed in the exact same way, and we can share the
code.

Still missing:

 - Update LowerReturn to handle structs returned in registers.
 - LowerCall.
 - Variadic functions.

llvm-svn: 178958

11 years agoAdd optional LOG_TASK logging for MachVMMemory::PageSize when the call succeeds,...
Jason Molenda [Sat, 6 Apr 2013 07:28:38 +0000 (07:28 +0000)]
Add optional LOG_TASK logging for MachVMMemory::PageSize when the call succeeds, too.

llvm-svn: 178955

11 years agoAdd optional LOG_TASK logging for MachVMMemory::PageSize() task_info call failure.
Jason Molenda [Sat, 6 Apr 2013 07:26:59 +0000 (07:26 +0000)]
Add optional LOG_TASK logging for MachVMMemory::PageSize() task_info call failure.

llvm-svn: 178954

11 years agoUpdate MachVMMemory::PageSize to get the page size of a specific process
Jason Molenda [Sat, 6 Apr 2013 07:16:15 +0000 (07:16 +0000)]
Update MachVMMemory::PageSize to get the page size of a specific process
if we have an updated task_info call available; else fall back to getting
the default host-wide page size.

Update all uses of the vm page size to get it via MachVMMemory::PageSize().

<rdar://problem/13477763>, <rdar://problem/13498504>

llvm-svn: 178953

11 years agoRemove nondeterminism introduced in r178950.
Richard Smith [Sat, 6 Apr 2013 07:07:44 +0000 (07:07 +0000)]
Remove nondeterminism introduced in r178950.

llvm-svn: 178952

11 years agoChange the default of 'platform.plugin.darwin-kernel.search-locally-for-kexts'
Jason Molenda [Sat, 6 Apr 2013 05:25:38 +0000 (05:25 +0000)]
Change the default of 'platform.plugin.darwin-kernel.search-locally-for-kexts'
to 'off' for a week or so while we test the behavior in different environments.

llvm-svn: 178951

11 years agoWhen an internal-linkage function or variable is declared within an extern "C"
Richard Smith [Sat, 6 Apr 2013 05:00:46 +0000 (05:00 +0000)]
When an internal-linkage function or variable is declared within an extern "C"
linkage specification, and is marked as __attribute__((used)), try to also give
it the unmangled name (by emitting an internal linkage alias) if nothing else
within the translation unit would use that name. This allows inline asm in that
translation unit to use the entity via its unmangled name, which people
apparently rely on.

llvm-svn: 178950

11 years agotypo
Nadav Rotem [Sat, 6 Apr 2013 04:24:12 +0000 (04:24 +0000)]
typo

llvm-svn: 178949

11 years agoRemove last use of InMemoryStruct from MachOObjectFile.cpp.
Rafael Espindola [Sat, 6 Apr 2013 03:50:05 +0000 (03:50 +0000)]
Remove last use of InMemoryStruct from MachOObjectFile.cpp.

llvm-svn: 178948

11 years agoDon't use InMemoryStruct<macho::SymtabLoadCommand>.
Rafael Espindola [Sat, 6 Apr 2013 03:31:08 +0000 (03:31 +0000)]
Don't use InMemoryStruct<macho::SymtabLoadCommand>.

This also required not using the RegisterStringTable API, which is also a
good thing.

llvm-svn: 178947

11 years agoDon't use InMemoryStruct in getSymbol64TableEntry.
Rafael Espindola [Sat, 6 Apr 2013 02:15:44 +0000 (02:15 +0000)]
Don't use InMemoryStruct in getSymbol64TableEntry.

llvm-svn: 178946

11 years agoDon't use InMemoryStruct in getSymbolTableEntry.
Rafael Espindola [Sat, 6 Apr 2013 01:59:05 +0000 (01:59 +0000)]
Don't use InMemoryStruct in getSymbolTableEntry.

llvm-svn: 178945

11 years ago[analyzer] When creating a trimmed graph, preserve whether a node is a sink.
Jordan Rose [Sat, 6 Apr 2013 01:42:02 +0000 (01:42 +0000)]
[analyzer] When creating a trimmed graph, preserve whether a node is a sink.

This is important because sometimes two nodes are identical, except the
second one is a sink.

This bug has probably been around for a while, but it wouldn't have been an
issue in the old report graph algorithm. I'm ashamed to say I actually looked
at this the first time around and thought it would never be a problem...and
then didn't include an assertion to back that up.

PR15684

llvm-svn: 178944

11 years agoDon't use InMemoryStruct in getRelocation.
Rafael Espindola [Sat, 6 Apr 2013 01:24:11 +0000 (01:24 +0000)]
Don't use InMemoryStruct in getRelocation.

llvm-svn: 178943

11 years ago[objcmt] Fix a mishandled conversion to objc directory literal.
Argyrios Kyrtzidis [Sat, 6 Apr 2013 01:13:17 +0000 (01:13 +0000)]
[objcmt] Fix a mishandled conversion to objc directory literal.

rdar://13181413

llvm-svn: 178942

11 years agoDwarf: use utostr on CUID to append to SmallString.
Manman Ren [Sat, 6 Apr 2013 01:02:38 +0000 (01:02 +0000)]
Dwarf: use utostr on CUID to append to SmallString.

We used to do "SmallString += CUID", which is incorrect, since CUID will
be truncated to a char.

rdar://problem/13573833

llvm-svn: 178941

11 years agoAdd VTune as an optional external dependency and add task tracking.
Michael J. Spencer [Sat, 6 Apr 2013 00:56:40 +0000 (00:56 +0000)]
Add VTune as an optional external dependency and add task tracking.

llvm-svn: 178940

11 years ago<rdar://problem/13325066> Destroy std::initializer_list temporaries whose lifetime...
Douglas Gregor [Sat, 6 Apr 2013 00:46:20 +0000 (00:46 +0000)]
<rdar://problem/13325066> Destroy std::initializer_list temporaries whose lifetime has been extended by reference binding.

llvm-svn: 178939

11 years ago[analyzer] Shorten the malloc checker’s leak message
Anna Zaks [Sat, 6 Apr 2013 00:41:36 +0000 (00:41 +0000)]
[analyzer] Shorten the malloc checker’s leak message

As per Ted’s suggestion!

llvm-svn: 178938

11 years agoRework how ObjC method inherit deprecated/availability.
Ted Kremenek [Sat, 6 Apr 2013 00:34:27 +0000 (00:34 +0000)]
Rework how ObjC method inherit deprecated/availability.

New rule:
- Method decls in @implementation are considered "redeclarations"
  and inherit deprecated/availability from the @interface.
- All other cases are consider overrides, which do not inherit
  deprecated/availability.  For example:

  (a) @interface redeclares a method in an adopted protocol.
  (b) A subclass redeclares a method in a superclass.
  (c) A protocol redeclares a method from another protocol it adopts.

The idea is that API authors should have the ability to easily
move availability/deprecated up and down a class/protocol hierarchy.
A redeclaration means that the availability/deprecation is a blank
slate.

Fixes <rdar://problem/13574571>

llvm-svn: 178937

11 years agoDon't call DisableBreakpointSite (i.e. don't try to remove the breakpoint from the...
Jim Ingham [Sat, 6 Apr 2013 00:16:39 +0000 (00:16 +0000)]
Don't call DisableBreakpointSite (i.e. don't try to remove the breakpoint from the target process) if the target
process is no longer alive.

<rdar://problem/13320991>

llvm-svn: 178936

11 years ago[analyzer] Reword error messages for nil keys and values of NSMutableDictionary.
Anna Zaks [Fri, 5 Apr 2013 23:50:18 +0000 (23:50 +0000)]
[analyzer] Reword error messages for nil keys and values of NSMutableDictionary.

llvm-svn: 178935

11 years ago[analyzer] Remove another redundancy from trackNullOrUndef
Anna Zaks [Fri, 5 Apr 2013 23:50:14 +0000 (23:50 +0000)]
[analyzer] Remove another redundancy from trackNullOrUndef

llvm-svn: 178934

11 years ago[analyzer] Fix null tracking for the given test case, by using the proper state and...
Anna Zaks [Fri, 5 Apr 2013 23:50:11 +0000 (23:50 +0000)]
[analyzer] Fix null tracking for the given test case, by using the proper state and removing redundant code.

llvm-svn: 178933