summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix unreferenced parameter warning. Patch from STL@microsoft.comEric Fiselier2016-06-301-1/+1
| | | | llvm-svn: 274204
* Avoid applying unary minus to unsigned integers. Patch from STL@microsoft.comEric Fiselier2016-06-302-8/+8
| | | | llvm-svn: 274203
* [MS ABI] Pick an inheritance model if we resolve an overload setDavid Majnemer2016-06-302-0/+19
| | | | | | | | | | | | | We didn't assign an inheritance model for 'Foo' if the event an exrepssion like '&Foo::Bar' occured if 'Bar' could resolve to multiple functions. Once the overload set is resolved to a particular member, we enforce a specific inheritance model. This fixes PR28360. llvm-svn: 274202
* [CodeView] Implement support for bitfields in ClangDavid Majnemer2016-06-304-41/+77
| | | | | | | | | | | Emit the underlying storage offset in addition to the starting bit position of the field. This fixes PR28162. Differential Revision: http://reviews.llvm.org/D21783 llvm-svn: 274201
* [CodeView] Implement support for bitfields in LLVMDavid Majnemer2016-06-306-11/+272
| | | | | | | | | | | | | CodeView need to know the offset of the storage allocation for a bitfield. Encode this via the "extraData" field in DIDerivedType and introduced a new flag, DIFlagBitField, to indicate whether or not a member is a bitfield. This fixes PR28162. Differential Revision: http://reviews.llvm.org/D21782 llvm-svn: 274200
* [SCEV] Compute max be count from shift operator only if all else failsSanjoy Das2016-06-302-6/+35
| | | | | | | In particular, check to see if we can compute a precise trip count by exhaustively simulating the loop first. llvm-svn: 274199
* [ADT] Add a new data structure for managing a priority worklist whereChandler Carruth2016-06-303-0/+331
| | | | | | | | | | | | | | | | | | | | | | | | re-insertion of entries into the worklist moves them to the end. This is fairly similar to a SetVector, but helps in the case where in addition to not inserting duplicates you want to adjust the sequence of a pop-off-the-back worklist. I'm not at all attached to the name of this data structure if others have better suggestions, but this is one that David Majnemer brought up in IRC discussions that seems plausible. I've trimmed the interface down somewhat from SetVector's interface because several things make less sense here IMO: iteration primarily. I'd prefer to add these back as we have users that need them. My use case doesn't even need all of what is provided here. =] I've also included a basic unittest to make sure this functions reasonably. Differential Revision: http://reviews.llvm.org/D21866 llvm-svn: 274198
* [CFLAA] Add support for ModRef queries.George Burgess IV2016-06-303-0/+83
| | | | | | | | | | | | This patch makes CFLAA answer some ModRef queries. Because we don't distinguish between reading/writing when making StratifiedSets, we're unable to offer any of the readonly-related answers. Patch by Jia Chen. Differential Revision: http://reviews.llvm.org/D21858 llvm-svn: 274197
* [CMake] Introduce a LLVM_ENABLE_LOCAL_SUBMODULE_VISIBILITY flag.Adrian Prantl2016-06-302-2/+16
| | | | | | | | | | | | | On Darwin it is currently impossible to build LLVM with modules because the Darwin system module map is not compatible with -fmodules-local-submodule-visibility at this point in time. This patch makes the flag optional and off by default on Darwin so it becomes possible to build LLVM with modules again. http://reviews.llvm.org/D21827 rdar://problem/27019000 llvm-svn: 274196
* Fix logic error in check() function.Peter Collingbourne2016-06-301-1/+1
| | | | llvm-svn: 274195
* RegisterScavenging: Code cleanup; NFCMatthias Braun2016-06-302-44/+31
| | | | | | | | | | | | | - Use range based for loops - No need for some !Reg checks: isPhysicalRegister() reports false for NoRegister anyway - Do not repeat function name in documentation comment. - Do not repeat documentation comment in implementation when we already have one at the declaration. - Factor some common subexpressions out. - Change file comments to use doxygen syntax. llvm-svn: 274194
* CodeGen: Add an explicit BuildMI overload for MachineInstr&Duncan P. N. Exon Smith2016-06-301-7/+17
| | | | | | | | | | | | | | | | | | | | | Add an explicit overload to BuildMI for MachineInstr& to deal with insertions inside of instruction bundles. - Use it to re-implement MachineInstr* to give it coverage. - Document how the overload for MachineBasicBlock::instr_iterator differs from that for MachineBasicBlock::iterator (the previous (implicit) overload for MachineInstr&). - Add a comment explaining why the MachineInstr& and MachineInstr* overloads don't universally forward to the MachineBasicBlock::instr_iterator overload. Thanks to Justin for noticing the API quirk. While this doesn't fix any known bugs -- all uses of BuildMI with a MachineInstr& were previously using MachineBasicBlock::iterator -- it protects against future bugs. llvm-svn: 274193
* add vector tests to show missing transformSanjay Patel2016-06-301-0/+38
| | | | llvm-svn: 274192
* [SystemZ] Split up PerformDAGCombine. [NFC]Marcin Koscielnicki2016-06-302-142/+183
| | | | | | This function is already a bit too long, and I'm about to make it worse. llvm-svn: 274191
* Use the same type for adjacent bit field members.Akira Hatanaka2016-06-301-4/+4
| | | | | | | | | MSVC doesn't pack the bit field members if different types are used. This came up in a patch review. http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20160627/163107.html llvm-svn: 274190
* CodeGen: Use MachineInstr& in TargetInstrInfo, NFCDuncan P. N. Exon Smith2016-06-3092-3331/+3286
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is mostly a mechanical change to make TargetInstrInfo API take MachineInstr& (instead of MachineInstr* or MachineBasicBlock::iterator) when the argument is expected to be a valid MachineInstr. This is a general API improvement. Although it would be possible to do this one function at a time, that would demand a quadratic amount of churn since many of these functions call each other. Instead I've done everything as a block and just updated what was necessary. This is mostly mechanical fixes: adding and removing `*` and `&` operators. The only non-mechanical change is to split ARMBaseInstrInfo::getOperandLatencyImpl out from ARMBaseInstrInfo::getOperandLatency. Previously, the latter took a `MachineInstr*` which it updated to the instruction bundle leader; now, the latter calls the former either with the same `MachineInstr&` or the bundle leader. As a side effect, this removes a bunch of MachineInstr* to MachineBasicBlock::iterator implicit conversions, a necessary step toward fixing PR26753. Note: I updated WebAssembly, Lanai, and AVR (despite being off-by-default) since it turned out to be easy. I couldn't run tests for AVR since llc doesn't link with it turned on. llvm-svn: 274189
* regenerate checksSanjay Patel2016-06-291-27/+75
| | | | llvm-svn: 274188
* PrologEpilogInserter: Some code cleanup; NFCMatthias Braun2016-06-291-40/+36
| | | | | | | | | - Use range based for - Use the more common variable names MBB and MF for MachineBasicBlock/MachineFunction variables. - Add a few const modifiers llvm-svn: 274187
* Add move constructor and move assignment to fix MSVC build.Peter Collingbourne2016-06-291-0/+11
| | | | llvm-svn: 274186
* [Tooling] Add optional argument to getFullyQualifiedName to prepend "::".Siva Chandra2016-06-293-49/+137
| | | | | | | | | | Reviewers: rsmith, saugustine, rnk Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D21666 llvm-svn: 274185
* COFF: Switch to new archive writer interface (D21721).Peter Collingbourne2016-06-293-28/+31
| | | | | | Differential Revision: http://reviews.llvm.org/D21722 llvm-svn: 274184
* Object: Replace NewArchiveIterator with a simpler NewArchiveMember class. NFCI.Peter Collingbourne2016-06-294-203/+140
| | | | | | | | | | | | | | | | The NewArchiveIterator class has a problem: it requires too much context. Any memory buffers added to the archive must be stored within an Archive::Member, which must have an associated Archive. This makes it harder than necessary to create new archive members (or new archives entirely) from scratch using memory buffers. This patch replaces NewArchiveIterator with a NewArchiveMember class that stores just the memory buffer and the information that goes into the archive member header. Differential Revision: http://reviews.llvm.org/D21721 llvm-svn: 274183
* [LV] Improve accuracy and formatting of function commentAdam Nemet2016-06-291-2/+3
| | | | llvm-svn: 274182
* [ClangConfig] Store all of the targets exported in the variable ↵Michael Gottesman2016-06-292-1/+2
| | | | | | CLANG_EXPORTED_TARGETS. llvm-svn: 274180
* [ClangConfig] Unset some variables after we are done using them to configure ↵Michael Gottesman2016-06-291-0/+5
| | | | | | | | | | ClangConfig.cmake.in files. This ensures that the values do not bleed over in between computations. It may make sense in the future to just refactor this code into functions to provide "true scoping". llvm-svn: 274179
* [ClangConfig] Instead of hard coding the ClangTargets location to ↵Michael Gottesman2016-06-292-1/+19
| | | | | | | | /ClangTargets.cmake, follow LLVM's example and use a pre-computed cmake variable @CLANG_CONFIG_EXPORTS_FILE@. This just makes ClangConfig more consistent with LLVMConfig. llvm-svn: 274178
* [ClangConfig] Follow LLVM's example and only install ↵Michael Gottesman2016-06-291-4/+6
| | | | | | Clang{Config,Target}.cmake when LLVM_INSTALL_TOOLCHAIN_ONLY is disabled. llvm-svn: 274177
* [cmake] Instead of just copying ClangConfig.cmake, configure it using ↵Michael Gottesman2016-06-292-10/+14
| | | | | | | | | ClangConfig.cmake.in. This will allow for cmake to expand variables in ClangConfig.cmake for downstream users. llvm-svn: 274176
* [LLVMConfig.cmake] LLVM_CONFIG_EXPORTED_TARGETS => LLVM_EXPORTED_TARGETS.Michael Gottesman2016-06-291-1/+1
| | | | | | | This matches more closely the rest of the variables in LLVMConfig.cmake which shed the _CONFIG_ part of their names. llvm-svn: 274175
* [compiler-rt] Fix Sanitizer-common Unittests on win64Etienne Bergeron2016-06-292-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch is fixing unittests that are broken on windows (64-bits). Tests under 'SANITIZER_CAN_USE_ALLOCATOR64' are disabled. A custom allocator for windows based on WinHeap API will replace these tests. Tested on Win32/Win64 (Ninja and MSVC). Tested on Linux 32-bit/64-bit clang. ``` C:\src\llvm\build64\projects\compiler-rt>lib\sanitizer_common\tests\Release\Sanitizer-x86_64-Test.exe [==========] Running 101 tests from 12 test cases. [----------] Global test environment set-up. [----------] 51 tests from SanitizerCommon [ RUN ] SanitizerCommon.DefaultSizeClassMap [ OK ] SanitizerCommon.DefaultSizeClassMap (1 ms) [ RUN ] SanitizerCommon.CompactSizeClassMap [ OK ] SanitizerCommon.CompactSizeClassMap (1 ms) [ RUN ] SanitizerCommon.InternalSizeClassMap [ OK ] SanitizerCommon.InternalSizeClassMap (1 ms) [ RUN ] SanitizerCommon.SizeClassAllocator32Compact [ OK ] SanitizerCommon.SizeClassAllocator32Compact (828 ms) [ RUN ] SanitizerCommon.SizeClassAllocator32CompactMetadataStress [ OK ] SanitizerCommon.SizeClassAllocator32CompactMetadataStress (914 ms) [ RUN ] SanitizerCommon.SizeClassAllocator32MapUnmapCallback [...] [----------] 4 tests from Symbolizer [ RUN ] Symbolizer.ExtractToken [ OK ] Symbolizer.ExtractToken (0 ms) [ RUN ] Symbolizer.ExtractInt [ OK ] Symbolizer.ExtractInt (0 ms) [ RUN ] Symbolizer.ExtractUptr [ OK ] Symbolizer.ExtractUptr (0 ms) [ RUN ] Symbolizer.ExtractTokenUpToDelimiter [ OK ] Symbolizer.ExtractTokenUpToDelimiter (0 ms) [----------] 4 tests from Symbolizer (24 ms total) [----------] Global test environment tear-down [==========] 101 tests from 12 test cases ran. (5090 ms total) [ PASSED ] 101 tests. ``` Reviewers: rnk Subscribers: chrisha, wang0109, llvm-commits, kubabrecka Differential Revision: http://reviews.llvm.org/D21817 llvm-svn: 274174
* [llvm-cov] Use relative paths to file reports in -output-dir modeVedant Kumar2016-06-293-5/+17
| | | | | | This makes it possible to e.g copy a report to another filesystem. llvm-svn: 274173
* [compiler-rt] Fix the Asan unittest on WindowsEtienne Bergeron2016-06-291-1/+1
| | | | | | | | | | | | | | | | | Summary: The build bot is broken because the runtime library doesn't have debug information. This is broken due to a recent change: http://reviews.llvm.org/D21554 Reviewers: rnk Subscribers: kubabrecka, llvm-commits, chrisha Differential Revision: http://reviews.llvm.org/D21862 llvm-svn: 274172
* Resubmit "Update llvm command line parser to support subcommands."Zachary Turner2016-06-294-108/+680
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes an issue where occurrence counts would be unexpectedly reset when parsing different parts of a command line multiple times. **ORIGINAL COMMIT MESSAGE** This allows command line tools to use syntaxes like the following: llvm-foo.exe command1 -o1 -o2 llvm-foo.exe command2 -p1 -p2 Where command1 and command2 contain completely different sets of valid options. This is backwards compatible with previous uses of llvm cl which did not support subcommands, as any option which specifies no optional subcommand (e.g. all existing code) goes into a special "top level" subcommand that expects dashed options to appear immediately after the program name. For example, code which is subcommand unaware would generate a command line such as the following, where no subcommand is specified: llvm-foo.exe -q1 -q2 The top level subcommand can co-exist with actual subcommands, as it is implemented as an actual subcommand which is searched if no explicit subcommand is specified. So llvm-foo.exe as specified above could be written so as to support all three aforementioned command lines simultaneously. There is one additional "special" subcommand called AllSubCommands, which can be used to inject an option into every subcommand. This is useful to support things like help, so that commands such as: llvm-foo.exe --help llvm-foo.exe command1 --help llvm-foo.exe command2 --help All work and display the help for the selected subcommand without having to explicitly go and write code to handle each one separately. This patch is submitted without an example of anything actually using subcommands, but a followup patch will convert the llvm-pdbdump tool to use subcommands. Reviewed By: beanz llvm-svn: 274171
* P0305R1: Parsing support for init-statements in 'if' and 'switch' statements.Richard Smith2016-06-2913-61/+254
| | | | | | | | | | | | | | | | | | No semantic analysis yet. This is a pain to disambiguate correctly, because the parsing rules for the declaration form of a condition and of an init-statement are quite different -- for a token sequence that looks like a declaration, we frequently need to disambiguate all the way to the ')' or ';'. We could do better here in some cases by stopping disambiguation once we've decided whether we've got an expression or not (rather than keeping going until we know whether it's an init-statement declaration or a condition declaration), by unifying our parsing code for the two types of declaration and moving the syntactic checks into Sema; if this has a measurable impact on parsing performance, I'll look into that. llvm-svn: 274169
* [ClangConfig] Copy ClangConfig.cmake to ↵Michael Gottesman2016-06-291-1/+1
| | | | | | | | | | | | | | ${CMAKE_BINARY_DIR}/${CLANG_INSTALL_PACKAGE_DIR} instead of to ${CLANG_BINARY_DIR}/${CLANG_INSTALL_PACKAGE_DIR}. This is an obvious bug since ClangConfig.cmake looks for ClangTargets.cmake in ${CMAKE_CURRENT_LIST_DIR}. But ClangTargets.cmake is in ${CMAKE_BINARY_DIR}/${CLANG_INSTALL_PACKAGE_DIR}, so it will always fail with an in tree build. In the case where clang is built out of tree, this is still correct since CMAKE_BINARY_DIR and CLANG_BINARY_DIR will be the same. llvm-svn: 274168
* Convert another case over to RevertingTentativeParsingAction.Richard Smith2016-06-291-4/+1
| | | | llvm-svn: 274167
* Switch to an RAII object to revert tentative parsing automatically.Richard Smith2016-06-292-27/+23
| | | | llvm-svn: 274165
* Add NSTaggedPointerString to the table of data formattersEnrico Granata2016-06-291-0/+1
| | | | | | Fixes rdar://27002512 llvm-svn: 274164
* Revert r273313 "[NVPTX] Improve lowering of byval args of device functions."Artem Belevich2016-06-295-105/+23
| | | | | | The change causes llvm crash in some unoptimized builds. llvm-svn: 274163
* StackColoring for SafeStack.Evgeniy Stepanov2016-06-298-38/+1222
| | | | | | | | | | | | | | | | This is a fix for PR27842. An IR-level implementation of stack coloring tailored to work with SafeStack. It is a bit weaker than the MI implementation in that it does not the "lifetime start at first access" logic. This can be improved in the future. This patch also replaces the naive implementation of stack frame layout with a greedy algorithm that can split existing stack slots and even fit small objects inside the alignment padding of other objects. llvm-svn: 274162
* Matching change for lld for the llvm change of Archive::create() from ↵Kevin Enderby2016-06-294-7/+16
| | | | | | ErrorOr<...> to Expected<...> in r274160. llvm-svn: 274161
* Change Archive::create() from ErrorOr<...> to Expected<...> and updateKevin Enderby2016-06-297-29/+43
| | | | | | | | | its clients. This commit will break the next lld builds. I’ll be committing the matching change for lld next. llvm-svn: 274160
* Validate the option index before trying to access an array element using it ↵Enrico Granata2016-06-291-0/+7
| | | | | | - OptionArgElement can potentially use negative indices to mean interesting, but non option, states llvm-svn: 274159
* [ClangConfig] Replace paths with the same value as CLANG_INSTALL_PACKAGE_DIR ↵Michael Gottesman2016-06-291-2/+2
| | | | | | with a deref of the variable. llvm-svn: 274158
* [cmake] Move creation of ClangTargets and installation of ClangConfig.cmake ↵Michael Gottesman2016-06-292-22/+23
| | | | | | | | from ./CMakeLists.txt -> ./cmake/modules/CMakeLists.txt. This matches LLVM. llvm-svn: 274157
* [InstCombine] Simplify and correct folding fcmps with the same childrenTim Shen2016-06-294-598/+283
| | | | | | | | | | | | | | Summary: Take advantage of FCmpInst::Predicate's bit pattern and handle (fcmp *, x, y) | (fcmp *, x, y) and (fcmp *, x, y) & (fcmp *, x, y) more consistently. Also fold more FCmpInst::FCMP_FALSE and FCmpInst::FCMP_TRUE to constants. Currently InstCombine wrongly folds (fcmp ogt, x, y) | (fcmp ord, x, y) to (fcmp ogt, x, y); this patch also fixes that. Reviewers: spatel Subscribers: llvm-commits, iteratee, echristo Differential Revision: http://reviews.llvm.org/D21775 llvm-svn: 274156
* [InstCombine, NFC] Change the generated variable names by creating new ↵Tim Shen2016-06-292-30/+30
| | | | | | | | instructions This removes some noise for D21775's test changes. llvm-svn: 274155
* [Triple] Reimplement isLittleEndian(). Now it works for arm too.Davide Italiano2016-06-292-30/+33
| | | | | | Differential Revision: http://reviews.llvm.org/D21846 llvm-svn: 274154
* [compiler-rt] Fix passing debug information to unittest.Etienne Bergeron2016-06-292-0/+8
| | | | | | | | | | | | | | | | | | | | Summary: On windows, the debug information was not present in the unittest executables, which make them hard to debug. The Sanitizer Unittests are compiled with a local clang build. The link pass is also done by calling clang. This pass is adding the appropriate flags to bring the right debug information to these executables. Reviewers: rnk Subscribers: kubabrecka, llvm-commits, wang0109, chrisha Differential Revision: http://reviews.llvm.org/D21838 llvm-svn: 274153
* Permit memory operands in ins/outs instructionsNirav Dave2016-06-293-4/+76
| | | | | | | | | | | | | | | [x86] (PR15455) While (ins|outs)[bwld] instructions do not take %dx as a memory operand, various unofficial references do and objdump disassembles to this format. Extend special treatment of similar (in|out)[bwld] operations. Reviewers: craig.topper, rnk, ab Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D18837 llvm-svn: 274152
OpenPOWER on IntegriCloud