platform/upstream/llvm.git
11 years agoSpacing.
Eric Christopher [Tue, 16 Oct 2012 23:46:19 +0000 (23:46 +0000)]
Spacing.

llvm-svn: 166074

11 years agoFix pretty-printing for variables declared in a condition. Patch by Grzegorz Jablonski.
Eli Friedman [Tue, 16 Oct 2012 23:45:15 +0000 (23:45 +0000)]
Fix pretty-printing for variables declared in a condition.  Patch by Grzegorz Jablonski.

llvm-svn: 166073

11 years agoSerialize TargetOptions into an AST file, and make sure that we keep
Douglas Gregor [Tue, 16 Oct 2012 23:40:58 +0000 (23:40 +0000)]
Serialize TargetOptions into an AST file, and make sure that we keep
target options around so they can be accessed at any point (rather
than keeping them transient).

llvm-svn: 166072

11 years agoDR1492: In a definition of a destructor, the exception specification must be
Richard Smith [Tue, 16 Oct 2012 23:30:16 +0000 (23:30 +0000)]
DR1492: In a definition of a destructor, the exception specification must be
explicitly specified iff it was specified in the declaration.

llvm-svn: 166071

11 years agoAPI cleanup.
Greg Clayton [Tue, 16 Oct 2012 22:58:25 +0000 (22:58 +0000)]
API cleanup.

llvm-svn: 166070

11 years agoPR13684: Emit vtable entries for deleted functions as __cxa_deleted_function.
David Blaikie [Tue, 16 Oct 2012 22:56:05 +0000 (22:56 +0000)]
PR13684: Emit vtable entries for deleted functions as __cxa_deleted_function.

This is consistent/interoperable with GCC 4.7 (& __cxa_deleted_function isn't
present in 4.4 - not sure when it got added, but you'll need something with
that function available for this to work).

llvm-svn: 166069

11 years agoAvoid rematerializing a redef immediately after the old def.
Jakob Stoklund Olesen [Tue, 16 Oct 2012 22:51:58 +0000 (22:51 +0000)]
Avoid rematerializing a redef immediately after the old def.

PR14098 contains an example where we would rematerialize a MOV8ri
immediately after the original instruction:

  %vreg7:sub_8bit<def> = MOV8ri 9; GR32_ABCD:%vreg7
  %vreg22:sub_8bit<def> = MOV8ri 9; GR32_ABCD:%vreg7

Besides being pointless, it is also wrong since the original instruction
only redefines part of the register, and the value read by the new
instruction is wrong.

The problem was the LiveRangeEdit::allUsesAvailableAt() didn't
special-case OrigIdx == UseIdx and found the wrong SSA value.

llvm-svn: 166068

11 years agoRevert r166046 "Switch back to the old coalescer for now to fix the 32 bit bit"
Jakob Stoklund Olesen [Tue, 16 Oct 2012 22:51:55 +0000 (22:51 +0000)]
Revert r166046 "Switch back to the old coalescer for now to fix the 32 bit bit"

A fix for PR14098, including the test case is in the next commit.

llvm-svn: 166067

11 years agoARM ABI: fix testing case arm-abi-vector.c by using [[VAR]]
Manman Ren [Tue, 16 Oct 2012 22:40:48 +0000 (22:40 +0000)]
ARM ABI: fix testing case arm-abi-vector.c by using [[VAR]]

rdar://12439123

llvm-svn: 166066

11 years agoAdd pnaclcall convention to Native Client targets.
Derek Schuff [Tue, 16 Oct 2012 22:30:41 +0000 (22:30 +0000)]
Add pnaclcall convention to Native Client targets.

Because PNaCl bitcode must be target-independent, it uses some
different bitcode representations from other targets (e.g. byval and
sret for structures). This means that without additional type
information, it cannot meet some native ABI requirements for some
targets (e.g. passing structures containing unions by value on
x86-64). To allow generation of code which uses the correct native
ABIs, we also support triples such as x86_64-nacl, which uses
target-dependent IR (as opposed to le32-nacl, which uses byval and
sret).

To allow interoperation between the two types of code, this patch adds
a calling convention attribute to be used in code compiled with the
target-dependent triple, which will generate code using the le32-style
bitcode. This calling convention does not need to be explicitly
supported in the backend because it determines bitcode representation
rather than native conventions (the backend just needs to undersand
how to handle byval and sret for the Native Client OS).

This patch implements __attribute__((pnaclcall)) to generate calls in
bitcode according to the le32 bitcode conventions, an attribute which
is accepted by any Native Client target, but issues a warning
otherwise.

llvm-svn: 166065

11 years agoXFAIL this testing case to recover buildbot
Manman Ren [Tue, 16 Oct 2012 22:02:26 +0000 (22:02 +0000)]
XFAIL this testing case to recover buildbot

llvm-svn: 166064

