summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [IRCE] Fix corner case with Start = INT_MAXMax Kazantsev2017-07-142-5/+126
| | | | | | | | | | | | | | | | | | | | When iterating through loop for (int i = INT_MAX; i > 0; i--) We fail to generate the pre-loop for it. It happens because we use the overflown value in a comparison predicate when identifying whether or not we need it. In old logic, we used SLE predicate against Greatest value which exceeds all seen values of the IV and might be overflown. Now we use the GreatestSeen value of this IV with SLT predicate. Also added a test that ensures that a pre-loop is generated for such loops. Differential Revision: https://reviews.llvm.org/D35347 llvm-svn: 308001
* [opt-viewer] Flush stdout after progress updateAdam Nemet2017-07-141-0/+1
| | | | | | | Without this, there was no progress shown during parsing but only during rendering on macOS. llvm-svn: 308000
* Add a set of comments explaining why getSubtargetImpl() is deleted on these ↵Eric Christopher2017-07-144-0/+8
| | | | | | targets. llvm-svn: 307999
* [lld] Update Windows support docsShoaib Meenai2017-07-141-4/+1
| | | | | | | | | | | The /appcontainer flag was added in r299728, and the lib.exe dependency for creating import libraries was removed in r275242. Update the docs accordingly. The PDB support also needs updating, but I'll leave that for someone who's more familiar with the current status (probably rnk). llvm-svn: 307998
* [libc++] Clean up cl warning 4231 disablingShoaib Meenai2017-07-143-21/+0
| | | | | | | | | Once upon a time, extern templates used to be a Microsoft extension, so cl would warn about their usage, and libc++ suppressed that warning. They've long since been standardized, so the warning is defunct. (libc++ also doesn't currently support building with cl anyway.) llvm-svn: 307997
* [SLPVectorizer] Add an extra parameter to alreadyVectorized function, NFCI.Dinar Temirbulatov2017-07-141-8/+8
| | | | llvm-svn: 307996
* Add release notes for the overloadable attributeGeorge Burgess IV2017-07-141-1/+3
| | | | llvm-svn: 307995
* Use EXPECT_TRUE rather than EXPECT_EQ(true, ...) to clean up the code and ↵Eric Christopher2017-07-141-2/+2
| | | | | | silence a null conversion warning. llvm-svn: 307989
* Change dyn_casts with unused variables to isa statements to avoid unused ↵Eric Christopher2017-07-142-3/+3
| | | | | | variables. llvm-svn: 307988
* Remove set but not used variables from the debug info verifier code.Eric Christopher2017-07-141-6/+1
| | | | llvm-svn: 307987
* [ODRHash] Avoid taking the types of FunctionDecl'sRichard Trieu2017-07-142-1/+19
| | | | | | | | FunctionDecl already hashes most of the information in the function's type. Add hashing of the return type, and skip hashing the function's type to avoid redundancy and extra work when computing the hash. llvm-svn: 307986
* [CMake]Use LLVM_LIBRARY_DIR for lib path.Leo Li2017-07-141-3/+5
| | | | | | | | | | | | | | Summary: This makes sure the correct lib path is being used when `CMAKE_CFG_INTDIR` or `LLVM_LIBDIR_SUFFIX` is set. Reviewers: beanz Subscribers: mgorny, srhines, pirama, llvm-commits Differential Revision: https://reviews.llvm.org/D35318 llvm-svn: 307985
* ELF: Exclude dead symbols from -Map output.Peter Collingbourne2017-07-142-1/+10
| | | | | | | | | This was previously erroring out if one of the dead symbols was a TLS symbol and we were able to discard all TLS sections. Differential Revision: https://reviews.llvm.org/D35397 llvm-svn: 307984
* ELF: Reword a somewhat misleading error message.Peter Collingbourne2017-07-142-3/+3
| | | | | | | | | | | PT_TLS is a type of program header, so we wouldn't expect to see one in an object file. This error should probably be referring to the fact that we didn't see a section with the flag SHF_TLS, which would normally cause us to create a PT_TLS program header. Differential Revision: https://reviews.llvm.org/D35395 llvm-svn: 307983
* [Driver] Respect -target when determining target platform on AppleAkira Hatanaka2017-07-142-19/+61
| | | | | | | | | | | | | | platforms. Set the target OS based on -target if it is present on the command line and -arch is not. With this commit, "-target x86_64-apple-ios8.0" does the same thing as "-arch x86_64 -mios-version-min=8.0". rdar://problem/21012522 llvm-svn: 307982
* [libFuzzer] update the comments in afl/afl_driver.cppKostya Serebryany2017-07-141-2/+2
| | | | llvm-svn: 307981
* [libFuzzer] remove stale code; NFCKostya Serebryany2017-07-143-52/+0
| | | | llvm-svn: 307980
* [PDB] Put LLD's PDB writing code in a class NFCReid Kleckner2017-07-141-122/+167
| | | | | | | | | | | | | | | | | | | | | | | Summary: We've accumulated about five or so data structures that are widely referenced: - PDBBuilder - Type table - Id table - PDB string table - Type server handler I'm about to rewrite type server handling, and I need a new class in LLD where I can put its state. By creating a new PDBLinker class, I hope to put it there next. Reviewers: ruiu Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D35392 llvm-svn: 307979
* AMDGPU: Detect kernarg segment pointerMatt Arsenault2017-07-1411-27/+94
| | | | | | | | This is necessary to pass the kernarg segment pointer to callee functions. Also don't unconditionally enable for kernels. llvm-svn: 307978
* [libFuzzer] simplify the handling of memmem/strstrKostya Serebryany2017-07-1410-129/+61
| | | | llvm-svn: 307977
* [AMDGPU] fcaninicalize optimization for GFX9+Stanislav Mekhanoshin2017-07-133-14/+79
| | | | | | | | | | | | | | Since GFX9 supports denorm modes for v_min_f32/v_max_f32 that is possible to further optimize fcanonicalize and remove it if applied to min/max given their operands are known not to be an sNaN or that sNaNs are not supported. Additionally we can remove fcanonicalize if denorms are supported for the VT and we know that its argument is never a NaN. Differential Revision: https://reviews.llvm.org/D35335 llvm-svn: 307976
* [DWARF] Introduce verification for the unit header chain in .debug_info ↵Spyridoula Gravani2017-07-135-0/+235
| | | | | | | | | | | | | | | section to llvm-dwarfdump. This patch adds verification checks for the unit header chain in the .debug_info section. Specifically, for each unit in the .debug_info section, the verifier checks that: The unit length is valid (i.e. the unit can actually fit in the .debug_info section) The dwarf version of the unit is valid The address size is valid (4 or 8) The unit type (if the unit is in dwarf5) is valid The debug_abbrev_offset is valid llvm-svn: 307975
* [Dominators] Define Arc less-than operator inline.Jakub Kuderski2017-07-132-7/+5
| | | | | | This fixes warnings on some buildbots. llvm-svn: 307974
* [libFuzzer] move code around; NFCKostya Serebryany2017-07-132-69/+60
| | | | llvm-svn: 307973
* [libc++] class template -> template class. NFCShoaib Meenai2017-07-131-1/+1
| | | | llvm-svn: 307972
* Fix build due to const-correctness issue after last minute refactoringReid Kleckner2017-07-131-1/+1
| | | | llvm-svn: 307971
* [PDB] Fix quadratic behavior when writing a BinaryItemStreamReid Kleckner2017-07-131-13/+26
| | | | | | | | | | | | | | | | | | Binary streams are an abstraction over a discontiguous buffer. To write a discontiguous buffer, we want to copy each contiguous chunk individually. Currently BinaryStreams do not expose a way to iterate over the chunks, so the code repeatedly calls readLongestContiguousChunk() with an increasing offset. In order to lookup the chunk by offset, we would iterate the items list to figure out which chunk the offset is within. This is obviously O(n^2). Instead, pre-compute a table of offsets and do a binary search to figure out which chunk to use. This is still only an O(n^2) to O(n log n) improvement, but it's a very local fix that seems worth doing. This improves self-linking lld.exe with PDBs from 90s to 10s. llvm-svn: 307970
* Fix sanitizer build against latest glibcKostya Serebryany2017-07-134-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: libsanitizer doesn't build against latest glibc anymore, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81066 for details. One of the changes is that stack_t changed from typedef struct sigaltstack { ... } stack_t; to typedef struct { ... } stack_t; for conformance reasons. And the other change is that the glibc internal __need_res_state macro is now ignored, so when doing ``` #define __need_res_state #include <resolv.h> ``` the effect is now the same as just ``` #include <resolv.h> ``` and thus one doesn't get just the ``` struct __res_state { ... }; ``` definition, but newly also the ``` extern struct __res_state *__res_state(void) __attribute__ ((__const__)); ``` prototype. So __res_state is no longer a type, but a function. Reviewers: kcc, ygribov Reviewed By: kcc Subscribers: kubamracek Differential Revision: https://reviews.llvm.org/D35246 llvm-svn: 307969
* [Dominators] Rename Update.Arc to Update.EdgeJakub Kuderski2017-07-132-7/+7
| | | | | | Update.Arc of type Arc caused a warning on some buildbots. llvm-svn: 307968
* AMDGPU: Annotate call graph with used featuresMatt Arsenault2017-07-133-68/+344
| | | | | | | Previously this wouldn't detect used features indirectly used in callee functions. llvm-svn: 307967
* [libc++] Mark string operator+ _LIBCPP_FUNC_VISShoaib Meenai2017-07-132-2/+3
| | | | | | | | | | | | | | | It has an extern template instantiation declaration in the headers and a corresponding instantiation definition in the library, so we must mark it with _LIBCPP_FUNC_VIS to make it available outside the library. This doesn't cause any ABI changes as-is since we don't build libc++ with hidden visibility (so the function is exported anyway). It's needed for building libc++ with hidden visibility, however. Clarify the Windows behavior for extern function templates while I'm here, since this exercises that behavior. llvm-svn: 307966
* [libc++] Remove unused _LIBCPP_FUNC_VIS_ONLYShoaib Meenai2017-07-131-5/+0
| | | | | | This has been unused since r282644. llvm-svn: 307965
* [PS4] Disable LTO unit features under ThinLTO, like for Darwin.Paul Robinson2017-07-132-4/+7
| | | | llvm-svn: 307964
* [Dominators] Add CFGBuilder testing utilityJakub Kuderski2017-07-133-0/+366
| | | | | | | | | | | | | | | | | | | Summary: This patch introduces a new testing utility for building and modifying CFG -- CFGBuilder. The primary use case for the utility is testing the upcoming incremental dominator tree update API. The current design provides a simple mechanism of constructing arbitrary graphs and then applying series of updates to them. CFGBuilder takes care of creating empty functions, connecting and disconnecting basic blocks. Under the hood it uses SwitchInst and UnreachableInst. It will be also possible to create a thin wrapper over CFGBuilder for parsing string input and to hook it up to other textual tools (e.g. opt used with FileCheck). Reviewers: dberlin, sanjoy, grosser, dblaikie Reviewed By: dblaikie Subscribers: davide, mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D34798 llvm-svn: 307960
* Use getNameAsString instead of getName to get method names when dumpingLang Hames2017-07-131-6/+2
| | | | | | | | overrides: getName can fail if the decl's name isn't a simple identifier. This is a more general replacement for the fix in r305860. llvm-svn: 307959
* [scudo] Do not grab a cache for secondary allocation & per related changesKostya Kortchinsky2017-07-132-55/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Secondary backed allocations do not require a cache. While it's not necessary an issue when each thread has its cache, it becomes one with a shared pool of caches (Android), as a Secondary backed allocation or deallocation holds a cache that could be useful to another thread doing a Primary backed allocation. We introduce an additional PRNG and its mutex (to avoid contention with the Fallback one for Primary allocations) that will provide the `Salt` needed for Secondary backed allocations. I changed some of the code in a way that feels more readable to me (eg: using some values directly rather than going through ternary assigned variables, using directly `true`/`false` rather than `FromPrimary`). I will let reviewers decide if it actually is. An additional change is to mark `CheckForCallocOverflow` as `UNLIKELY`. Reviewers: alekseyshl Reviewed By: alekseyshl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D35358 llvm-svn: 307958
* Fix debugserver accepting remote connectionsChris Bieneman2017-07-134-3/+32
| | | | | | | | While adding IPv6 support to debugserver I broke handling wildcard addresses and fully qualified address filtering. This patch resolves that bug and adds a test for matching the address "*". <rdar://problem/32947613> llvm-svn: 307957
* [ubsan] Teach the pointer overflow check that "p - <unsigned> <= p" ↵Vedant Kumar2017-07-132-9/+21
| | | | | | | | (compiler-rt) Compiler-rt changes associated with: D34121 llvm-svn: 307956
* [ubsan] Teach the pointer overflow check that "p - <unsigned> <= p" (PR33430)Vedant Kumar2017-07-134-20/+44
| | | | | | | | | | | | | | | | | | | | | The pointer overflow check gives false negatives when dealing with expressions in which an unsigned value is subtracted from a pointer. This is summarized in PR33430 [1]: ubsan permits the result of the subtraction to be greater than "p", but it should not. To fix the issue, we should track whether or not the pointer expression is a subtraction. If it is, and the indices are unsigned, we know to expect "p - <unsigned> <= p". I've tested this by running check-{llvm,clang} with a stage2 ubsan-enabled build. I've also added some tests to compiler-rt, which are in D34122. [1] https://bugs.llvm.org/show_bug.cgi?id=33430 Differential Revision: https://reviews.llvm.org/D34121 llvm-svn: 307955
* [libc++] Use proper template terminology. NFCShoaib Meenai2017-07-131-3/+3
| | | | | | | It's supposed to be "class template" and "function template" instead of "template class" and "template function". llvm-svn: 307954
* [Dominators] Simplify templatesJakub Kuderski2017-07-134-79/+36
| | | | | | | | | | | | | | Summary: DominatorTreeBase and related classes used overcomplicated template machinery. This patch simplifies them and gets rid of DominatorTreeBaseTraits and DominatorTreeBaseByTraits, which weren't actually used outside the DomTree construction. Reviewers: dberlin, sanjoy, davide, grosser Reviewed By: dberlin, davide, grosser Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D35285 llvm-svn: 307953
* [Orc] Fix some Error-related fixmes in CompileOnDemandLayer now that the layerLang Hames2017-07-131-12/+11
| | | | | | interface has been errorized. llvm-svn: 307952
* [InstCombine] put tests for commuted variants of the same fold together; NFCSanjay Patel2017-07-131-44/+66
| | | | llvm-svn: 307951
* [Dominators] Split SemiNCA into smaller functionsJakub Kuderski2017-07-131-58/+77
| | | | | | | | | | | | | | | | | Summary: This patch splits the SemiNCA algorithm into smaller functions. It also adds a new debug macro. In order to perform incremental updates, we need to be able to refire SemiNCA on a subset of CFG nodes (determined by a DFS walk results). We also need to skip nodes that are not deep enough in a DomTree. Reviewers: dberlin, davide, sanjoy, grosser Reviewed By: dberlin, davide Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D35282 llvm-svn: 307950
* Move feature-specific functions out of Strings.cpp.Rui Ueyama2017-07-134-26/+23
| | | | | | | | Functions declared in Strings.h should provide generic string operations for the linker, but some of them are too specific to some features. This patch moves them to the location where they are used. llvm-svn: 307949
* [COFF] Bounds check relocationsReid Kleckner2017-07-133-1/+71
| | | | | | | | | | | | | | | | | | Summary: This would have caught the invalid object file I used in my test case in r307726. The OOB was only caught by ASan later, which is slow and doesn't work on some platforms. LLD should do some basic input validation itself. This check isn't perfect, so relocations can reach OOB by up to seven bytes, but it's better than what we had and probably cheap. Reviewers: ruiu Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D35371 llvm-svn: 307948
* [NFC] Move DEBUG_TYPE below includes in HexagonJakub Kuderski2017-07-137-14/+14
| | | | llvm-svn: 307947
* [PDB] Fix type server handling for archivesReid Kleckner2017-07-136-19/+154
| | | | | | | | | | | | | | | | | | | Summary: This fixes type indices for SDK or CRT static archives. Previously we'd try to look next to the archive object file path, which would not exist on the local machine. Also error out if we can't resolve a type server record. Hypothetically we can recover from this error by discarding debug info for this object, but that is not yet implemented. Reviewers: ruiu, amccarth Subscribers: aprantl, hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D35369 llvm-svn: 307946
* For Darwin's GetTaskInfoMaxAddress, define the real structure with real ↵Kuba Mracek2017-07-131-5/+26
| | | | | | fields to avoid confusion. NFC. llvm-svn: 307945
* Enable parsing C++ names generated by lambda functions.Jim Ingham2017-07-133-0/+39
| | | | | | https://reviews.llvm.org/D34911 from Weng Xuetian. llvm-svn: 307944
OpenPOWER on IntegriCloud