Commit Graph

152817 Commits

Author SHA1 Message Date
Richard Smith feb3e1a1e3 Lazily deserialize function template specializations. This fixes a cycle in
module deserialization / merging, and more laziness here is general goodness.

llvm-svn: 185132
2013-06-28 04:37:53 +00:00
David Blaikie c3ccdbe2bf Integrate Assembler: Support X86_64_DTPOFF64 relocations
llvm-svn: 185131
2013-06-28 04:24:32 +00:00
Rui Ueyama 4251055a66 [PECOFF][Writer] Fix a bug that the contents of .data and .rdata were swapped.
llvm-svn: 185130
2013-06-28 04:15:37 +00:00
Rui Ueyama fed750ff3b [PECOFF][Writer] Skip ".debug$S" section in the input object file.
llvm-svn: 185129
2013-06-28 04:06:49 +00:00
Rui Ueyama d059f360a3 [PECOFF][Writer] Use a constant instead of a magic number.
llvm-svn: 185128
2013-06-28 03:52:41 +00:00
Rafael Espindola 157f34bd31 Update for llvm::sys::fs::unique_file not creating directories.
llvm-svn: 185127
2013-06-28 03:49:04 +00:00
Rafael Espindola e79a87226a Improvements to unique_file and createUniqueDirectory.
* Don't try to create parent directories in unique_file. It had two problem:
   * It violates the contract that it is atomic. If the directory creation
     success and the file creation fails, we would return an error but the
     file system was modified.
   * When creating a temporary file clang would have to first check if the
     parent directory existed or not to avoid creating one when it was not
     supposed to.

* More efficient implementations of createUniqueDirectory and the unique_file
  that produces only the file name. Now all 3 just call into a static
  function passing what they want (name, file or directory).

Clang also has to be updated, so tests might fail if a bot picks up this commit
and not the corresponding clang one.

llvm-svn: 185126
2013-06-28 03:48:47 +00:00
Rui Ueyama 1a54aad50b [PECOFF][Writer] Templatize connectAtomsWithLayoutEdge()
Templatize connectAtomsWithLayoutEdge() so that it can handle other types of
defined atoms.

llvm-svn: 185125
2013-06-28 03:41:07 +00:00
Matt Arsenault fbfdced30f Convert tests to FileCheck
llvm-svn: 185124
2013-06-28 01:29:35 +00:00
Rafael Espindola 1842482359 Don't ask for a mode when we are not keeping the file.
llvm-svn: 185123
2013-06-28 01:05:47 +00:00
Arnold Schwaighofer 12ecb331af LoopVectorize: Preserve debug location info
radar://14169017

llvm-svn: 185122
2013-06-28 00:38:54 +00:00
Matt Arsenault 5d2e85f6d7 Fix using arg_end() - arg_begin() instead of arg_size()
llvm-svn: 185121
2013-06-28 00:25:40 +00:00
Matt Arsenault fd9ed8ab4e Fix typo
llvm-svn: 185120
2013-06-28 00:25:36 +00:00
Eli Friedman c7ad5c4e29 Delete dead code.
llvm-svn: 185119
2013-06-28 00:23:34 +00:00
Eli Friedman cb9cd6c714 Switch Decl instantiation to DeclNodes.inc.
This replaces a long list of declarations for visitor functions with
a list generated from DeclNodes.inc.  Nothing really interesting came
out of it; we had comprehensive coverage anyway
(excluding FriendTemplateDecls).

llvm-svn: 185118
2013-06-27 23:21:55 +00:00
Richard Smith 8d7f11da50 Fix nested lifetime extension when a std::initializer_list member is
initialized during aggregate initialization of the surrounding structure.

llvm-svn: 185117
2013-06-27 22:54:33 +00:00
Peter Collingbourne 5c5e6179a0 Use the zero-argument DIBuilder::createNullPtrType in Clang.
Differential Revision: http://llvm-reviews.chandlerc.com/D1051

llvm-svn: 185115
2013-06-27 22:51:01 +00:00
Peter Collingbourne a4a47cb97b Rename DIBuilder::createNullPtrType to createUnspecifiedType and introduce
a zero-argument createNullPtrType function for creating the canonical
nullptr type.

Differential Revision: http://llvm-reviews.chandlerc.com/D1050

llvm-svn: 185114
2013-06-27 22:50:59 +00:00
Michael Gottesman 296adb8b12 At the request of Richard Smith, swapped the order of cold/builtin so it is in alphabetical order.
llvm-svn: 185113
2013-06-27 22:48:08 +00:00
John McCall 611d9b6659 Ensure that debugger calls to signature-less functions default to
passing arguments in the fixed style.

We have an abstraction for deciding this, but it's (1) deep in
IR-generation, (2) necessarily tied to exact argument lists, and
(3) triggered by unprototyped function types, which we can't
legitimately make in C++ mode.  So this solution, wherein Sema
rewrites the function type to an exact prototype but leaves the
variadic bit enabled so as to request x86-64-like platforms to
pass the extra variadic info, is very much a hack, but it's one
that works in practice on the platforms that LLDB will support
in the medium term --- the only place we know of where it's a
problem is instance methods in Windows, where variadic functions
are implicitly cdecl.  We may have a more abstracted base on which
to build a solution by then.

