summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [Stackmaps] Make ithe frame-pointer required for stackmaps.Juergen Ributzka2014-10-029-14/+16
| | | | | | | | | Do not eliminate the frame pointer if there is a stackmap or patchpoint in the function. All stackmap references should be FP relative. This fixes PR21107. llvm-svn: 218920
* [PECOFF] Use "llvm-readobj -coff-imports" to test the import table.Rui Ueyama2014-10-021-6/+13
| | | | | | -coff-imports is added in r218915. You may have to sync your llvm source tree. llvm-svn: 218919
* Revert "DI: Fold constant arguments into a single MDString"Duncan P. N. Exon Smith2014-10-02354-6804/+6705
| | | | | | This reverts commit r218914 while I investigate some bots. llvm-svn: 218918
* Revert "DI: LLVM schema change: fold constants into string"Duncan P. N. Exon Smith2014-10-0259-215/+210
| | | | | | This reverts commit r218913 while I investigate some bots. llvm-svn: 218917
* Rename data -> DataRui Ueyama2014-10-022-5/+5
| | | | llvm-svn: 218916
* llvm-readobj: print COFF imported symbolsRui Ueyama2014-10-024-4/+141
| | | | | | | | This patch defines a new iterator for the imported symbols. Make a change to COFFDumper to use that iterator to print out imported symbols and its ordinals. llvm-svn: 218915
* DI: Fold constant arguments into a single MDStringDuncan P. N. Exon Smith2014-10-02354-6705/+6804
| | | | | | | | | | | | | This patch addresses the first stage of PR17891 by folding constant arguments together into a single MDString. Integers are stringified and a `\0` character is used as a separator. Part of PR17891. Note: I've attached my testcases upgrade scripts to the PR. If I've just broken your out-of-tree testcases, they might help. llvm-svn: 218914
* DI: LLVM schema change: fold constants into stringDuncan P. N. Exon Smith2014-10-0259-210/+215
| | | | | | | | | Update debug info testcases for an LLVM metadata schema change to fold metadata constant operands into a single `MDString`. Part of PR17891. llvm-svn: 218913
* Reflowing some comments, NFC.Aaron Ballman2014-10-021-7/+6
| | | | llvm-svn: 218912
* [x86] Teach the new vector shuffle lowering to widen floating pointChandler Carruth2014-10-024-18/+213
| | | | | | | | | | | | | | | | | | | elements as well as integer elements in order to form simpler shuffle patterns. This is the primary reason why we were failing to match some of the 2-and-2 floating point shuffles such as PR21140. Even after fixing this we need to support some extra patterns in the backend in order to match the resulting X86ISD::UNPCKL nodes into the correct instructions. This commit should fix PR21140 and includes more comprehensive testing of insertion patterns in v4 shuffles. Not all of the added tests are beautiful. For example, we don't have clever instructions to insert-via-load in the integer domain. There are also some places where we aren't sufficiently cunning with our use of movq and movd, but that's future work. llvm-svn: 218911
* Initial support for the align_value attributeHal Finkel2014-10-0211-2/+210
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for the align_value attribute. This attribute is supported by Intel's compiler (versions 14.0+), and several of my HPC users have requested support in Clang. It specifies an alignment assumption on the values to which a pointer points, and is used by numerical libraries to encourage efficient generation of vector code. Of course, we already have an aligned attribute that can specify enhanced alignment for a type, so why is this additional attribute important? The problem is that if you want to specify that an input array of T is, say, 64-byte aligned, you could try this: typedef double aligned_double attribute((aligned(64))); void foo(aligned_double *P) { double x = P[0]; // This is fine. double y = P[1]; // What alignment did those doubles have again? } the access here to P[1] causes problems. P was specified as a pointer to type aligned_double, and any object of type aligned_double must be 64-byte aligned. But if P[0] is 64-byte aligned, then P[1] cannot be, and this access causes undefined behavior. Getting round this problem requires a lot of awkward casting and hand-unrolling of loops, all of which is bad. With the align_value attribute, we can accomplish what we'd like in a well defined way: typedef double *aligned_double_ptr attribute((align_value(64))); void foo(aligned_double_ptr P) { double x = P[0]; // This is fine. double y = P[1]; // This is fine too. } This attribute does not create a new type (and so it not part of the type system), and so will only "propagate" through templates, auto, etc. by optimizer deduction after inlining. This seems consistent with Intel's implementation (thanks to Alexey for confirming the various Intel-compiler behaviors). As a final note, I would have chosen to call this aligned_value, not align_value, for better naming consistency with the aligned attribute, but I think it would be more useful to users to adopt Intel's name. llvm-svn: 218910
* Remove unused function attribute params.Sanjay Patel2014-10-021-2/+2
| | | | llvm-svn: 218909
* Add FreeBSD test failure decoratorsEd Maste2014-10-023-0/+3
| | | | llvm-svn: 218908
* LTO: Document the Boolean argument from r218784Duncan P. N. Exon Smith2014-10-021-1/+2
| | | | llvm-svn: 218907
* Optimize square root squared (PR21126).Sanjay Patel2014-10-022-0/+34
| | | | | | | | | | | When unsafe-fp-math is enabled, we can turn sqrt(X) * sqrt(X) into X. This can happen in the real world when calculating x ** 3/2. This occurs in test-suite/SingleSource/Benchmarks/BenchmarkGame/n-body.c. Differential Revision: http://reviews.llvm.org/D5584 llvm-svn: 218906
* Add __sync_fetch_and_nand (again)Hal Finkel2014-10-027-13/+144
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prior to GCC 4.4, __sync_fetch_and_nand was implemented as: { tmp = *ptr; *ptr = ~tmp & value; return tmp; } but this was changed in GCC 4.4 to be: { tmp = *ptr; *ptr = ~(tmp & value); return tmp; } in response to this change, support for sync_fetch_and_nand (and sync_nand_and_fetch) was removed in r99522 in order to avoid miscompiling code depending on the old semantics. However, at this point: 1. Many years have passed, and the amount of code relying on the old semantics is likely smaller. 2. Through the work of many contributors, all LLVM backends have been updated such that "atomicrmw nand" provides the newer GCC 4.4+ semantics (this process was complete July of 2014 (added to the release notes in r212635). 3. The lack of this intrinsic is now a needless impediment to porting codes from GCC to Clang (I've now seen several examples of this). It is true, however, that we still set GNUC_MINOR to 2 (corresponding to GCC 4.2). To compensate for this, and to address the original concern regarding code relying on the old semantics, I've added a warning that specifically details the fact that the semantics have changed and that we provide the newer semantics. Fixes PR8842. llvm-svn: 218905
* Limit test to DarwinEd Maste2014-10-021-0/+1
| | | | | | Test requres <Foundation/Foundation.h> llvm-svn: 218904
* [x86] Move the vperm2f128 test to be vperm2x128 and test both theChandler Carruth2014-10-023-116/+217
| | | | | | | | | floating point and integer domains. Merge the AVX2 test into it and add an extra RUN line. Generate clean FileCheck statements with my script. Remove the now merged AVX2 tests. llvm-svn: 218903
* Fix stale comments in new tests.Todd Fiala2014-10-021-2/+6
| | | | | | Dang. llvm-svn: 218901
* thread state coordinator: add tests and impl to error on creation/death issues.Todd Fiala2014-10-023-7/+49
| | | | | | | | Added tests and impl to make sure the following errors are reported: * Notifying a created thread that we are already tracking. * Notifying a thread death for a thread we don't know about. llvm-svn: 218900
* Add ENABLE_THREADS for these threaded testsEd Maste2014-10-022-0/+2
| | | | | | On at least FreeBSD linking with -lpthread is needed for std::thread. llvm-svn: 218899
* [clang-tidy] Add check misc-braces-around-statements.Alexander Kornienko2014-10-026-0/+787
| | | | | | | | | | | | | | | | | | | | | | | | | | | This check looks for if statements and loops: for, range-for, while and do-while, and verifies that the inside statements are inside braces '{}'. If not, proposes to add braces around them. Example: if (condition) action(); becomes if (condition) { action(); } This check ought to be used with the -format option, so that the braces be well-formatted. Patch by Marek Kurdej! http://reviews.llvm.org/D5395 llvm-svn: 218898
* thread state coordinator: added simpler deferred stop notification method.Todd Fiala2014-10-023-33/+214
| | | | | | | | | | | | | | | Now that ThreadStateCoordinator errors out on threads in unexpected states, it has enough information to know which threads need stop requests fired when we want to do a deferred callback on a thread's behalf. This change adds a new method, CallAfterRunningThreadsStop(...), which no longer takes a set of thread ids that require stop requests. It's much harder to misuse this method and (with newer error logic) it's harder to correctly use the original method. Expect the original method that takes the set of thread ids to stop to disappear in the near future. Adds several tests for CallAfterRunningThreadsStop(). llvm-svn: 218897
* Make this test case a little more resilient to class name changesEnrico Granata2014-10-021-1/+1
| | | | llvm-svn: 218896
* Diagnose mixed use of '_' and '.' as versionFariborz Jahanian2014-10-023-2/+15
| | | | | | separators in my previous patch. llvm-svn: 218895
* [mach-o] preserve custom section names on coalesable stringsNick Kledzik2014-10-022-5/+114
| | | | llvm-svn: 218894
* Preserve custom section names when coalescing.Nick Kledzik2014-10-022-0/+84
| | | | | | | | | | | | The mergeByContent attribute on DefinedAtoms triggers the symbol table to coalesce atoms with the exact same content. The problem is that atoms can also have a required custom section. The coalescing should never change the custom section of an atom. The fix is to only consider to atoms to have the same content if their sectionChoice() and customSectionName() attributes match. llvm-svn: 218893
* InstrProf: Avoid linear search in a hot loopJustin Bogner2014-10-022-10/+41
| | | | | | | | | | Every time we were adding or removing an expression when generating a coverage mapping we were doing a linear search to try and deduplicate the list. The indices in the list are important, so we can't just replace it by a DenseMap entirely, but an auxilliary DenseMap for fast lookup massively improves the performance issues I was seeing here. llvm-svn: 218892
* This patch adds a new flag "-coff-imports" to llvm-readobj.Rui Ueyama2014-10-028-5/+68
| | | | | | | | | | | | | | When the flag is given, the command prints out the COFF import table. Currently only the import table directory will be printed. I'm going to make another patch to print out the imported symbols. The implementation of import directory entry iterator in COFFObjectFile.cpp was buggy. This patch fixes that too. http://reviews.llvm.org/D5569 llvm-svn: 218891
* Fix codesigning of MacOSX debugserver when built with cmake.Todd Fiala2014-10-022-2/+4
| | | | | | | | | | | | | | | | This patch fixes the codesigning of debugserver on OSX when built with cmake. Without this you get this error when debugging: error: process launch failed: unable to locate debugserver Note: you also need to set LLDB_DEBUGSERVER_PATH to point to your built debugserver. e.g. export LLDB_DEBUGSERVER_PATH=`pwd`/bin/debugserver Change by dawn@burble.org. Tested on MacOSX 10.9.5 and Xcode 6.1 Beta using cmake/ninja. Verified no build break on Linux Ubuntu cmake/ninja and Xcode 6.1 canonical build. llvm-svn: 218890
* [x32/NaCl] Check if method pointers straddle an eightbyte to classify HiJan Wen Voung2014-10-023-3/+77
| | | | | | | | | | | | | | | | | | | | Summary: Currently, with struct my_struct { int x; method_ptr y; }; a call to foo(my_struct s) may end up dropping the last 4 bytes of the method pointer for x86_64 NaCl and x32. When checking Has64BitPointers, also check if the method pointer straddles an eightbyte boundary and classify Hi as well as Lo if needed. Test Plan: test/CodeGenCXX/x86_64-arguments-nacl-x32.cpp Reviewers: dschuff, pavel.v.chupin Subscribers: jfb Differential Revision: http://reviews.llvm.org/D5555 llvm-svn: 218889
* Reapply "InstrProf: Update for the LLVM API change in r218879"Justin Bogner2014-10-023-15/+7
| | | | | | | | Reapplying now that r218887 is in. This reverts commit r218882, reapplying r218880. llvm-svn: 218888
* Reapply "InstrProf: Don't keep a large sparse list around just to zero it"Justin Bogner2014-10-022-32/+50
| | | | | | | | | | When I was preparing r218879 for commit, I removed an early return that I decided was just noise. It wasn't. This is r218879 no-crash edition. This reverts commit r218881, reapplying r218879. llvm-svn: 218887
* Remove an extra whitespace.Adrian Prantl2014-10-021-1/+1
| | | | llvm-svn: 218886
* Pretty-printer: Paper over an ambiguity between line table entriesAdrian Prantl2014-10-021-1/+3
| | | | | | | | and tagged mdnodes. fixes http://llvm.org/bugs/show_bug.cgi?id=21131 llvm-svn: 218885
* Patch to accept '_' in addition to '.' as versionFariborz Jahanian2014-10-022-3/+100
| | | | | | | number separator in "availability" attribute. rdar://18490958 llvm-svn: 218884
* Align copied load/store instructions as the original.Johannes Doerfert2014-10-026-6/+112
| | | | | | | | | | This also forbids the json importer to access other memory locations than the original instruction as we to reuse the alignment of the original load/store. Differential Revision: http://reviews.llvm.org/D5560 llvm-svn: 218883
* Revert "InstrProf: Update for the LLVM API change in r218879"Justin Bogner2014-10-023-7/+15
| | | | | | | | r218879 has been reverted for now, this needs to go to match. This reverts commit r218880. llvm-svn: 218882
* Revert "InstrProf: Don't keep a large sparse list around just to zero it"Justin Bogner2014-10-022-45/+32
| | | | | | | | This seems to be crashing on some buildbots. Reverting to investigate. This reverts commit r218879. llvm-svn: 218881
* InstrProf: Update for the LLVM API change in r218879Justin Bogner2014-10-023-15/+7
| | | | llvm-svn: 218880
* InstrProf: Don't keep a large sparse list around just to zero itJustin Bogner2014-10-022-32/+45
| | | | | | | | | | | | | | | | | | | | The Terms vector here represented a polynomial of of all possible counters, and is used to simplify expressions when generating coverage mapping. There are a few problems with this: 1. Keeping the vector as a member is wasteful, since we clear it every time we use it. 2. Most expressions refer to a subset of the counters, so we end up iterating over a large number of zeros doing nothing a lot of the time. This updates the user of the vector to store the terms locally, and uses a sort and combine approach so that we only operate on counters that are actually used in a given expression. For small cases this makes very little difference, but in cases with a very large number of counted regions this is a significant performance fix. llvm-svn: 218879
* [Refactor] Rename LoopAnnotator to ScopAnnotatorJohannes Doerfert2014-10-025-19/+19
| | | | | | | | | The LoopAnnotator doesn't annotate only loops any more, thus it is called ScopAnnotator from now on. This also removes unnecessary polly:: namespace tags. llvm-svn: 218878
* Allow to annotate alias scopes in the new SCoP.Johannes Doerfert2014-10-028-34/+225
| | | | | | | | | The command line flag -polly-annotate-alias-scopes controls whether or not Polly annotates alias scopes in the new SCoP (default ON). This can improve later optimizations as the new SCoP is basically an alias free environment for them. llvm-svn: 218877
* Use the local variable that other clauses around here are already using.Sanjay Patel2014-10-021-1/+1
| | | | llvm-svn: 218876
* Remove duplicate function names from comments. NFC.Sanjay Patel2014-10-021-43/+35
| | | | llvm-svn: 218875
* [NVPTX] Remove dead code.Tilmann Scheller2014-10-021-9/+3
| | | | | | Found by the Clang static analyzer. llvm-svn: 218874
* Fix up stale comments from last change.Todd Fiala2014-10-021-2/+2
| | | | llvm-svn: 218873
* thread state coordinator: requesting resume now signals error appropriately.Todd Fiala2014-10-022-8/+37
| | | | | | | | | | Added tests to verify that the coordinator signals an error if the given thread to resume is unknown, and if the thread is through to be running already. Modified resume handling code to match tests. llvm-svn: 218872
* gtest runner: now always does a clean step after running.Todd Fiala2014-10-021-13/+25
| | | | | | | | | | * Checks for any 'clean' arg, setting clean-only mode. * If clean-only mode, skip the make. * Adds the equivalent of os.devnull in a way that supports the file-like 'write' operation. * Uses a null sysout/syserr for the clean step so we don't see noise from cleaning. * Now always runs the clean step after a real test run so we don't have cruft left over after a test run. llvm-svn: 218871
* Support padding unaligned data in .text.Joerg Sonnenberger2014-10-022-1/+10
| | | | llvm-svn: 218870
OpenPOWER on IntegriCloud