Commit Graph

135601 Commits

Author SHA1 Message Date
Andrew Trick 0b1d8d04b9 misched: Better handling of invalid latencies in the machine model
llvm-svn: 166107
2012-10-17 17:27:10 +00:00
Sean Silva 13c64c08c2 docs: Add link to integrated assembler HowTo
llvm-svn: 166106
2012-10-17 16:36:27 +00:00
Daniel Dunbar 511479ddb4 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
2012-10-17 16:30:54 +00:00
Alexey Samsonov 5f1a7589ad [ASan] unit tests: Move main() to a separate file. Fix lint
llvm-svn: 166104
2012-10-17 14:04:57 +00:00
Kostya Serebryany 9ced62d195 [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
2012-10-17 13:42:04 +00:00
Kostya Serebryany 20343351be [asan] better debug diagnostics in asan compiler module
llvm-svn: 166102
2012-10-17 13:40:06 +00:00
Alexey Samsonov 7b52cb9e6d [ASan] Fix strchr/index tests for users who have 'char* strchr(char*,int)' instead of 'char* strchr(const char*, int)'
llvm-svn: 166101
2012-10-17 13:39:09 +00:00
Daniel Jasper 7943eb5cb5 Fix tests, which accidentally matched implicit code on specific
platforms to make buildbots happy.

llvm-svn: 166100
2012-10-17 13:35:36 +00:00
Alexey Samsonov 4230a4a05a [ASan] don't use attribute no_address_safety_analysis if it's unknown to compiler
llvm-svn: 166099
2012-10-17 13:19:59 +00:00
Alexey Samsonov 68791d162a [Sanitizer] symbolizer: increase the maximal number of shared libraries to 16K
llvm-svn: 166098
2012-10-17 13:12:23 +00:00
Chandler Carruth 9e4b8290ae Remove an unneeded flag from the bitrig driver tests.
Based loosely on a patch from David Hill.

llvm-svn: 166096
2012-10-17 09:40:16 +00:00
Chandler Carruth 6fab42aa39 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
2012-10-17 09:23:48 +00:00
Daniel Jasper 516b02e548 First version of matchers for Types and TypeLocs.
Review: http://llvm-reviews.chandlerc.com/D47
llvm-svn: 166094
2012-10-17 08:52:59 +00:00
Kostya Serebryany 05a3b01d4f [asan] fix gcc warnings while building asan-rt
llvm-svn: 166093
2012-10-17 08:50:53 +00:00
Bill Wendling 003516b592 Marked this variable as 'used' so that LTO doesn't get rid of it.
llvm-svn: 166092
2012-10-17 08:08:06 +00:00
Chandler Carruth 40617f593e 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
2012-10-17 07:22:16 +00:00
Richard Smith 3440ecaae3 Update test FIXME: The '[]' in 'delete []' is never part of a lambda.
llvm-svn: 166090
2012-10-17 06:45:09 +00:00
Craig Topper 1958f04bda 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
2012-10-17 05:15:58 +00:00
John McCall 0d54a17b52 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
2012-10-17 04:53:31 +00:00
John McCall ef19dbb620 Organize and rename the magic constants for class flags.
No functionality change.

llvm-svn: 166087
2012-10-17 04:53:23 +00:00
Michael Liao cef9541dac Check SSSE3 instead of SSE4.1
- All shuffle insns required, especially PSHUB, are added in SSSE3.

llvm-svn: 166086
2012-10-17 03:59:18 +00:00
John McCall e68b8f4dcc 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
2012-10-17 02:28:37 +00:00
Michael Liao 6f7206132f 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
2012-10-17 02:22:27 +00:00
Jakob Stoklund Olesen a2136be107 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
2012-10-17 01:37:59 +00:00
David Blaikie 7e414261f6 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
2012-10-17 00:47:58 +00:00
Jason Molenda 5c1ac4ea72 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
2012-10-17 00:41:14 +00:00
Nico Weber 9272407c39 "'Might as well make it static const.' -- John McCall" -- Michael Scott
llvm-svn: 166080
2012-10-17 00:34:34 +00:00
Douglas Gregor 44d6361ed7 Fix the handling of target options in our unit tests.
llvm-svn: 166079
2012-10-17 00:11:35 +00:00
Eli Friedman 667f95395f Move test to a more appropriate place.
llvm-svn: 166078
2012-10-16 23:55:06 +00:00
Eric Christopher 494109b055 Use a typedef to reduce some typing and reformat code accordingly.
llvm-svn: 166077
2012-10-16 23:46:25 +00:00
Eric Christopher 02509481f6 Variable name cleanup.
llvm-svn: 166076
2012-10-16 23:46:23 +00:00
Eric Christopher 3680f8826e Formatting and 80-col.
llvm-svn: 166075
2012-10-16 23:46:21 +00:00
Eric Christopher 587e153197 Spacing.
llvm-svn: 166074
2012-10-16 23:46:19 +00:00
Eli Friedman f86e50737b Fix pretty-printing for variables declared in a condition. Patch by Grzegorz Jablonski.
llvm-svn: 166073
2012-10-16 23:45:15 +00:00
Douglas Gregor cb177f15e7 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
2012-10-16 23:40:58 +00:00
Richard Smith 1ee6352788 DR1492: In a definition of a destructor, the exception specification must be
explicitly specified iff it was specified in the declaration.

llvm-svn: 166071
2012-10-16 23:30:16 +00:00
Greg Clayton cced1566e2 API cleanup.
llvm-svn: 166070
2012-10-16 22:58:25 +00:00
David Blaikie eb7d598cec 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
2012-10-16 22:56:05 +00:00
Jakob Stoklund Olesen 4df59a9ff8 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
2012-10-16 22:51:58 +00:00
Jakob Stoklund Olesen 2043329e67 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
2012-10-16 22:51:55 +00:00
Manman Ren de70d54c43 ARM ABI: fix testing case arm-abi-vector.c by using [[VAR]]
rdar://12439123

llvm-svn: 166066
2012-10-16 22:40:48 +00:00
Derek Schuff a202096dc0 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
2012-10-16 22:30:41 +00:00
Manman Ren 0e8bf254b5 XFAIL this testing case to recover buildbot
llvm-svn: 166064
2012-10-16 22:02:26 +00:00
Chad Rosier f8037a1fb6 [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
2012-10-16 21:55:39 +00:00
Jim Ingham 35e1bda695 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
2012-10-16 21:41:58 +00:00
Michael Gottesman 02a1141e5a [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
2012-10-16 21:29:38 +00:00
Enrico Granata 430e540b6b Removing the two extra GetXSize(bool) calls since we do not desire to support them long-term
llvm-svn: 166060
2012-10-16 21:11:14 +00:00
David Blaikie 8db50561b0 Test pure virtual vtable entries in the Itanium ABI.
(original functionality committed in r99807, refactored in r160373)

llvm-svn: 166059
2012-10-16 21:03:19 +00:00
Enrico Granata cd4d24d5e9 <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
2012-10-16 20:57:12 +00:00
Jason Molenda 981d4dfa0f 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
2012-10-16 20:45:49 +00:00