11 years ago[ms-inline asm] Move some logic around to simplify the interface between the
Chad Rosier [Tue, 16 Oct 2012 21:55:39 +0000 (21:55 +0000)]
[ms-inline asm] Move some logic around to simplify the interface between the
front-end and the AsmParser.  No functional change intended.

llvm-svn: 166063

11 years agoAdd the ability to set timeout & "run all threads" options both from the "expr" comma...
Jim Ingham [Tue, 16 Oct 2012 21:41:58 +0000 (21:41 +0000)]
Add the ability to set timeout & "run all threads" options both from the "expr" command and from
the SB API's that evaluate expressions.

<rdar://problem/12457211>

llvm-svn: 166062

11 years ago[InstCombine] Teach InstCombine how to handle an obfuscated splat.
Michael Gottesman [Tue, 16 Oct 2012 21:29:38 +0000 (21:29 +0000)]
[InstCombine] Teach InstCombine how to handle an obfuscated splat.

An obfuscated splat is where the frontend poorly generates code for a splat
using several different shuffles to create the splat, i.e.,

  %A = load <4 x float>* %in_ptr, align 16
  %B = shufflevector <4 x float> %A, <4 x float> undef, <4 x i32> <i32 0, i32 0, i32 undef, i32 undef>
  %C = shufflevector <4 x float> %B, <4 x float> %A, <4 x i32> <i32 0, i32 1, i32 4, i32 undef>
  %D = shufflevector <4 x float> %C, <4 x float> %A, <4 x i32> <i32 0, i32 1, i32 2, i32 4>

llvm-svn: 166061

11 years agoRemoving the two extra GetXSize(bool) calls since we do not desire to support them...
Enrico Granata [Tue, 16 Oct 2012 21:11:14 +0000 (21:11 +0000)]
Removing the two extra GetXSize(bool) calls since we do not desire to support them long-term

llvm-svn: 166060

11 years agoTest pure virtual vtable entries in the Itanium ABI.
David Blaikie [Tue, 16 Oct 2012 21:03:19 +0000 (21:03 +0000)]
Test pure virtual vtable entries in the Itanium ABI.

(original functionality committed in r99807, refactored in r160373)

llvm-svn: 166059

11 years ago<rdar://problem/12446320> Fixing an issue with our Driver where setting an immediate...
Enrico Granata [Tue, 16 Oct 2012 20:57:12 +0000 (20:57 +0000)]
<rdar://problem/12446320> Fixing an issue with our Driver where setting an immediate output would not cause suppression of the final printout. This allows effective output redirection for Python commands

llvm-svn: 166058

11 years agollvm needs the OS to be set to either iOS or Mac OS X
Jason Molenda [Tue, 16 Oct 2012 20:45:49 +0000 (20:45 +0000)]
llvm needs the OS to be set to either iOS or Mac OS X
to work properly; when doing bare-boards rom debugging
force the OS to be one of those when initializing llvm.
<rdar://problem/12504138>

llvm-svn: 166057

11 years agoNote deleted functions when dumping vtables.
David Blaikie [Tue, 16 Oct 2012 20:25:33 +0000 (20:25 +0000)]
Note deleted functions when dumping vtables.

llvm-svn: 166056

11 years agoPatch from Matt Kopec:
Greg Clayton [Tue, 16 Oct 2012 20:20:18 +0000 (20:20 +0000)]
Patch from Matt Kopec:

This patch fixes an issue where if lldb fails to attach to a process (ie. invalid pid) on Linux, the process monitor thread gets stuck waiting for a signal from the attach thread, which never comes due to not being signaled. It also implements StopOpThread which is used for both attach/launch cases as I'm not aware of any special handling needed for the attach case. Also, propagate 'Error' from the Detach function instead of using a bool.

llvm-svn: 166055

11 years ago[ms-inline asm] Add the helper function, isParseringInlineAsm(). To be used in a...
Chad Rosier [Tue, 16 Oct 2012 20:16:20 +0000 (20:16 +0000)]
[ms-inline asm] Add the helper function, isParseringInlineAsm(). To be used in a future commit.

llvm-svn: 166054

11 years agoSimplify code. No functionality change.
Jakub Staszak [Tue, 16 Oct 2012 19:52:32 +0000 (19:52 +0000)]
Simplify code. No functionality change.

llvm-svn: 166053

11 years agoARM ABI: fix ABI alignment issues in varargs.
Manman Ren [Tue, 16 Oct 2012 19:51:48 +0000 (19:51 +0000)]
ARM ABI: fix ABI alignment issues in varargs.

We generalize r166040 to handle ABI alignment issues for all types.

rdar://12439123

llvm-svn: 166052

11 years agoCheck .rela instead of ELF64 for the compensation vaue resetting
Michael Liao [Tue, 16 Oct 2012 19:49:51 +0000 (19:49 +0000)]
Check .rela instead of ELF64 for the compensation vaue resetting

