platform/upstream/llvm.git
11 years agoAdded register write examples and also how to modify the pc. For this we show and...
Greg Clayton [Wed, 17 Oct 2012 20:58:52 +0000 (20:58 +0000)]
Added register write examples and also how to modify the pc. For this we show and example of GDB using the "jump" command, and LLDB using "register write" with an expression.

llvm-svn: 166127

11 years agoTeach DAG combine to fold (extract_subvec (concat v1, ..) i) to v_i
Michael Liao [Wed, 17 Oct 2012 20:48:33 +0000 (20:48 +0000)]
Teach DAG combine to fold (extract_subvec (concat v1, ..) i) to v_i

- If the extracted vector has the same type of all vectored being concatenated
  together, it should be simplified directly into v_i, where i is the index of
  the element being extracted.

llvm-svn: 166125

11 years agoSwitch MRI::UsedPhysRegs to a register unit bit vector.
Jakob Stoklund Olesen [Wed, 17 Oct 2012 20:26:33 +0000 (20:26 +0000)]
Switch MRI::UsedPhysRegs to a register unit bit vector.

This is a more compact, less redundant representation, and it avoids
scanning long lists of aliases for ARM D-registers, for example.

llvm-svn: 166124

11 years agoUpdate the release notes about how to enable the loop vectorizer.
Nadav Rotem [Wed, 17 Oct 2012 19:49:21 +0000 (19:49 +0000)]
Update the release notes about how to enable the loop vectorizer.

llvm-svn: 166123

11 years agoAdd a really faster pre-RA scheduler (-pre-RA-sched=linearize). It doesn't use
Evan Cheng [Wed, 17 Oct 2012 19:39:36 +0000 (19:39 +0000)]
Add a really faster pre-RA scheduler (-pre-RA-sched=linearize). It doesn't use
any scheduling heuristics nor does it build up any scheduling data structure
that other heuristics use. It essentially linearize by doing a DFA walk but
it does handle glues correctly.

IMPORTANT: it probably can't handle all the physical register dependencies so
it's not suitable for x86. It also doesn't deal with dbg_value nodes right now
so it's definitely is still WIP.

rdar://12474515

llvm-svn: 166122

11 years ago[analyzer] When binding to a ParenExpr, bind to its inner expression instead.
Jordan Rose [Wed, 17 Oct 2012 19:35:44 +0000 (19:35 +0000)]
[analyzer] When binding to a ParenExpr, bind to its inner expression instead.

This actually looks through several kinds of expression, such as
OpaqueValueExpr and ExprWithCleanups. The idea is that binding and lookup
should be consistent, and so if the environment needs to be modified later,
the code doing the modification will not have to manually look through these
"transparent" expressions to find the real binding to change.

This is necessary for proper updating of struct rvalues as described in
the previous commit.

llvm-svn: 166121

11 years ago[analyzer] Create a temporary region when accessing a struct rvalue.
Jordan Rose [Wed, 17 Oct 2012 19:35:37 +0000 (19:35 +0000)]
[analyzer] Create a temporary region when accessing a struct rvalue.

In C++, rvalues that need to have their address taken (for example, to be
passed to a function by const reference) will be wrapped in a
MaterializeTemporaryExpr, which lets CodeGen know to create a temporary
region to store this value. However, MaterializeTemporaryExprs are /not/
created when a method is called on an rvalue struct, even though the 'this'
pointer needs a valid value. CodeGen works around this by creating a
temporary region anyway; now, so does the analyzer.

The analyzer also does this when accessing a field of a struct rvalue.
This is a little unfortunate, since the rest of the struct will soon be
thrown away, but it does make things consistent with the rest of the
analyzer.

This allows us to bring back the assumption that all known 'this' values
are Locs. This is a revised version of r164828-9, reverted in r164876-7.

<rdar://problem/12137950>

llvm-svn: 166120

11 years ago<rdar://problem/12503640> Fixing an issue where the dynamic type of an Objective...
Enrico Granata [Wed, 17 Oct 2012 19:03:34 +0000 (19:03 +0000)]
<rdar://problem/12503640> Fixing an issue where the dynamic type of an Objective-C pointer changed but we still reported the one-true-definition for the previous type. This was causing issues where a variable could be reported as being of an entirely different type after an assignment

llvm-svn: 166119

11 years agoMove -Wint-to-pointer-cast from -Wall to -Wmost to group it with more things.
David Blaikie [Wed, 17 Oct 2012 18:47:30 +0000 (18:47 +0000)]
Move -Wint-to-pointer-cast from -Wall to -Wmost to group it with more things.

Addressing feedback on r166039 given by Matt Beaumont-Gay.

llvm-svn: 166118

