summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [sanitizer] Remove empty Symbolizer PrepareForSandboxingKostya Kortchinsky2018-04-0310-38/+10
| | | | | | | | | | | | | | | | | | | | | | | Summary: `Symbolizer::PrepareForSandboxing` is empty for all platforms and apparently has been for a while (D10213). Remove it, and shuffle things around so that the platform specific code is now in `PlatformPrepareForSandboxing`. This allows to have one less symbolizer dependency in a common file, which helps for the upcoming split. Also remove `SymbolizerPrepareForSandboxing` in tsan_go which appears to not be used anywhere. Reviewers: alekseyshl, eugenis, dvyukov, mcgrathr Reviewed By: alekseyshl Subscribers: kubamracek, delcypher, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D44953 llvm-svn: 329094
* [dsymutil] Apply recursion workaround for threadingJonas Devlieghere2018-04-033-13/+26
| | | | | | | | | | | | The DwarfLinker can have some very deep recursion that can max out the (significantly smaller) stack when using threads. We don't want this limitation when we only have a single thread. We already have this workaround for the architecture-related threading. This patch applies the same workaround to the parallel analysis and cloning. Differential revision: https://reviews.llvm.org/D45172 llvm-svn: 329093
* Make fetchIfLazy only fetch an object file. NFC.Rui Ueyama2018-04-033-18/+29
| | | | | | | Previously, fetchIfLazy did more than the name says. Now, setting to UsedInRegularObj is moved to another function. llvm-svn: 329092
* [SLP] Fixed formatting, NFC.Alexey Bataev2018-04-031-1/+2
| | | | llvm-svn: 329091
* [clangd] synthesize fix message when the diagnostic doesn't provide one.Sam McCall2018-04-032-20/+33
| | | | | | | | | | | | | | | | | | | | Summary: Currently if a fix is attached directly to a diagnostic, we repeat the diagnostic message as the fix message. From eyeballing the top diagnostics, it seems describing the textual replacement would be much clearer. e.g. error: use of undeclared identifier 'goo'; did you mean 'foo'? action before: use of undeclared identifier 'goo'; did you mean 'foo'? action after: change 'goo' to 'foo' Reviewers: ilya-biryukov Subscribers: klimek, jkorous-apple, ioeric, MaskRay, cfe-commits Differential Revision: https://reviews.llvm.org/D45069 llvm-svn: 329090
* [DEBUGINFO] Add option that allows to disable emission of flags in .loc ↵Alexey Bataev2018-04-034-19/+112
| | | | | | | | | | | | | | | | | | directives. Summary: Some targets do not support extended format of .loc directive and support only simple format: .loc <FileID> <Line> <Column>. Patch adds MCAsmInfo flag and option that allows emit .loc directive without additional flags. Reviewers: echristo Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D45184 llvm-svn: 329089
* [lld] fix data race in ELF/ICF.cppBob Haarman2018-04-031-12/+18
| | | | | | | | | | | | | | | | Summary: r328610 fixed a data race in the COFF linker. This change makes a similar fix to the ELF linker. Reviewers: ruiu, pcc, rnk Reviewed By: ruiu Subscribers: emaste, llvm-commits, arichardson Differential Revision: https://reviews.llvm.org/D45192 llvm-svn: 329088
* [InstCombine] Fold compare of int constant against a splatted vector of intsDaniel Neilson2018-04-033-0/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Folding patterns like: %vec = shufflevector <4 x i8> %insvec, <4 x i8> undef, <4 x i32> zeroinitializer %cast = bitcast <4 x i8> %vec to i32 %cond = icmp eq i32 %cast, 0 into: %ext = extractelement <4 x i8> %insvec, i32 0 %cond = icmp eq i32 %ext, 0 Combined with existing rules, this allows us to fold patterns like: %insvec = insertelement <4 x i8> undef, i8 %val, i32 0 %vec = shufflevector <4 x i8> %insvec, <4 x i8> undef, <4 x i32> zeroinitializer %cast = bitcast <4 x i8> %vec to i32 %cond = icmp eq i32 %cast, 0 into: %cond = icmp eq i8 %val, 0 When we construct a splat vector via a shuffle, and bitcast the vector into an integer type for comparison against an integer constant. Then we can simplify the the comparison to compare the splatted value against the integer constant. Reviewers: spatel, anna, mkazantsev Reviewed By: spatel Subscribers: efriedma, rengolin, llvm-commits Differential Revision: https://reviews.llvm.org/D44997 llvm-svn: 329087
* [ELF] - Eliminate Lazy class.George Rimar2018-04-036-49/+31
| | | | | | | | | Patch removes Lazy class which is just an excessive layer. Differential revision: https://reviews.llvm.org/D45083 llvm-svn: 329086
* [SLP] Fix PR36481: vectorize reassociated instructions.Alexey Bataev2018-04-0312-278/+429
| | | | | | | | | | | | | | | | | | Summary: If the load/extractelement/extractvalue instructions are not originally consecutive, the SLP vectorizer is unable to vectorize them. Patch allows reordering of such instructions. Patch does not support reordering of the repeated instruction, this must be handled in the separate patch. Reviewers: RKSimon, spatel, hfinkel, mkuper, Ayal, ashahid Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D43776 llvm-svn: 329085
* Remove a stale comment cut and pasted from another file.Eric Christopher2018-04-031-1/+0
| | | | llvm-svn: 329084
* [llvm-mca] Move the logic that prints register file statistics to its own ↵Andrea Di Biagio2018-04-0312-102/+195
| | | | | | | | | | | | | view. NFCI Before this patch, the "BackendStatistics" view was responsible for printing the register file usage (as well as many other statistics). Now users can enable register file usage statistics using the command line flag `-register-file-stats`. By default, the tool doesn't print register file statistics. llvm-svn: 329083
* Recommit "[SLP] Fix issues with debug output in the SLP vectorizer."Alexey Bataev2018-04-031-3/+4
| | | | | | | | | | | | | The primary issue here is that using NDEBUG alone isn't enough to guard debug printing -- instead the DEBUG() macro needs to be used so that the specific pass debug logging check is employed. Without this, every asserts-enabled build was printing out information when it hit this. I also fixed another place where we had multiple statements in a DEBUG macro to use {}s to be a bit cleaner. And I fixed a place that used errs() rather than dbgs(). llvm-svn: 329082
* [LoopInterchange] Update tests so DA can handle access after D35430.Florian Hahn2018-04-038-325/+365
| | | | | | | | | | | | | | | I have taken the opportunity to simplify some tests slightly and move parts around. It also brings back a few IR checks for interchangable loops. Reviewers: karthikthecool, sebpop, grosser Reviewed By: sebpop Differential Revision: https://reviews.llvm.org/D45207 llvm-svn: 329081
* [SLP] Added tests for checks of reordering of the repeated instructions,Alexey Bataev2018-04-031-0/+129
| | | | | | NFC. llvm-svn: 329080
* [Hexagon] Remove -mhvx-double and the corresponding subtarget featureKrzysztof Parzyszek2018-04-033-50/+32
| | | | | | | Specifying the HVX vector length should be done via the -mhvx-length option. llvm-svn: 329079
* [Hexagon] Remove unneeded attributes from lit testKrzysztof Parzyszek2018-04-031-1/+1
| | | | llvm-svn: 329078
* [Hexagon] Remove -mhvx-double and the corresponding subtarget featureKrzysztof Parzyszek2018-04-035-51/+9
| | | | | | | Specifying the HVX vector length should be done via the -mhvx-length option. llvm-svn: 329077
* Adding optional Name parameter to createVirtualRegister and ↵Puyan Lotfi2018-04-032-6/+8
| | | | | | createGenericVirtualRegister. llvm-svn: 329076
* Implement P0754R2: The <version> header.Marshall Clow2018-04-034-2/+67
| | | | llvm-svn: 329075
* [llvm-mca] Remove redundant include from BackendStatistics.h. NFCAndrea Di Biagio2018-04-031-3/+2
| | | | | | Also use llvm::DenseMap for Histograms (instead of std::map). llvm-svn: 329074
* [clang-tidy] Check for sizeof that call functionsHaojian Wu2018-04-034-1/+126
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: A common mistake that I have found in our codebase is calling a function to get an integer or enum that represents the type such as: ``` int numBytes = numElements * sizeof(x.GetType()); ``` So this extends the `sizeof` check to check for these cases. There is also a `WarnOnSizeOfCall` option so it can be disabled. Patch by Paul Fultz II! Reviewers: hokein, alexfh, aaron.ballman, ilya-biryukov Reviewed By: alexfh Subscribers: lebedev.ri, xazax.hun, jkorous-apple, cfe-commits Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D44231 llvm-svn: 329073
* [OpenMP] enable bc file compilation using the latest clangGuansong Zhang2018-04-031-0/+1
| | | | | | | | | | | | | | | | Summary: adding cuda-rdc flag to allow extern global data Reviewers: grokos Reviewed By: grokos Subscribers: gregrodgers, mgorny, openmp-commits Tags: #openmp Differential Revision: https://reviews.llvm.org/D44992 llvm-svn: 329072
* Revert "[SLP] Fix PR36481: vectorize reassociated instructions."Benjamin Kramer2018-04-0311-427/+278
| | | | | | This reverts commit r328980 and r329046. Makes the vectorizer crash. llvm-svn: 329071
* [clang-format/ObjC] Do not detect "[]" as ObjC method expressionBen Hamilton2018-04-032-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The following C++ code was being detected by `guessLanguage()` as Objective-C: #define FOO(...) auto bar = [] __VA_ARGS__; This was because `[] __VA_ARGS__` is not currently detected as a C++ lambda expression (it has no parens or braces), so `TokenAnnotator::parseSquare()` incorrectly treats the opening square as an ObjC method expression. We have two options to fix this: 1. Parse `[] __VA_ARGS__` explicitly as a C++ lambda 2. Make it so `[]` is never parsed as an Objective-C method expression This diff implements option 2, which causes the `[` to be parsed as `TT_ArraySubscriptLSquare` instead of `TT_ObjCMethodExpr`. Note that when I fixed this, it caused one change in formatting behavior, where the following was implicitly relying on the `[` being parsed as `TT_ObjCMethodExpr`: A<int * []> a; becomes: A<int *[]> a; with `Style.PointerAlignment = Middle`. I don't really know what the desired format is for this syntax; the test was added by Janusz Sobczak and integrated by @djasper in https://github.com/llvm-mirror/clang/commit/b511fe9818829d7ece0cc0b2ce1fbe04a1f0739a . I went ahead and changed the test for now. Test Plan: New tests added. Ran tests with: % make -j12 FormatTests && ./tools/clang/unittests/Format/FormatTests Fixes: https://bugs.llvm.org/show_bug.cgi?id=36248 Reviewers: djasper, jolesiak Reviewed By: djasper Subscribers: klimek, cfe-commits, djasper Differential Revision: https://reviews.llvm.org/D45169 llvm-svn: 329070
* [clang-format/ObjC] Do not insert space after opening brace of ObjC dict literalBen Hamilton2018-04-032-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: D44816 attempted to fix a few cases where `clang-format` incorrectly inserted a space before the closing brace of an Objective-C dictionary literal. This revealed there were still a few cases where we inserted a space after the opening brace of an Objective-C dictionary literal. This fixes the formatting to be consistent and adds more tests. Test Plan: New tests added. Confirmed tests failed before diff and passed after diff. Ran tests with: % make -j12 FormatTests && ./tools/clang/unittests/Format/FormatTests Reviewers: djasper, jolesiak, krasimir Reviewed By: djasper Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D45168 llvm-svn: 329069
* [MC] Fix -Wmissing-field-initializer warning after r329067.Andrea Di Biagio2018-04-031-0/+1
| | | | | | | | This should fix the problem reported by the lld buildbots: - Builder lld-x86_64-darwin13, Build #19782 - Builder lld-perf-testsuite, Build #1419 llvm-svn: 329068
* [MC][Tablegen] Allow the definition of processor register files in the ↵Andrea Di Biagio2018-04-0316-103/+621
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | scheduling model for llvm-mca This patch allows the description of register files in processor scheduling models. This addresses PR36662. A new tablegen class named 'RegisterFile' has been added to TargetSchedule.td. Targets can optionally describe register files for their processors using that class. In particular, class RegisterFile allows to specify: - The total number of physical registers. - Which target registers are accessible through the register file. - The cost of allocating a register at register renaming stage. Example (from this patch - see file X86/X86ScheduleBtVer2.td) def FpuPRF : RegisterFile<72, [VR64, VR128, VR256], [1, 1, 2]> Here, FpuPRF describes a register file for MMX/XMM/YMM registers. On Jaguar (btver2), a YMM register definition consumes 2 physical registers, while MMX/XMM register definitions only cost 1 physical register. The syntax allows to specify an empty set of register classes. An empty set of register classes means: this register file models all the registers specified by the Target. For each register class, users can specify an optional register cost. By default, register costs default to 1. A value of 0 for the number of physical registers means: "this register file has an unbounded number of physical registers". This patch is structured in two parts. * Part 1 - MC/Tablegen * A first part adds the tablegen definition of RegisterFile, and teaches the SubtargetEmitter how to emit information related to register files. Information about register files is accessible through an instance of MCExtraProcessorInfo. The idea behind this design is to logically partition the processor description which is only used by external tools (like llvm-mca) from the processor information used by the llvm machine schedulers. I think that this design would make easier for targets to get rid of the extra processor information if they don't want it. * Part 2 - llvm-mca related * The second part of this patch is related to changes to llvm-mca. The main differences are: 1) class RegisterFile now needs to take into account the "cost of a register" when allocating physical registers at register renaming stage. 2) Point 1. triggered a minor refactoring which lef to the removal of the "maximum 32 register files" restriction. 3) The BackendStatistics view has been updated so that we can print out extra details related to each register file implemented by the processor. The effect of point 3. is also visible in tests register-files-[1..5].s. Differential Revision: https://reviews.llvm.org/D44980 llvm-svn: 329067
* [LangRef] fix description and examples of fptruncSanjay Patel2018-04-031-6/+5
| | | | | | | | | | | | As noted in PR36966: https://bugs.llvm.org/show_bug.cgi?id=36966 The old description doesn't match what we do in code, so this just fixes the documentation to avoid confusion. Differential Revision: https://reviews.llvm.org/D45190 llvm-svn: 329065
* [PowerPC] reorder entries in P9InstrResources.td in alphabetical order; NFCHiroshi Inoue2018-04-031-1/+1
| | | | | | Reorder entries added in my previous commit (rL328969) to keep alphabetical order. llvm-svn: 329064
* [ELF] - Check that output sections fit in address space.George Rimar2018-04-034-7/+41
| | | | | | | | | | Added checks to test that we do not produce output where VA of sections overruns the address space available. Differential revision: https://reviews.llvm.org/D43820 llvm-svn: 329063
* [ELF] - Fix the comment. NFC.George Rimar2018-04-031-3/+2
| | | | llvm-svn: 329062
* [ELF] - Relax checks for R_386_8/R_386_16 relocations.George Rimar2018-04-035-4/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes PR36927. The issue is next. Imagine we have -Ttext 0x7c and code below. .code16 .global _start _start: movb $_start+0x83,%ah So we have R_386_8 relocation and _start at 0x7C. Addend is 0x83 == 131. We will sign extend it to 0xffffffffffffff83. Now, 0xffffffffffffff83 + 0x7c gives us 0xFFFFFFFFFFFFFFFF. Techically 0x83 + 0x7c == 0xFF, we do not exceed 1 byte value, but currently LLD errors out, because we use checkUInt<8>. Let's try to use checkInt<8> now and the following code to see if it can help (no): main.s: .byte foo input.s: .globl foo .hidden foo foo = 0xff Here, foo is 0xFF. And addend is 0x0. Final value is 0x00000000000000FF. Again, it fits one byte well, but with checkInt<8>, we would error out it, so we can't use it. What we want to do is to check that the result fits 1 byte well. Patch changes the check to checkIntUInt to fix the issue. Differential revision: https://reviews.llvm.org/D45051 llvm-svn: 329061
* [ELF] - Simplify createFiles. NFCI.George Rimar2018-04-031-14/+7
| | | | | | | | Groups paired options together. Differential revision: https://reviews.llvm.org/D45090 llvm-svn: 329060
* [ELF] - X86_64: don't allow 8/16 bit dynamic relocations.George Rimar2018-04-032-2/+19
| | | | | | | | | | | Having 8/16 bits dynamic relocations is incorrect. Both gold and bfd (built from latest sources) disallow that too. Differential revision: https://reviews.llvm.org/D45158 llvm-svn: 329059
* [ELF] - Remove dead declaration. NFC.George Rimar2018-04-031-2/+0
| | | | llvm-svn: 329058
* [x86] Fix a pretty obvious think-o with my asm scrubbing. You have to inChandler Carruth2018-04-032-3960/+3960
| | | | | | | | | | fact use regular expression syntax to use regular expressions. Should restore the bots. Sorry for the noise on this test. Thanks to Philip for spotting the bug! llvm-svn: 329057
* [x86] Clean up and enhance a test around eflags copying.Chandler Carruth2018-04-031-25/+212
| | | | | | | | | | | This adds the basic test cases from all the EFLAGS bugs in more direct forms. It also switches to generated check lines, and includes both 32-bit and 64-bit variations. No functionality changing here, just setting things up to have a nice clean asm diff in my EFLAGS patch. llvm-svn: 329056
* [x86] Extend my goofy SP offset scrubbing for llc test cases to actuallyChandler Carruth2018-04-032-3959/+3966
| | | | | | | | | | | | | | | do explicit scrubbing of the offsets of stack spills and reloads. You can always turn this off in order to test specific stack slot usage. We were already hiding most of this, but the new logic hides it more generically. Notably, we should effectively hide stack slot churn in functions that have a frame pointer now, and should also hide it when changing a function from stack pointer to frame pointer. That transition already changes enough to be clearly noticed in the test case diff, showing *every* spill and reload is really noisy without benefit. See the test case I ran this on as a classic example. llvm-svn: 329055
* MSan: introduce the conservative assembly handling mode.Alexander Potapenko2018-04-032-1/+132
| | | | | | | | | | | | The default assembly handling mode may introduce false positives in the cases when MSan doesn't understand that the assembly call initializes the memory pointed to by one of its arguments. We introduce the conservative mode, which initializes the first |sizeof(type)| bytes for every |type*| pointer passed into the assembly statement. llvm-svn: 329054
* [clangd][cmake] Provide libatomic when there is no native support for 64bit ↵Simon Dardis2018-04-031-0/+6
| | | | | | | | | | | | atomics This addresses a persistent failure on clang-cmake-mips buildbot. Reviewers: ioeric Differential Revision: https://reviews.llvm.org/D44248 llvm-svn: 329053
* UsersManual.rst: update text for /GX- to match r328708Hans Wennborg2018-04-031-1/+1
| | | | llvm-svn: 329052
* [SCEV] Fix PR36974.Serguei Katkov2018-04-031-5/+6
| | | | | | | | | | | | | The patch changes the usage of dominate to properlyDominate to satisfy the condition !(a < a) while using std::max. It is actually NFC due to set data structure is used to keep the Loops and no two identical loops can be in collection. So in reality there is no difference between usage of dominate and properlyDominate in this particular case. However it might be changed so it is better to fix it. llvm-svn: 329051
* Add a wrapper around llvm-objdump to look for indirect calls/jmps in x86 ↵Eric Christopher2018-04-031-0/+49
| | | | | | | | | | | assembly. Useful when looking for indirect calls/jmps the need mitigation via retpoline or other mitigations for Spectre v2. Feedback, extension, additional patches welcome. llvm-svn: 329050
* [X86] Reduce number of OpPrefix bits in TSFlags to 2. NFCICraig Topper2018-04-034-34/+38
| | | | | | TSFlag doesn't need to disambiguate NoPrfx from PS. So shift the encodings so PS is NoPrfx|0x4. llvm-svn: 329049
* [X86][TableGen] Add a missing error check to make sure EVEX instructions use ↵Craig Topper2018-04-031-1/+5
| | | | | | one PS/PD/XS/XD prefixes. llvm-svn: 329048
* [SCEV] Make computeExitLimit more simple and more powerfulMax Kazantsev2018-04-032-58/+51
| | | | | | | | | | | | | | | | | | | | | | | Current implementation of `computeExitLimit` has a big piece of code the only purpose of which is to prove that after the execution of this block the latch will be executed. What it currently checks is actually a subset of situations where the exiting block dominates latch. This patch replaces all these checks for simple particular cases with domination check over loop's latch which is the only necessary condition of taking the exiting block into consideration. This change allows to calculate exact loop taken count for simple loops like for (int i = 0; i < 100; i++) { if (cond) {...} else {...} if (i > 50) break; . . . } Differential Revision: https://reviews.llvm.org/D44677 Reviewed By: efriedma llvm-svn: 329047
* [SLP] Fix issues with debug output in the SLP vectorizer.Chandler Carruth2018-04-031-10/+10
| | | | | | | | | | | | | The primary issue here is that using NDEBUG alone isn't enough to guard debug printing -- instead the DEBUG() macro needs to be used so that the specific pass debug logging check is employed. Without this, every asserts-enabled build was printing out information when it hit this. I also fixed another place where we had multiple statements in a DEBUG macro to use {}s to be a bit cleaner. And I fixed a place that used `errs()` rather than `dbgs()`. llvm-svn: 329046
* [TableGen] Use llvm::cast instead of static_cast so that the cast will be ↵Craig Topper2018-04-031-1/+1
| | | | | | checked. NFC llvm-svn: 329045
* Use OffsetMap in getSectionPiece.Rafael Espindola2018-04-031-5/+17
| | | | | | | | | | OffsetMap maps to a SectionPiece index, but we were not taking advantage of that in getSectionPiece. With this patch both getOffset and getSectionPiece use OffsetMap and the binary search is moved to findSectionPiece. llvm-svn: 329044
OpenPOWER on IntegriCloud