llvm-svn: 166051

11 years ago80-col fixup.
Jakub Staszak [Tue, 16 Oct 2012 19:39:40 +0000 (19:39 +0000)]
80-col fixup.

llvm-svn: 166050

11 years agoTeach DAG combine to fold (trunc (fptoXi x)) to (fptoXi x)
Michael Liao [Tue, 16 Oct 2012 19:38:35 +0000 (19:38 +0000)]
Teach DAG combine to fold (trunc (fptoXi x)) to (fptoXi x)

llvm-svn: 166049

11 years ago[analyzer] Expose clang_version in CmpRuns
Anna Zaks [Tue, 16 Oct 2012 19:36:39 +0000 (19:36 +0000)]
[analyzer] Expose clang_version in CmpRuns

llvm-svn: 166048

11 years ago[analyzer] Ivar Invalidation: track ivars in continuations and
Anna Zaks [Tue, 16 Oct 2012 19:36:37 +0000 (19:36 +0000)]
[analyzer] Ivar Invalidation: track ivars in continuations and
@implementation.

llvm-svn: 166047

11 years agoSwitch back to the old coalescer for now to fix the 32 bit bit
Rafael Espindola [Tue, 16 Oct 2012 19:34:06 +0000 (19:34 +0000)]
Switch back to the old coalescer for now to fix the 32 bit bit
llvm+clang+compiler-rt bootstrap.

llvm-svn: 166046

11 years agoSimplify potentially quadratic behavior while erasing elements from std::vector.
Jakub Staszak [Tue, 16 Oct 2012 19:32:31 +0000 (19:32 +0000)]
Simplify potentially quadratic behavior while erasing elements from std::vector.

llvm-svn: 166045

11 years agoARM ABI: passing illegal vector types as varargs.
Manman Ren [Tue, 16 Oct 2012 19:18:39 +0000 (19:18 +0000)]
ARM ABI: passing illegal vector types as varargs.

We expand varargs in clang and the call site is handled in the back end, it is
hard to match exactly how illegal vectors are handled in the backend. Therefore,
we legalize the illegal vector types in clang:
if (Size <= 32), legalize to i32.
if (Size == 64), legalize to v2i32.
if (Size == 128), legalize to v4i32.
if (Size > 128), use indirect.

rdar://12439123

llvm-svn: 166043

11 years agoARM ABI: fix ABI alignment issues when passing legal vector types as varargs.
Manman Ren [Tue, 16 Oct 2012 19:01:37 +0000 (19:01 +0000)]
ARM ABI: fix ABI alignment issues when passing legal vector types as varargs.

We create an aligned temporary space and copy the content over from ap.cur to
the temporary space. This is necessary if the natural alignment of the type is
greater than the ABI alignment.

rdar://12439123

llvm-svn: 166040

11 years agoImplement GCC's -Wint-to-pointer-cast.
David Blaikie [Tue, 16 Oct 2012 18:53:14 +0000 (18:53 +0000)]
Implement GCC's -Wint-to-pointer-cast.

