summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [ScopDetection] Allow detection of full functionsTobias Grosser2017-05-192-2/+72
| | | | | | This is useful when only analyzing functions. llvm-svn: 303420
* Restore and update documentation comment for EmitPointerWithAlignmentKrzysztof Parzyszek2017-05-191-5/+16
| | | | llvm-svn: 303419
* [globalisel][tablegen] Demote OptForSize/OptForMinSize/ForCodeSize to ↵Daniel Sanders2017-05-199-40/+28
| | | | | | | | | | | | | | | | | | per-function predicates. Summary: This causes them to be re-computed more often than necessary but resolves objections that were raised post-commit on r301750. Reviewers: qcolombet, ab, t.p.northover, rovka, kristof.beyls Reviewed By: qcolombet Subscribers: igorb, llvm-commits Differential Revision: https://reviews.llvm.org/D32861 llvm-svn: 303418
* Fix vector pass-through value being unused in IRBuilder::CreateMaskedGatherAmara Emerson2017-05-192-2/+5
| | | | | | Also s/0/nullptr in the call site in LV. llvm-svn: 303416
* [clang-format] Handle trailing comment sections in import statement linesKrasimir Georgiev2017-05-194-11/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch updates the handling of multiline trailing comment sections in import statement lines to make it more consistent with the case in general. This includes updating the parsing logic to collect the trailing comment sections and the formatting logic to not insert escaped newlines at the end of comment lines in import statement lines. Specifically, before this patch this code: ``` #include <a> // line 1 // line 2 ``` will be turned into two unwrapped lines, whereas this code: ``` int i; // line 1 // line 2 ``` is turned into a single unwrapped line, enabling reflowing across comments. An example where the old behaviour is bad is when partially formatting the lines 3 to 4 of this code: ``` #include <a> // line 1 // line 2 int i; ``` which gets turned into: ``` #include <a> // line 1 // line 2 int i; ``` because the two comment lines were independent and the indent was copied. Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D33351 llvm-svn: 303415
* CodeGenFunction::EmitPointerWithAlignment(): Prune a \param in r303358, ↵NAKAMURA Takumi2017-05-191-15/+0
| | | | | | possibly obsolete. [-Wdocumentation] llvm-svn: 303414
* [GlobalISel] IRTranslator: Translate ConstantStructVolkan Keles2017-05-192-0/+56
| | | | | | | | | | | | Reviewers: qcolombet, ab, t.p.northover, aditya_nandakumar, dsanders Reviewed By: qcolombet Subscribers: rovka, kristof.beyls, javed.absar, igorb, llvm-commits Differential Revision: https://reviews.llvm.org/D33317 llvm-svn: 303412
* [APInt] Use b.negate() in place of b = -std::move(b). NFCICraig Topper2017-05-191-2/+2
| | | | llvm-svn: 303411
* Fix compilation failure.Zachary Turner2017-05-191-1/+1
| | | | llvm-svn: 303410
* Revert "[CodeView] Provide a common interface for type collections."Zachary Turner2017-05-1939-851/+576
| | | | | | | | | | | | | | | | | | This is a squash of ~5 reverts of, well, pretty much everything I did today. Something is seriously broken with lit on Windows right now, and as a result assertions that fire in tests are triggering failures. I've been breaking non-Windows bots all day which has seriously confused me because all my tests have been passing, and after running lit with -a to view the output even on successful runs, I find out that the tool is crashing and yet lit is still reporting it as a success! At this point I don't even know where to start, so rather than leave the tree broken for who knows how long, I will get this back to green, and then once lit is fixed on Windows, hopefully hopefully fix the remaining set of problems for real. llvm-svn: 303409
* Don't crash if someone tries to visit an empty type stream.Zachary Turner2017-05-191-0/+3
| | | | llvm-svn: 303408
* [CodeView] Reduce memory usage in TypeSerializer.Zachary Turner2017-05-192-5/+30
| | | | | | | | | | | We were using a BumpPtrAllocator to allocate stable storage for a record, then trying to insert that into a hash table. If a collision occurred, the bytes were never inserted and the allocation was unnecessary. At the cost of an extra hash computation, check first if it exists, and only if it does do we allocate and insert. llvm-svn: 303407
* [NewGVN] Delete the old store when we find congruent to a load.Davide Italiano2017-05-192-2/+61
| | | | | | | (or non-store, more in general). Fixes PR33086. Caught by the store verifier. llvm-svn: 303406
* [ScopInfo] Fix typo in documentationTobias Grosser2017-05-191-5/+6
| | | | llvm-svn: 303405
* [ScopInfo] Gracefully handle long compile timesTobias Grosser2017-05-192-6/+266
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following test case tried to compute the lexicographic minimum of the following set during alias analysis, which caused very long compile time: [p_0, p_1, p_2, p_3, p_4, p_5] -> { MemRef0[i0] : (517p_3 >= 70944 - 298p_2 and 256i0 >= -71199 + 298p_2 + 517p_3 and 256i0 <= -70944 + 298p_2 + 517p_3) or (409p_4 >= 57120 - 298p_2 and 256i0 >= -57375 + 298p_2 + 409p_4 and 256i0 <= -57120 + 298p_2 + 409p_4) or (104p_4 >= 17329 + 149p_2 - 50p_3 and 128i0 >= 17328 + 149p_2 - 50p_3 - 104p_4 and 128i0 <= 17455 + 149p_2 - 50p_3 - 104p_4) or (104p_4 <= 17328 + 149p_2 - 50p_3 and 128i0 >= 17201 + 149p_2 - 50p_3 - 104p_4 and 128i0 <= 17328 + 149p_2 - 50p_3 - 104p_4) or (409p_4 <= 57119 - 298p_2 and 256i0 >= -57120 + 298p_2 + 409p_4 and 256i0 <= -56865 + 298p_2 + 409p_4) or (517p_3 <= 70943 - 298p_2 and 256i0 >= -70944 + 298p_2 + 517p_3 and 256i0 <= -70689 + 298p_2 + 517p_3) or (p_1 >= 2 + 2p_0 and 298p_5 >= 70944 - 517p_3 and 256i0 >= -71199 + 517p_3 + 298p_5 and 256i0 <= -70944 + 517p_3 + 298p_5) or (p_1 >= 2 + 2p_0 and 298p_5 >= 57120 - 409p_4 and 256i0 >= -57375 + 409p_4 + 298p_5 >and 256i0 <= -57120 + 409p_4 + 298p_5) or (p_1 >= 2 + 2p_0 and 149p_5 <= -17329 >+ 50p_3 + 104p_4 and 128i0 >= 17328 - 50p_3 - 104p_4 + 149p_5 and 128i0 <= >17455 - 50p_3 - 104p_4 + 149p_5) or (p_1 >= 2 + 2p_0 and 149p_5 >= -17328 + >50p_3 + 104p_4 and 128i0 >= 17201 - 50p_3 - 104p_4 + 149p_5 and 128i0 <= 17328 >- 50p_3 - 104p_4 + 149p_5) or (p_1 >= 2 + 2p_0 and 298p_5 <= 57119 - 409p_4 and >256i0 >= -57120 + 409p_4 + 298p_5 and 256i0 <= -56865 + 409p_4 + 298p_5) or >(p_1 >= 2 + 2p_0 and 298p_5 <= 70943 - 517p_3 and 256i0 >= -70944 + 517p_3 + >298p_5 and 256i0 <= -70689 + 517p_3 + 298p_5) } We now guard the potentially expensive functions in Polly's scop analysis to gracefully bail out in case of overly long compilation times. llvm-svn: 303404
* Fix a broken test.Zachary Turner2017-05-191-2/+2
| | | | | | | | | | | | Similar to my previous fix, it turns out llvm-pdbdump has been printing an incorrect value since the beginning of time, but we didn't know it was incorrect. Specifically, we were interpreting a TypeIndex as referencing a type from the TPI stream when it actually should come from the IPI stream. So we were printing a string that looked like a valid string, but was just from the wrong place. llvm-svn: 303403
* Revert "[ADT] Fix some Clang-tidy modernize-use-using warnings; other minor ↵Adam Nemet2017-05-1914-302/+250
| | | | | | | | | | | | fixes (NFC)." This reverts commit r303383. This breaks the modules-enabled macOS build with: lib/Support/LockFileManager.cpp:86:7: error: declaration of 'gethostuuid' must be imported from module 'Darwin.POSIX.unistd' before it is required llvm-svn: 303402
* When a type-id is unexpectedly given a name, assume that the name is unrelatedRichard Smith2017-05-195-42/+27
| | | | | | | | syntax unless we have a reason to think otherwise. This improves error recovery in a couple of cases. llvm-svn: 303398
* Fix crasher in CodeView test.Zachary Turner2017-05-191-1/+1
| | | | | | | | | | | Apparently this was always broken, but previously we were more graceful about it and we would print "unknown udt" if we couldn't find the type index, whereas now we just segfault because we assume it's valid. But this exposed a real bug, which is that we weren't looking in the right place. So fix that, and also fix this crash at the same time. llvm-svn: 303397
* LiveIntervalAnalysis: Fix missing case in pruneSubRegValues()Matthias Braun2017-05-192-1/+38
| | | | | | | | | | pruneSubRegValues() needs to remove subregister ranges starting at instructions that later get removed by eraseInstrs(). It missed to check one case in which eraseInstrs() would remove an instruction. Fixes http://llvm.org/PR32688 llvm-svn: 303396
* Fix typoMatthias Braun2017-05-191-1/+1
| | | | llvm-svn: 303395
* Fix another warning.Zachary Turner2017-05-181-1/+1
| | | | llvm-svn: 303394
* [NewGVN] Break infinite recursion in singleReachablePHIPath().Davide Italiano2017-05-182-6/+74
| | | | | | | | | | | | We can have cycles between PHIs and this causes singleReachablePhi() to call itself indefintely (until we run out of stack). The proper solution would be that of computing SCCs, but it's not worth for now, so just keep a visited set and give up when we find a cycle. Thanks to Dan for the discussion/help with this. Fixes PR33014. llvm-svn: 303393
* [compiler-rt] Replace ifs with switch statement in IsHandledDeadlySignalVitaly Buka2017-05-182-19/+27
| | | | | | | | | | Reviewers: eugenis Subscribers: kubamracek, llvm-commits, dberris Differential Revision: https://reviews.llvm.org/D33158 llvm-svn: 303392
* Fix some build errors and warnings.Zachary Turner2017-05-183-3/+3
| | | | llvm-svn: 303391
* [CodeView] Raise the source to ID map out of the TypeStreamMerger.Zachary Turner2017-05-185-13/+26
| | | | | | | This map will be needed to rewrite symbol streams after re-writing the corresponding type streams. llvm-svn: 303390
* [llvm-pdbdump] Add the ability to merge PDBs.Zachary Turner2017-05-186-2/+198
| | | | | | | | | | | | | | | Merging PDBs is a feature that will be used heavily by the linker. The functionality already exists but does not have deep test coverage because it's not easily exposed through any tools. This patch aims to address that by adding the ability to merge PDBs via llvm-pdbdump. It takes arbitrarily many PDBs and outputs a single PDB. Using this new functionality, a test is added for merging type records. Future patches will add the ability to merge symbol records, module information, etc. llvm-svn: 303389
* [CodeView] Provide a common interface for type collections.Zachary Turner2017-05-1837-573/+844
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Right now we have multiple notions of things that represent collections of types. Most commonly used are TypeDatabase, which is supposed to keep mappings from TypeIndex to type name when reading a type stream, which happens when reading PDBs. And also TypeTableBuilder, which is used to build up a collection of types dynamically which we will later serialize (i.e. when writing PDBs). But often you just want to do some operation on a collection of types, and you may want to do the same operation on any kind of collection. For example, you might want to merge two TypeTableBuilders or you might want to merge two type streams that you loaded from various files. This dichotomy between reading and writing is responsible for a lot of the existing code duplication and overlapping responsibilities in the existing CodeView library classes. For example, after building up a TypeTableBuilder with a bunch of type records, if we want to dump it we have to re-invent a bunch of extra glue because our dumper takes a TypeDatabase or a CVTypeArray, which are both incompatible with TypeTableBuilder. This patch introduces an abstract base class called TypeCollection which is shared between the various type collection like things. Wherever we previously stored a TypeDatabase& in some common class, we now store a TypeCollection&. The advantage of this is that all the details of how the collection are implemented, such as lazy deserialization of partial type streams, is completely transparent and you can just treat any collection of types the same regardless of where it came from. Differential Revision: https://reviews.llvm.org/D33293 llvm-svn: 303388
* [InstCombine] add more tests for xor-of-icmps; NFCSanjay Patel2017-05-181-0/+30
| | | | llvm-svn: 303387
* [ScopInfo] Fix r302231 to use logical or (||). NFC.Michael Kruse2017-05-181-1/+1
| | | | | | | | | | | In r302231 we mistakenly use bitwise or (|) instead of logical or (||). This patch fixes that. Contributed-by: Sameer AbuAsal <sabuasal@codeaurora.org> Differential Revision: https://reviews.llvm.org/D33337 llvm-svn: 303386
* [NewGVN] Replace predicate info leftovers.Davide Italiano2017-05-182-0/+30
| | | | | | | This time with an additional fix, i.e. we remove the dead @llvm.ssa.copy instruction. llvm-svn: 303385
* Use linker script commands in writeMapFile.Rafael Espindola2017-05-184-13/+19
| | | | | | | | | | This converts the last (chronologically) user of OutputSections to use the linker script commands instead. The idea is to convert all uses after fabricateDefaultCommands, so that we have a single representation. llvm-svn: 303384
* [ADT] Fix some Clang-tidy modernize-use-using warnings; other minor fixes (NFC).Eugene Zelenko2017-05-1814-250/+302
| | | | llvm-svn: 303383
* clang-format: [JS] for await, and fix a crash with for loops.Martin Probst2017-05-183-9/+8
| | | | | | | | | | | | | | Summary: The syntax is actually `for await (const x of y)` (d'oh). This also fixes a crash for `for` tokens not followed by additional tokens. Reviewers: djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D33329 llvm-svn: 303382
* [InstCombine] add helper to foldXorOfICmps(); NFCISanjay Patel2017-05-182-41/+48
| | | | | | | | | | | Also, fix the old-style capitalization of the related functions and move them to the 'private' section of the class since they are just helpers of the visit* functions. As shown in the post-commit comments for D32143, we are missing folds for xor-of-icmps. llvm-svn: 303381
* [scudo] lower quarantine default sizesKostya Kortchinsky2017-05-181-2/+2
| | | | | | | | | | | | | | | | | | | | Summary: After discussing the current defaults with a couple of parties, the consensus is that they are too high. 1Mb of quarantine has about a 4Mb impact on PSS, so memory usage goes up quickly. This is obviously configurable, but the default value should be more "approachable", so both the global size and the thread local size are 1/4 of what they used to be. Reviewers: alekseyshl, kcc Reviewed By: alekseyshl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D33321 llvm-svn: 303380
* [InstSimplify] Make m_Not work for xor -1, XCraig Topper2017-05-182-6/+18
| | | | | | | | Currently m_Not only works the canonical xor X, -1 form that InstCombine produces. InstSimplify can't rely on this canonicalization. Differential Revision: https://reviews.llvm.org/D33331 llvm-svn: 303379
* Set IMAGE_DLL_CHARACTERISTICS_NO_BIND.Rui Ueyama2017-05-185-13/+10
| | | | | | | | | Our output is not compatible with the Binding feature, so make it explicit that. Differential Revision: https://reviews.llvm.org/D33336 llvm-svn: 303378
* Revert r303375 "LLVM_FALLTHROUGH instead of fall-through comment."Rui Ueyama2017-05-181-1/+1
| | | | | | This reverts commit r303375 since it didn't compile. llvm-svn: 303377
* [clangd] Make formatting.test asynchronous again.Benjamin Kramer2017-05-181-1/+1
| | | | | | | This test doesn't rely on the order of asynchronous messages, enable threads so we have at least some coverage for those code paths. llvm-svn: 303376
* LLVM_FALLTHROUGH instead of fall-through comment.Galina Kistanova2017-05-181-1/+1
| | | | llvm-svn: 303375
* Merge IAT and ILT.Rui Ueyama2017-05-185-16/+14
| | | | | | | | | | | | | | | | | | Previously, LLD-produced executables had IAT (Import Address Table) and ILT (Import Lookup Table) as separate chunks of data, although their contents are identical. My interpretation of the COFF spec when I wrote the COFF linker is that they need to be separate tables even though they are the same. But Peter found that the Windows loader is fine with executables in which IAT and ILT are merged. This is a patch to merge IAT and ILT. I confirmed that an lld-link self-hosted with this patch works fine. Fixes https://bugs.llvm.org/show_bug.cgi?id=33064 Differential Revision: https://reviews.llvm.org/D33326 llvm-svn: 303374
* When we enter a module within a linkage specification, switch the linkageRichard Smith2017-05-182-5/+36
| | | | | | | | | | specification and the TU to the new module. This is necessary to get the module ownership correct for entities that we temporarily hang off the TranslationUnitDecl, such as template parameters and function parameters. llvm-svn: 303373
* Fix the location of "missing ';'" suggestions after annotation tokens.Richard Smith2017-05-1813-125/+137
| | | | | | | | | | We were incorrectly setting PrevTokLocation to the first token in the annotation token instead of the last when consuming it. To fix this without adding a complex switch to the hot path through ConsumeToken, we now have a ConsumeAnnotationToken function for consuming annotation tokens in addition to the other Consume*Token special case functions. llvm-svn: 303372
* COFF: Replace DLLNames maps with vectors.Peter Collingbourne2017-05-182-16/+8
| | | | | | | | | The import lists are already binned by DLL name, so there's no need to deduplicate here. Differential Revision: https://reviews.llvm.org/D33330 llvm-svn: 303371
* CodeGen: Cast alloca to expected address spaceYaxun Liu2017-05-1828-85/+286
| | | | | | | | | | | Alloca always returns a pointer in alloca address space, which may be different from the type defined by the language. For example, in C++ the auto variables are in the default address space. Therefore cast alloca to the expected address space when necessary. Differential Revision: https://reviews.llvm.org/D32248 llvm-svn: 303370
* Revert r302938 "Add LiveRangeShrink pass to shrink live range within BB."Hans Wennborg2017-05-1856-1665/+1409
| | | | | | | | | This also reverts follow-ups r303292 and r303298. It broke some Chromium tests under MSan, and apparently also internal tests at Google. llvm-svn: 303369
* Use existing helper. NFC.Rafael Espindola2017-05-181-4/+1
| | | | llvm-svn: 303368
* [InstSimplify] Add test cases for missing fold (A & B) | ~(A ^ B) -> ~(A ^ B).Craig Topper2017-05-181-0/+68
| | | | llvm-svn: 303367
* [index] Avoid one more crash caused by infinite recursion that happens whenAlex Lorenz2017-05-183-3/+32
| | | | | | | | | | looking up a dependent name in a record that derives from itself rdar://32273000 Differential Revision: https://reviews.llvm.org/D33324 llvm-svn: 303366
OpenPOWER on IntegriCloud