summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [AST] Fix a whitespace typo [NFC]Philip Reames2018-08-221-1/+1
| | | | llvm-svn: 340384
* [AST] Reorder code to reduce a future patch diff [NFC]Philip Reames2018-08-221-3/+3
| | | | llvm-svn: 340383
* [AST] Move a function definition into the cpp [NFC]Philip Reames2018-08-222-11/+13
| | | | llvm-svn: 340382
* [GuardWidening] Ignore guards with trivial conditionsMax Kazantsev2018-08-222-0/+32
| | | | | | | | | | | | Guard widening should not spend efforts on dealing with guards with trivial true/false conditions. Such guards can easily be eliminated by any further cleanup pass like instcombine. However we should not unconditionally delete them because it may be profitable to widen other conditions into such guards. Differential Revision: https://reviews.llvm.org/D50247 Reviewed By: fedor.sergeev llvm-svn: 340381
* [gold] -thinlto-object-suffix-replace: don't append new suffix if path does ↵Fangrui Song2018-08-222-7/+14
| | | | | | | | | | | | | | | | not end with old suffix Summary: This is to be consistent with lld behavior since rLLD340364. Reviewers: tejohnson Reviewed By: tejohnson Subscribers: steven_wu, eraman, mehdi_amini, inglorion, dexonsmith, llvm-commits Differential Revision: https://reviews.llvm.org/D51060 llvm-svn: 340380
* [CodeGenPrepare] Set debug loc when widening a switch conditionVedant Kumar2018-08-222-0/+9
| | | | | | | Set a debug location on the cast instruction used to widen a switch condition. llvm-svn: 340379
* [analyzer] [NFC] Fix minor formatting issues in RetainCountCheckerGeorge Karpenkov2018-08-223-10/+8
| | | | | | Differential Revision: https://reviews.llvm.org/D51072 llvm-svn: 340378
* [analyzer] [NFC] Extract a method for creating RefVal from RetEffect in ↵George Karpenkov2018-08-221-34/+17
| | | | | | | | RetainCountChecker Differential Revision: https://reviews.llvm.org/D51071 llvm-svn: 340377
* Update the docs for using LLVM toolset in Visual StudioStephen Kelly2018-08-221-9/+10
| | | | | | | | | | Reviewers: hans Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D51079 llvm-svn: 340376
* [Support][CachePruning] prune least recently accessed files firstBob Haarman2018-08-223-35/+78
| | | | | | | | | | | | | | | | | Summary: Before this change, pruning order was based on size. This changes it to be based on time of last use instead, preferring to keep recently used files and prune older ones. Reviewers: pcc, rnk, espindola Reviewed By: rnk Subscribers: emaste, arichardson, hiraditya, steven_wu, dexonsmith, llvm-commits Differential Revision: https://reviews.llvm.org/D51062 llvm-svn: 340374
* [WebAssembly] Fix typos in mem.grow/memory.grow opcodesHeejin Ahn2018-08-221-2/+2
| | | | | | This should be not 0x3f but 0x40. llvm-svn: 340373
* [WebAssembly] Change comments on SP writing back (NFC)Heejin Ahn2018-08-222-3/+5
| | | | | | | | | | | | Summary: We now write back not to memory but to __stack_pointer global. Reviewers: dschuff Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D51074 llvm-svn: 340372
* [CodeGenPrepare] Set debug locations when splitting selectsVedant Kumar2018-08-222-4/+22
| | | | | | | When splitting a select into a diamond, set debug locations on newly-created branch instructions and phi nodes. llvm-svn: 340371
* [CodeGenPrepare] Clean up dbg.value use-before-def as late as possibleVedant Kumar2018-08-212-7/+6
| | | | | | | | | | | CodeGenPrepare has a strategy for moving dbg.values so that a value's definition always dominates its debug users. This cleanup was happening too early (before certain CGP transforms were run), resulting in some dbg.value use-before-def errors. Perform this cleanup as late as possible to avoid use-before-def. llvm-svn: 340370
* [CodeGenPrepare] Pre-commit debug info test for optimizeSelectInstVedant Kumar2018-08-211-0/+15
| | | | | | | | This test shows that optimizeSelectInst splits a select and sinks a `fdiv` operation to one side of the diamond. However, the dbg.value for the operation isn't moved. llvm-svn: 340369
* [CodeGenPrepare] Scan past debug intrinsics to find select candidates (NFC)Vedant Kumar2018-08-211-3/+4
| | | | | | | | | | In optimizeSelectInst, when scanning for candidate selects to rewrite into branches, scan past debug intrinsics. This makes the debug-enabled and non-debug paths through optimizeSelectInst more congruent. NFC because every select is eventually visited either way. llvm-svn: 340368
* [CodeGenPrepare] Exit earlier when optimizing selects (NFC)Vedant Kumar2018-08-211-2/+5
| | | | | | | When optimizing for size, this allows optimizeSelectInst to skip a linear scan and exit early. llvm-svn: 340367
* Avoid dbg.value use-before-def in a few tests (NFC)Vedant Kumar2018-08-214-13/+13
| | | | | | | | | | This is preparation for landing a use-before-def verifier for debug intrinsics (D46100). As a drive-by, remove `tail` from debug intrinsic calls because it doesn't mean anything in that context. llvm-svn: 340366
* Update MemorySSA in BasicBlockUtils.Alina Sbirlea2018-08-2110-38/+66
| | | | | | | | | | | Summary: Extend BasicBlocksUtils to update MemorySSA. Subscribers: sanjoy, arsenm, nhaehnle, jlebar, Prazek, llvm-commits Differential Revision: https://reviews.llvm.org/D45300 llvm-svn: 340365
* [ELF] -thinlto-object-suffix-replace=: don't error if the path does not end ↵Fangrui Song2018-08-212-12/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with old suffix Summary: For -thinlto-object-suffix-replace=old\;new, in tools/gold/gold-plugin.cpp, the thinlto object filename is Path minus optional old suffix. static std::string getThinLTOObjectFileName(StringRef Path, StringRef OldSuffix, StringRef NewSuffix) { if (OldSuffix.empty() && NewSuffix.empty()) return Path; StringRef NewPath = Path; NewPath.consume_back(OldSuffix); std::string NewNewPath = NewPath; NewNewPath += NewSuffix; return NewNewPath; } Currently lld will error that the path does not end with old suffix. This patch makes lld accept such paths but only add new suffix if Path ends with old suffix. This fixes a link error where bitcode members in an archive are regular LTO objects without old suffix. Acording to tejohnson, this will "enable supporting mix and match of minimized ThinLTO bitcode files with normal ThinLTO bitcode files in a single link (where we want to apply the suffix replacement to the minimized files, and just ignore it for the normal ThinLTO files)." Reviewers: ruiu, pcc, tejohnson, espindola Reviewed By: tejohnson Subscribers: emaste, inglorion, arichardson, eraman, steven_wu, dexonsmith, llvm-commits Differential Revision: https://reviews.llvm.org/D51055 llvm-svn: 340364
* [MemorySSA] Update comment for move APIs to clarify behavior (NFC).Alina Sbirlea2018-08-211-11/+11
| | | | llvm-svn: 340362
* Add space to TemplateArgument dumpRichard Trieu2018-08-211-1/+1
| | | | | | | Add a missing space when dumping a template argument which is a template expansion. Found during debugging so no test. llvm-svn: 340357
* [MS Demangler] Print template constructor args.Zachary Turner2018-08-212-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously if you had something like this: template<typename T> struct Foo { template<typename U> Foo(U); }; Foo F(3.7); this would mangle as ??$?0N@?$Foo@H@@QEAA@N@Z and this would be demangled as: undname: __cdecl Foo<int>::Foo<int><double>(double) llvm-undname: __cdecl Foo<int>::Foo<int>(double) Note the lack of the constructor template parameter in our demangling. This patch makes it so we print the constructor argument list. llvm-svn: 340356
* [tsan] Adjust setjmp/longjmp handling on Darwin for macOS MojaveKuba Mracek2018-08-216-4/+30
| | | | | | | | | | On macOS Mojave, the OS started using the XOR-by-a-secret-key scheme (same as glibc is alread doing) for storing the SP value in setjmp environment. We need to adjust for that to keep supporting setjmp/longjmp on latest Darwin. The patch is basically doing the same what we're already doing for glibc. rdar://problem/43542596 Differential Revision: https://reviews.llvm.org/D51064 llvm-svn: 340350
* Eliminate instances of `EmitScalarExpr(E->getArg(n))` in EmitX86BuiltinExpr().Nico Weber2018-08-213-34/+46
| | | | | | | | | | | | EmitX86BuiltinExpr() emits all args into Ops at the beginning, so don't do that work again. This changes behavior: If e.g. ++a was passed as an arg, we incremented a twice previously. This change fixes that bug. https://reviews.llvm.org/D50979 llvm-svn: 340348
* Fixup for r340342: Avoid Block_release'ing the block since we're no longer ↵Kuba Mracek2018-08-211-1/+1
| | | | | | | | making a copy. rdar://problem/42242579 llvm-svn: 340347
* MachineScheduler: Refactor setPolicy() to limit computing remaining latencyTom Stellard2018-08-212-28/+64
| | | | | | | | | | | | | | | | | | | | | Summary: Computing the remaining latency can be very expensive especially on graphs of N nodes where the number of edges approaches N^2. This reduces the compile time of a pathological case with the AMDGPU backend from ~7.5 seconds to ~3 seconds. This test case has a basic block with 2655 stores, each with somewhere between 500 and 1500 successors and predecessors. Reviewers: atrick, MatzeB, airlied, mareko Reviewed By: mareko Subscribers: tpr, javed.absar, llvm-commits Differential Revision: https://reviews.llvm.org/D50486 llvm-svn: 340346
* [LICM] Fix a test so it actualy checks what was meant [NFC]Philip Reames2018-08-211-8/+29
| | | | llvm-svn: 340344
* [AMDGPU] Consider loads from flat addrspace to be potentially divergentScott Linder2018-08-212-4/+21
| | | | | | | | | In general we can't assume flat loads are uniform, and cases where we can prove they are should be handled through infer-address-spaces. Differential Revision: https://reviews.llvm.org/D50991 llvm-svn: 340343
* [tsan] Avoid calling Block_copy in the "sync" GCD interceptorsKuba Mracek2018-08-212-4/+35
| | | | | | | | | | The synchronous dispatch functions in GCD (dispatch_sync, dispatch_barrier_sync), don't make a copy of the passed block. To maintain binary compatibility, we should avoid doing that as well in TSan, as there's no reason to do that. The synchronous dispatch functions will not return before the block is actually executed. rdar://problem/42242579 Differential Revision: https://reviews.llvm.org/D50920 llvm-svn: 340342
* [MS Demangler] Fix a few more edge cases.Zachary Turner2018-08-214-18/+77
| | | | | | | | | | | | | | | | I found these by running llvm-undname over a couple hundred megabytes of object files generated as part of building chromium. The issues fixed in this patch are: 1) decltype-auto return types. 2) Indirect vtables (e.g. const A::`vftable'{for `B'}) 3) Pointers, references, and rvalue-references to member pointers. I have exactly one remaining symbol out of a few hundred MB of object files that produces a name we can't demangle, and it's related to back-referencing. llvm-svn: 340341
* Print "invalid mangled name" when we can't demangle something.Zachary Turner2018-08-211-0/+2
| | | | llvm-svn: 340340
* [WebAssembly] Restore __stack_pointer after catch instructionsHeejin Ahn2018-08-217-6/+114
| | | | | | | | | | | | | | | Summary: After the stack is unwound due to a thrown exception, the `__stack_pointer` global can point to an invalid address. This inserts instructions that restore `__stack_pointer` global. Reviewers: jgravelle-google, dschuff Subscribers: mgorny, sbc100, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D50980 llvm-svn: 340339
* NFC: update the test comments in LV test about early exit loopsAnna Thomas2018-08-211-2/+14
| | | | llvm-svn: 340337
* [WebAssembly] v128.constThomas Lively2018-08-219-19/+229
| | | | | | | | | | | | | | | | Summary: This CL implements v128.const for each vector type. New operand types are added to ensure the vector contents can be serialized without LEB encoding. Tests are added for instruction selection, encoding, assembly and disassembly. Reviewers: aheejin, dschuff, aardappel Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D50873 llvm-svn: 340336
* [docs][gold] Fix a typoFangrui Song2018-08-211-1/+1
| | | | llvm-svn: 340335
* [CodeGen] Implicitly set stackrealign on the main function, if custom stack ↵Martin Storsjo2018-08-212-0/+26
| | | | | | | | | | | | | | | | | | | | | alignment is used If using a custom stack alignment, one is expected to make sure that all callers provide such alignment, or realign the stack in all entry points (and callbacks). Despite this, the compiler can assume that the main function will need realignment in these cases, since the startup routines calling the main function most probably won't provide the custom alignment. This matches what GCC does in similar cases; if compiling with -mincoming-stack-boundary=X -mpreferred-stack-boundary=X, GCC normally assumes such alignment on entry to a function, but specifically for the main function still does realignment. Differential Revision: https://reviews.llvm.org/D51026 llvm-svn: 340334
* [LICM] Refactor some AliasSetTracker code to get rid of new/deletes. NFCMarcello Maggioni2018-08-211-43/+33
| | | | | | Differential Revision: https://reviews.llvm.org/D51024 llvm-svn: 340333
* [CodeExtractor] Use 'normal destination' BB as insert point to store invoke ↵Florian Hahn2018-08-212-1/+56
| | | | | | | | | | | | | | | | | | | results. Currently CodeExtractor tries to use the next node after an invoke to place the store for the result of the invoke, if it is an out parameter of the region. This fails, as the invoke terminates the current BB. In that case, we can place the store in the 'normal destination' BB, as the result will only be available in that case. Reviewers: davidxl, davide, efriedma Reviewed By: davidxl Differential Revision: https://reviews.llvm.org/D51037 llvm-svn: 340331
* [WebAssembly] Don't make wasm cleanuppads into funclet entriesHeejin Ahn2018-08-212-5/+9
| | | | | | | | | | | | | | | Summary: Catchpads and cleanuppads are not funclet entries; they are only EH scope entries. We already dont't set `isEHFuncletEntry` for catchpads. This patch does the same thing for cleanuppads. Reviewers: dschuff Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D50654 llvm-svn: 340330
* [WebAssembly] Change writeSPToMemory to writeSPToGlobal (NFC)Heejin Ahn2018-08-211-4/+4
| | | | | | | | | | | | Summary: SP is now a __stack_pointer global and not a memory address anymore. Reviewers: dschuff Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D51046 llvm-svn: 340328
* [RegisterCoalescer] Use substPhysReg in reMaterializeTrivialDefBjorn Pettersson2018-08-212-1/+55
| | | | | | | | | | | | | | | | | | | Summary: When RegisterCoalescer::reMaterializeTrivialDef is substituting a register use in a DBG_VALUE instruction, and the old register is a subreg, and the new register is a physical register, then we need to use substPhysReg in order to extract the correct subreg. Reviewers: wmi, aprantl Reviewed By: wmi Subscribers: hiraditya, MatzeB, qcolombet, tpr, llvm-commits Differential Revision: https://reviews.llvm.org/D50844 llvm-svn: 340326
* [WebAssembly] Add isEHScopeReturn instruction propertyHeejin Ahn2018-08-2112-5/+85
| | | | | | | | | | | | | | | | | | | | | | | | Summary: So far, `isReturn` property is used to mean both a return instruction from a functon and the end of an EH scope, a scope that starts with a EH scope entry BB and ends with a catchret or a cleanupret instruction. Because WinEH uses funclets, all EH-scope-ending instructions are also real return instruction from a function. But for wasm, they only serve as the end marker of an EH scope but not a return instruction that exits a function. This mismatch caused incorrect prolog and epilog generation in wasm EH scopes. This patch fixes this. This patch is in the same vein with rL333045, which splits `MachineBasicBlock::isEHFuncletEntry` into `isEHFuncletEntry` and `isEHScopeEntry`. Reviewers: dschuff Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D50653 llvm-svn: 340325
* Fix Wdocumentation warning. NFCI.Simon Pilgrim2018-08-211-1/+1
| | | | llvm-svn: 340324
* [InstCombine] Pull simple checks above a more complicated one. NFCICraig Topper2018-08-211-4/+2
| | | | | | I'm assuming its easier to make sure the RHS of an XOR is all ones than it is to check for the many select patterns we have. So lets check that first. Same with the one use check. llvm-svn: 340321
* [GVN] Assign new value number to calls reading memory, if there is no MemDep ↵Florian Hahn2018-08-212-13/+38
| | | | | | | | | | | | | | | | | | | | | | info. Currently we assign the same value number to two calls reading the same memory location if we do not have MemoryDependence info. Without MemDep Info we cannot guarantee that there is no store between the two calls, so we have to assign a new number to the second call. It also adds a new option EnableMemDep to enable/disable running MemoryDependenceAnalysis and also renamed NoLoads to NoMemDepAnalysis to be more explicit what it does. As it also impacts calls that read memory, NoLoads is a bit confusing. Reviewers: efriedma, sebpop, john.brawn, wmi Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D50893 llvm-svn: 340319
* [RegisterCoalscer] Manually remove leftover segments when commuting defKrzysztof Parzyszek2018-08-212-0/+90
| | | | | | | | | | | | | In removeCopyByCommutingDef, segments from the source live range are copied into (and merged with) the segments of the target live range. This is performed for all subranges of the source interval. It can happen that there will be subranges of the target interval that had no corresponding subranges in the source interval, and in such cases these subrages will not be updated. Since the copy being coalesced is about to be removed, these ranges need to be updated by removing the segments that are started by the copy. llvm-svn: 340318
* [NVPTX] Remove ftz variants of cvt with rounding modeBenjamin Kramer2018-08-212-94/+123
| | | | | | | | These do not exist in ptxas, it refuses to compile them. Differential Revision: https://reviews.llvm.org/D51042 llvm-svn: 340317
* [llvm-mca] Remove unused decl. NFC.Matt Davis2018-08-211-1/+0
| | | | llvm-svn: 340316
* Temporarily Revert "[PowerPC] Generate Power9 extswsli extend sign and shift ↵Eric Christopher2018-08-215-55/+3
| | | | | | | | immediate instruction" due to it causing a compiler crash on valid. This reverts commit r340016, testcase forthcoming. llvm-svn: 340315
OpenPOWER on IntegriCloud