This implementation doesn't warn on anything that GCC doesn't warn on with the
exception of templates specializations (GCC doesn't warn, Clang does). The
specific skipped cases (boolean, constant expressions, enums) are open for
debate/adjustment if anyone wants to demonstrate that GCC is being overly
conservative here. The only really obvious false positive I found was in the
Clang regression suite's MPI test - apparently MPI uses specific flag values in
pointer constants. (eg: #define FOO (void*)~0)

llvm-svn: 166039

11 years agoIf a full path to a compiler is provided on the
Sean Callanan [Tue, 16 Oct 2012 18:22:04 +0000 (18:22 +0000)]
If a full path to a compiler is provided on the
command line to dotest.py, replace / with _ in
the logfile names that mention that compiler so
that we don't try to put log files in weird
places.

llvm-svn: 166038

11 years agoAnd now we can call the other 'get' method from this one and not duplicate the code.
Bill Wendling [Tue, 16 Oct 2012 18:20:09 +0000 (18:20 +0000)]
And now we can call the other 'get' method from this one and not duplicate the code.

llvm-svn: 166037

11 years agoSupport v8f32 to v8i8/vi816 conversion through custom lowering
Michael Liao [Tue, 16 Oct 2012 18:14:11 +0000 (18:14 +0000)]
Support v8f32 to v8i8/vi816 conversion through custom lowering

- Add custom FP_TO_SINT on v8i16 (and v8i8 which is legalized as v8i16 due to
  vector element-wise widening) to reduce DAG combiner and its overhead added
  in X86 backend.

llvm-svn: 166036

11 years agoUse the appropriate Attributes::get method to create an Attributes object.
Bill Wendling [Tue, 16 Oct 2012 18:06:06 +0000 (18:06 +0000)]
Use the appropriate Attributes::get method to create an Attributes object.

llvm-svn: 166035

11 years agoWhen using a symbol with attribute weakref, search for it first and
Joerg Sonnenberger [Tue, 16 Oct 2012 17:45:27 +0000 (17:45 +0000)]
When using a symbol with attribute weakref, search for it first and
don't try the normal GetOrCreateLLVM. The latter could drop the weak
atrtibute on the second reference, if there is no explicit declaration
of the aliasee.

llvm-svn: 166032

11 years agoSpeculative fix the mask constants to be of type uintptr_t. I don't know of any...
Owen Anderson [Tue, 16 Oct 2012 17:10:33 +0000 (17:10 +0000)]
Speculative fix the mask constants to be of type uintptr_t.  I don't know of any case where the old form was incorrect, but I'm more confident that such cases don't exist in this version.

llvm-svn: 166031

11 years agoMinor tweak to last patch along with a test case.
Fariborz Jahanian [Tue, 16 Oct 2012 17:08:11 +0000 (17:08 +0000)]
Minor tweak to last patch along with a test case.
// rdar://12491143

llvm-svn: 166030

11 years agoDo not call ReplaceCFAllocator() before __CFInitialize(), otherwise crashes are possi...
Alexander Potapenko [Tue, 16 Oct 2012 16:58:10 +0000 (16:58 +0000)]
Do not call ReplaceCFAllocator() before __CFInitialize(), otherwise crashes are possible on 10.8.
Fixes http://code.google.com/p/address-sanitizer/issues/detail?id=122

llvm-svn: 166029

11 years agoCommit a leftover file from r166026: Add MACOS_VERSION_MOUNTAIN_LION.
Alexander Potapenko [Tue, 16 Oct 2012 16:48:51 +0000 (16:48 +0000)]
Commit a leftover file from r166026: Add MACOS_VERSION_MOUNTAIN_LION.

llvm-svn: 166028

11 years agoAdd MACOS_VERSION_MOUNTAIN_LION.
Alexander Potapenko [Tue, 16 Oct 2012 16:24:49 +0000 (16:24 +0000)]
Add MACOS_VERSION_MOUNTAIN_LION.

llvm-svn: 166026

11 years agofixes an objc crash involving objc bool literal on
Fariborz Jahanian [Tue, 16 Oct 2012 16:21:20 +0000 (16:21 +0000)]
fixes an objc crash involving objc bool literal on
hopelessly poorly written code after spewing several
errors. // rdar://12491143

llvm-svn: 166025

11 years agoFix function parameter spelling in comments. Caught by -Wdocumentation.
Dmitri Gribenko [Tue, 16 Oct 2012 15:37:50 +0000 (15:37 +0000)]
Fix function parameter spelling in comments.  Caught by -Wdocumentation.

llvm-svn: 166024

11 years agoGNUstep runtime version default to 1.6, generate correct property attribute
David Chisnall [Tue, 16 Oct 2012 15:11:55 +0000 (15:11 +0000)]
GNUstep runtime version default to 1.6, generate correct property attribute
metadata.

llvm-svn: 166023

11 years agoThis patch addresses PR13949.
Bill Schmidt [Tue, 16 Oct 2012 13:30:53 +0000 (13:30 +0000)]
This patch addresses PR13949.

For the PowerPC 64-bit ELF Linux ABI, aggregates of size less than 8
bytes are to be passed in the low-order bits ("right-adjusted") of the
doubleword register or memory slot assigned to them.  A previous patch
addressed this for aggregates passed in registers.  However, small
aggregates passed in the overflow portion of the parameter save area are
still being passed left-adjusted.

The fix is made in PPCTargetLowering::LowerCall_Darwin_Or_64SVR4 on the
caller side, and in PPCTargetLowering::LowerFormalArguments_64SVR4 on
the callee side.  The main fix on the callee side simply extends
existing logic for 1- and 2-byte objects to 1- through 7-byte objects,
and correcting a constant left over from 32-bit code.  There is also a
fix to a bogus calculation of the offset to the following argument in
the parameter save area.

On the caller side, again a constant left over from 32-bit code is
fixed.  Additionally, some code for 1, 2, and 4-byte objects is
duplicated to handle the 3, 5, 6, and 7-byte objects for SVR4 only.  The
LowerCall_Darwin_Or_64SVR4 logic is getting fairly convoluted trying to
handle both ABIs, and I propose to separate this into two functions in a
future patch, at which time the duplication can be removed.

The patch adds a new test (structsinmem.ll) to demonstrate correct
passing of structures of all seven sizes.  Eight dummy parameters are
used to force these structures to be in the overflow portion of the
parameter save area.

As a side effect, this corrects the case when aggregates passed in
registers are saved into the first eight doublewords of the parameter
save area:  Previously they were stored left-justified, and now are
properly stored right-justified.  This requires changing the expected
output of existing test case structsinregs.ll.

llvm-svn: 166022

11 years agoisl scheduler: Do not fail when returning an empty band list
Tobias Grosser [Tue, 16 Oct 2012 07:29:19 +0000 (07:29 +0000)]
isl scheduler: Do not fail when returning an empty band list

The bug was within isl. To fix it, we simply update the isl version that
is used by Polly. We still have some changes within Polly to be able to
write a proper test case.

Reported-by: Sameer Sahasrabuddhe <Sameer.Sahasrabuddhe@amd.com>
llvm-svn: 166021

11 years agoisl-codegen: Support '<' and '>'
Tobias Grosser [Tue, 16 Oct 2012 07:29:13 +0000 (07:29 +0000)]
isl-codegen: Support '<' and '>'

Previously isl always generated '<=' or '>='. However, in many cases '<' or '>'
leads to simpler code. This commit updates isl and adds the relevant code
generation support to Polly.

llvm-svn: 166020

11 years agoTransform pattern:
Alexey Samsonov [Tue, 16 Oct 2012 07:22:28 +0000 (07:22 +0000)]
Transform pattern:
  if (CGM.getModuleDebugInfo())
    DebugInfo = CGM.getModuleDebugInfo()
into a call:
  maybeInitializeDebugInfo();

This is a simplification for a possible future fix of PR13942.

llvm-svn: 166019

11 years agoIssue:
Stepan Dyatkovskiy [Tue, 16 Oct 2012 07:16:47 +0000 (07:16 +0000)]
Issue:
Stack is formed improperly for long structures passed as byval arguments for
EABI mode.

If we took AAPCS reference, we can found the next statements:

A: "If the argument requires double-word alignment (8-byte), the NCRN (Next
Core Register Number) is rounded up to the next even register number." (5.5
Parameter Passing, Stage C, C.3).

