James Dennett [Thu, 11 Jul 2013 05:01:16 +0000 (05:01 +0000)]
Documentation fixes - the rest of DeclCXX.h:
* More \brief additions/fixes;
* Fix some misleading comments about C++11's explicit conversion operators;
* Mark up some \code examples;
* Add \file documentation.
llvm-svn: 186059
Nadav Rotem [Thu, 11 Jul 2013 04:54:05 +0000 (04:54 +0000)]
SLPVectorizer: refactor the code that places extracts. Place the code that decides where to put extracts in the build-tree phase. This allows us to take the cost of the extracts into account.
llvm-svn: 186058
Michael Gottesman [Thu, 11 Jul 2013 04:40:01 +0000 (04:40 +0000)]
Teach TailRecursionElimination to handle certain cases of nocapture escaping allocas.
Without the changes introduced into this patch, if TRE saw any allocas at all,
TRE would not perform TRE *or* mark callsites with the tail marker.
Because TRE runs after mem2reg, this inadequacy is not a death sentence. But
given a callsite A without escaping alloca argument, A may not be able to have
the tail marker placed on it due to a separate callsite B having a write-back
parameter passed in via an argument with the nocapture attribute.
Assume that B is the only other callsite besides A and B only has nocapture
escaping alloca arguments (*NOTE* B may have other arguments that are not passed
allocas). In this case not marking A with the tail marker is unnecessarily
conservative since:
1. By assumption A has no escaping alloca arguments itself so it can not
access the caller's stack via its arguments.
2. Since all of B's escaping alloca arguments are passed as parameters with
the nocapture attribute, we know that B does not stash said escaping
allocas in a manner that outlives B itself and thus could be accessed
indirectly by A.
With the changes introduced by this patch:
1. If we see any escaping allocas passed as a capturing argument, we do
nothing and bail early.
2. If we do not see any escaping allocas passed as captured arguments but we
do see escaping allocas passed as nocapture arguments:
i. We do not perform TRE to avoid PR962 since the code generator produces
significantly worse code for the dynamic allocas that would be created
by the TRE algorithm.
ii. If we do not return twice, mark call sites without escaping allocas
with the tail marker. *NOTE* This excludes functions with escaping
nocapture allocas.
3. If we do not see any escaping allocas at all (whether captured or not):
i. If we do not have usage of setjmp, mark all callsites with the tail
marker.
ii. If there are no dynamic/variable sized allocas in the function,
attempt to perform TRE on all callsites in the function.
Based off of a patch by Nick Lewycky.
rdar://
14324281.
llvm-svn: 186057
James Dennett [Thu, 11 Jul 2013 03:51:36 +0000 (03:51 +0000)]
Documentation cleanup for DeclCXX.h:
* Fixing up \brief summaries (adding some, making some briefer);
* Standardizing on \commands, not @commands;
* Update C++0x references to C++11;
* Fix typos and Doxygen warnings.
llvm-svn: 186056
NAKAMURA Takumi [Thu, 11 Jul 2013 03:45:54 +0000 (03:45 +0000)]
clang/test/CodeGen/c11atomics.c: Fix testcase for -Asserts since r186054.
llvm-svn: 186055
Eli Friedman [Thu, 11 Jul 2013 02:28:36 +0000 (02:28 +0000)]
Fix build.
Sorry about that.
llvm-svn: 186054
Richard Smith [Thu, 11 Jul 2013 02:27:57 +0000 (02:27 +0000)]
Add a __builtin_addressof that performs the same functionality as the built-in
& operator (ignoring any overloaded operator& for the type). The purpose of
this builtin is for use in std::addressof, to allow it to be made constexpr;
the existing implementation technique (reinterpret_cast to some reference type,
take address, reinterpert_cast back) does not permit this because
reinterpret_cast between reference types is not permitted in a constant
expression in C++11 onwards.
llvm-svn: 186053
Richard Smith [Thu, 11 Jul 2013 02:26:56 +0000 (02:26 +0000)]
Make CheckAddressOfOperand a member of Sema so it can be reused by
__builtin_addressof.
llvm-svn: 186052
Hal Finkel [Thu, 11 Jul 2013 01:55:55 +0000 (01:55 +0000)]
Move r186044 tests into CodeGen/X86
I had thought that these tests could be target-neutral, but in practice this is
not the case (on some targets, like Hexagon and Darwin), they trigger an assert
(a different assert than the one that r186044 fixes).
llvm-svn: 186051
Jim Ingham [Thu, 11 Jul 2013 01:47:46 +0000 (01:47 +0000)]
Add a -remote-file option to “target create” to specify the location of the executable on a remote system (if debugging remotely using debugserver on the target system.) This gets us closer to being able to set up a remote debugging session from the lldb command line.
llvm-svn: 186050
Eli Friedman [Thu, 11 Jul 2013 01:32:21 +0000 (01:32 +0000)]
Simplify atomic load/store IRGen.
Also fixes a couple minor bugs along the way; see testcases.
llvm-svn: 186049
Richard Smith [Thu, 11 Jul 2013 00:34:42 +0000 (00:34 +0000)]
Fix some grammar errors.
llvm-svn: 186048
Richard Smith [Thu, 11 Jul 2013 00:27:05 +0000 (00:27 +0000)]
Fix documentation:
#if defined(__has_foo("X")) && __has_foo("X")
is not a correct way to portably use __has_foo, because it is expanded to
#if 0 && 0("X")
... which is ill-formed.
Also add a missing ')'.
llvm-svn: 186047
Hal Finkel [Wed, 10 Jul 2013 23:25:03 +0000 (23:25 +0000)]
Set REQUIRES shell on the test cases for r186044
Trying to fix the i686-mingw32 build.
llvm-svn: 186046
Hal Finkel [Wed, 10 Jul 2013 23:11:14 +0000 (23:11 +0000)]
XFAIL the test cases for r186044 on Hexagon
For some reason, the Hexagon backend does not reject these invalid static
initializer expressions, but instead crashes in AsmPrinter::EmitGlobalConstant.
llvm-svn: 186045
Hal Finkel [Wed, 10 Jul 2013 22:51:01 +0000 (22:51 +0000)]
Don't assert if we can't constant fold extract/insertvalue
A non-constant-foldable static initializer expression containing insertvalue or
extractvalue had been causing an assert:
Constants.cpp:1971: Assertion `FC && "ExtractValue constant expr couldn't be
folded!"' failed.
Now we report a more-sensible "Unsupported expression in static initializer"
error instead.
Fixes PR15417.
llvm-svn: 186044
Rafael Espindola [Wed, 10 Jul 2013 22:15:29 +0000 (22:15 +0000)]
Remove this test for now.
It is not reliable to depend on the output of llvm_unreachable. The original
change will have proper tests when llvm-ar moves to lib/Object (soon).
llvm-svn: 186043
Hans Wennborg [Wed, 10 Jul 2013 22:09:22 +0000 (22:09 +0000)]
CommandLine.rst: remove tiny bit of bad mark-up
llvm-svn: 186042
Rafael Espindola [Wed, 10 Jul 2013 22:07:59 +0000 (22:07 +0000)]
Find the symbol table on archives created on OS X.
llvm-svn: 186041
Richard Smith [Wed, 10 Jul 2013 22:04:13 +0000 (22:04 +0000)]
If we friend a declaration twice, that should not make it visible to name
lookup in the surrounding context. Slightly rework how we handle friend
declarations to inherit the visibility of the prior declaration, rather
than setting a friend declaration to be visible whenever there was a prior
declaration.
llvm-svn: 186040
Andrew Kaylor [Wed, 10 Jul 2013 21:57:27 +0000 (21:57 +0000)]
Stop process monitor from ProcessPOSIX::Finalize
llvm-svn: 186039
Rafael Espindola [Wed, 10 Jul 2013 21:47:16 +0000 (21:47 +0000)]
Move tests from test/Archive to test/Object.
There is no lib/Archive anymore and some archive tests were in test/Archive and
others in test/Object. Since archive is just one of the formats supported by
lib/Object, test/Object is probably the best location.
llvm-svn: 186038
Fariborz Jahanian [Wed, 10 Jul 2013 21:30:22 +0000 (21:30 +0000)]
ObjC migrator: Improve on hueristics.
migrate to 'copy attribute if Object
class implements NSCopying otherwise
assume implied 'strong'. Remove
lifetime qualifier on property as it has
moved to property's attribute. Added TODO
comment for future work by poking into
setter implementation.
llvm-svn: 186037
Adrian Prantl [Wed, 10 Jul 2013 21:08:02 +0000 (21:08 +0000)]
Add a comment.
llvm-svn: 186035
Tim Northover [Wed, 10 Jul 2013 20:58:17 +0000 (20:58 +0000)]
Put ELF COMDAT relocations into the relevant COMDAT group.
Patch from Игорь Пашев (I do hope we support utf-8 commit messages; I
also hope he'll forgive me for transliterating it as Igor Pashev in
case things go horribly wrong).
llvm-svn: 186034
Matt Kopec [Wed, 10 Jul 2013 20:53:11 +0000 (20:53 +0000)]
Add support for listing inferior thread names on Linux.
llvm-svn: 186033
Stephen Lin [Wed, 10 Jul 2013 20:47:39 +0000 (20:47 +0000)]
Remove trailing whitespac
llvm-svn: 186032
Adrian Prantl [Wed, 10 Jul 2013 20:43:29 +0000 (20:43 +0000)]
Add a testcase for r186014.
llvm-svn: 186031
Eric Christopher [Wed, 10 Jul 2013 20:14:36 +0000 (20:14 +0000)]
Use a LexicalScope here since it is one and it will encapsulate
the two sets of debug scope and cleanup scope.
llvm-svn: 186030
Rafael Espindola [Wed, 10 Jul 2013 20:14:22 +0000 (20:14 +0000)]
Don't crash in 'llvm -s' when an archive has no symtab.
llvm-svn: 186029
Jordan Rose [Wed, 10 Jul 2013 19:14:10 +0000 (19:14 +0000)]
[analyzer] Remove bogus assert: in C++11, 'new' can do list-initialization.
Previously, we asserted that whenever 'new' did not include a constructor
call, the type must be a non-record type. In C++11, however, uniform
initialization syntax (braces) allow 'new' to construct records with
list-initialization: "new Point{1, 2}".
Removing this assertion should be perfectly safe; the code here matches
what VisitDeclStmt does for regions allocated on the stack.
<rdar://problem/
14403437>
llvm-svn: 186028
Reid Kleckner [Wed, 10 Jul 2013 18:55:06 +0000 (18:55 +0000)]
Fix %t typo in Ocaml bindings test.
llvm-svn: 186027
Michael Gottesman [Wed, 10 Jul 2013 18:49:00 +0000 (18:49 +0000)]
[objc-arc] Changed 'mode: c++' => 'C++' at Nick Lewycky's suggestion. Also removed unnecessary mode: c++ lines from .cpp files.
llvm-svn: 186026
Michael Gottesman [Wed, 10 Jul 2013 18:40:49 +0000 (18:40 +0000)]
Changed "mode: c++" => "C++" at the suggestion of Nick Lewycky.
llvm-svn: 186025
James Dennett [Wed, 10 Jul 2013 18:29:15 +0000 (18:29 +0000)]
Add a hook RecursiveASTVisitor::TraverseLambdaBody, to enable visitors to
use/maintain additional state from the LambdaExpr while visiting the body
of a LambdaExpr.
One use for this arises because Clang's AST currently holds lambda bodies
in a form prior to their adjustment to refer to captured copies of local
variables, and so some clients will need access to the lambda's closure
type in order to query how to map VarDecl*s to the FieldDecls of their
by-copy captures. This hook is sufficient for at least one such client;
to do this without such a hook would require the client to re-implement
the whole of TraverseLambdaExpr, which is non-trivial and would likely be
more brittle.
llvm-svn: 186024
Enrico Granata [Wed, 10 Jul 2013 18:25:45 +0000 (18:25 +0000)]
Adding a summary for ObjC blocks
llvm-svn: 186023
Marshall Clow [Wed, 10 Jul 2013 18:01:34 +0000 (18:01 +0000)]
Improved tests (and fixed a bug in the tests); thanks to Richard Smith for the suggestion
llvm-svn: 186022
Benjamin Kramer [Wed, 10 Jul 2013 18:01:16 +0000 (18:01 +0000)]
Update doxygen comment to match renamed parameters.
Found by -Wdocumentation.
llvm-svn: 186021
Greg Clayton [Wed, 10 Jul 2013 17:58:19 +0000 (17:58 +0000)]
Fixed an issue introduced with my last fix where the command and sequence ID extraction were moved causing them to be reversed.
llvm-svn: 186020
Kaelyn Uhrain [Wed, 10 Jul 2013 17:34:22 +0000 (17:34 +0000)]
Offer typo suggestions for 'using' declarations.
Patch courtesy of Luke Zarko <zarko@google.com>
llvm-svn: 186019
Rafael Espindola [Wed, 10 Jul 2013 17:30:39 +0000 (17:30 +0000)]
MemoryBuffer::getFile handles zero sized files, no need to duplicate the test.
llvm-svn: 186018
Aaron Ballman [Wed, 10 Jul 2013 17:19:22 +0000 (17:19 +0000)]
Replacing an empty switch with its moral equivalent. No functional changes intended.
llvm-svn: 186017
Rafael Espindola [Wed, 10 Jul 2013 17:16:40 +0000 (17:16 +0000)]
Use status to implement file_size.
The status function is already using a syscall that returns the file size.
Remember it and implement file_size as a simple wrapper.
No functionally change, but clients that already use status now can avoid
calling file_size.
llvm-svn: 186016
Adrian Prantl [Wed, 10 Jul 2013 16:56:52 +0000 (16:56 +0000)]
Use the appropriate unsigned int type for the offset.
llvm-svn: 186015
Adrian Prantl [Wed, 10 Jul 2013 16:56:47 +0000 (16:56 +0000)]
Safeguard DBG_VALUE handling. Unbreaks the ASAN buildbot.
llvm-svn: 186014
Craig Topper [Wed, 10 Jul 2013 16:38:35 +0000 (16:38 +0000)]
Simplify code.
llvm-svn: 186013
Michel Danzer [Wed, 10 Jul 2013 16:37:07 +0000 (16:37 +0000)]
R600/SI: Initial local memory support
Enough for the radeonsi driver to use it for calculating derivatives.
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 186012
Michel Danzer [Wed, 10 Jul 2013 16:36:57 +0000 (16:36 +0000)]
R600/SI: Add pattern for the AMDGPU.barrier.local intrinsic
lit test coverage to follow in the next commit.
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 186011
Michel Danzer [Wed, 10 Jul 2013 16:36:52 +0000 (16:36 +0000)]
R600/SI: Add intrinsic for retrieving the current thread ID
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 186010
Michel Danzer [Wed, 10 Jul 2013 16:36:43 +0000 (16:36 +0000)]
R600/SI: Initial support for LDS/GDS instructions
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 186009
Michel Danzer [Wed, 10 Jul 2013 16:36:36 +0000 (16:36 +0000)]
R600/SI: Add intrinsics for texture sampling with user derivatives
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 186008
Tareq A. Siraj [Wed, 10 Jul 2013 16:09:36 +0000 (16:09 +0000)]
Generate a unique filename for a given header
This patch is in preparation for writing the header replacement to disk.
Added getUniqueHeaderName() that generates a unique header filename in
the same directory as the header file.
Differential Revision: http://llvm-reviews.chandlerc.com/D1104
llvm-svn: 186007
Argyrios Kyrtzidis [Wed, 10 Jul 2013 15:33:20 +0000 (15:33 +0000)]
Remove llvm/ADT/NullablePtr.h, there are no uses of it in-tree.
llvm-svn: 186006
Hal Finkel [Wed, 10 Jul 2013 15:29:01 +0000 (15:29 +0000)]
PPC: Add a better comment about the i64 FI fixup
In discussing this change with Bill Schmidt, it was decided that the original
comment about negative FIs was incorrect. We'll still exclude them for now, but
now with a more-accurate explanation.
llvm-svn: 186005
Evgeniy Stepanov [Wed, 10 Jul 2013 14:17:46 +0000 (14:17 +0000)]
[sanitizer] More checks in mbstowcs-like interceptors.
llvm-svn: 186004
Daniel Jasper [Wed, 10 Jul 2013 14:02:49 +0000 (14:02 +0000)]
Add experimental flag for adaptive parameter bin-packing.
This is not activated for any style, might change or go away
completely.
For those that want to play around with it, set
ExperimentalAutoDetectBinPacking to true.
clang-format will then:
Look at whether function calls/declarations/definitions are currently
formatted with one parameter per line (on a case-by-case basis). If so,
clang-format will avoid bin-packing the parameters. If all parameters
are on one line (thus that line is "inconclusive"), clang-format will
make the choice dependent on whether there are other bin-packed
calls/declarations in the same file.
The reason for this change is that bin-packing in some situations can be
really bad and an author might opt to put one parameter on each line. If
the author does that, he might want clang-format not to mess with that.
If the author is unhappy with the one-per-line formatting, clang-format
can easily be convinced to bin-pack by putting any two parameters on the
same line.
llvm-svn: 186003
Evgeniy Stepanov [Wed, 10 Jul 2013 14:01:51 +0000 (14:01 +0000)]
[sanitizer] Fix handling of edge cases in mbstowcs-like interceptors.
llvm-svn: 186002
Vladimir Medic [Wed, 10 Jul 2013 12:27:25 +0000 (12:27 +0000)]
Reverting commit r185999 due to buildboot failure.
llvm-svn: 186001
Vladimir Medic [Wed, 10 Jul 2013 12:26:26 +0000 (12:26 +0000)]
Reverting commit r185999 due to buildboot failure.
llvm-svn: 186000
Vladimir Medic [Wed, 10 Jul 2013 10:18:10 +0000 (10:18 +0000)]
Add support for Mips break and syscall insructions. The corresponding test cases are added.
llvm-svn: 185999
Chandler Carruth [Wed, 10 Jul 2013 09:50:29 +0000 (09:50 +0000)]
Fix a bug in the readdir_r interceptor: when we reach the end of the
directory stream, the entry is not written to, instead *result is set to
NULL and the entry is not written to at all.
I'm still somewhat suspicious of the correct instrumention here --
I feel like it should be marking the written range as the pointer in
*result and the length (*result)->d_reclen in case the implementation
decides not to use the passed-in entry (if that's even allowed).
Finally, the definition of 'struct dirent' analog used in the
interceptor is wrong in 32-bit mode with _FILE_OFFSET_BITS=64 as it hard
codes the use of a pointer-sized offset.
I've added a somewhat goofy test for the bug I fixed via ASan --
suggestions on how to better test the interceptor logic itself welcome.
llvm-svn: 185998
Serge Pavlov [Wed, 10 Jul 2013 04:59:14 +0000 (04:59 +0000)]
Fixed comment of Sema::FindInstantiatedDecl.
llvm-svn: 185997
Jim Ingham [Wed, 10 Jul 2013 02:21:57 +0000 (02:21 +0000)]
Call xmlFree on the node contents returned by xmlNodeGetContent, as the docs say to do.
<rdar://problem/
14391836>
llvm-svn: 185996
Stephen Lin [Wed, 10 Jul 2013 01:57:39 +0000 (01:57 +0000)]
Fix typo
llvm-svn: 185995
Stephen Lin [Wed, 10 Jul 2013 01:54:24 +0000 (01:54 +0000)]
Explicitly define ARMISelLowering::isFMAFasterThanFMulAndFAdd. No functionality change.
Currently ARM is the only backend that supports FMA instructions (for at least some subtargets) but does not implement this virtual, so FMAs are never generated except from explicit fma intrinsic calls. Apparently this is due to the fact that it supports both fused (one rounding step) and unfused (two rounding step) multiply + add instructions. This patch clarifies that this the case without changing behavior by implementing the virtual function to simply return false, as the default TargetLoweringBase version does.
It is possible that some cpus perform the fused version faster than the unfused version and vice-versa, so the function implementation should be revisited if hard data is found.
llvm-svn: 185994
Adrian Prantl [Wed, 10 Jul 2013 01:53:37 +0000 (01:53 +0000)]
Un-break the buildbot by tweaking the indirection flag.
Pulled in a testcase from the debuginfo-test suite.
llvm-svn: 185993
Adrian Prantl [Wed, 10 Jul 2013 01:53:30 +0000 (01:53 +0000)]
Document a known limitation of the status quo.
llvm-svn: 185992
Eli Friedman [Wed, 10 Jul 2013 01:33:19 +0000 (01:33 +0000)]
Finish off mangling locals in block literals.
Specifically, handle the case where the block is in a default argument
in a class method. The mangling here follows what we do for lambdas.
llvm-svn: 185991
Greg Clayton [Wed, 10 Jul 2013 01:23:25 +0000 (01:23 +0000)]
Cleanup on the unified section list changes. Main changes are:
- ObjectFile::GetSymtab() and ObjectFile::ClearSymtab() no longer takes any flags
- Module coordinates with the object files and contain a unified section list so that object file and symbol file can share sections when they need to, yet contain their own sections.
Other cleanups:
- Fixed Symbol::GetByteSize() to not have the symbol table compute the byte sizes on the fly
- Modified the ObjectFileMachO class to compute symbol sizes all at once efficiently
- Modified the Symtab class to store a file address lookup table for more efficient lookups
- Removed Section::Finalize() and SectionList::Finalize() as they did nothing
- Improved performance of the detection of symbol files that have debug maps by excluding stripped files and core files, debug files, object files and stubs
- Added the ability to tell if an ObjectFile has been stripped with ObjectFile::IsStripped() (used this for the above performance improvement)
llvm-svn: 185990
Eli Friedman [Wed, 10 Jul 2013 01:13:27 +0000 (01:13 +0000)]
Get rid of dead/useless code for block mangling.
llvm-svn: 185989
Greg Clayton [Wed, 10 Jul 2013 01:05:05 +0000 (01:05 +0000)]
Fixed the CommunicationKDP::SendRequestAndGetReply() to correctly be able to deal with getting a reply from a previous packet without resending the packet again.
llvm-svn: 185988
Duncan Sands [Wed, 10 Jul 2013 00:52:41 +0000 (00:52 +0000)]
Correct comment.
llvm-svn: 185987
Eli Friedman [Wed, 10 Jul 2013 00:30:46 +0000 (00:30 +0000)]
More local mangling fixes.
Compute mangling numbers for externally visible local variables and tags.
Change the mangler to consistently use discriminators where necessary.
Tweak the scheme we use to number decls which are not externally visible
to avoid unnecessary discriminators in common cases now that we request
them more consistently.
Fixes <rdar://problem/
14204721>.
llvm-svn: 185986
Fariborz Jahanian [Wed, 10 Jul 2013 00:20:11 +0000 (00:20 +0000)]
objc migrator: More refinment of property
attributes in migration. Specialli use of
'copy' attribute for retainable object types.
llvm-svn: 185985
Eric Christopher [Tue, 9 Jul 2013 23:48:45 +0000 (23:48 +0000)]
Fix comment.
llvm-svn: 185984
Michael Sartain [Tue, 9 Jul 2013 23:22:53 +0000 (23:22 +0000)]
Add silent option to command source.
Patch from Matthew Sorrels
llvm-svn: 185983
Jim Grosbach [Tue, 9 Jul 2013 22:59:22 +0000 (22:59 +0000)]
ARM: Fix incorrect pack pattern for thumb2
Propagate the fix from r185712 to Thumb2 codegen as well. Original
commit message applies here as well:
A "pkhtb x, x, y asr #num" uses the lower 16 bits of "y asr #num" and
packs them in the bottom half of "x". An arithmetic and logic shift are
only equivalent in this context if the shift amount is 16. We would be
shifting in ones into the bottom 16bits instead of zeros if "y" is
negative.
rdar://
14338767
llvm-svn: 185982
Andrew Kaylor [Tue, 9 Jul 2013 22:36:48 +0000 (22:36 +0000)]
Reverting ProcessMonitor shared pointer changes
llvm-svn: 185981
Peter Collingbourne [Tue, 9 Jul 2013 22:04:28 +0000 (22:04 +0000)]
[asan] Update blacklists to use categories.
Differential Revision: http://llvm-reviews.chandlerc.com/D1094
llvm-svn: 185980
Peter Collingbourne [Tue, 9 Jul 2013 22:03:30 +0000 (22:03 +0000)]
Apply BlackList -> SpecialCaseList rename in Clang.
Differential Revision: http://llvm-reviews.chandlerc.com/D1095
llvm-svn: 185979
Peter Collingbourne [Tue, 9 Jul 2013 22:03:17 +0000 (22:03 +0000)]
Implement categories for special case lists.
A special case list can now specify categories for specific globals,
which can be used to instruct an instrumentation pass to treat certain
functions or global variables in a specific way, such as by omitting
certain aspects of instrumentation while keeping others, or informing
the instrumentation pass that a specific uninstrumentable function
has certain semantics, thus allowing the pass to instrument callers
according to those semantics.
For example, AddressSanitizer now uses the "init" category instead of
global-init prefixes for globals whose initializers should not be
instrumented, but which in all other respects should be instrumented.
The motivating use case is DataFlowSanitizer, which will have a
number of different categories for uninstrumentable functions, such
as "functional" which specifies that a function has pure functional
semantics, or "discard" which indicates that a function's return
value should not be labelled.
Differential Revision: http://llvm-reviews.chandlerc.com/D1092
llvm-svn: 185978
Peter Collingbourne [Tue, 9 Jul 2013 22:03:12 +0000 (22:03 +0000)]
Add some SpecialCaseList unit tests.
Differential Revision: http://llvm-reviews.chandlerc.com/D1091
llvm-svn: 185977
Peter Collingbourne [Tue, 9 Jul 2013 22:03:09 +0000 (22:03 +0000)]
Introduce a SpecialCaseList ctor which takes a MemoryBuffer to make
it more unit testable, and fix memory leak in the other ctor.
Differential Revision: http://llvm-reviews.chandlerc.com/D1090
llvm-svn: 185976
Peter Collingbourne [Tue, 9 Jul 2013 22:02:49 +0000 (22:02 +0000)]
Rename BlackList class to SpecialCaseList and move it to Transforms/Utils.
Differential Revision: http://llvm-reviews.chandlerc.com/D1089
llvm-svn: 185975
Fariborz Jahanian [Tue, 9 Jul 2013 22:02:20 +0000 (22:02 +0000)]
Objective-C: merge objc_requires_super attribute of
method declaration into its implementation to
prevent a bogus warning about mismatched attributes.
then make sure the warning about missing call to super comes out
of the method implementation. // rdar://
14251387
llvm-svn: 185974
David Majnemer [Tue, 9 Jul 2013 22:01:22 +0000 (22:01 +0000)]
InstSimplify: X >> X -> 0
llvm-svn: 185973
Adrian Prantl [Tue, 9 Jul 2013 21:44:11 +0000 (21:44 +0000)]
move test into the appropriate subdir.
llvm-svn: 185972
Adrian Prantl [Tue, 9 Jul 2013 21:44:06 +0000 (21:44 +0000)]
Typo.
llvm-svn: 185971
Nadav Rotem [Tue, 9 Jul 2013 21:38:08 +0000 (21:38 +0000)]
Fix PR16571, which is a bug in the code that checks that all of the types in the bundle are uniform.
llvm-svn: 185970
Marshall Clow [Tue, 9 Jul 2013 20:34:14 +0000 (20:34 +0000)]
move __save_flags from <random> to <ios> in preparation for reuse; no functionality change
llvm-svn: 185968
Adrian Prantl [Tue, 9 Jul 2013 20:29:03 +0000 (20:29 +0000)]
Reapply an improved version of r180816/180817.
Do not generate VLAs as complex variables any more, as they are now
correctly represented as breg+0 locations in the backend.
(Paired commit with LLVM: r185966)
rdar://problem/
13658587
llvm-svn: 185967
Adrian Prantl [Tue, 9 Jul 2013 20:28:37 +0000 (20:28 +0000)]
Reapply an improved version of r180816/180817.
Change the informal convention of DBG_VALUE machine instructions so that
we can express a register-indirect address with an offset of 0.
The old convention was that a DBG_VALUE is a register-indirect value if
the offset (operand 1) is nonzero. The new convention is that a DBG_VALUE
is register-indirect if the first operand is a register and the second
operand is an immediate. For plain register values the combination reg,
reg is used. MachineInstrBuilder::BuildMI knows how to build the new
DBG_VALUES.
rdar://problem/
13658587
llvm-svn: 185966
Enrico Granata [Tue, 9 Jul 2013 20:14:26 +0000 (20:14 +0000)]
Second attempt at getting the PyCallable changes in trunk
Thanks to Daniel Malea for helping test this patch for Linux happiness!
llvm-svn: 185965
Michael Gottesman [Tue, 9 Jul 2013 20:08:46 +0000 (20:08 +0000)]
Fixed up the comments in FastISel.h so that they conform to the LLVM style guide.
llvm-svn: 185964
Michael Gottesman [Tue, 9 Jul 2013 20:00:25 +0000 (20:00 +0000)]
Added "mode: c++" to FastISel.h header.
llvm-svn: 185963
Stephen Lin [Tue, 9 Jul 2013 19:27:10 +0000 (19:27 +0000)]
Appease buildbots after r185956: just set -mcpu explicitly, as it should have been from the beginning.
llvm-svn: 185962
Stephen Lin [Tue, 9 Jul 2013 18:55:52 +0000 (18:55 +0000)]
Appease Atom buildbot after r185956 (explicitly turn on AVX)
llvm-svn: 185961
Hal Finkel [Tue, 9 Jul 2013 18:55:10 +0000 (18:55 +0000)]
WidenVecRes_BUILD_VECTOR must use the first operand's type
Because integer BUILD_VECTOR operands may have a larger type than the result's
vector element type, and all operands must have the same type, when widening a
BUILD_VECTOR node by adding UNDEFs, we cannot use the vector element type, but
rather must use the type of the existing operands.
Another bug found by llvm-stress.
llvm-svn: 185960
Bill Schmidt [Tue, 9 Jul 2013 18:50:20 +0000 (18:50 +0000)]
[PowerPC] Better fix for PR16556.
A more complete example of the bug in PR16556 was recently provided,
showing that the previous fix was not sufficient. The previous fix is
reverted herein.
The real problem is that ReplaceNodeResults() uses LowerFP_TO_INT as
custom lowering for FP_TO_SINT during type legalization, without
checking whether the input type is handled by that routine.
LowerFP_TO_INT requires the input to be f32 or f64, so we fail when
the input is ppcf128.
I'm leaving the test case from the initial fix (r185821) in place, and
adding the new test as another crash-only check.
llvm-svn: 185959
Stephen Lin [Tue, 9 Jul 2013 18:41:43 +0000 (18:41 +0000)]
Attempt to appease buildbot after r185956 by explicitly turning setting -fma,-fma4 attrs (I'm assuming they're set because the bot is running on machine that has one or the other.)
llvm-svn: 185958