summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [X86] Remove 'barcelona' string from getHostCPUName. Use 'amdfam10' instead. ↵Craig Topper2017-07-121-2/+0
| | | | | | The x86 backend doesn't distinguish. llvm-svn: 307755
* [MemoryBuiltins] Allow truncation in visitAllocaInst()Mikael Holmen2017-07-122-17/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Solves PR33689. If the pointer size is less than the size of the type used for the array size in an alloca (the <ty> type below) then we could trigger the assert in the PR. In that example we have pointer size i16 and <ty> is i32. <result> = alloca [inalloca] <type> [, <ty> <NumElements>] [, align <alignment>] Handle the situation by allowing truncation as well as zero extension in ObjectSizeOffsetVisitor::visitAllocaInst(). Also, we now detect overflow in visitAllocaInst(), similar to how it was already done in visitCallSite(). Reviewers: craig.topper, rnk, george.burgess.iv Reviewed By: george.burgess.iv Subscribers: davide, llvm-commits Differential Revision: https://reviews.llvm.org/D35003 llvm-svn: 307754
* Revert "[PDB] Use a more appropriate message for a fatal error"Vitaly Buka2017-07-122-154/+10
| | | | | | | | | | Revert "[PDB] Tweak bad type index error handling" check-lld with asan detects use-after-poison. This reverts commits r307733 and r307726. llvm-svn: 307752
* Fix unrepresentable enum for clang-cl unstable ABIBen Craig2017-07-121-8/+8
| | | | | | | | | | | | | | When using LIBCXX_ABI_UNSTABLE=YES, clang-cl gave the following warning: P:\llvm_master\src\llvm\projects\libcxx\include\string(683,51): warning: enumerator value is not representable in the underlying type 'int' [-Wmicrosoft-enum-value] Fixed by switching from enums to static const size_type. https://reviews.llvm.org/D35174 llvm-svn: 307751
* Remove redundant newline.Rui Ueyama2017-07-121-1/+1
| | | | llvm-svn: 307750
* Remove <__refstring> header; Move it into source directory.Eric Fiselier2017-07-122-4/+4
| | | | | | | | | | | | | | | | | | | | The libc++ <__refstring> headers has no real reason why it should be a public header that libc++ ships. The only reason it was in the include directory was because libc++abi needed it to build the library. However keeping <__refstring> a header had other problems, like requiring its dependancies to also be in the headers. For that reason this patch moves it into the source directory. To work around libc++abi's need for this header a duplicated copy was added to libc++abi in r307748. While duplicating the code is an unfortunate solution it's the best solution that's currently possible. In the future I would like to start a discussion on the mailing lists about making libc++abi build as a sub-project of libc++, requiring the libc++ sources always be present. llvm-svn: 307749
* Remove dependancy on __refstring header; use local copy instead.Eric Fiselier2017-07-122-1/+132
| | | | | | | | | | | | | | This patch removes the dependancy on libc++'s __refstring header, which was only a header in the first place so that libc++abi could build library code using it, and not because libc++ needed it in the headers. This patch allows libc++ to stop shipping <__refstring> publicaly at the cost of duplicating it across projects. Ideally libc++abi would always require the libc++ sources when building, but that's a separate discussion I plan to start on the mailing lists shortly. llvm-svn: 307748
* Specify complete target triple in testMatthias Braun2017-07-121-2/+2
| | | | | | This should fix the problems on the greendragon build. llvm-svn: 307747
* Revert "[libc++] Refactoring __sync_* builtins; NFC (Reland)"Eric Fiselier2017-07-125-47/+12
| | | | | | | This reverts commit r307595. The commit had some issues that needed to first be addressed in review. llvm-svn: 307746
* Fix minor typo introduced in r276404Don Hinton2017-07-121-1/+1
| | | | | | | | | | | | | | | | | Summary: A space was added between '-' and 'help' when emitting help output. See https://reviews.llvm.org/D22621 for details. Reviewers: MaggieYi, vsk Reviewed By: vsk Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D35283 llvm-svn: 307745
* LowerTypeTests: When importing functions skip definitions where the summary ↵Peter Collingbourne2017-07-123-3/+16
| | | | | | | | | | | | | | contains a decl. This normally indicates mixed CFI + non-CFI compilation, and will result in us treating the function in the same way as a function defined outside of the LTO unit. Part of PR33752. Differential Revision: https://reviews.llvm.org/D35281 llvm-svn: 307744
* [ODRHash] Revert r307720 to fix buildbot.Richard Trieu2017-07-124-167/+52
| | | | llvm-svn: 307743
* [Dominators][NFC] Remove extra semicolon...Jakub Kuderski2017-07-121-1/+1
| | | | | | to silence a gcc warning. llvm-svn: 307742
* [WebAssembly] Expose the offset of each data segmentSam Clegg2017-07-1210-19/+31
| | | | | | | | | | | | | | Summary: This allows tools like lld that process relocations to apply data relocation correctly. This information is required because relocation are stored as section offset. Subscribers: jfb, dschuff, jgravelle-google, aheejin Differential Revision: https://reviews.llvm.org/D35234 llvm-svn: 307741
* Fix unused variable warningsKonstantin Zhuravlyov2017-07-121-0/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D35280 llvm-svn: 307740
* [tsan] Update test to r307338Vitaly Buka2017-07-121-2/+2
| | | | | | | r307338 enabled new optimization reducing number of operation in tested functions. There is no any performance regression detectable with TsanRtlTest DISABLED_BENCH.Mop* tests. llvm-svn: 307739
* Simplify interface now that we don't need to pass IsPCRel. NFC.Rafael Espindola2017-07-117-19/+22
| | | | llvm-svn: 307734
* [PDB] Use a more appropriate message for a fatal errorReid Kleckner2017-07-111-1/+1
| | | | llvm-svn: 307733
* [codeview] Change readobj symbol dumping formatReid Kleckner2017-07-1132-236/+191
| | | | | | | | Avoid duplicating DictScope with hand-written names everywhere. Print the S_-prefixed symbol kind for every record. This should make it easier to search for certain kinds of records when debugging PDB linking. llvm-svn: 307732
* [CMake] Support multi-target runtimes buildPetr Hosek2017-07-113-29/+167
| | | | | | | | | | | | | | | | | | | | | This changes adds support for building runtimes for multiple different targets using LLVM runtimes directory. The implementation follow the model used already by the builtins build which already supports this option. To specify the runtimes targets to be built, use the LLVM_RUNTIME_TARGETS variable, where the valuae is the list of targets to build runtimes for. To pass a per target variable to the runtimes build, you can set RUNTIMES_<target>_<variable> where <variable> will be passed to the runtimes build for <target>. Each runtime target (except for the default one) will be installed into lib/<target> subdirectory. Build targets will be suffixed with the target name. Differential Revision: https://reviews.llvm.org/D32816 llvm-svn: 307731
* Fully fix the movw/movt addend.Rafael Espindola2017-07-1117-37/+48
| | | | | | | | | | The issue is not if the value is pcrel. It is whether we have a relocation or not. If we have a relocation, the static linker will select the upper bits. If we don't have a relocation, we have to do it. llvm-svn: 307730
* [IPO] Temporarily rollback r307215.Davide Italiano2017-07-112-35/+0
| | | | | | | | | [GlobalOpt] Remove unreachable blocks before optimizing a function. While the change is presumably correct, it exposes a latent bug in DI which breaks on of the CFI checks. I'll analyze it further and try to understand what's going on. llvm-svn: 307729
* Update now that the llvm-mc bug is fixed.Rafael Espindola2017-07-111-7/+2
| | | | llvm-svn: 307728
* [Dominators] Use a custom DFS implementationJakub Kuderski2017-07-111-87/+84
| | | | | | | | | | | | | | | | | | | | | Summary: Custom DFS implementation allows us to skip over certain nodes without adding them to the visited map, which is not easily doable with llvm's dfs iterators. What's more, caching predecessors becomes easy. This patch implements a single DFS function (template) for both forward and reverse DFS, which should be easier to maintain then separate two ones. Skipping over nodes based on a predicate will be necessary later to implement incremental updates. There also seems to be a very slight performance improved when bootstrapping clang with this patch on my machine (3:28s -> 3:26s) . Reviewers: dberlin, sanjoy, davide, grosser Reviewed By: dberlin Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D34651 llvm-svn: 307727
* [PDB] Tweak bad type index error handlingReid Kleckner2017-07-112-10/+154
| | | | | | | | | | | | | | | Translate invalid type indices to a sentinel value instead of skipping the record. Skipping records isn't a good recovery method, because we can skip a scope open or close record, which will confuse the scope management code. We currently have lots of invalid type indices on Microsoft-provided standard libraries, because the LF_TYPESERVER2 records contain absolute paths that are only valid on their build servers. Our type server handlers need to look at other things (GUIDs) to find these type server PDBs. llvm-svn: 307726
* [codeview] Fix type index discovery for four symbol recordsReid Kleckner2017-07-111-0/+12
| | | | | | | | | | | | I encountered these when linking LLD, which uses atls.lib. Those objects appear to use these uncommon symbol records: 0x115E S_HEAPALLOCSITE 0x113D S_ENVBLOCK 0x1113 S_GTHREAD32 0x1153 S_FILESTATIC llvm-svn: 307725
* Enhance synchscope representation (clang)Konstantin Zhuravlyov2017-07-112-17/+16
| | | | | | | | Relevant changes required for r307722. Differential Revision: https://reviews.llvm.org/D33109 llvm-svn: 307723
* Enhance synchscope representationKonstantin Zhuravlyov2017-07-1169-791/+1227
| | | | | | | | | | | | | | | | | | | | | | | | | | | OpenCL 2.0 introduces the notion of memory scopes in atomic operations to global and local memory. These scopes restrict how synchronization is achieved, which can result in improved performance. This change extends existing notion of synchronization scopes in LLVM to support arbitrary scopes expressed as target-specific strings, in addition to the already defined scopes (single thread, system). The LLVM IR and MIR syntax for expressing synchronization scopes has changed to use *syncscope("<scope>")*, where <scope> can be "singlethread" (this replaces *singlethread* keyword), or a target-specific name. As before, if the scope is not specified, it defaults to CrossThread/System scope. Implementation details: - Mapping from synchronization scope name/string to synchronization scope id is stored in LLVM context; - CrossThread/System and SingleThread scopes are pre-defined to efficiently check for known scopes without comparing strings; - Synchronization scope names are stored in SYNC_SCOPE_NAMES_BLOCK in the bitcode. Differential Revision: https://reviews.llvm.org/D21723 llvm-svn: 307722
* [ODRHash] Support more method types.Richard Trieu2017-07-114-52/+167
| | | | | | | Hash CXXConstructorDecl and CXXDestructorDecl. Extend the diagnostics from CXXMethodDecl to include constructors and destructors. llvm-svn: 307720
* [CodeGen] Rename DEBUG_TYPE to match passnamesEvandro Menezes2017-07-1111-11/+11
| | | | | | | | | Rename missing DEBUG_TYPE "machine-scheduler" from backend files, which were absent from https://reviews.llvm.org/rL303921. Differential revision: https://reviews.llvm.org/D35231 llvm-svn: 307719
* [x86] auto-generate full checks; NFCSanjay Patel2017-07-111-79/+126
| | | | llvm-svn: 307718
* [mips][mt] Correct spelling error in comment. NFCI.Simon Dardis2017-07-111-1/+1
| | | | llvm-svn: 307717
* [mips][mt][2/7] Implement .module and .set directives for the MT ASE.Simon Dardis2017-07-116-0/+118
| | | | | | | | | | | | This patch implements the .module and .set directives for the MT ASE, notably that .module sets the relevant flags in .MIPS.abiflags and .set doesn't. Reviewers: slthakur, atanasyan Differential Revision: https://reviews.llvm.org/D35249 llvm-svn: 307716
* [clangd] Fix Go to Definition not working in VSCode extensionMarc-Andre Laperle2017-07-111-1/+1
| | | | | | | | | | | | | | | | | | Summary: The URI conversion logic was returning 'undefined' when going from server to VSCode which broke the Go to Definition functionality. Reviewers: krasimir Reviewed By: krasimir Subscribers: cfe-commits Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D35215 llvm-svn: 307715
* [ARM, ELF] Don't shift movt relocation offsetsMartin Storsjo2017-07-112-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | For ELF, a movw+movt pair is handled as two separate relocations. If an offset should be applied to the symbol address, this offset is stored as an immediate in the instruction (as opposed to stored as an offset in the relocation itself). Even though the actual value stored in the movt immediate after linking is the top half of the value, we need to store the unshifted offset prior to linking. When the relocation is made during linking, the offset gets added to the target symbol value, and the upper half of the value is stored in the instruction. This makes sure that movw+movt with offset symbols get properly handled, in case the offset addition in the lower half should be carried over to the upper half. This makes the output from the additions to the test case match the output from GNU binutils. For COFF and MachO, the movw/movt relocations are handled as a pair, and the overflow from the lower half gets carried over to the movt, so they should keep the shifted offset just as before. Differential Revision: https://reviews.llvm.org/D35242 llvm-svn: 307713
* switch on enum should be exhaustive and warning-freeTim Hammerquist2017-07-111-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Testing the value of type_code against the closed enum TypeCodes provides statically verifiable completeness of testing. However, one branch assigns to type_code by casting directly from a masked integer value. This is currently handled by adding a default: case after checking each TypeCodes instance. This patch introduces a bool variable containing the "default" state value, allowing the switch to be exhaustive, protect against future instances not being handled in the switch, and preserves the original logic. This addresses the warning: warning: default label in switch which covers all enumeration values [-Wcovered-switch-default] As an issue of maintainability, the bitmask on line 524 handles the current values of TypeCodes enum, but this will be invalid if the enum is extended. This patch does not address this, and a more closed conversion from cfinfoa -> TypeCodes would help protect against this. Reviewers: spyffe, lhames, sas Reviewed By: sas Subscribers: sas, lldb-commits Differential Revision: https://reviews.llvm.org/D35036 llvm-svn: 307712
* [AArch64] Remove unused IsDarwin & IsNotDarwin predicates (NFCI). Florian Hahn2017-07-111-3/+0
| | | | | | | | | | | | Reviewers: t.p.northover, rengolin Reviewed By: t.p.northover Subscribers: aemerson, javed.absar, llvm-commits, kristof.beyls Differential Revision: https://reviews.llvm.org/D35266 llvm-svn: 307706
* [LoopUnrollRuntime] NFC: Add some debugging trace messages for why loop ↵Anna Thomas2017-07-111-8/+30
| | | | | | wasn't unrolled. llvm-svn: 307705
* [WWW] Add a section to Getting Started about building out-of-treePhilip Pfaffe2017-07-111-0/+12
| | | | llvm-svn: 307704
* Remove unnecessary local variable.Rui Ueyama2017-07-111-2/+1
| | | | llvm-svn: 307703
* [ProfileData] Add new option to dump topn hottest functionsXinliang David Li2017-07-113-6/+56
| | | | | | Differential Revision: http://reviews.llvm.org/D35155 llvm-svn: 307702
* Fix clang-tidy diagnostic.cpp test on WindowsReid Kleckner2017-07-111-1/+1
| | | | llvm-svn: 307701
* [NewGVN] Check for congruency of memory accesses.Davide Italiano2017-07-112-1/+93
| | | | | | | | | | This is fine as nothing in the code relies on leader and memory leader being the same for a given congruency class. Ack'ed by Dan. Fixes PR33720. llvm-svn: 307699
* reverting 307677.Michael Zuckerman2017-07-111-144/+67
| | | | llvm-svn: 307698
* [OPENMP] Skip BuildMemberExpr() in BuildFieldReferenceExpr(), NFC, by Kai NodaAlexey Bataev2017-07-111-5/+4
| | | | | | | | | In the OpenMP mode, we don't need to call BuildMemberExpr() only to discard its return value. BuildDeclRefExpr() is called instead. Differential revision: https://reviews.llvm.org/D35201 llvm-svn: 307697
* Use internal_strncpy to copy filename in linux procmapsFrancis Ricci2017-07-111-6/+5
| | | | | | | | | | | | Cleaner than using a while loop to copy the string character by character. Reviewers: alekseyshl, glider Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D35136 llvm-svn: 307696
* Inline function to get mac segment address rangeFrancis Ricci2017-07-112-63/+58
| | | | | | | | | | | | | | Summary: This function is only called once and is fairly simple. Inline to keep API simple. Reviewers: alekseyshl, kubamracek Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D35270 llvm-svn: 307695
* [NewGVN] Fix an innocent typo I found while debugging PR33720.Davide Italiano2017-07-111-1/+1
| | | | llvm-svn: 307694
* [OPENMP] Add restriction for reduction clause in taskloop directives.Alexey Bataev2017-07-116-8/+717
| | | | | | | | Added checks for the reduction clauses in the taskloop directives: 1. Only addressable items must be used in reduction clauses. 2. Reduction clauses cannot be used with nogroup clauses. llvm-svn: 307693
* [NewGVN] Clarify the function invariants formatting them properly.Davide Italiano2017-07-111-3/+4
| | | | llvm-svn: 307692
OpenPOWER on IntegriCloud