B: "The alignment of an aggregate shall be the alignment of its most-aligned
component." (4.3 Composite Types, 4.3.1 Aggregates).

So if we have structure with doubles (9 double fields) and 3 Core unused
registers (r1, r2, r3): caller should use r2 and r3 registers only.
Currently r1,r2,r3 set is used, but it is invalid.

Callee VA routine should also use r2 and r3 regs only. All is ok here. This
behaviour is guessed by rounding up SP address with ADD+BFC operations.

Fix:
Main fix is in ARMTargetLowering::HandleByVal. If we detected AAPCS mode and
8 byte alignment, we waste odd registers then.

P.S.:
I also improved LDRB_POST_IMM regression test. Since ldrb instruction will
not generated by current regression test after this patch.

llvm-svn: 166018

11 years agoReapply r165661, Patch by Shuxin Yang <shuxin.llvm@gmail.com>.
NAKAMURA Takumi [Tue, 16 Oct 2012 06:28:34 +0000 (06:28 +0000)]
Reapply r165661, Patch by Shuxin Yang <shuxin.llvm@gmail.com>.

Original message:

The attached is the fix to radar://11663049. The optimization can be outlined by following rules:

   (select (x != c), e, c) -> select (x != c), e, x),
   (select (x == c), c, e) -> select (x == c), x, e)
where the <c> is an integer constant.

 The reason for this change is that : on x86, conditional-move-from-constant needs two instructions;
however, conditional-move-from-register need only one instruction.

  While the LowerSELECT() sounds to be the most convenient place for this optimization, it turns out to be a bad place. The reason is that by replacing the constant <c> with a symbolic value, it obscure some instruction-combining opportunities which would otherwise be very easy to spot. For that reason, I have to postpone the change to last instruction-combining phase.

  The change passes the test of "make check-all -C <build-root/test" and "make -C project/test-suite/SingleSource".

Original message since r165661:

My previous change has a bug: I negated the condition code of a CMOV, and go ahead creating a new CMOV using the *ORIGINAL* condition code.

llvm-svn: 166017

11 years agoCleanup whitespace.
Bill Wendling [Tue, 16 Oct 2012 06:10:45 +0000 (06:10 +0000)]
Cleanup whitespace.

llvm-svn: 166016

11 years agoFix a bug in the set(I,E)/reset(I,E) methods that I recently added. The boundary...
Owen Anderson [Tue, 16 Oct 2012 06:04:27 +0000 (06:04 +0000)]
Fix a bug in the set(I,E)/reset(I,E) methods that I recently added.  The boundary condition for checking if I and E were in the same word were incorrect, and, beyond that, the mask computation was not using a wide enough constant.

llvm-svn: 166015

11 years agoMove X86MCInstLower class definition into implementation file. It's not needed outside.
Craig Topper [Tue, 16 Oct 2012 06:01:50 +0000 (06:01 +0000)]
Move X86MCInstLower class definition into implementation file. It's not needed outside.

llvm-svn: 166014