11 years agoMerge MRI::isPhysRegOrOverlapUsed() into isPhysRegUsed().
Jakob Stoklund Olesen [Wed, 17 Oct 2012 18:44:18 +0000 (18:44 +0000)]
Merge MRI::isPhysRegOrOverlapUsed() into isPhysRegUsed().

All callers of these functions really want the isPhysRegOrOverlapUsed()
functionality which also checks aliases. For historical reasons, targets
without register aliases were calling isPhysRegUsed() instead.

Change isPhysRegUsed() to also check aliases, and switch all
isPhysRegOrOverlapUsed() callers to isPhysRegUsed().

llvm-svn: 166117

11 years agoUpdate the release notes about the store-merge dag optimization.
Nadav Rotem [Wed, 17 Oct 2012 18:35:21 +0000 (18:35 +0000)]
Update the release notes about the store-merge dag optimization.

llvm-svn: 166116

11 years agoUpdate the release notes about the new TargetTransformInfo API changes.
Nadav Rotem [Wed, 17 Oct 2012 18:33:50 +0000 (18:33 +0000)]
Update the release notes about the new TargetTransformInfo API changes.

llvm-svn: 166115

11 years agobuild/clang_darwin: Don't try to build ARM contents on 10.6.
Daniel Dunbar [Wed, 17 Oct 2012 18:33:43 +0000 (18:33 +0000)]
build/clang_darwin: Don't try to build ARM contents on 10.6.

 - The cctools' ranlib on 10.6 has a bug and can't understand our ARM object
   files.

llvm-svn: 166114

11 years agoUpdate the release notes about the new loop vectorizer.
Nadav Rotem [Wed, 17 Oct 2012 18:30:09 +0000 (18:30 +0000)]
Update the release notes about the new loop vectorizer.

llvm-svn: 166113

11 years agoAdd a loop vectorizer.
Nadav Rotem [Wed, 17 Oct 2012 18:25:06 +0000 (18:25 +0000)]
Add a loop vectorizer.

llvm-svn: 166112

11 years agobuild/make: There is no need to put timestamps into .dir files, and it just
Daniel Dunbar [Wed, 17 Oct 2012 18:21:21 +0000 (18:21 +0000)]
build/make: There is no need to put timestamps into .dir files, and it just
makes trees less comparable.

llvm-svn: 166111

11 years agoCheck for empty YMM use-def lists in X86VZeroUpper.
Jakob Stoklund Olesen [Wed, 17 Oct 2012 17:52:35 +0000 (17:52 +0000)]
Check for empty YMM use-def lists in X86VZeroUpper.

The previous MRI.isPhysRegUsed(YMM0) would also return true when the
function contains a call to a function that may clobber YMM0. That's
most of them.

Checking the use-def chains allows us to skip functions that don't
explicitly mention YMM registers.

llvm-svn: 166110

11 years agoRevert r158009 since there are some uses of artificial functions in
Eric Christopher [Wed, 17 Oct 2012 17:37:17 +0000 (17:37 +0000)]
Revert r158009 since there are some uses of artificial functions in
debug info.

llvm-svn: 166109

11 years agoFix fallout from RegInfo => FrameLowering refactoring on MSP430.
Anton Korobeynikov [Wed, 17 Oct 2012 17:37:11 +0000 (17:37 +0000)]
Fix fallout from RegInfo => FrameLowering refactoring on MSP430.
Patch by Job Noorman!

llvm-svn: 166108

11 years agomisched: Better handling of invalid latencies in the machine model
Andrew Trick [Wed, 17 Oct 2012 17:27:10 +0000 (17:27 +0000)]
misched: Better handling of invalid latencies in the machine model

llvm-svn: 166107

11 years agodocs: Add link to integrated assembler HowTo
Sean Silva [Wed, 17 Oct 2012 16:36:27 +0000 (16:36 +0000)]
docs: Add link to integrated assembler HowTo

llvm-svn: 166106

11 years agoSupport: Don't remove special files on signals.
Daniel Dunbar [Wed, 17 Oct 2012 16:30:54 +0000 (16:30 +0000)]
Support: Don't remove special files on signals.
 - Similar to Path::eraseFromDisk(), we don't want LLVM to remove things like
   /dev/null, even if it has the permission.

llvm-svn: 166105

11 years ago[ASan] unit tests: Move main() to a separate file. Fix lint
Alexey Samsonov [Wed, 17 Oct 2012 14:04:57 +0000 (14:04 +0000)]
[ASan] unit tests: Move main() to a separate file. Fix lint

llvm-svn: 166104

