summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* SjLjEHPrepare: Don't reg-to-mem swifterror valuesArnold Schwaighofer2018-03-142-24/+38
| | | | | | | | | | | | | | | | | swifterror llvm values model the swifterror register as memory at the LLVM IR level. ISel will perform adhoc mem-to-reg on them. swifterror values are constraint in how they can be used. Spilling them to memory is not allowed. SjLjEHPrepare tried to lower swifterror values to memory which is unecessary since the back-end will spill and reload the register as neccessary (as long as clobbering calls are marked as such which is the case here) and further leads to invalid IR because swifterror values can't be stored to memory. rdar://38164004 llvm-svn: 327521
* [GlobalIsel][X86] Support for G_SDIV instructionAlexander Ivchenko2018-03-147-4/+695
| | | | | | | | Reviewed By: igorb Differential Revision: https://reviews.llvm.org/D44430 llvm-svn: 327520
* [dotest] Rename llvm-dotest -> lldb-dotest and make it a custom targetJonas Devlieghere2018-03-142-4/+7
| | | | | | | | | | This renames llvm-dotest to lldb-dotest and makes it a custom target so you can run `ninja lldb-dotest` to rebuild whatever is necessary before rerunning the tests. Differential revision: https://reviews.llvm.org/D44473 llvm-svn: 327519
* [CodeGen] allow printing of zero latency in sched commentsSanjay Patel2018-03-141-5/+3
| | | | | | | | | | I don't know how to expose this in a test. There are ARM / AArch64 sched classes that include zero latency instructions, but I'm not seeing sched info printed for those targets. X86 will almost certainly have these soon (see PR36671), but no model has 'let Latency = 0' currently. llvm-svn: 327518
* [llvm-mca] Remove unused variable from InstrBuilder.cpp. NFCAndrea Di Biagio2018-03-141-1/+0
| | | | | | This was causing a buildbot failure. llvm-svn: 327517
* Add deep AST tree test for r327515Yaxun Liu2018-03-141-0/+262
| | | | llvm-svn: 327516
* CodeGen: Reduce LValue and CallArgList memory footprint before recommitting ↵Yaxun Liu2018-03-142-6/+9
| | | | | | | | | | | | | | | | | | r326946 Recent change r326946 (https://reviews.llvm.org/D34367) causes regression in Eigen due to increased memory footprint of CallArg. This patch reduces LValue size from 112 to 96 bytes and reduces inline argument count of CallArgList from 16 to 8. It has been verified that this will let the added deep AST tree test pass with r326946. In the long run, CallArg or LValue memory footprint should be further optimized. Differential Revision: https://reviews.llvm.org/D44445 llvm-svn: 327515
* [llvm-mca] Move the logic that updates the register files from InstrBuilder ↵Andrea Di Biagio2018-03-146-58/+65
| | | | | | | | | | | | | | | | | | | to DispatchUnit. NFCI Before this patch, the register file was always updated at instruction creation time. That means, new read-after-write dependencies, and new temporary registers were allocated at instruction creation time. This patch refactors the code in InstrBuilder, and move all the logic that updates the register file into the dispatch unit. We only want to update the register file when instructions are effectively dispatched (not before). This refactoring also helps removing a bad dependency between the InstrBuilder and the DispatchUnit. No functional change intended. llvm-svn: 327514
* [OpenMP] Add OpenMP data sharing infrastructure using global memoryGheorghe-Teodor Bercea2018-03-149-272/+981
| | | | | | | | | | | | | | | | | Summary: This patch handles the Clang code generation phase for the OpenMP data sharing infrastructure. TODO: add a more detailed description. Reviewers: ABataev, carlo.bertolli, caomhin, hfinkel, Hahnfeld Reviewed By: ABataev Subscribers: jholewinski, guansong, cfe-commits Differential Revision: https://reviews.llvm.org/D43660 llvm-svn: 327513
* [test] Disable TestMachCore everywhere except on DarwinJonas Devlieghere2018-03-141-0/+1
| | | | | | | | | | Apparently the parser is wrapped inside ifdef's so the logic isn't available on non-Darwin platforms. Should fix build bot failure: http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/20463 llvm-svn: 327512
* [mips] Add support for CRC ASEPetar Jovanovic2018-03-1427-4/+426
| | | | | | | | | | | | | | | | | | | This includes Instructions: crc32b, crc32h, crc32w, crc32d, crc32cb, crc32ch, crc32cw, crc32cd Assembler directives: .set crc, .set nocrc, .module crc, .module nocrc Attribute: crc .MIPS.abiflags: CRC (0x8000) Patch by Vladimir Stefanovic. Differential Revision: https://reviews.llvm.org/D44176 llvm-svn: 327511
* [X86][Btver2] Fix YMM shuffle, permute and permutevar scheduler costsSimon Pilgrim2018-03-143-15/+72
| | | | | | Account for ymm double pumping and add proper pshufb/permutevar support llvm-svn: 327510
* [LTO/gold] Fix workaround for old plugin-api.h in --wrap supportTeresa Johnson2018-03-141-1/+1
| | | | | | | | | | | | The workaround for older plugin-api.h in r327506 unfortunately used another union member that is also fairly new and not available in the plugin-api.h on some of the bots, leading to: http://lab.llvm.org:8011/builders/clang-with-thin-lto-ubuntu/builds/9121/steps/build-stage2-LLVMgold.so/logs/stdio Change to use a different member that we will definitely have (as it is used elsewhere in gold-plugin.cpp already). llvm-svn: 327509
* [WebAssembly] Add missing implementation for --initial/max-memory argsNicholas Wilson2018-03-143-2/+62
| | | | | | | | | Previously, Config->InitialMemory/MaxMemory were hooked up to some commandline args but had no effect at all. Differential Revision: https://reviews.llvm.org/D44393 llvm-svn: 327508
* [WebAssembly] Replace varargs debugPrint with standard log callNicholas Wilson2018-03-141-19/+9
| | | | | | Differential Revision: https://reviews.llvm.org/D44441 llvm-svn: 327507
* [LTO/gold] Support --wrapTeresa Johnson2018-03-145-0/+187
| | | | | | | | | | | | | | | | | | | | Summary: (Restores r327459 with handling for old plugin-api.h) Utilize new gold plugin api interface for obtaining --wrap option arguments, and LTO API handling (added for --wrap support in lld LTO), to mark symbols so that LTO does not optimize them inappropriately. Note the test cases will be in a new gold test subdirectory that is dependent on the next release of gold which will contain the new interfaces. Reviewers: pcc, tmsriram Subscribers: mehdi_amini, llvm-commits, inglorion Differential Revision: https://reviews.llvm.org/D44235 llvm-svn: 327506
* [X86][SSE] Use WriteFShuffleLd for MOVDDUP/MOVSHDUP/MOVSLDUP reg-mem ↵Simon Pilgrim2018-03-143-19/+23
| | | | | | | | | | instructions They shouldn't be treated as pure loads. Found while investigating D44428 llvm-svn: 327505
* [Sema] Pop function scope when instantiating a func with skipped bodyIlya Biryukov2018-03-141-6/+6
| | | | | | | | | | | | | | | | | | | | | Summary: By calling ActOnFinishFunctionBody(). Previously we were only calling ActOnSkippedFunctionBody, which didn't pop the function scope. This causes a crash when running on our internal code. No test-case, though, since I couldn't come up with a small example in reasonable time. The bug was introduced in r321174. Reviewers: bkramer, sammccall, sepavloff, aaron.ballman Reviewed By: sammccall, aaron.ballman Subscribers: aaron.ballman, cfe-commits Differential Revision: https://reviews.llvm.org/D44439 llvm-svn: 327504
* [AArch64] Don't produce R_AARCH64_TLSLE_LDST32_TPREL_LO12_NCMartin Storsjo2018-03-142-4/+10
| | | | | | | | | Support for this relocation is missing in both LLD and GNU binutils at the moment. This reverts the ELF parts of SVN r327316. llvm-svn: 327503
* Fix 'not all control paths return a value' MSVC warning. NFCI.Simon Pilgrim2018-03-141-0/+1
| | | | llvm-svn: 327502
* Update selected thread after loading mach coreJonas Devlieghere2018-03-144-3/+969
| | | | | | | | | | | The OS plugins might have updated the thread list after a core file has been loaded. The physical thread in the core file may no longer be the one that should be selected. Hence we should run the thread selection logic after loading the core. Differential revision: https://reviews.llvm.org/D44139 llvm-svn: 327501
* Fix msvc compiler error in r327498Pavel Labath2018-03-141-1/+1
| | | | | | | msvc reports an "illegal indirection" error here. Attempt to appease it with a different initialization syntax. llvm-svn: 327500
* [GlobalISel][X86] Support G_LSHR/G_ASHR/G_SHLAlexander Ivchenko2018-03-1416-13/+2430
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support G_LSHR/G_ASHR/G_SHL. We have 3 variance for shift instructions : shift gpr, shift imm, shift 1. Currently GlobalIsel TableGen generate patterns for shift imm and shift 1, but with shiftCount i8. In G_LSHR/G_ASHR/G_SHL like LLVM-IR both arguments has the same type, so for now only shift i8 can use auto generated TableGen patterns. The support of G_SHL/G_ASHR enables tryCombineSExt from LegalizationArtifactCombiner.h to hit, which results in different legalization for the following tests: LLVM :: CodeGen/X86/GlobalISel/ext-x86-64.ll LLVM :: CodeGen/X86/GlobalISel/gep.ll LLVM :: CodeGen/X86/GlobalISel/legalize-ext-x86-64.mir -; X64-NEXT: movsbl %dil, %eax +; X64-NEXT: movl $24, %ecx +; X64-NEXT: # kill: def $cl killed $ecx +; X64-NEXT: shll %cl, %edi +; X64-NEXT: movl $24, %ecx +; X64-NEXT: # kill: def $cl killed $ecx +; X64-NEXT: sarl %cl, %edi +; X64-NEXT: movl %edi, %eax ..which is not optimal and should be addressed later. Rework of the patch by igorb Reviewed By: igorb Differential Revision: https://reviews.llvm.org/D44395 llvm-svn: 327499
* Explicitly initialize dwarf::FormParams in DIEInteger::SizeOfPavel Labath2018-03-141-1/+1
| | | | | | | | | | | | | | | | | This could end up inititialized if someone called the function with a null AsmPrinter. Right now this only happens in DIEHash unit tests, presumably because it was hard to create an AsmPrinter in the context of unit tests. This only worked before r327486 because those tests did not use any dwarf forms whose size actually depended on the dwarf version (otherwise, they would have crashed due to null dereference). I fix the uninitialized error, by explicitly initializing FormParams to an invalid value, which will cause getFixedFormByteSize to return None if called with a form with version-dependent size. A more principled solution might be to fix the DIEHash tests to always pass in a valid AsmPrinter. llvm-svn: 327498
* TableGen: Explicitly forbid some nestings of class, multiclass, and foreachNicolai Haehnle2018-03-141-2/+10
| | | | | | | | | | | These previously all failed one way or another, but now we produce a more helpful error message. Change-Id: I8ffd2e87c8e35a5134c3be289e0a1fecaa2bb8ca Differential revision: https://reviews.llvm.org/D44115 llvm-svn: 327497
* TableGen: Add !ne, !le, !lt, !ge, and !gt comparisonsNicolai Haehnle2018-03-1410-17/+159
| | | | | | | | Change-Id: I8e2ece677268972d578a787467f7ef52a1f33a71 Differential revision: https://reviews.llvm.org/D44114 llvm-svn: 327496
* TableGen: Allow dag operators to be resolved lateNicolai Haehnle2018-03-142-4/+22
| | | | | | | | Change-Id: I51bb80fd5c48c8ac441ab11e43d43c1b91b4b590 Differential revision: https://reviews.llvm.org/D44113 llvm-svn: 327495
* TableGen: Type-check BinOpsNicolai Haehnle2018-03-147-32/+174
| | | | | | | | | | | Additionally, allow more than two operands to !con, !add, !and, !or in the same way as is already allowed for !listconcat and !strconcat. Change-Id: I9659411f554201b90cd8ed7c7e004d381a66fa93 Differential revision: https://reviews.llvm.org/D44112 llvm-svn: 327494
* TableGen: Allow ? in listsNicolai Haehnle2018-03-143-16/+14
| | | | | | | | | | This makes using !dag more convenient in some cases. Change-Id: I0a8c35e15ccd1ecec778fd1c8d64eee38d74517c Differential revision: https://reviews.llvm.org/D44111 llvm-svn: 327493
* TableGen: Add !dag function for constructionNicolai Haehnle2018-03-148-3/+181
| | | | | | | | | | | | | | | This allows constructing DAG nodes with programmatically determined names, and can simplify constructing DAG nodes in other cases as well. Also, add documentation and some very simple tests for the already existing !con. Change-Id: Ida61cd82e99752548d7109ce8da34d29da56a5f7 Differential revision: https://reviews.llvm.org/D44110 llvm-svn: 327492
* StaticAnalyzer: fix compiler warning. NFCPavel Labath2018-03-141-1/+1
| | | | | | | | | | | | My compiler (clang-3.8) complains that the RCC variable is unused. That's not really true, as it's checked by the if-declaration, but it's also kinda true, because we don't need to declaration if we only check it in the if statement. In reality, all this means that the dyn_cast<> can be replaced by isa<>, so that's what I do here. llvm-svn: 327491
* [cmake] Fix standalone+LLVM_LINK_LLVM_DYLIB builds (pr36687)Pavel Labath2018-03-141-5/+9
| | | | | | | | | | | | | | | | | | | | Summary: To make this build work, I needed to add detection code for the pthread library. This is necessary, because we have direct calls to these libraries (instead of going through llvm) and in the standalone build we cannot rely on llvm to detect these for us. In a standalone non-dylib build this was accidentaly working because these libraries were pulled in as an interface dependency of the .a files, but in a dylib build these are no longer part of the link interface, and so we need to add them explicitly. Reviewers: krytarowski, zturner Subscribers: lldb-commits, mgorny Differential Revision: https://reviews.llvm.org/D44379 llvm-svn: 327490
* Fix build broken by llvm r327486Pavel Labath2018-03-141-1/+1
| | | | | | llvm::DWARFFormParams moved to llvm::dwarf::FormParams. llvm-svn: 327489
* [AMDGPU] Fix for DAGCombiner infinite loop in OCLtstAlexander Timofeev2018-03-141-1/+3
| | | | | | Differential revision: https://reviews.llvm.org/D44417 llvm-svn: 327488
* [clangd] Add an interface that finds symbol by SymbolID in SymbolIndex.Eric Liu2018-03-148-10/+114
| | | | | | | | | | | | | | | | Summary: Potential use case: argument go-to-definition result with symbol information (e.g. function definition in cc file) that might not be in the AST. Reviewers: sammccall Reviewed By: sammccall Subscribers: klimek, ilya-biryukov, jkorous-apple, cfe-commits Differential Revision: https://reviews.llvm.org/D44305 llvm-svn: 327487
* DWARF: Unify form size handling codePavel Labath2018-03-1414-260/+221
| | | | | | | | | | | | | | | | | Summary: This patch replaces the two switches which are deducing the size of various forms with a single implementation. I have put the new implementation into BinaryFormat, to avoid introducing dependencies between the two independent libraries (DebugInfo and CodeGen) that need this functionality. Reviewers: aprantl, JDevlieghere, dblaikie Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D44418 llvm-svn: 327486
* [dsymutil] Print architecture in warningJonas Devlieghere2018-03-142-14/+21
| | | | | | | Make the architecture part of the warning in the DebugMapParser. This makes things consistent with the Apple's internal version of dsymutil. llvm-svn: 327485
* Export LLVM_DYLIB_COMPONENTS in LLVMConfig.cmakePavel Labath2018-03-141-0/+2
| | | | | | | | | | | | | | | | | Summary: This is needed so that external projects (e.g. a standalone build of lldb) can link to the LLVM shared library via the USE_SHARED argument of llvm_config. Without this, llvm_config would add LLVM to the link list, but then also add the constituent static libraries, resulting in multiply defined symbols. Reviewers: beanz, mgorny Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D44391 llvm-svn: 327484
* Skip TestWatchedVarHitWhenInScope.py everywherePavel Labath2018-03-141-3/+1
| | | | | | | | | | | The expression-hits tracking logic is not available on any platform. The reason this tests happens to pass on some platforms is that the test is written poorly -- it relies on the fact that post-main cleanup code will write to the stack memory once occupied by the watched variable, but this is not the case everywhere (e.g. linux glibc does not seem to do this, but android's bionic library does). llvm-svn: 327483
* [GlobalIsel][X86] Support for G_ZEXT instructionAlexander Ivchenko2018-03-144-0/+876
| | | | | | | | Reviewed By: igorb Differential Revision: https://reviews.llvm.org/D44378 llvm-svn: 327482
* [ELF] - Never create .gnu_hash with NBuckets == 0.George Rimar2018-03-144-12/+16
| | | | | | | | | | | | Currently, we can end up with NBuckets==0 and android loader does not like it (PR36537). Seems we can go with a minimal amount of changes here for simplicity and be consistent with gold and so just always use >= 1 value for NBuckets. Differential revision: https://reviews.llvm.org/D44422 llvm-svn: 327481
* [ELF] - Convert overlapping-sections.s testcase to x86 and cleanup.George Rimar2018-03-141-85/+27
| | | | | | | | | | | | | | | Patch do the following changes: * Test case was converted from MIPS to x86. * Removed part of the test checking we are able to produce a valid output. Since we do that already in other tests, this one's intention should be only to check we are still able to report overlaps and/or produce broken output with overlaps. Differential revision: https://reviews.llvm.org/D44438 llvm-svn: 327480
* [LLVM-C] Redo unnamed_address attribute bindingsRobert Widmann2018-03-144-1/+37
| | | | | | | | | | | | | | | | | | | Summary: The old bindings should have used an enum instead of a boolean. This deprecates LLVMHasUnnamedAddr and LLVMSetUnnamedAddr , replacing them with LLVMGetUnnamedAddress and LLVMSetUnnamedAddress respectively that do. Though it is unlikely LLVM will gain more supported global value linker hints, the new API can scale to accommodate this. Reviewers: deadalnix, whitequark Reviewed By: whitequark Subscribers: llvm-commits, harlanhaskins Differential Revision: https://reviews.llvm.org/D43448 llvm-svn: 327479
* [RuntimeDyld] Silence a compiler error.Lang Hames2018-03-141-1/+1
| | | | | | | This should fix the error at http://lab.llvm.org:8011/builders/lld-x86_64-darwin13/builds/19008 llvm-svn: 327478
* [ORC] Fix a data race in the lookup function.Lang Hames2018-03-141-10/+24
| | | | | | | | | | | The Error locals need to be protected by a mutex. (This could be fixed by having the promises / futures contain Expected and Error values, but MSVC's future implementation does not support this yet). Hopefully this will fix some of the errors seen on the builders due to r327474. llvm-svn: 327477
* [ExecutionEngine] Add a getSymbolTable method to RuntimeDyld.Lang Hames2018-03-144-6/+34
| | | | | | | | | | This can be used to extract the symbol table from a RuntimeDyld instance prior to disposing of it. This patch also updates RTDyldObjectLinkingLayer to use the new method, rather than requesting symbols one at a time via getSymbol. llvm-svn: 327476
* [ORC] Silence a compiler error.Lang Hames2018-03-141-1/+1
| | | | | | | This should fix the builder error at http://lab.llvm.org:8011/builders/lld-x86_64-darwin13/builds/19006 llvm-svn: 327475
* [ORC] Add a 'lookup' convenience function for finding symbols in a list of VSOs.Lang Hames2018-03-143-0/+241
| | | | | | | | | | | | | | The lookup function takes a list of VSOs, a set of symbol names (or just one symbol name) and a materialization function object. It returns an Expected<SymbolMap> (if given a set of names) or an Expected<JITEvaluatedSymbol> (if given just one name). The lookup method constructs an AsynchronousSymbolQuery for the given names, applies that query to each VSO in the list in turn, and then blocks waiting for the query to complete. If threading is enabled then the materialization function object can be used to execute the materialization on different threads. If threading is disabled the MaterializeOnCurrentThread utility must be used. llvm-svn: 327474
* [SymbolFilePDB] Rewrite ParseTypes methodAaron Smith2018-03-141-19/+48
| | | | | | | | | | | | | | | | | | | | | Summary: The types for the compiland's children are parsed when parsing types for a PDB compiland. Global types also need to be parsed but unfortunately PDBs do not have compiland information about each global type. So we parse them all on the first call to ParseTypes. If a sc.function is provided then parse the types for that function. Otherwise parse the types for the overall sc.comp_unit. The ParseTypes method can be very slow if a program has a long list of compile units containing needed modules. Debugging clang-cl with lldb will show the problem. Reviewers: zturner, rnk, lldb-commits Reviewed By: zturner Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D44253 llvm-svn: 327473
* Disable test debuglineinfo-path on powerpcEugene Zemtsov2018-03-141-6/+6
| | | | llvm-svn: 327472
OpenPOWER on IntegriCloud