11 years agoCleanup whitespace.
Bill Wendling [Tue, 16 Oct 2012 06:01:44 +0000 (06:01 +0000)]
Cleanup whitespace.

llvm-svn: 166013

11 years agoHave AttributesImpl defriend the Attributes class.
Bill Wendling [Tue, 16 Oct 2012 05:57:28 +0000 (05:57 +0000)]
Have AttributesImpl defriend the Attributes class.

llvm-svn: 166012

11 years agoHave AttrBuilder defriend the Attributes class.
Bill Wendling [Tue, 16 Oct 2012 05:55:09 +0000 (05:55 +0000)]
Have AttrBuilder defriend the Attributes class.

llvm-svn: 166011

11 years agoUse the Attributes::get method which takes an AttrVal value directly to simplify...
Bill Wendling [Tue, 16 Oct 2012 05:23:44 +0000 (05:23 +0000)]
Use the Attributes::get method which takes an AttrVal value directly to simplify the code a bit. No functionality change.

llvm-svn: 166010

11 years agoUse the Attributes::get method which takes an AttrVal value directly to simplify...
Bill Wendling [Tue, 16 Oct 2012 05:23:31 +0000 (05:23 +0000)]
Use the Attributes::get method which takes an AttrVal value directly to simplify the code a bit. No functionality change.

llvm-svn: 166009

11 years agoPut simple c'tors inline.
Bill Wendling [Tue, 16 Oct 2012 05:22:28 +0000 (05:22 +0000)]
Put simple c'tors inline.

llvm-svn: 166008

11 years agoPass in the context to the Attributes::get method.
Bill Wendling [Tue, 16 Oct 2012 05:20:51 +0000 (05:20 +0000)]
Pass in the context to the Attributes::get method.

llvm-svn: 166007

11 years ago[asan] fix lint
Kostya Serebryany [Tue, 16 Oct 2012 04:50:32 +0000 (04:50 +0000)]
[asan] fix lint

llvm-svn: 166006

11 years agoAdd a new ABI plugin method which specifies whether the architecture
Jason Molenda [Tue, 16 Oct 2012 02:39:21 +0000 (02:39 +0000)]
Add a new ABI plugin method which specifies whether the architecture
must push something on the stack for a function call or not.  In
x86, the stack pointer is decremented when the caller's pc is saved
on the stack.  In arm, the stack pointer and frame pointer don't
necessarily have to change for a function call, although most
functions need to use some stack space during their execution.

Use this information in the RegisterContextLLDB to detect invalid
unwind scenarios more accurately.

<rdar://problem/12348574>

llvm-svn: 166005

11 years agoFix filename in file header.
Craig Topper [Tue, 16 Oct 2012 02:21:30 +0000 (02:21 +0000)]
Fix filename in file header.

llvm-svn: 166004

11 years agoFix the cpu name and add -verify-machineinstrs.
Rafael Espindola [Tue, 16 Oct 2012 01:13:06 +0000 (01:13 +0000)]
Fix the cpu name and add -verify-machineinstrs.

llvm-svn: 166003

11 years ago[analyzer] ObjCContainersASTChecker: minor cleanup and an extra test case.
Jordan Rose [Tue, 16 Oct 2012 00:47:25 +0000 (00:47 +0000)]
[analyzer] ObjCContainersASTChecker: minor cleanup and an extra test case.

Follow-up to r165838, which fixed a potential crash.

llvm-svn: 166002

11 years agomisched: Added handleMove support for updating all kill flags, not just for allocatab...
Andrew Trick [Tue, 16 Oct 2012 00:22:51 +0000 (00:22 +0000)]
misched: Added handleMove support for updating all kill flags, not just for allocatable regs.

This is a medium term workaround until we have a more robust solution
in the form of a register liveness utility for postRA passes.

llvm-svn: 166001

11 years agoPatch from Matt Kopec <matt.kopec@intel.com> to fix the problem that if two breakpoin...
Jim Ingham [Tue, 16 Oct 2012 00:09:33 +0000 (00:09 +0000)]
Patch from Matt Kopec <matt.kopec@intel.com> to fix the problem that if two breakpoints were set on consecutive addresses, the continue from the
first breakpoint would skip the second.

llvm-svn: 166000

11 years agoRemove unused BitVectors from getAllocatableSet().
Jakob Stoklund Olesen [Tue, 16 Oct 2012 00:05:06 +0000 (00:05 +0000)]
Remove unused BitVectors from getAllocatableSet().

llvm-svn: 165999

11 years agoLTO also needs to initialize the TargetTransform infrastructure.
Nadav Rotem [Mon, 15 Oct 2012 22:50:02 +0000 (22:50 +0000)]
LTO also needs to initialize the TargetTransform infrastructure.

llvm-svn: 165997