rdar://13731520

llvm-svn: 185112
2013-06-27 22:43:24 +00:00
Michael Gottesman 79b0967548 Revert "Revert "[APFloat] Removed APFloat constructor which initialized to either zero/NaN but allowed you to arbitrarily set the category of the float.""
This reverts commit r185099.

Looks like both the ppc-64 and mips bots are still failing after I reverted this
change.

Since:

1. The mips bot always performs a clean build,
2. The ppc64-bot failed again after a clean build (I asked the ppc-64
maintainers to clean the bot which they did... Thanks Will!),

I think it is safe to assume that this change was not the cause of the failures
that said builders were seeing. Thus I am recomitting.

llvm-svn: 185111
2013-06-27 21:58:19 +00:00
Michael Gottesman a7b73d4534 Revert "Revert r184787: "Added arm_neon intrinsic tests.""
This reverts commit r184817. The failure Chandler was seeing was most likely the
bug that Bob Wilson fixed in r184870 (which was a bug caught by these tests).

To be safe, I just checked again on x86-64 mac os x/linux that this test passed
(which it did).

llvm-svn: 185110
2013-06-27 21:52:01 +00:00
Richard Smith 5a0ef78cd7 Remove bogus VarDecl::extendsLifetimeOfTemporary function and inline it into
its only caller with a FIXME explaining why it's bogus.

llvm-svn: 185109
2013-06-27 21:43:17 +00:00
Eli Friedman 9fb40ee966 Remove unnecessary check.
llvm-svn: 185108
2013-06-27 21:20:28 +00:00
Tim Northover 0614fcd0e3 Prevent race in when stopping a "read thread"
Both StopReadThread and the thread being stopped set the thread id to
0 after m_read_thread_enabled was set to false. If the thread being
stopped got there first then StopReadThread called pthread_join on an
invalid thread number. This is not a Good Thing,

Should fix a fairly regular segfault when quitting on Linux.

llvm-svn: 185107
2013-06-27 21:19:30 +00:00
Bill Wendling 28e84fc53e Revert hack that omits errno on Darwin platforms. We now have an acceptable 'errno' header.
llvm-svn: 185106
2013-06-27 21:17:53 +00:00
Bill Wendling 4ddc302879 Declare 'strerror' so that we can use it with errno.
llvm-svn: 185105
2013-06-27 21:17:24 +00:00
Bill Wendling bc922e5a5f Add 'errno.h' to the Darwin SDK.
llvm-svn: 185104
2013-06-27 21:17:06 +00:00
Eli Friedman ba4b86d074 Delete dead code.
llvm-svn: 185103
2013-06-27 21:04:24 +00:00
Rui Ueyama ee8b55d6a8 [PECOFF][Writer] Fix DLLCharacteristic flag in image header.
llvm-svn: 185102
2013-06-27 21:03:44 +00:00
Eli Friedman b998bff32b Delete dead code.
llvm-svn: 185101
2013-06-27 20:48:08 +00:00
Douglas Gregor f83b4ea8b6 Under -fms-extensions, only inject a friend tag name when we didn't see a tag with that name in an enclosing scope.
r177473 made us correctly consider only those declarations in the
enclosing namespace scope when looking for a friend declaration. Under
ms-extensions mode, where we do some level of friend injection, this
meant that we were introducing a new tag type into a different scope
than what Microsoft actually does. Address this by only doing the
friend injection when we didn't see any tag with that name in any
outer scope. Fixes <rdar://problem/14250378>.

llvm-svn: 185100
2013-06-27 20:42:30 +00:00
Michael Gottesman ccaf3321f1 Revert "[APFloat] Removed APFloat constructor which initialized to either zero/NaN but allowed you to arbitrarily set the category of the float."
This reverts commit r185095. This is causing a FileCheck failure on
the 3dnow intrinsics on at least the mips/ppc bots but not on the x86
bots.

Reverting while I figure out what is going on.

llvm-svn: 185099
2013-06-27 20:40:11 +00:00
Eli Friedman 2850ba8e21 Simplify StmtIterator.
llvm-svn: 185098
2013-06-27 20:39:04 +00:00
Arnold Schwaighofer 38de7cd464 LoopVectorize: Cache edge masks created during if-conversion
Otherwise, we end up with an exponential IR blowup.
Fixes PR16472.

llvm-svn: 185097
2013-06-27 20:31:06 +00:00
Chad Rosier ecff07c897 Remove unnecessary conditional checks.
llvm-svn: 185096
2013-06-27 20:19:13 +00:00
Michael Gottesman 03255a1675 [APFloat] Removed APFloat constructor which initialized to either zero/NaN but allowed you to arbitrarily set the category of the float.
The category which an APFloat belongs to should be dependent on the
actual value that the APFloat has, not be arbitrarily passed in by the
user. This will prevent inconsistency bugs where the category and the
actual value in APFloat differ.

