Benjamin Kramer [Thu, 11 Jul 2013 15:37:27 +0000 (15:37 +0000)]
Use move semantics if possible to construct ConstantRanges.
Arithmetic on ConstantRanges creates a lot of large temporary APInts that
benefit from move semantics.
llvm-svn: 186091
Rafael Espindola [Thu, 11 Jul 2013 15:35:23 +0000 (15:35 +0000)]
Fix a FIXME about the format and add a test.
While at it, use strftime on Unix too and use the thread safe versions
of localtime.
llvm-svn: 186090
Howard Hinnant [Thu, 11 Jul 2013 15:32:55 +0000 (15:32 +0000)]
Bill Fisher: This patch fixes a less likely case where '\b' can back up into invalid memory, when driven by a regex_iterator (for case 1, see r185273 or llvm.org/bugs/show_bug.cgi?id=16240)
The attached test program also supplies a test for the case 1 fix in r185273.
llvm-svn: 186089
Arnold Schwaighofer [Thu, 11 Jul 2013 15:21:55 +0000 (15:21 +0000)]
LoopVectorize: Vectorize all accesses in address space zero with unit stride
We can vectorize them because in the case where we wrap in the address space the
unvectorized code would have had to access a pointer value of zero which is
undefined behavior in address space zero according to the LLVM IR semantics.
(Thank you Duncan, for pointing this out to me).
Fixes PR16592.
llvm-svn: 186088
Daniel Jasper [Thu, 11 Jul 2013 14:33:06 +0000 (14:33 +0000)]
Improve detection of trailing return types.
Trailing return types can only occur in declaration contexts.
Before:
void f() { auto a = b -> c(); }
After:
void f() { auto a = b->c(); }
llvm-svn: 186087
Ed Maste [Thu, 11 Jul 2013 14:12:16 +0000 (14:12 +0000)]
Add stub GetThreadName for FreeBSD, missed in r186033.
On FreeBSD inferior thread names are available through ptrace, so we won't
use Host::GetThreadName anyway.
llvm-svn: 186086
Daniel Jasper [Thu, 11 Jul 2013 13:48:16 +0000 (13:48 +0000)]
Fix indentation problem for comments in call chains
Before:
SomeObject
// Calling someFunction on SomeObject
.someFunction();
After:
SomeObject
// Calling someFunction on SomeObject
.someFunction();
llvm-svn: 186085
Rafael Espindola [Thu, 11 Jul 2013 13:44:10 +0000 (13:44 +0000)]
Merge these tests.
llvm-svn: 186084
Rafael Espindola [Thu, 11 Jul 2013 13:31:38 +0000 (13:31 +0000)]
Use a more unique name to avoid conflicting with directory.ll tests when running
in parallel.
llvm-svn: 186083
Rafael Espindola [Thu, 11 Jul 2013 13:24:27 +0000 (13:24 +0000)]
Add a test for llvm-ar's 'd' operation.
llvm-svn: 186082
Rafael Espindola [Thu, 11 Jul 2013 13:13:09 +0000 (13:13 +0000)]
Add tests for the 'x' operation.
llvm-svn: 186081
Rafael Espindola [Thu, 11 Jul 2013 13:03:27 +0000 (13:03 +0000)]
Remove the 'N' modifier from llvm-ar.
* It is not present on OS X.
* It is untested.
* It is not needed for using ar in a build system.
llvm-svn: 186080
Rafael Espindola [Thu, 11 Jul 2013 12:54:11 +0000 (12:54 +0000)]
Delete dead code.
llvm-svn: 186079
Rafael Espindola [Thu, 11 Jul 2013 12:38:02 +0000 (12:38 +0000)]
Remove support for truncating names in archives.
* All systems we support have some form of long name support.
* The options has different names and semantics in different implementations
('f' on gnu, 'T' on OS X), which makes it unlikely it is normally used on
build systems.
* It was completely untested.
llvm-svn: 186078
Daniel Jasper [Thu, 11 Jul 2013 12:34:23 +0000 (12:34 +0000)]
Keep trailing annotations close to their argument.
Before:
bool aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa GUARDED_BY(
aaaaaaaaaaaa);
After:
bool aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
GUARDED_BY(
aaaaaaaaaaaa);
llvm-svn: 186077
Rafael Espindola [Thu, 11 Jul 2013 12:28:36 +0000 (12:28 +0000)]
Sync llvm-ar's help string with the options it supports.
llvm-svn: 186076
Benjamin Kramer [Thu, 11 Jul 2013 12:13:16 +0000 (12:13 +0000)]
Reduce the number of indirections in the attributes implementation.
- Coallocate entires for AttributeSetImpls and Nodes after the class itself.
- Remove mutable iterators from immutable classes.
- Remove unused context field from AttributeImpl.
- Derive Enum/Align/String attribute implementations from AttributeImpl instead
of having a whole new inheritance tree for them.
- Derive AlignAttributeImpl from EnumAttributeImpl.
llvm-svn: 186075
Richard Sandiford [Thu, 11 Jul 2013 09:10:38 +0000 (09:10 +0000)]
[SystemZ] Add testcase missing from r186073
llvm-svn: 186074
Richard Sandiford [Thu, 11 Jul 2013 09:10:09 +0000 (09:10 +0000)]
[SystemZ] Use zeroing form of RISBG for shift-and-AND sequences
Extend r186072 to handle shifts and ANDs.
llvm-svn: 186073
Richard Sandiford [Thu, 11 Jul 2013 08:59:12 +0000 (08:59 +0000)]
[SystemZ] Use zeroing form of RISBG for some AND sequences
RISBG can handle some ANDs for which no AND IMMEDIATE exists.
It also acts as a three-operand AND for some cases where an
AND IMMEDIATE could be used instead.
It might be worth adding a pass to replace RISBG with AND IMMEDIATE
in cases where the register operands end up being the same and where
AND IMMEDIATE is smaller.
llvm-svn: 186072
Rui Ueyama [Thu, 11 Jul 2013 08:46:21 +0000 (08:46 +0000)]
[PECOFF] Support linking against DLL.
This patch adds a new pass, IdataPass, to transform shared atom references
to real references and to construct the .idata section data. With this patch
lld can produce a working Hello World program by linking it against
kernel32.dll and user32.dll.
Reviewers: Bigcheese
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1096
llvm-svn: 186071
Richard Sandiford [Thu, 11 Jul 2013 08:37:13 +0000 (08:37 +0000)]
[SystemZ] Allow 8-bit operands to RISBG
RISBG has three 8-bit operands (I3, I4 and I5). I'd originally
restricted all three to 6 bits, since that's the only range we intended
to use at the time. However, the top bit of I4 acts as a "zero" flag for
RISBG, while the top bit of I3 acts as a "test" flag for RNSBG & co.
This patch therefore allows them to have the full 8-bit range.
I've left the fifth operand as a 6-bit value for now since the
upper 2 bits have no defined meaning.
llvm-svn: 186070
Duncan Sands [Thu, 11 Jul 2013 08:28:20 +0000 (08:28 +0000)]
TryToSimplifyUncondBranchFromEmptyBlock was checking that any common
predecessors of the two blocks it is attempting to merge supply the
same incoming values to any phi in the successor block. This change
allows merging in the case where there is one or more incoming values
that are undef. The undef values are rewritten to match the non-undef
value that flows from the other edge. Patch by Mark Lacey.
llvm-svn: 186069
Hal Finkel [Thu, 11 Jul 2013 06:41:14 +0000 (06:41 +0000)]
Initialize AsmPrinter::MF in the constructor
MF is normally initialized in AsmPrinter::SetupMachineFunction, but if the file
contains only globals (no functions), then we need this to be initialized
because, when encountering an error, lowerConstant() references it.
This should fix the non-deterministic failures of
test/CodeGen/X86/nonconst-static-iv.ll, etc.
llvm-svn: 186068
Hal Finkel [Thu, 11 Jul 2013 05:55:57 +0000 (05:55 +0000)]
RegScavenger should not exclude undef uses
When computing currently-live registers, the register scavenger excludes undef
uses. As a result, undef uses are ignored when computing the restore points of
registers spilled into the emergency slots. While the register scavenger
normally excludes from consideration, when scavenging, registers used by the
current instruction, we need to not exclude undef uses. Otherwise, we might end
up requiring more emergency spill slots than we have (in the case where the
undef use *is* the currently-spilled register).
Another bug found by llvm-stress.
llvm-svn: 186067
Rui Ueyama [Thu, 11 Jul 2013 05:43:38 +0000 (05:43 +0000)]
[PECOFF][Writer] Fixed a bug that an empty section is emit to the section header.
llvm-svn: 186066
Craig Topper [Thu, 11 Jul 2013 05:39:44 +0000 (05:39 +0000)]
Fix indentation. No functional change.
llvm-svn: 186065
Nadav Rotem [Thu, 11 Jul 2013 05:39:02 +0000 (05:39 +0000)]
Fix a warning.
llvm-svn: 186064
Nadav Rotem [Thu, 11 Jul 2013 05:15:11 +0000 (05:15 +0000)]
Consolidate more lit tests.
llvm-svn: 186063
Nadav Rotem [Thu, 11 Jul 2013 05:11:33 +0000 (05:11 +0000)]
Consolidate some of the lit tests.
llvm-svn: 186062
Richard Smith [Thu, 11 Jul 2013 05:10:21 +0000 (05:10 +0000)]
PR5066: If a declarator cannot have an identifier, and cannot possibly be
followed by an identifier, then diagnose an identifier as being a bogus part of
the declarator instead of tripping over it. Improves diagnostics for cases like
std::vector<const int *p> my_vec;
llvm-svn: 186061
Nadav Rotem [Thu, 11 Jul 2013 05:01:50 +0000 (05:01 +0000)]
Consolidate some of the lit tests.
llvm-svn: 186060
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