11 years ago[analyzer] CmpRuns - cleaned up the API, added relative path getter
Anna Zaks [Mon, 15 Oct 2012 22:48:21 +0000 (22:48 +0000)]
[analyzer] CmpRuns - cleaned up the API, added relative path getter

llvm-svn: 165995

11 years ago[analyzer] Embed the analyzer version into the plist output.
Anna Zaks [Mon, 15 Oct 2012 22:48:19 +0000 (22:48 +0000)]
[analyzer] Embed the analyzer version into the plist output.

llvm-svn: 165994

11 years ago[analyzer] Enhance the error message.
Anna Zaks [Mon, 15 Oct 2012 22:48:17 +0000 (22:48 +0000)]
[analyzer] Enhance the error message.

llvm-svn: 165993

11 years ago[analyzer] Do not warn on direct ivar assignments within copy methods.
Anna Zaks [Mon, 15 Oct 2012 22:48:14 +0000 (22:48 +0000)]
[analyzer] Do not warn on direct ivar assignments within copy methods.

llvm-svn: 165992

11 years agoAdded "process plugin packet send" and "process plugin packet history" for GDB remote...
Greg Clayton [Mon, 15 Oct 2012 22:42:16 +0000 (22:42 +0000)]
Added "process plugin packet send" and "process plugin packet history" for GDB remote. "process plugin packet send" will send a packet and receive a response. "process plugin packet history" will dump the packet history buffer.

llvm-svn: 165991

11 years agoRemove RegisterClassInfo::isReserved() and isAllocatable().
Jakob Stoklund Olesen [Mon, 15 Oct 2012 22:41:03 +0000 (22:41 +0000)]
Remove RegisterClassInfo::isReserved() and isAllocatable().

Clients can use the equivalent functions in MRI.

llvm-svn: 165990

11 years agoAdd __builtin_setjmp/_longjmp supprt in X86 backend
Michael Liao [Mon, 15 Oct 2012 22:39:43 +0000 (22:39 +0000)]
Add __builtin_setjmp/_longjmp supprt in X86 backend

- Besides used in SjLj exception handling, __builtin_setjmp/__longjmp is also
  used as a light-weight replacement of setjmp/longjmp which are used to
  implementation continuation, user-level threading, and etc. The support added
  in this patch ONLY addresses this usage and is NOT intended to support SjLj
  exception handling as zero-cost DWARF exception handling is used by default
  in X86.

llvm-svn: 165989

11 years agoUn-revert r164907 and r164902 (+ follow-ups), 10.6 build fix to follow.
Daniel Dunbar [Mon, 15 Oct 2012 22:23:53 +0000 (22:23 +0000)]
Un-revert r164907 and r164902 (+ follow-ups), 10.6 build fix to follow.

llvm-svn: 165988

11 years agoplatform/clang_darwin: Drop an x86_64 slice into cc_kext_ios5.
Daniel Dunbar [Mon, 15 Oct 2012 22:23:34 +0000 (22:23 +0000)]
platform/clang_darwin: Drop an x86_64 slice into cc_kext_ios5.
 - This doesn't get used, but it is a simple workaround for PR14013.

llvm-svn: 165987

11 years agoUn-revert r164907 and r164902 (+ follow-ups), 10.6 build fix to follow.
Daniel Dunbar [Mon, 15 Oct 2012 22:23:32 +0000 (22:23 +0000)]
Un-revert r164907 and r164902 (+ follow-ups), 10.6 build fix to follow.

llvm-svn: 165986

11 years agoRemove LIS::isAllocatable() and isReserved() helpers.
Jakob Stoklund Olesen [Mon, 15 Oct 2012 22:14:34 +0000 (22:14 +0000)]
Remove LIS::isAllocatable() and isReserved() helpers.

All callers can simply use the corresponding MRI functions.

llvm-svn: 165985

11 years agoAdd range-based set()/reset() to BitVector. These allow fast setting/resetting of...
Owen Anderson [Mon, 15 Oct 2012 22:05:27 +0000 (22:05 +0000)]
Add range-based set()/reset() to BitVector.  These allow fast setting/resetting of ranges of bits, particularly useful when dealing with very large BitVector's.

llvm-svn: 165984

11 years agoSwitch most getReservedRegs() clients to the MRI equivalent.
Jakob Stoklund Olesen [Mon, 15 Oct 2012 21:57:41 +0000 (21:57 +0000)]
Switch most getReservedRegs() clients to the MRI equivalent.

Using the cached bit vector in MRI avoids comstantly allocating and
recomputing the reserved register bit vector.

llvm-svn: 165983

11 years agoFreeze the reserved registers as soon as isel is complete.
Jakob Stoklund Olesen [Mon, 15 Oct 2012 21:33:06 +0000 (21:33 +0000)]
Freeze the reserved registers as soon as isel is complete.

Also provide an MRI::getReservedRegs() function to access the frozen
register set, and isReserved() and isAllocatable() methods to test
individual registers.