I also fixed up all of the references to this constructor (which were
only in LLVM).

llvm-svn: 185095
2013-06-27 19:50:52 +00:00
Chad Rosier ccd0664393 Improve the compression of the tablegen DiffLists by introducing a new sort
algorithm when assigning EnumValues to the synthesized registers.

The current algorithm, LessRecord, uses the StringRef compare_numeric
function.  This function compares strings, while handling embedded numbers.
For example, the R600 backend registers are sorted as follows:

  T1
  T1_W
  T1_X
  T1_XYZW
  T1_Y
  T1_Z
  T2
  T2_W
  T2_X
  T2_XYZW
  T2_Y
  T2_Z

In this example, the 'scaling factor' is dEnum/dN = 6 because T0, T1, T2
have an EnumValue offset of 6 from one another.  However, in other parts
of the register bank, the scaling factors are different:

dEnum/dN = 5:
  KC0_128_W
  KC0_128_X
  KC0_128_XYZW
  KC0_128_Y
  KC0_128_Z
  KC0_129_W
  KC0_129_X
  KC0_129_XYZW
  KC0_129_Y
  KC0_129_Z

The diff lists do not work correctly because different kinds of registers have
different 'scaling factors'.  This new algorithm, LessRecordRegister, tries to
enforce a scaling factor of 1.  For example, the registers are now sorted as
follows:

  T1
  T2
  T3
  ...
  T0_W
  T1_W
  T2_W
  ...
  T0_X
  T1_X
  T2_X
  ...
  KC0_128_W
  KC0_129_W
  KC0_130_W
  ...

For the Mips and R600 I see a 19% and 6% reduction in size, respectively.  I
did see a few small regressions, but the differences were on the order of a
few bytes (e.g., AArch64 was 16 bytes).  I suspect there will be even
greater wins for targets with larger register files.

Patch reviewed by Jakob.
rdar://14006013

llvm-svn: 185094
2013-06-27 19:38:13 +00:00
Howard Hinnant 3ec1f00b73 Implement full support for non-pointer pointers in custom allocators for vector.
llvm-svn: 185093
2013-06-27 19:35:32 +00:00
John Thompson 161381e120 Ran clang-format on Modularize.cpp to get a baseline for future changes.
llvm-svn: 185092
2013-06-27 18:52:23 +00:00
Rafael Espindola 73c23a7182 Small improvements to createOutputFile.
* Use a single stat to find out if the file exists and if it is a regular file.
* Use early returns when possible.
* Add comments explaining why we have each check.

llvm-svn: 185091
2013-06-27 18:26:26 +00:00
Greg Clayton 96eb9ab047 A bit more cleanup on the process_events.py to use best practices for event handling.
llvm-svn: 185089
2013-06-27 18:08:32 +00:00
Sean Callanan 7dcbe3d356 Cleanup of IRForTarget. Removed some relics of
the time when the IRInterpreter ran inside
IRForTarget.

llvm-svn: 185088
2013-06-27 18:08:02 +00:00
Argyrios Kyrtzidis f183082dc6 [Support/Registry.h] Include llvm/Support/Compiler.h.
Because Registry.h is using the LLVM_DELETED_FUNCTION macro.

llvm-svn: 185087
2013-06-27 17:57:40 +00:00
Nadav Rotem 02dd93ec1a Get rid of the unused class member.
llvm-svn: 185086
2013-06-27 17:54:10 +00:00
Nadav Rotem f9ecbcb835 CostModel: improve the cost model for load/store of non power-of-two types such as <3 x float>, which are popular in graphics.
llvm-svn: 185085
2013-06-27 17:52:04 +00:00
Tom Stellard 1baa03aba6 R600: Remove alu-split.ll test
The purpose of this test was to check boundary conditions for the size
of an ALU clause.  This test is very sensitive to changes to the
optimizer or scheduler, because it requires an exact number of ALU
instructions in order to remain valid.  It's not good to have a test
this sensitive, because it is confusing to developers who implement
optimizations and then 'break' the test.

I'm not sure if there is a good way to test these limits using lit, but
if I can come up with replacement test that isn't as sensitive I'll add
it back to the tree.

llvm-svn: 185084
2013-06-27 17:00:38 +00:00
Sergey Matveev 9450108430 [sanitizer] Support padding with spaces in Printf.
llvm-svn: 185082
2013-06-27 15:30:44 +00:00
Arnold Schwaighofer a2dd195fb3 LoopVectorize: Use vectorized loop invariant gep index anchored in loop
Use vectorized instruction instead of original instruction anchored in the
original loop.

Fixes PR16452 and t2075.c of PR16455.

llvm-svn: 185081
2013-06-27 15:11:55 +00:00
Serge Pavlov 24a3ebb78d Use MCFillFragment for zero-initialized data.
It fixes PR16338 (ICE when compiling very large two-dimensional array).

Differential Revision: http://llvm-reviews.chandlerc.com/D1043

llvm-svn: 185080
2013-06-27 14:35:03 +00:00