11 years ago[asan] added a test for a bug in asan at -O0 introduced by r165936 (making asan a...
Kostya Serebryany [Wed, 17 Oct 2012 13:42:04 +0000 (13:42 +0000)]
[asan] added a test for a bug in asan at -O0 introduced by r165936 (making asan a FunctionPass). The test is not actually enabled for -O0 yet (since it fails)

llvm-svn: 166103

11 years ago[asan] better debug diagnostics in asan compiler module
Kostya Serebryany [Wed, 17 Oct 2012 13:40:06 +0000 (13:40 +0000)]
[asan] better debug diagnostics in asan compiler module

llvm-svn: 166102

11 years ago[ASan] Fix strchr/index tests for users who have 'char* strchr(char*,int)' instead...
Alexey Samsonov [Wed, 17 Oct 2012 13:39:09 +0000 (13:39 +0000)]
[ASan] Fix strchr/index tests for users who have 'char* strchr(char*,int)' instead of 'char* strchr(const char*, int)'

llvm-svn: 166101

11 years agoFix tests, which accidentally matched implicit code on specific
Daniel Jasper [Wed, 17 Oct 2012 13:35:36 +0000 (13:35 +0000)]
Fix tests, which accidentally matched implicit code on specific
platforms to make buildbots happy.

llvm-svn: 166100

11 years ago[ASan] don't use attribute no_address_safety_analysis if it's unknown to compiler
Alexey Samsonov [Wed, 17 Oct 2012 13:19:59 +0000 (13:19 +0000)]
[ASan] don't use attribute no_address_safety_analysis if it's unknown to compiler

llvm-svn: 166099

11 years ago[Sanitizer] symbolizer: increase the maximal number of shared libraries to 16K
Alexey Samsonov [Wed, 17 Oct 2012 13:12:23 +0000 (13:12 +0000)]
[Sanitizer] symbolizer: increase the maximal number of shared libraries to 16K

llvm-svn: 166098

11 years agoRemove an unneeded flag from the bitrig driver tests.
Chandler Carruth [Wed, 17 Oct 2012 09:40:16 +0000 (09:40 +0000)]
Remove an unneeded flag from the bitrig driver tests.

Based loosely on a patch from David Hill.

llvm-svn: 166096

11 years agoThis just in, it is a *bad idea* to use 'udiv' on an offset of
Chandler Carruth [Wed, 17 Oct 2012 09:23:48 +0000 (09:23 +0000)]
This just in, it is a *bad idea* to use 'udiv' on an offset of
a pointer. A very bad idea. Let's not do that. Fixes PR14105.

Note that this wasn't *that* glaring of an oversight. Originally, these
routines were only called on offsets within an alloca, which are
intrinsically positive. But over the evolution of the pass, they ended
up being called for arbitrary offsets, and things went downhill...

llvm-svn: 166095

11 years agoFirst version of matchers for Types and TypeLocs.
Daniel Jasper [Wed, 17 Oct 2012 08:52:59 +0000 (08:52 +0000)]
First version of matchers for Types and TypeLocs.

Review: http://llvm-reviews.chandlerc.com/D47
llvm-svn: 166094

11 years ago[asan] fix gcc warnings while building asan-rt
Kostya Serebryany [Wed, 17 Oct 2012 08:50:53 +0000 (08:50 +0000)]
[asan] fix gcc warnings while building asan-rt

llvm-svn: 166093

11 years agoMarked this variable as 'used' so that LTO doesn't get rid of it.
Bill Wendling [Wed, 17 Oct 2012 08:08:06 +0000 (08:08 +0000)]
Marked this variable as 'used' so that LTO doesn't get rid of it.

llvm-svn: 166092

11 years agoFix a really annoying "bug" introduced in r165941. The change from that
Chandler Carruth [Wed, 17 Oct 2012 07:22:16 +0000 (07:22 +0000)]
Fix a really annoying "bug" introduced in r165941. The change from that
revision makes no sense. We cannot use the address space of the *post
indexed* type to conclude anything about a *pre indexed* pointer type's
size. More importantly, this index can never be over a pointer. We are
indexing over arrays and vectors here.

Of course, I have no test case here. Neither did the original patch. =/

llvm-svn: 166091

11 years agoUpdate test FIXME: The '[]' in 'delete []' is never part of a lambda.
Richard Smith [Wed, 17 Oct 2012 06:45:09 +0000 (06:45 +0000)]
Update test FIXME: The '[]' in 'delete []' is never part of a lambda.

llvm-svn: 166090

11 years agoRemove LLVM_DELETED_FUNCTION from destructors that override non-deleted base class...
Craig Topper [Wed, 17 Oct 2012 05:15:58 +0000 (05:15 +0000)]
Remove LLVM_DELETED_FUNCTION from destructors that override non-deleted base class destructors. This isn't legal by the C++11 standard and clang now checks for it. Curiously gcc didn't catch this, possibly because of the template usage.

llvm-svn: 166089

11 years agoSet a special flag in class metadata when an Objective-C class
John McCall [Wed, 17 Oct 2012 04:53:31 +0000 (04:53 +0000)]
Set a special flag in class metadata when an Objective-C class
has ivars that require destruction, but none that require anything
except zero-initialization.  This is common in ARC and (when true
throughout a class hierarchy) permits the elimination of an
unnecessary message-send during allocation.

llvm-svn: 166088

11 years agoOrganize and rename the magic constants for class flags.
John McCall [Wed, 17 Oct 2012 04:53:23 +0000 (04:53 +0000)]
Organize and rename the magic constants for class flags.
No functionality change.

llvm-svn: 166087

11 years agoCheck SSSE3 instead of SSE4.1
Michael Liao [Wed, 17 Oct 2012 03:59:18 +0000 (03:59 +0000)]
Check SSSE3 instead of SSE4.1

- All shuffle insns required, especially PSHUB, are added in SSSE3.

llvm-svn: 166086

11 years agoAt -O0, prefer objc_storeStrong with a null new value to the
John McCall [Wed, 17 Oct 2012 02:28:37 +0000 (02:28 +0000)]
At -O0, prefer objc_storeStrong with a null new value to the
combination of a load+objc_release;  this is generally better
for tools that try to track why values are retained and
released.  Also use objc_storeStrong when copying a block
(again, only at -O0), which requires us to do a preliminary
store of null in order to compensate for objc_storeStrong's
assign semantics.

llvm-svn: 166085

11 years agoFix setjmp on models with non-Small code model nor non-Static relocation model
Michael Liao [Wed, 17 Oct 2012 02:22:27 +0000 (02:22 +0000)]
Fix setjmp on models with non-Small code model nor non-Static relocation model

- MBB address is only valid as an immediate value in Small & Static
  code/relocation models. On other models, LEA is needed to load IP address of
  the restore MBB.
- A minor fix of MBB in MC lowering is added as well to enable target
  relocation flag being propagated into MC.

llvm-svn: 166084

11 years agoUse a SparseSet instead of a BitVector for UsedInInstr in RAFast.
Jakob Stoklund Olesen [Wed, 17 Oct 2012 01:37:59 +0000 (01:37 +0000)]
Use a SparseSet instead of a BitVector for UsedInInstr in RAFast.

This is just as fast, and it makes it possible to avoid leaking the
UsedPhysRegs BitVector implementation through
MachineRegisterInfo::addPhysRegsUsed().

llvm-svn: 166083

11 years agoImplement C++ 10.3p16 - overrides involving deleted functions must match.
David Blaikie [Wed, 17 Oct 2012 00:47:58 +0000 (00:47 +0000)]
Implement C++ 10.3p16 - overrides involving deleted functions must match.

Only deleted functions may override deleted functions and non-deleted functions
may only override non-deleted functions.

llvm-svn: 166082

11 years agoAdd code to UnwindAssemblyInstEmulation::GetNonCallSiteUnwindPlanFromAssembly
Jason Molenda [Wed, 17 Oct 2012 00:41:14 +0000 (00:41 +0000)]
Add code to UnwindAssemblyInstEmulation::GetNonCallSiteUnwindPlanFromAssembly
to handle an addition class of early-return instructions we find in arm code:
tail-call optimziation returns where we restore the register state from the
function entry and jump directly (not branch & link) to another function --
when that other function returns, it will return to our caller.

Previously this mid-function epilogue sequence was not being correctly detected.
We would not re-instate the prologue setup instructions for the rest of the function
so unwinds would break from that point until the end of the function.
<rdar://problem/12502597>

llvm-svn: 166081

11 years ago"'Might as well make it static const.' -- John McCall" -- Michael Scott
Nico Weber [Wed, 17 Oct 2012 00:34:34 +0000 (00:34 +0000)]
"'Might as well make it static const.' -- John McCall" -- Michael Scott

llvm-svn: 166080

11 years agoFix the handling of target options in our unit tests.
Douglas Gregor [Wed, 17 Oct 2012 00:11:35 +0000 (00:11 +0000)]
Fix the handling of target options in our unit tests.

llvm-svn: 166079

11 years agoMove test to a more appropriate place.
Eli Friedman [Tue, 16 Oct 2012 23:55:06 +0000 (23:55 +0000)]
Move test to a more appropriate place.

llvm-svn: 166078

11 years agoUse a typedef to reduce some typing and reformat code accordingly.
Eric Christopher [Tue, 16 Oct 2012 23:46:25 +0000 (23:46 +0000)]
Use a typedef to reduce some typing and reformat code accordingly.

llvm-svn: 166077

11 years agoVariable name cleanup.
Eric Christopher [Tue, 16 Oct 2012 23:46:23 +0000 (23:46 +0000)]
Variable name cleanup.

llvm-svn: 166076

11 years agoFormatting and 80-col.
Eric Christopher [Tue, 16 Oct 2012 23:46:21 +0000 (23:46 +0000)]
Formatting and 80-col.

llvm-svn: 166075

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