The various implementations of TRI::getReservedRegs() are quite
complicated, and many passes need to look at the reserved register set.
This patch makes it possible for these passes to use the cached copy in
MRI, avoiding a lot of malloc traffic and repeated calculations.

llvm-svn: 165982

11 years agoARM: v1i64 and v2i64 VBSL intrinsic support.
Jim Grosbach [Mon, 15 Oct 2012 21:23:40 +0000 (21:23 +0000)]
ARM: v1i64 and v2i64 VBSL intrinsic support.

rdar://12502028

llvm-svn: 165981

11 years agoBuild with SDKROOT = macosx for "Debug" "DebugClang" and "Release" builds when buildi...
Greg Clayton [Mon, 15 Oct 2012 21:17:37 +0000 (21:17 +0000)]
Build with SDKROOT = macosx for "Debug" "DebugClang" and "Release" builds when building with Xcode.

llvm-svn: 165980

11 years agoFixed a logic error that showed up when compiling with a newer version of clang where:
Greg Clayton [Mon, 15 Oct 2012 21:16:43 +0000 (21:16 +0000)]
Fixed a logic error that showed up when compiling with a newer version of clang where:

lldb::BasicType
ClangASTContext::GetLLDBBasicTypeEnumeration (clang_type_t clang_type)

would return a bogus value.

llvm-svn: 165979

11 years agoAdd dependency on llvm-bcanalyzer from tests to the CMake build.
David Blaikie [Mon, 15 Oct 2012 21:11:46 +0000 (21:11 +0000)]
Add dependency on llvm-bcanalyzer from tests to the CMake build.

This fixes a CMake build break introduced by r165739.

Thanks Jan Voung for the quick suggestion/fix.

llvm-svn: 165978

11 years agoFixed CXXNamedCast right paren location propagation to instantiations.
Abramo Bagnara [Mon, 15 Oct 2012 21:08:58 +0000 (21:08 +0000)]
Fixed CXXNamedCast right paren location propagation to instantiations.

llvm-svn: 165977

11 years agoFixed LabelDecl source range.
Abramo Bagnara [Mon, 15 Oct 2012 21:07:44 +0000 (21:07 +0000)]
Fixed LabelDecl source range.

llvm-svn: 165976

11 years agoFixed ClassTemplateSpecializationDecl source range.
Abramo Bagnara [Mon, 15 Oct 2012 21:06:42 +0000 (21:06 +0000)]
Fixed ClassTemplateSpecializationDecl source range.

llvm-svn: 165975

11 years agoFixed FunctionTypeLoc range for trailing return type.
Abramo Bagnara [Mon, 15 Oct 2012 21:05:46 +0000 (21:05 +0000)]
Fixed FunctionTypeLoc range for trailing return type.

llvm-svn: 165974

11 years agoFixes location of overriding declaration with no comment
Fariborz Jahanian [Mon, 15 Oct 2012 20:57:52 +0000 (20:57 +0000)]
Fixes location of overriding declaration with no comment
of their own.

llvm-svn: 165972

11 years agoPatch from Daniel Malea -- Updated build instructions for Linux.
Greg Clayton [Mon, 15 Oct 2012 20:39:39 +0000 (20:39 +0000)]
Patch from Daniel Malea -- Updated build instructions for Linux.

llvm-svn: 165964

11 years agoRevert r164907 and r164902 (+ follow-ups). They broke building on 10.6.
Nico Weber [Mon, 15 Oct 2012 20:37:13 +0000 (20:37 +0000)]
Revert r164907 and r164902 (+ follow-ups). They broke building on 10.6.

See PR14013.

llvm-svn: 165963

11 years agoRevert r164907 and r164902 (+ follow-ups). They broke building on 10.6.
Nico Weber [Mon, 15 Oct 2012 20:37:01 +0000 (20:37 +0000)]
Revert r164907 and r164902 (+ follow-ups). They broke building on 10.6.

See PR14013.

llvm-svn: 165962

11 years agoMove the Attributes::Builder outside of the Attributes class and into its own class...
Bill Wendling [Mon, 15 Oct 2012 20:36:26 +0000 (20:36 +0000)]
Move the Attributes::Builder outside of the Attributes class and into its own class named AttrBuilder. No functionality change.

llvm-svn: 165961

11 years agoMove the Attributes::Builder outside of the Attributes class and into its own class...
Bill Wendling [Mon, 15 Oct 2012 20:35:56 +0000 (20:35 +0000)]
Move the Attributes::Builder outside of the Attributes class and into its own class named AttrBuilder. No functionality change.

llvm-svn: 165960

11 years agoCheck output of the misched unit tests
Andrew Trick [Mon, 15 Oct 2012 20:33:14 +0000 (20:33 +0000)]
Check output of the misched unit tests

llvm-svn: 165959