summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [pp-trace] Wrap code in clang::pp_traceFangrui Song2019-03-243-103/+89
| | | | llvm-svn: 356850
* [pp-trace] Modernize the codeFangrui Song2019-03-2410-124/+64
| | | | | | | | | Use InitLLVM and WithColor Delete PPTraceConsumer, add the callback in PPTraceAction Migrae to tooling::createExecutorFromCommandLineArgs Don't specialize empty OutputFileName llvm-svn: 356849
* [X86] Add BSR/BSF/BSWAP intrinsics to ia32intrin.h to match gcc.Craig Topper2019-03-244-15/+167
| | | | | | | | | | | | | | | | | | | | Summary: These are all implemented by icc as well. I made bit_scan_forward/reverse forward to the __bsfd/__bsrq since we also have __bsfq/__bsrq. Note, when lzcnt is enabled the bsr intrinsics generates lzcnt+xor instead of bsr. Reviewers: RKSimon, spatel Subscribers: cfe-commits, llvm-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59682 llvm-svn: 356848
* [WebAssembly] Fix test/Driver/wasm-toolchain.c in the presence of ↵Sam Clegg2019-03-241-1/+1
| | | | | | | | CLANG_DEFAULT_LINKER This was broken in rL356817 (See https://reviews.llvm.org/D59721) llvm-svn: 356847
* gn build: Merge r356820Nico Weber2019-03-232-0/+9
| | | | llvm-svn: 356846
* gn build: Add build files for modularize and pp-traceNico Weber2019-03-233-0/+39
| | | | | | Differential Revision: https://reviews.llvm.org/D59701 llvm-svn: 356845
* Fix typos in compiler-rt/lib/builtins/atomic.cHubert Tong2019-03-231-1/+10
| | | | | | | | | | | | | | | | | | | Summary: This patch fixes typos in file compiler-rt/lib/builtins/atomic.c. Reviewers: jasonliu, hubert.reinterpretcast, jfb Reviewed By: jfb Subscribers: t.p.northover, theraven, dberris, jfb, jdoerfert, #sanitizers, llvm-commits Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D59228 Patch by Xing Xue. llvm-svn: 356844
* libclang/CIndexer.cpp: Use loadquery() on AIX for path to libraryHubert Tong2019-03-231-0/+59
| | | | | | | | | | | | | | | | | | | Summary: `dladdr` is not available on AIX. Similar functionality is presented through `loadquery`. This patch replaces a use of `dladdr` with a version based on `loadquery`. Reviewers: sfertile, xingxue, jasonliu Reviewed By: xingxue Subscribers: jsji, lhames, majnemer, asb, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59233 llvm-svn: 356843
* Sync some doc changes ClangFormatStyleOptions.rst with doc comments in ↵Sylvestre Ledru2019-03-232-3/+3
| | | | | | | | | | | | | | | | | | | | | `Format.h` Summary: These changes were corrected directly in ClangFormatStyleOptions.rst (llvm-svn: 350192 and llvm-svn: 351976) but these sections can be produced automatically using `dump_format_style.py` so sync the corresponding doc comments in `Format.h` as well. Patch by Ronald Wampler Reviewers: eugene, sylvestre.ledru, djasper Reviewed By: sylvestre.ledru Subscribers: jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58186 llvm-svn: 356842
* Fix unused variable warning on non-asserts builds. NFCI.Simon Pilgrim2019-03-231-4/+3
| | | | llvm-svn: 356841
* Remove unused function argument. NFCI.Simon Pilgrim2019-03-231-5/+7
| | | | llvm-svn: 356840
* Fix unused variable warning. NFCI.Simon Pilgrim2019-03-231-1/+1
| | | | llvm-svn: 356839
* [DWARF] Delete a stray break and a stray comment. NFCFangrui Song2019-03-231-2/+1
| | | | llvm-svn: 356838
* [X86][SLP] Show example of failure to uniformly commute splats for 'alt' ↵Simon Pilgrim2019-03-231-0/+38
| | | | | | | | shuffles. If either the main/alt opcodes isn't commutable we may end up with the splats not correctly commuted to the same side. llvm-svn: 356837
* [x86] reduce code duplication; NFCSanjay Patel2019-03-231-3/+5
| | | | llvm-svn: 356836
* [clang-format] Keep protobuf "package" statement on one linePaul Hoad2019-03-232-3/+9
| | | | | | | | | | | | | | | | | | | | Summary: Top-level "package" and "import" statements should generally be kept on one line, for all languages. Reviewers: sammccall, krasimir, MyDeveloperDay Reviewed By: MyDeveloperDay Subscribers: MyDeveloperDay, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59627 Patch By: dchai (Donald Chai) llvm-svn: 356835
* Clang-format: add finer-grained options for putting all arguments on one linePaul Hoad2019-03-235-9/+299
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Add two new options, AllowAllArgumentsOnNextLine and AllowAllConstructorInitializersOnNextLine. These mirror the existing AllowAllParametersOfDeclarationOnNextLine and allow me to support an internal style guide where I work. I think this would be generally useful, some have asked for it on stackoverflow: https://stackoverflow.com/questions/30057534/clang-format-binpackarguments-not-working-as-expected https://stackoverflow.com/questions/38635106/clang-format-how-to-prevent-all-function-arguments-on-next-line Reviewers: djasper, krasimir, MyDeveloperDay Reviewed By: MyDeveloperDay Subscribers: jkorous, MyDeveloperDay, aol-nnov, lebedev.ri, uohcsemaj, cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D40988 Patch By: russellmcc (Russell McClellan) llvm-svn: 356834
* [clang-format] correctly format protobuf fields named "enum".Paul Hoad2019-03-232-0/+10
| | | | | | | | | | | | | | | | | | Summary: Similar to TypeScript, "enum" is not a reserved word. Reviewers: krasimir, MyDeveloperDay Reviewed By: MyDeveloperDay Subscribers: MyDeveloperDay, cfe-commits Tags: #clang, #clang-tools-extra Differential Revision: https://reviews.llvm.org/D59629 Patch by: dchai (Donald Chai) llvm-svn: 356833
* [SLPVectorizer] reorderInputsAccordingToOpcode - use InstructionState ↵Simon Pilgrim2019-03-231-3/+6
| | | | | | directly. NFCI. llvm-svn: 356832
* [LowerSwitch] Use ConstantRange::fromKnownBits(); NFCNikita Popov2019-03-231-9/+3
| | | | | | | Using an unsigned range to stay NFC, but a signed range would really be more useful here. llvm-svn: 356831
* [SLPVectorizer] Don't repeat VL.size() call. NFCI.Simon Pilgrim2019-03-231-1/+1
| | | | llvm-svn: 356830
* [DebugInfo] follow up for "add SectionedAddress to DebugInfo interfaces"Alexey Lapshin2019-03-233-49/+37
| | | | | | | | | | | | | | | | | | | | | | | [Symbolizer] Add getModuleSectionIndexForAddress() helper routine The https://reviews.llvm.org/D58194 patch changed symbolizer interface. Particularily it requires not only Address but SectionIndex also. Note object::SectionedAddress parameter: Expected<DILineInfo> symbolizeCode(const std::string &ModuleName, object::SectionedAddress ModuleOffset, StringRef DWPName = ""); There are callers of symbolizer which do not know particular section index. That patch creates getModuleSectionIndexForAddress() routine which will detect section index for the specified address. Thus if caller set ModuleOffset.SectionIndex into object::SectionedAddress::UndefSection state then symbolizer would detect section index using getModuleSectionIndexForAddress routine. Differential Revision: https://reviews.llvm.org/D58848 llvm-svn: 356829
* [gn] Add clang-tools-extra/clang-tidy/tool/BUILD.gnVitaly Buka2019-03-231-0/+18
| | | | llvm-svn: 356828
* [gn] Add clang-tools-extra/clang-tidy/tool/BUILD.gnVitaly Buka2019-03-231-0/+1
| | | | llvm-svn: 356827
* Disable MachO TBD write tests for Windows.Juergen Ributzka2019-03-232-0/+6
| | | | | | | The tests are failing on the windows bots. I am disabling them for now. This is a followup to r356820. llvm-svn: 356826
* [Reproducers] Fix GDB remote flakiness during replayJonas Devlieghere2019-03-221-24/+23
| | | | | | | | | | | | | | | | | | | | | | This fixes the flakiness of the GDB remote reproducer during replay. It was caused by a combination sending one ACK to many from the replay server and the code that "flushes" any queued GDB remote packets in GDBRemoteCommunicationClient::HandshakeWithServer. The spurious ACK was the result of combining both implicit and explicit handling of ACKs in the replay server. The handshake consists of an ACK followed by an QStartNoAckMode. As long as we haven't seen any QStartNoAckMode, we were sending implicit acknowledgments. So the first ACK got acknowledged twice, once implicitly, and once as part of the replay. The reason we didn't notice this was the code in HandshakeWithServer that "waits for any responses that might have been queued up in the remote GDB server and flush them all". A 10ms timeout is used to move on when no packets are left. If the second ACK didn't make it within those 10ms, all packets were offset by one. llvm-svn: 356825
* [Legacy][TimePasses] allow -time-passes reporting into a custom streamFedor Sergeev2019-03-225-21/+121
| | | | | | | | | | | | | | | | As a followup to newpm -time-passes fix (D59366), now adding a similar functionality to legacy time-passes. Enhancing llvm::reportAndResetTimings to accept an optional stream for reporting output. By default it still reports into the stream created by CreateInfoOutputFile (-info-output-file). Also fixing to actually reset after printing as declared. Reviewed By: philip.pfaffe Differential Revision: https://reviews.llvm.org/D59416 llvm-svn: 356824
* Followup for r356820 to fix the bots.Juergen Ributzka2019-03-221-1/+1
| | | | | | Try using a move constructor instead. llvm-svn: 356823
* IRGen: Remove StructorType; thread GlobalDecl through more code. NFCI.Peter Collingbourne2019-03-2214-229/+127
| | | | | | | | This should make it easier to add more structor variants. Differential Revision: https://reviews.llvm.org/D59724 llvm-svn: 356822
* [clang-format][NFC] correct the release notesPaul Hoad2019-03-221-2/+3
| | | | | | Move the clang-format notes to the correct section llvm-svn: 356821
* [TextAPI] TBD Reader/WriterJuergen Ributzka2019-03-2221-1/+3195
| | | | | | | | | | | | | | | | | | | | | | | | Add basic infrastructure for reading and writting TBD files (version 1 - 3). The TextAPI library is not used by anything yet (besides the unit tests). Tool support will be added in a separate commit. The TBD format is currently documented in the implementation file (TextStub.cpp). https://reviews.llvm.org/D53945 Update: This contains changes to fix issues discovered by the bots: - add parentheses to silence warnings. - rename variables - use PlatformType from BinaryFormat - Trying if switching from a vector to an array will appeas the bots. - Replace the tuple with a struct to work around an explicit constructor bug. - This fixes an issue where we were leaking the YAML document if there was a parsing error. Updated the license information in all files. llvm-svn: 356820
* [ScriptInterpreter] Remove a warning and reformat comments.Davide Italiano2019-03-221-6/+6
| | | | llvm-svn: 356819
* Fix a minor bug with std::next and prev not and negative numbers. In ↵Marshall Clow2019-03-226-18/+157
| | | | | | particular, std::prev cannot require Bidirectional Iterators, because you might 'go back' -1 places, which goes forward. Thanks to Ville and Jonathan for the bug report. llvm-svn: 356818
* [WebAssembly] Make driver -pthread imply linker --shared-memoryThomas Lively2019-03-222-2/+5
| | | | | | | | | | | | | | | | Summary: This eliminates a linker error the user might otherwise see about how using the 'atomics' feature requires --shared-memory. Reviewers: sbc100, aheejin Subscribers: dschuff, jgravelle-google, sunfish, jfb, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59721 llvm-svn: 356817
* [ScriptInterpreter] Make sure that PYTHONHOME is right.Davide Italiano2019-03-221-0/+10
| | | | | | | | | | | | | | | | | Summary: For the only version of Python actually supported on Darwin. <rdar://problem/40961425> Reviewers: jingham, friss, JDevlieghere, aprantl, jasonmolenda Subscribers: jdoerfert, llvm-commits, lldb-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59719 llvm-svn: 356816
* [LLD][COFF] Separate module descriptors creation from type/symbol mergingAlexandre Ganea2019-03-223-31/+44
| | | | | | | | | | Take module DBI creation out of PDBLinker::addObjFile() into its own function. This is groundwork towards parallelizable type merging, as proposed in D59226. Differential Revision: https://reviews.llvm.org/D59261 llvm-svn: 356815
* [SLP] Remove redundancy of performing operand reordering twice: once in ↵Simon Pilgrim2019-03-221-82/+171
| | | | | | | | | | | | | | | buildTree() and later in vectorizeTree(). This is a refactoring patch that removes the redundancy of performing operand reordering twice, once in buildTree() and later in vectorizeTree(). To achieve this we need to keep track of the operands within the TreeEntry struct while building the tree, and later in vectorizeTree() we are just accessing them from the TreeEntry in the right order. This patch is the first in a series of patches that will allow for better operand reordering across chains of instructions (e.g., a chain of ADDs), as presented here: https://www.youtube.com/watch?v=gIEn34LvyNo Patch by: @vporpo (Vasileios Porpodas) Differential Revision: https://reviews.llvm.org/D59059 llvm-svn: 356814
* [pdb] Add -type-stats and sort stats by descending sizeReid Kleckner2019-03-227-31/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: It prints this on chromium browser_tests.exe.pdb: Types Total: 5647475 entries ( 371,897,512 bytes, 65.85 avg) -------------------------------------------------------------------------- LF_CLASS: 397894 entries ( 119,537,780 bytes, 300.43 avg) LF_STRUCTURE: 236351 entries ( 83,208,084 bytes, 352.05 avg) LF_FIELDLIST: 291003 entries ( 66,087,920 bytes, 227.10 avg) LF_MFUNCTION: 1884176 entries ( 52,756,928 bytes, 28.00 avg) LF_POINTER: 1149030 entries ( 13,877,344 bytes, 12.08 avg) LF_ARGLIST: 789980 entries ( 12,436,752 bytes, 15.74 avg) LF_METHODLIST: 361498 entries ( 8,351,008 bytes, 23.10 avg) LF_ENUM: 16069 entries ( 6,108,340 bytes, 380.13 avg) LF_PROCEDURE: 269374 entries ( 4,309,984 bytes, 16.00 avg) LF_MODIFIER: 235602 entries ( 2,827,224 bytes, 12.00 avg) LF_UNION: 9131 entries ( 2,072,168 bytes, 226.94 avg) LF_VFTABLE: 323 entries ( 207,784 bytes, 643.29 avg) LF_ARRAY: 6639 entries ( 106,380 bytes, 16.02 avg) LF_VTSHAPE: 126 entries ( 6,472 bytes, 51.37 avg) LF_BITFIELD: 278 entries ( 3,336 bytes, 12.00 avg) LF_LABEL: 1 entries ( 8 bytes, 8.00 avg) The PDB is overall 1.9GB, so the LF_CLASS and LF_STRUCTURE declarations account for about 10% of the overall file size. I was surprised to find that on average LF_FIELDLIST records are short. Maybe this is because there are many more types with short member lists than there are instantiations with lots of members, like std::vector. Reviewers: aganea, zturner Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59672 llvm-svn: 356813
* Simplify PltSection.Rui Ueyama2019-03-222-22/+11
| | | | | | | | | Previously, `Entries` contains pairs of symbols and their indices. The indices are always 0, x, 2x, 3x, ..., where x is the size of relocation entry. We didn't have to store that values because we can compute them when we consume them. llvm-svn: 356812
* Revert "[llvm-readobj] Separate `Symbol Version` dumpers into `LLVM style` ↵Douglas Yung2019-03-224-114/+102
| | | | | | | | | | | | | and `GNU style`" This reverts commit 94a0cffe250c1cd6b8fea5607be502cadf617bdc (r356764). This change was originally committed in r356764, but then partially reverted in r356777 due to "bad changes". This caused test failures because the test changes committed along with the original change were not reverted, so this change reverts the rest of the changes. llvm-svn: 356811
* [TargetLowering] SimplifyDemandedBits trunc(srl(x, C1)) - early out for out ↵Simon Pilgrim2019-03-221-19/+19
| | | | | | of range C1. NFCI. llvm-svn: 356810
* [ARM] Don't form "ands" when it isn't scheduled correctly.Eli Friedman2019-03-222-1/+63
| | | | | | | | | | | | In r322972/r323136, the iteration here was changed to catch cases at the beginning of a basic block... but we accidentally deleted an important safety check. Restore that check to the way it was. Fixes https://bugs.llvm.org/show_bug.cgi?id=41116 Differential Revision: https://reviews.llvm.org/D59680 llvm-svn: 356809
* [X86] Use xmm registers to implement 64-bit popcnt on 32-bit targets if ↵Craig Topper2019-03-222-5/+149
| | | | | | | | | | | | possible if popcnt instruction is not available On 32-bit targets without popcnt, we currently expand 64-bit popcnt to sequences of arithmetic and logic ops for each 32-bit half and then add the 32 bit halves together. If we have xmm registers we can use use those to implement the operation instead. This results in less instructions then doing two separate 32-bit popcnt sequences. This mitigates some of PR41151 for the i64 on i686 case when we have SSE2. Differential Revision: https://reviews.llvm.org/D59662 llvm-svn: 356808
* [X86] Use movq for i64 atomic load on 32-bit targets when sse2 is enableCraig Topper2019-03-223-49/+88
| | | | | | | | | | | | | | We used a lock cmpxchg8b to do i64 atomic loads. But if we have SSE2 we can do better and use a plain movq to do the load instead. I tried to just use an f64 atomic load and add isel patterns to MOVSD(which the domain fixing pass can turn to MOVQ), but the atomic_load SDNode in TargetSelectionDAG.td requires the type to be integer. So I've emitted VZEXT_LOAD instead which should be selected by isel to a MOVQ. Hopefully we don't need a specific atomic flavor of this. I kept the memory operand from the original AtomicSDNode. I wasn't sure if I might need to set the MOVolatile flag? I've left some FIXMEs for improvements we can do without SSE2. Differential Revision: https://reviews.llvm.org/D59679 llvm-svn: 356807
* Revert minidump changesJonas Devlieghere2019-03-229-170/+13
| | | | | | | | | | | | | | This reverts the following two commits: Revert "Extend r356573 (minidump UUID handling) to cover elf build-ids too" Revert "Fix UUID decoding from minidump files" Greg's original commit broke the sanitizer bot which has been red for several days now. http://green.lab.llvm.org/green/view/LLDB/job/lldb-sanitized/ llvm-svn: 356806
* [WebAssembly] Add linker options to control feature checkingThomas Lively2019-03-228-7/+200
| | | | | | | | | | | | | | | | | | | | | Summary: Adds --check-features and --no-check-features. The default for now is to enable the checking, but this might change in the future. Also adds --features=foo,bar for precisely controlling the features used in the output binary. Depends on D59173. Reviewers: sbc100, aheejin Subscribers: dschuff, jgravelle-google, sunfish, jdoerfert, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59274 llvm-svn: 356805
* [libc++] Update the list of symbols exported from libc++abi for new/deleteLouis Dionne2019-03-221-2/+14
| | | | | | | | When libc++ does not provide new/delete, libc++abi now also provides the aligned allocation and deallocation functions, so those should be part of the re-export list for libc++. llvm-svn: 356804
* Fix non-determinism in Reassociate caused by address coincidencesDaniel Sanders2019-03-223-6/+133
| | | | | | | | | | | | | | | | | | | | | | | Summary: Between building the pair map and querying it there are a few places that erase and create Values. It's rare but the address of these newly created Values is occasionally the same as a just-erased Value that we already have in the pair map. These coincidences should be accounted for to avoid non-determinism. Thanks to Roman Tereshin for the test case. Reviewers: rtereshin, bogner Reviewed By: rtereshin Subscribers: mgrang, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59401 llvm-svn: 356803
* [clang-tidy] openmp-exception-escape - a new checkRoman Lebedev2019-03-2211-0/+336
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Finally, we are here! Analyzes OpenMP Structured Blocks and checks that no exception escapes out of the Structured Block it was thrown in. As per the OpenMP specification, structured block is an executable statement, possibly compound, with a single entry at the top and a single exit at the bottom. Which means, ``throw`` may not be used to to 'exit' out of the structured block. If an exception is not caught in the same structured block it was thrown in, the behaviour is undefined / implementation defined, the program will likely terminate. Reviewers: JonasToth, aaron.ballman, baloghadamsoftware, gribozavr Reviewed By: aaron.ballman, gribozavr Subscribers: mgorny, xazax.hun, rnkovacs, guansong, jdoerfert, cfe-commits, ABataev Tags: #clang-tools-extra, #openmp, #clang Differential Revision: https://reviews.llvm.org/D59466 llvm-svn: 356802
* [clang-tidy] openmp-use-default-none - a new checkRoman Lebedev2019-03-228-0/+326
| | | | | | | | | | | | | | | | | | | | | | | Summary: Finds OpenMP directives that are allowed to contain `default` clause, but either don't specify it, or the clause is specified but with the kind other than `none`, and suggests to use `default(none)` clause. Using `default(none)` clause changes the default variable visibility from being implicitly determined, and thus forces developer to be explicit about the desired data scoping for each variable. Reviewers: JonasToth, aaron.ballman, xazax.hun, hokein, gribozavr Reviewed By: JonasToth, aaron.ballman Subscribers: jdoerfert, openmp-commits, klimek, sbenza, arphaman, Eugene.Zelenko, ABataev, mgorny, rnkovacs, guansong, cfe-commits Tags: #clang-tools-extra, #openmp, #clang Differential Revision: https://reviews.llvm.org/D57113 llvm-svn: 356801
OpenPOWER on IntegriCloud