summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [SCEV] Replace a struct with a function; NFCSanjoy Das2016-09-271-153/+139
| | | | | | We can do this now thanks to C++11 lambdas. llvm-svn: 282515
* [SCEV] Use find instead of find_as; NFCSanjoy Das2016-09-271-1/+1
| | | | | | We don't need the extra generality here. llvm-svn: 282514
* [SCEV] Reduce the scope of a struct; NFCSanjoy Das2016-09-271-22/+20
| | | | llvm-svn: 282513
* [SCEV] Remove custom RAII wrapper; NFCSanjoy Das2016-09-271-22/+5
| | | | | | Instead use the pre-existing `scope_exit` class. llvm-svn: 282512
* [SCEV] Make PendingLoopPredicates more frugal; NFCISanjoy Das2016-09-272-4/+5
| | | | | | | | | I don't expect `PendingLoopPredicates` to have very many elements (e.g. when -O3'ing the sqlite3 amalgamation, `PendingLoopPredicates` has at most 3 elements). So now we use a `SmallPtrSet` for it instead of the more heavyweight `DenseSet`. llvm-svn: 282511
* [CMake] Use if(... IN_LIST ...) instead of list(FIND...)Chris Bieneman2016-09-271-14/+6
| | | | | | NFC. This is just a little code cleanup to make things easier to read and understand. llvm-svn: 282510
* Mixed type atomic routines for unsigned integers.Jonathan Peyton2016-09-272-0/+36
| | | | | | | | | | New routines should be used for atomics like "<int>OP=<float>" when <int> is unsigned. Using functions __kmpc_atomic_fixed<bits>_<op>_fp) produces incorrect results Differential Revision: https://reviews.llvm.org/D24756 llvm-svn: 282509
* convert TestFatArchives.py over to no-debug-info testTodd Fiala2016-09-271-11/+4
| | | | | | | | | | We only use the .o-style debug info here regardless, so having it run all three debuginfo styles was a waste. This also strips out the custom build function and uses the TestBase.build() method. llvm-svn: 282508
* Disable monitor thread creation by default.Jonathan Peyton2016-09-279-6/+126
| | | | | | | | | | | | | This change set disables creation of the monitor thread by default. The global counter maintained by the monitor thread was replaced by logic that uses system time directly, and cyclic yielding on Linux target was also removed since there was no clear benefit of using it. Turning on KMP_USE_MONITOR variable (=1) enables creation of monitor thread again if it is really necessary for some reasons. Differential Revision: https://reviews.llvm.org/D24739 llvm-svn: 282507
* Propagate DBG_VALUE entries when there are unvisited predecessorsKeith Walker2016-09-272-10/+306
| | | | | | | | | | | | | | | | | Variables are sometimes missing their debug location information in blocks in which the variables should be available. This would occur when one or more predecessor blocks had not yet been visited by the routine which propagated the information from predecessor blocks. This is addressed by only considering predecessor blocks which have already been visited. The solution to this problem was suggested by Daniel Berlin on the LLVM developer mailing list. Differential Revision: https://reviews.llvm.org/D24927 llvm-svn: 282506
* Use xxhash for fast --build-id.Rafael Espindola2016-09-271-50/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The speed improvements I got were: firefox master 7.050784981 patch 6.842361079 0.970439617353 chromium master 4.260626249 patch 4.183148025 0.981815296749 chromium fast master 1.829028591 patch 1.806439277 0.987649556649 the gold plugin master 0.336154128 patch 0.331893374 0.987324998728 clang master 0.561869781 patch 0.558640828 0.994253200458 llvm-as master 0.034025959 patch 0.033984389 0.99877828572 the gold plugin fsds master 0.360710529 patch 0.356483564 0.988281559145 clang fsds master 0.640518422 patch 0.632329874 0.987215749432 llvm-as fsds master 0.031569416 patch 0.030822055 0.976326423017 scylla master 3.154770529 patch 3.11982016 0.988921422754 llvm-svn: 282505
* Revert "Adapt to LLVM optimization remark interface change. NFC"Adam Nemet2016-09-271-1/+1
| | | | | | This reverts commit r282500. llvm-svn: 282504
* Revert "Output optimization remarks in YAML"Adam Nemet2016-09-2710-331/+10
| | | | | | | | This reverts commit r282499. The GCC bots are failing llvm-svn: 282503
* Add llvm::join_items to StringExtras.Zachary Turner2016-09-273-1/+108
| | | | | | | | | | | | | | | | llvm::join_items is similar to llvm::join, which produces a string by concatenating a sequence of values together separated by a given separator. But it differs in that the arguments to llvm::join() are same-type members of a container, whereas the arguments to llvm::join_items are arbitrary types passed into a variadic template. The only requirement on parameters to llvm::join_items (including for the separator themselves) is that they be implicitly convertible to std::string or have an overload of std::string::operator+ Differential Revision: https://reviews.llvm.org/D24880 llvm-svn: 282502
* [lit] Fix refacto introduced by rL282479.Daniel Dunbar2016-09-271-1/+3
| | | | llvm-svn: 282501
* Adapt to LLVM optimization remark interface change. NFCAdam Nemet2016-09-271-1/+1
| | | | llvm-svn: 282500
* Output optimization remarks in YAMLAdam Nemet2016-09-2710-10/+331
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows various presentation of this data using an external tool. This was first recommended here[1]. As an example, consider this module: 1 int foo(); 2 int bar(); 3 4 int baz() { 5 return foo() + bar(); 6 } The inliner generates these missed-optimization remarks today (the hotness information is pulled from PGO): remark: /tmp/s.c:5:10: foo will not be inlined into baz (hotness: 30) remark: /tmp/s.c:5:18: bar will not be inlined into baz (hotness: 30) Now with -pass-remarks-output=<yaml-file>, we generate this YAML file: --- !Missed Pass: inline Name: NotInlined DebugLoc: { File: /tmp/s.c, Line: 5, Column: 10 } Function: baz Hotness: 30 Args: - Callee: foo - String: will not be inlined into - Caller: baz ... --- !Missed Pass: inline Name: NotInlined DebugLoc: { File: /tmp/s.c, Line: 5, Column: 18 } Function: baz Hotness: 30 Args: - Callee: bar - String: will not be inlined into - Caller: baz ... This is a summary of the high-level decisions: * There is a new streaming interface to emit optimization remarks. E.g. for the inliner remark above: ORE.emit(DiagnosticInfoOptimizationRemarkMissed( DEBUG_TYPE, "NotInlined", &I) << NV("Callee", Callee) << " will not be inlined into " << NV("Caller", CS.getCaller()) << setIsVerbose()); NV stands for named value and allows the YAML client to process a remark using its name (NotInlined) and the named arguments (Callee and Caller) without parsing the text of the message. Subsequent patches will update ORE users to use the new streaming API. * I am using YAML I/O for writing the YAML file. YAML I/O requires you to specify reading and writing at once but reading is highly non-trivial for some of the more complex LLVM types. Since it's not clear that we (ever) want to use LLVM to parse this YAML file, the code supports and asserts that we're writing only. On the other hand, I did experiment that the class hierarchy starting at DiagnosticInfoOptimizationBase can be mapped back from YAML generated here (see D24479). * The YAML stream is stored in the LLVM context. * In the example, we can probably further specify the IR value used, i.e. print "Function" rather than "Value". * As before hotness is computed in the analysis pass instead of DiganosticInfo. This avoids the layering problem since BFI is in Analysis while DiagnosticInfo is in IR. [1] https://reviews.llvm.org/D19678#419445 Differential Revision: https://reviews.llvm.org/D24587 llvm-svn: 282499
* Sort headersAdam Nemet2016-09-271-1/+1
| | | | llvm-svn: 282498
* [ELF] - Fixed string encoding in test. NFC.George Rimar2016-09-271-1/+1
| | | | llvm-svn: 282497
* xfail TestExec.py on macOSTodd Fiala2016-09-271-0/+1
| | | | | | | Tracked by: rdar://28476369 llvm-svn: 282496
* [ELF] - Fixed linkage error when using -g --gc-sections together.George Rimar2016-09-272-2/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r282444 introduced new issue, sample program below fails to link on assert(Piece.Live); int main() { return 0; } clang test.cpp -c -o out.o -g ld.lld -flavor gnu --gc-sections out.o -o out Problem is that .debug_info contains relocations to .debug_str: Section (7) .rela.debug_info { .. 0xC R_X86_64_32 .debug_str 0x0 0x12 R_X86_64_32 .debug_str 0x37 .. But we do not preserve .debug_str in a right way now. To fix this we should ignore relocations from non-allocatable sections to allocatable to allow GC work at full power, but still should proccess relocations from non-allocatable to non-allocatable sections as usual to mark some parts of debug sections alive to keep them so we do not end up with such assert when trying to access dead pieces. That looks like what gold/ld do, they do not strip .debug_str section from what I saw using sample provided. Thanks to Evgeny Leviant for suggestions about how to fix this. Differential revision: https://reviews.llvm.org/D24967 llvm-svn: 282495
* project_id is from another era in phabricator land and does not provide any ↵Manuel Klimek2016-09-271-1/+0
| | | | | | | | value. Patch by Eitan Adler. llvm-svn: 282494
* Add xxhash to llvm.Rafael Espindola2016-09-275-0/+203
| | | | | | It will be used for fast fingerprinting in lld at least. llvm-svn: 282493
* Update to commit r282488, fix the buildboot failure.Ayman Musa2016-09-271-2/+2
| | | | llvm-svn: 282492
* [SE] Change CoreTests target nameJason Henline2016-09-271-1/+1
| | | | | | | | | | | | | | Summary: Call it StreamExecutorCoreTests in order to prevent collision with targets from other modules. Reviewers: jlebar, jprice Subscribers: beanz, mgorny, jlebar, parallel_libs-commits Differential Revision: https://reviews.llvm.org/D24949 llvm-svn: 282491
* [docs] Fix naming style in the exampleAlexander Kornienko2016-09-271-1/+1
| | | | llvm-svn: 282490
* [AMDGPU] Enable changing instprinter's behavior based on the per-functionKonstantin Zhuravlyov2016-09-273-132/+214
| | | | | | | | | | subtarget This is a prerequisite for coming waitcnt changes Differential Revision: https://reviews.llvm.org/D24939 llvm-svn: 282489
* [avx512] Add aliases to some missing avx512 intrinsics.Ayman Musa2016-09-272-2/+389
| | | | | | Differential Revision:https: //reviews.llvm.org/D24961 llvm-svn: 282488
* [mips] Disable tail calls temporarilySimon Dardis2016-09-2710-55/+55
| | | | | | | | | | Disable tail calls while the remaining bugs are fixed. Enable only for tests. Reviewers: vkalintiris Differential Review: https://reviews.llvm.org/D24912 llvm-svn: 282487
* Workaround ASTMatcher crashes. Added some more test cases.Eric Liu2016-09-272-12/+115
| | | | | | | | | | | | | | | Summary: - UsingDecl matcher crashed when `UsingShadowDecl` has no parent map. Workaround by moving parent check into `UsingDecl`. - FunctionDecl matcher crashed when there is a lambda defined in parameter list (also due to no parent map). Workaround by putting `unless(cxxMethodDecl())` before parent check. Reviewers: klimek, sbenza, aaron.ballman, hokein Subscribers: aaron.ballman, cfe-commits Differential Revision: https://reviews.llvm.org/D24862 llvm-svn: 282486
* [mips] Add rsqrt, recip for MIPSSimon Dardis2016-09-2761-98/+226
| | | | | | | | | | | Add rsqrt.[ds], recip.[ds] for MIPS. Correct the microMIPS definitions for architecture support and register usage. Reviewers: vkalintiris, zoran.jovanoic Differential Review: https://reviews.llvm.org/D24499 llvm-svn: 282485
* Silencing a Sphinx diagnostic with options, again.Aaron Ballman2016-09-271-2/+2
| | | | | | | Warning, treated as error: /opt/llvm/build.attributes.src/tools/clang/docs/CommandGuide/clang.rst:413: WARNING: unknown option: -save-stats=cwd llvm-svn: 282484
* [cmake] Add linker option "-Wl,-z,defs" in standalone buildMichal Gorny2016-09-271-0/+12
| | | | | | | | | | | | | | Add the "-Wl,-z,defs" linker option that is used to prevent underlinking. It is already used by LLVM itself but does not get propagated into stand-alone build of libc++. This patch ensures that the option is passed in independently of whether libc++ is built in-tree or out-of-tree. Patch by Lei Zhang. Differential Revision: https://reviews.llvm.org/D24119 llvm-svn: 282483
* [docs] Make WritingAnLLVMPass.rst up-to-date with current state of thingsAndrey Bokhanko2016-09-271-133/+129
| | | | | | | | | | | | | | | | This patch updates WritingAnLLVMPass.rst to make it in line with current state of things. Specifically: * Makefile instructions replaced with CMake ones * Filenames replaced with correct ones * Example reformatted a bit to make it less confusing and more conforming to LLVM Coding Standards * opt tool output updated with what it actually prints nowdays * "gcse" (which doesn't exist anymore) replaced with "gvn" (which still does) Differential Revision: https://reviews.llvm.org/D24233 llvm-svn: 282482
* [Power9] Builtins for ELF v.2 ABI conformance - front end portionNemanja Ivanovic2016-09-278-10/+1431
| | | | | | | | | | This patch corresponds to review: https://reviews.llvm.org/D24397 It adds the __POWER9_VECTOR__ macro and the -mpower9-vector option along with a number of altivec.h functions (refer to the code review for a list). llvm-svn: 282481
* [include-fixer] Add customized editor settings documents.Haojian Wu2016-09-271-2/+42
| | | | | | | | | | Reviewers: bkramer Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D24719 llvm-svn: 282480
* Trying to fix lldb build breakage probably caused by rL282452Dimitar Vlahovski2016-09-271-11/+11
| | | | llvm-svn: 282479
* [Power9] Builtins for ELF v.2 API conformance - back end portionNemanja Ivanovic2016-09-276-50/+276
| | | | | | | | | | | | | | | | This patch corresponds to review: https://reviews.llvm.org/D24396 This patch adds support for the "vector count trailing zeroes", "vector compare not equal" and "vector compare not equal or zero instructions" as well as "scalar count trailing zeroes" instructions. It also changes the vector negation to use XXLNOR (when VSX is enabled) so as not to increase register pressure (previously this was done with a splat immediate of all ones followed by an XXLXOR). This was done because the altivec.h builtins (patch to follow) use vector negation and the use of an additional register for the splat immediate is not optimal. llvm-svn: 282478
* [clang-move] Use isStaticStorageClass matcher.Haojian Wu2016-09-271-9/+3
| | | | llvm-svn: 282477
* [clang-tidy] Use isStaticStorageClass ast matcher.Haojian Wu2016-09-271-12/+6
| | | | llvm-svn: 282476
* [cmake] Strip possibly-inherited compiler flags in in-tree build onlyMichal Gorny2016-09-271-3/+6
| | | | | | | | | | | | | | | | | | Strip the set of flags (including debug defs, -m32) that could be inherited from top-level LLVM build only when in-tree build is performed. This prevents libcxx from confusingly and undesiredly stripping user-supplied flags e.g. when performing packaging system controlled multi-ABI build. Otherwise, in order to perform 32-bit builds the build scripts would have to use LIBCXX_BUILD_32_BITS. However, -m32 is only one of the many different ABI flags for different targets, and it really makes no sense to add separate CMake options for each possible -m* flag and then keep a mapping from well-known flags to the custom CMake options. Differential Revision: https://reviews.llvm.org/D24809 llvm-svn: 282475
* [ASTMatcher] Clarify isStaticStorageClass and hasStaticStorageDuration ↵Haojian Wu2016-09-273-11/+28
| | | | | | | | | | | | documents. Reviewers: aaron.ballman Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D24928 llvm-svn: 282474
* [X86] Add test case for PR30511 and r282341.Craig Topper2016-09-271-0/+23
| | | | llvm-svn: 282473
* [X86] Expand all-ones-vector test to cover 256-bit and 512-bit vectors.Craig Topper2016-09-271-4/+586
| | | | llvm-svn: 282472
* [X86] Use std::max to calculate alignment instead of assuming RC->getSize() ↵Craig Topper2016-09-271-2/+2
| | | | | | will not return a value greater than 32. I think it theoretically could be 64 for AVX-512. llvm-svn: 282471
* [libc++abi] Default to DLL annotations on WindowsShoaib Meenai2016-09-272-3/+16
| | | | | | | | | | | | `__declspec(dllexport)` and `__declspec(dllimport)` should only be used when building libc++abi as a DLL, but that's the more common use case, so default to adding the annotations and add an option to opt out. Similar to r282449, which made the corresponding change for libc++. Differential Revision: https://reviews.llvm.org/D24945 llvm-svn: 282470
* [libFuzzer] run re2 test in 8 threads by defaultKostya Serebryany2016-09-271-1/+1
| | | | llvm-svn: 282469
* Fix possible division by zeroEric Fiselier2016-09-271-1/+1
| | | | llvm-svn: 282468
* [sanitizer-coverage] fix a bug in trace-gepKostya Serebryany2016-09-273-2/+10
| | | | llvm-svn: 282467
* Remove out of date items in TODO.txtEric Fiselier2016-09-271-23/+1
| | | | llvm-svn: 282466
OpenPOWER on IntegriCloud