summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* DAG: Allow matching fminnum/fmaxnum from vselectMatt Arsenault2018-08-243-8/+1308
| | | | llvm-svn: 340655
* Use unique_ptr to hold MCInstrInfoVitaly Buka2018-08-241-1/+2
| | | | llvm-svn: 340654
* Verifier: verify that a DILocation's scope is a DILocalScope.Adrian Prantl2018-08-242-0/+28
| | | | | | | | This fixes an assertion failure(!) in the Verifier. rdar://problem/43687474 llvm-svn: 340653
* Fixed windows bots that were failing because of PATH_MAXRaphael Isemann2018-08-241-0/+2
| | | | | | | | As we only use PATH_MAX for an assert in a unit test that is supposed to catch the random failures on the Swift CI bots, we might as well just ifdef this assert out on Windows. llvm-svn: 340652
* [SafeStack] Set debug location for calls to __safestack_pointer_address.Eli Friedman2018-08-242-0/+102
| | | | | | | | | | | | Otherwise, the debug info is incorrect. On its own, this is mostly harmless, but the safe-stack also later inlines the call to __safestack_pointer_address, which leads to debug info with the wrong scope, which eventually causes an assertion failure (and incorrect debug info in release mode). Differential Revision: https://reviews.llvm.org/D51075 llvm-svn: 340651
* Reduce the memory footprint of dsymutil. (NFC)Adrian Prantl2018-08-242-29/+43
| | | | | | | | | | | | | | | | | | This (partially) fixes a regression introduced by https://reviews.llvm.org/D43945 / r327399, which parallelized DwarfLinker. This patch avoids parsing and allocating the memory for all input DIEs up front and instead only allocates them in the concurrent loop in the AnalyzeLambda. At the end of the loop the memory from the LinkContext is cleared again. This reduces the peak memory needed to link the debug info of a non-modular build of the Swift compiler by >3GB. rdar://problem/43444464 Differential Revision: https://reviews.llvm.org/D51078 llvm-svn: 340650
* Reland r340552, "Driver: Enable address-significance tables by default when ↵Peter Collingbourne2018-08-242-1/+3
| | | | | | | | | | targeting COFF." which was reverted in r340579. The underlying problem that caused the revert was fixed in r340648. Differential Revision: https://reviews.llvm.org/D51049 llvm-svn: 340649
* CodeGen: Add two more conditions for adding symbols to the ↵Peter Collingbourne2018-08-242-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | address-significance table. Firstly, require the symbol to be used within the module. If a symbol is unused within a module, then by definition it cannot be address-significant within that module. This condition is useful on all platforms because it could make symbol tables smaller -- without this change, emitting an address-significance table could cause otherwise unused undefined symbols to be added to the object file. But this change is necessary with COFF specifically in order to preserve the property that an unreferenced undefined symbol in an IR module does not result in a link failure. This is already the case for ELF because ELF linkers only reject links with unresolved symbols if there is a relocation to that symbol, but COFF linkers require all undefined symbols to be resolved regardless of relocations. So if a module contains an unreferenced undefined symbol, we need to make sure not to add it to the address-significance table (and thus the symbol table) in case it doesn't end up resolved at link time. Secondly, do not add dllimport symbols to the table. These symbols won't be able to be resolved because their definitions live in another module and are accessed via the IAT, and the address-significance table has no effect on other modules anyway. It wouldn't make sense to add the IAT entry symbol to the address-significance table either because the IAT entry isn't address-significant -- the generated code never takes its address. Differential Revision: https://reviews.llvm.org/D51199 llvm-svn: 340648
* [OpenMP] Fixed affinity verbose double printing for balanced type.Jonathan Peyton2018-08-241-1/+2
| | | | llvm-svn: 340647
* DebugInfo: Fix skipping CUs in DWARFv5 debug_names tableDavid Blaikie2018-08-242-29/+50
| | | | | | | | | | My previoust test case had skipped CUs from one TU out of a two-TU LTO scenario, which meant the CU index wasn't needed (as it was unambiguous which CU a table entry applied to) - expanding the test to use 3 TUs, skipping one (so long as it's not the last one) shows the indexes are miscomputed. Fix that with a little indirection for the index. llvm-svn: 340646
* [llvm-mca] Move views and stats into a Views subdir. NFC.Matt Davis2018-08-2423-38/+37
| | | | llvm-svn: 340645
* Add REQUIRES: x86-registered-target to test.Eli Friedman2018-08-241-0/+1
| | | | | | | (This isn't really x86-specific, but we have to pick some non-Apple triple to exercise the right codepath.) llvm-svn: 340644
* [PowerPC] Emit xscpsgndp instead of xxlor when copying floating point scalar ↵Stefan Pintilie2018-08-246-15/+63
| | | | | | | | | | | | | | | registers for P9 This patch will address using the xscpsgndp instruction to copy floating point scalar registers instead of the xxlor (specifically XXLORf) instruction that is currently used. Additionally, this patch of utilizing xscpsgndp will apply to P9, while pre-P9 will still use xxlor. Patch by amyk Differential Revision: https://reviews.llvm.org/D50004 llvm-svn: 340643
* Use unique_ptr.Joel Galenson2018-08-241-1/+2
| | | | llvm-svn: 340642
* [Exception Handling] Unwind tables are required for all functions that have ↵Stefan Pintilie2018-08-244-1/+96
| | | | | | | | | | | | | | an EH personality. This patch is for defect: https://bugs.llvm.org/show_bug.cgi?id=32611 Functions may require unwind tables even if they are marked with the attribute nounwind. Any function with an EH personality may require an unwind table. Differential Revision: https://reviews.llvm.org/D50987 llvm-svn: 340641
* [LTO] Fix -save-temps with LTO and unnamed globals.Eli Friedman2018-08-242-2/+14
| | | | | | | | | If all LLVM passes are disabled, we can't emit a summary because there could be unnamed globals in the IR. Differential Revision: https://reviews.llvm.org/D51198 llvm-svn: 340640
* [PowerPC] Change Test Options [NFC]Stefan Pintilie2018-08-243-750/+782
| | | | | | Patch by amyk llvm-svn: 340639
* [AST] Simplify code minorly using pattern match [NFC]Philip Reames2018-08-241-8/+4
| | | | llvm-svn: 340638
* [AArch64] Reject inline asm with FP registers when FP is disabled.Eli Friedman2018-08-242-0/+26
| | | | | | | | Otherwise, we would crash trying to deal with an illegal input. Differential Revision: https://reviews.llvm.org/D51202 llvm-svn: 340637
* Thread safety analysis no longer hands when analyzing a self-referencing ↵Aaron Ballman2018-08-242-0/+11
| | | | | | | | initializer. This fixes PR38640. llvm-svn: 340636
* [Common] Discard the temp file while keeping the memory mapping open, on errorsMartin Storsjo2018-08-241-2/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D51095 llvm-svn: 340635
* [Support] Allow discarding a FileOutputBuffer without removing the memory ↵Martin Storsjo2018-08-242-0/+10
| | | | | | | | mapping Differential Revision: https://reviews.llvm.org/D51095 llvm-svn: 340634
* [scudo] Replace eraseHeader with compareExchangeHeader for Quarantined chunksKostya Kortchinsky2018-08-241-10/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The reason for the existence of `eraseHeader` was that it was deemed faster to null-out a chunk header, effectively making it invalid, rather than marking it as available, which incurred a checksum computation and a cmpxchg. A previous use of `eraseHeader` was removed with D50655 due to a race. Now we remove the second use of it in the Quarantine deallocation path and replace is with a `compareExchangeHeader`. The reason for this is that greatly helps debugging some heap bugs as the chunk header is now valid and the chunk marked available, as opposed to the header being invalid. Eg: we get an invalid state error, instead of an invalid header error, which reduces the possibilities. The computational penalty is negligible. Reviewers: alekseyshl, flowerhack, eugenis Reviewed By: eugenis Subscribers: delcypher, jfb, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D51224 llvm-svn: 340633
* [OpenMP] Fix tasking bug for decreasing hot team nthreadsJonathan Peyton2018-08-241-1/+1
| | | | | | | | | | | | | | | | | | The __kmp_execute_tasks_template() function reads the task_team and current_task from the thread structure. There appears to be a pathological timing where the number of threads in the hot team decreases and so a thread is put in the pool via __kmp_free_thread(). It could be the case that: 1) A thread reads th_task_team into task_team local variables and is then interrupted by the OS 2) Master frees the thread and sets current task and task team to NULL 3) The thread reads current_task as NULL When this happens, current_task is dereferenced and a segfault occurs. This patch just checks for current_task to not be NULL as well. Differential Revision: https://reviews.llvm.org/D50651 llvm-svn: 340632
* [X86] Teach combineLoopMAddPattern to handle cases where there is no loop ↵Craig Topper2018-08-242-41/+41
| | | | | | | | and the add has two multiply inputs Differential Revision: https://reviews.llvm.org/D50868 llvm-svn: 340631
* [X86] Add test case for D50868. NFCCraig Topper2018-08-241-0/+80
| | | | llvm-svn: 340630
* [OpenMP] Add check for hot_teams arrayJonathan Peyton2018-08-241-1/+2
| | | | | | | | | | If hot teams are not being used, this code could seg fault without the added check, and does so when composability is used in conjunction with nesting. The fix prevents the segfault. Differential Revision: https://reviews.llvm.org/D50649 llvm-svn: 340629
* [OpenMP] Fix incorrect barrier imbalance reporting in ITTNOTIFYJonathan Peyton2018-08-242-22/+26
| | | | | | | | | Exclude nested explicit tasks from timing, only outer level explicit task counted and its time added to barrier arrive time for the thread. Differential Revision: https://reviews.llvm.org/D50584 llvm-svn: 340628
* [ASTImporter] Add test for PackExpansionExprRaphael Isemann2018-08-242-0/+23
| | | | | | | | | | | | Reviewers: a.sidorin, a_sidorin Reviewed By: a_sidorin Subscribers: martong, cfe-commits Differential Revision: https://reviews.llvm.org/D51142 llvm-svn: 340627
* [DAGCombiner][Mips] Don't combine bitcast+store after LegalOperations when ↵Craig Topper2018-08-243-5/+9
| | | | | | | | | | | | | | the store is volatile, if the resulting store isn't Legal Previously we allowed the store to be Custom. But without knowing for sure that the Custom handling won't split the store, we shouldn't convert a volatile store. We also probably shouldn't be creating a store the requires custom handling after LegalizeOps. This could lead to an infinite loop if the custom handling was to insert a bitcast. Though I guess isStoreBitCastBeneficial could be used to block such a loop. The test changes here are due to the volatile part of this. The stores in the test are all volatile and i32 stores are marked custom, So we are no longer converting them This is related to D50491 where I was trying to allow some bitcasting of volatile loads Differential Revision: https://reviews.llvm.org/D50578 llvm-svn: 340626
* Revert "[Exception Handling] Unwind tables are required for all functions ↵Stefan Pintilie2018-08-244-96/+1
| | | | | | | | | that have an EH personality." This reverts commit rL340614. Previous commit broke some llvm-cfi-verify tests. llvm-svn: 340625
* [clang-format] fix PR38557 - comments between "default" and ':' causes the ↵Jonas Toth2018-08-242-1/+20
| | | | | | | | | | | | | | | | | | | case label to be treated as an identifier Summary: The Bug was reported and fixed by Owen Pan. See the original bug report here: https://bugs.llvm.org/show_bug.cgi?id=38557 Patch by Owen Pan! Reviewers: krasimir, djasper, klimek Reviewed By: klimek Subscribers: JonasToth, cfe-commits Differential Revision: https://reviews.llvm.org/D50697 llvm-svn: 340624
* [clang-format] fix PR38525 - Extraneous continuation indent spaces with ↵Jonas Toth2018-08-242-1/+14
| | | | | | | | | | | | | | | | | | BreakBeforeBinaryOperators set to All Summary: See bug report https://bugs.llvm.org/show_bug.cgi?id=38525 for more details. Reviewers: djasper, klimek, krasimir, sammccall Reviewed By: sammccall Subscribers: hiraditya, JonasToth, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D50699 llvm-svn: 340623
* [Hexagon] Remove unneeded strings from builtin definitions, NFCKrzysztof Parzyszek2018-08-241-815/+815
| | | | llvm-svn: 340622
* [Sanitizer] implementing remaining function under OSXDavid Carlier2018-08-242-5/+8
| | | | | | | | | | | | | - GetRandom and GetnumberOfCPUs using sys call for the former. - enabling unit tests for the other oses. Reviewers: kubamracek Reviewed By: kubamracek Differential Revision: https://reviews.llvm.org/D50937 llvm-svn: 340621
* [clang-doc] Fix memory leaksJulie Hockett2018-08-242-5/+7
| | | | | | | | Adds a virtual destructor to the base Info class. Differential Revision: https://reviews.llvm.org/D51137 llvm-svn: 340620
* Revert [Inliner] Attribute callsites with inline remarksDavid Bolvansky2018-08-242-147/+8
| | | | llvm-svn: 340619
* [Inliner] Attribute callsites with inline remarksDavid Bolvansky2018-08-242-8/+147
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Sometimes reading an output *.ll file it is not easy to understand why some callsites are not inlined. We can read output of inline remarks (option --pass-remarks-missed=inline) and try correlating its messages with the callsites. An easier way proposed by this patch is to add to every callsite processed by Inliner an attribute with the latest message that describes the cause of not inlining this callsite. The attribute is called //inline-remark//. By default this feature is off. It can be switched on by the option //-inline-remark-attribute//. For example in the provided test the result method //@test1// has two callsites //@bar// and inline remarks report different inlining missed reasons: remark: <unknown>:0:0: bar not inlined into test1 because too costly to inline (cost=-5, threshold=-6) remark: <unknown>:0:0: bar not inlined into test1 because it should never be inlined (cost=never): recursive It is not clear which remark correspond to which callsite. With the inline remark attribute enabled we get the reasons attached to their callsites: define void @test1() { call void @bar(i1 true) #0 call void @bar(i1 false) #2 ret void } attributes #0 = { "inline-remark"="(cost=-5, threshold=-6)" } .. attributes #2 = { "inline-remark"="(cost=never): recursive" } Patch by: yrouban (Yevgeny Rouban) Reviewers: xbolva00, tejohnson, apilipenko Reviewed By: xbolva00, tejohnson Subscribers: eraman, llvm-commits Differential Revision: https://reviews.llvm.org/D50435 llvm-svn: 340618
* [LICM] Hoist an invariant_start out of loops if there are no stores executed ↵Philip Reames2018-08-242-8/+9
| | | | | | | | | | before it Once the invariant_start is reached, we know that no instruction *after* it can modify the memory. So, if we can prove the location isn't read *between entry into the loop and the execution of the invariant_start*, we can execute the invariant_start before entering the loop. Differential Revision: https://reviews.llvm.org/D51181 llvm-svn: 340617
* Modify tests to show PLT entry labelsJoel Galenson2018-08-2410-5/+59
| | | | llvm-svn: 340616
* Add missing override keyword (NFC)Joel Galenson2018-08-241-1/+2
| | | | llvm-svn: 340615
* [Exception Handling] Unwind tables are required for all functions that have ↵Stefan Pintilie2018-08-244-1/+96
| | | | | | | | | | | | | | an EH personality. This patch is for defect: https://bugs.llvm.org/show_bug.cgi?id=32611 Functions may require unwind tables even if they are marked with the attribute nounwind. Any function with an EH personality may require an unwind table. Differential Revision: https://reviews.llvm.org/D50987 llvm-svn: 340614
* [PhiValues] Use callback value handles to invalidate deleted valuesJohn Brawn2018-08-243-4/+67
| | | | | | | | | | | The way that PhiValues is integrated with BasicAA it is possible for a pass which uses BasicAA to pick up an instance of BasicAA that uses PhiValues without intending to, and then delete values from a function in a way that causes PhiValues to return dangling pointers to these deleted values. Fix this by having a set of callback value handles to invalidate values when they're deleted. llvm-svn: 340613
* [cfi-verify] Support cross-DSOJoel Galenson2018-08-247-1/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When used in cross-DSO mode, CFI will generate calls to special functions rather than trap instructions. For example, instead of generating if (!InlinedFastCheck(f)) abort(); call *f CFI generates if (!InlinedFastCheck(f)) __cfi_slowpath(CallSiteTypeId, f); call *f This patch teaches cfi-verify to recognize calls to __cfi_slowpath and abort and treat them as trap functions. In addition to normal symbols, we also parse the dynamic relocations to handle cross-DSO calls in libraries. We also extend cfi-verify to recognize other patterns that occur using cross-DSO. For example, some indirect calls are not guarded by a branch to a trap but instead follow a call to __cfi_slowpath. For example: if (!InlinedFastCheck(f)) call *f else { __cfi_slowpath(CallSiteTypeId, f); call *f } In this case, the second call to f is not marked as protected by the current code. We thus recognize if indirect calls directly follow a call to a function that will trap on CFI violations and treat them as protected. We also ignore indirect calls in the PLT, since on AArch64 each entry contains an indirect call that should not be protected by CFI, and these are labeled incorrectly when debug information is not present. Differential Revision: https://reviews.llvm.org/D49383 llvm-svn: 340612
* [llvm-objdump] Label calls to the PLT.Joel Galenson2018-08-246-0/+55
| | | | | | Differential Revision: https://reviews.llvm.org/D50204 llvm-svn: 340611
* Find PLT entries for x86, x86_64, and AArch64.Joel Galenson2018-08-245-0/+162
| | | | | | | | | | This adds a new method to ELFObjectFileBase that returns the symbols and addresses of PLT entries. This design was suggested by pcc and eugenis in https://reviews.llvm.org/D49383. Differential Revision: https://reviews.llvm.org/D50203 llvm-svn: 340610
* [libc++] Fix handling of negated character classes in regexLouis Dionne2018-08-243-10/+51
| | | | | | | | | | | | | | | | Summary: This commit fixes a regression introduced in r316095, where we don't match inverted character classes when there's no negated characrers in the []'s. rdar://problem/43060054 Reviewers: mclow.lists, timshen, EricWF Subscribers: christof, dexonsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D50534 llvm-svn: 340609
* [libc++] Remove race condition in std::asyncLouis Dionne2018-08-243-16/+66
| | | | | | | | | | | | | | | | | Summary: The state associated to the future was set in one thread (with synchronization) but read in another thread without synchronization, which led to a data race. https://bugs.llvm.org/show_bug.cgi?id=38181 rdar://problem/42548261 Reviewers: mclow.lists, EricWF Subscribers: christof, dexonsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D51170 llvm-svn: 340608
* [clangd] Initial cancellation mechanism for LSP requests.Kadir Cetinkaya2018-08-2415-29/+431
| | | | | | | | | | | | Reviewers: ilya-biryukov, ioeric, hokein Reviewed By: ilya-biryukov Subscribers: mgorny, ioeric, MaskRay, jkorous, arphaman, jfb, cfe-commits Differential Revision: https://reviews.llvm.org/D50502 llvm-svn: 340607
* [Local] Make DoesKMove required for combineMetadata.Florian Hahn2018-08-2414-14/+288
| | | | | | | | | | | | | | | This patch makes the DoesKMove argument non-optional, to force people to think about it. Most cases where it is false are either code hoisting or code sinking, where we pick one instruction from a set of equal instructions among different code paths. Reviewers: dberlin, nlopes, efriedma, davide Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D47475 llvm-svn: 340606
OpenPOWER on IntegriCloud