summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [dwarfdump] Fix spurious verification errors for DW_AT_location attributesJonas Devlieghere2018-02-175-23/+312
| | | | | | | | | | | Verifying any DWARF file that is optimized and contains at least one tag with a DW_AT_location with a location list offset as a DW_AT_form_dataXXX results in dwarfdump spuriously claiming that the location list is invalid. Differential revision: https://reviews.llvm.org/D40199 llvm-svn: 325430
* [DAGCombiner] Remove simplifyShuffleMask - now handled more generally by ↵Simon Pilgrim2018-02-171-35/+0
| | | | | | SimplifyDemandedVectorElts. llvm-svn: 325429
* Fix signed/unsigned comparison warning in AsmGenMatcher generated code. NFCI.Simon Pilgrim2018-02-171-4/+4
| | | | llvm-svn: 325428
* [DebugInfo] Removed assert on missing CountVarDIESander de Smalen2018-02-173-7/+50
| | | | | | | | | | | | | | | | | | | | Summary: The assert for a DISubrange's CountVarDIE to be available fails when the dbg.value() has been optimized away for any reason. Having the assert for that is a little heavy, so instead removing it now in favor of not generating the 'count' expression. Addresses http://llvm.org/PR36263 . Reviewers: aprantl, dblaikie, probinson Reviewed By: aprantl Subscribers: JDevlieghere, llvm-commits, dstenb Differential Revision: https://reviews.llvm.org/D43387 llvm-svn: 325427
* Report fatal error in the case of out of memorySerge Pavlov2018-02-172-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | This is partial recommit of r325224, reverted in 325227. The relevant part of original comment is below. Analysis of fails in the case of out of memory errors can be tricky on Windows. Such error emerges at the point where memory allocation function fails, but manifests itself when null pointer is used. These two points may be distant from each other. Besides, next runs may not exhibit allocation error. Usual programming practice does not require checking result of 'operator new' because it throws 'std::bad_alloc' in the case of allocation error. However, LLVM is usually built with exceptions turned off, so 'new' can return null pointer. This change installs custom new handler, which causes fatal error in the case of out of memory. The handler is installed automatically prior to call to 'main' during construction of a static object defined in 'lib/Support/ErrorHandling.cpp'. If the application does not use this file, the handler may be installed manually by a call to 'llvm::install_out_of_memory_new_handler', declared in 'include/llvm/Support/ErrorHandling.h". Differential Revision: https://reviews.llvm.org/D43010 llvm-svn: 325426
* [AMDGPU] Return true in enableMultipleCopyHints().Jonas Paulsson2018-02-174-12/+14
| | | | | | | | | | Enable multiple COPY hints to eliminate more COPYs during register allocation. Note that this is something all targets should do, see https://reviews.llvm.org/D38128. Review: Stanislav Mekhanoshin, Tom Stellard. llvm-svn: 325425
* [OMPT] Omissionin in OMPT FormattingJoachim Protze2018-02-175-7/+9
| | | | | | | | Applying clang-format to the /runtime/src/ folder Differential Revision: https://reviews.llvm.org/D42169 llvm-svn: 325424
* [OMPT] Add interoperability testcaseJoachim Protze2018-02-171-0/+99
| | | | | | | | Test whether OMPT-callbacks for two threads that initiate a parallel region are correct. Differential Revision: https://reviews.llvm.org/D41942 llvm-svn: 325423
* [OMPT] Update api_calls testcaseJoachim Protze2018-02-172-34/+50
| | | | | | | | | | Only use ompt_ functions when testing OMPT in api_calls testcase. Add size parameter to print_list. Fix small bug in implementation of ompt_get_partition_place_nums(): return correct length. Differential Revision: https://reviews.llvm.org/D42162 llvm-svn: 325422
* Revert "[MachineCopyPropagation] Extend pass to do COPY source forwarding"Quentin Colombet2018-02-17118-1021/+456
| | | | | | | | | | | | | | | | | This reverts commit r323991. This commit breaks target that don't model all the register constraints in TableGen. So far the workaround was to set the hasExtraXXXRegAllocReq, but it proves that it doesn't cover all the cases. For instance, when mutating an instruction (like in the lowering of COPYs) the isRenamable flag is not properly updated. The same problem will happen when attaching machine operand from one instruction to another. Geoff Berry is working on a fix in https://reviews.llvm.org/D43042. llvm-svn: 325421
* [DAG, X86] Revert r324797, r324491, and r324359.Chandler Carruth2018-02-1718-645/+986
| | | | | | | | | | | | Sadly, r324359 caused at least PR36312. There is a patch out for review but it seems to be taking a bit and we've already had these crashers in tree for too long. We're hitting this PR in real code now and are blocked on shipping new compilers as a consequence so I'm reverting us back to green. Sorry for the churn due to the stacked changes that I had to revert. =/ llvm-svn: 325420
* [InstSimplify] add vector select tests with undef elts in condition; NFCSanjay Patel2018-02-171-0/+20
| | | | llvm-svn: 325419
* [WebAssembly] Remove unneeded classifer methods from Symbol class. NFC.Sam Clegg2018-02-174-11/+4
| | | | | | | | | We already have isa<> for this, and these methods were simply duplicating those redundantly. Differential Revision: https://reviews.llvm.org/D43422 llvm-svn: 325418
* [X86] Turn selects with constant condition into vector shuffles during DAG ↵Craig Topper2018-02-174-47/+61
| | | | | | | | | | | | | | | | | | | | | | | combine Summary: Currently we convert to shuffles during lowering. This moves it to DAG combine so hopefully we can get it done before type legalization has to extend the condition. I believe in some cases we're creating SHRUNKBLENDs that end up with constant conditions because we see the extended on the condition and think its a dynamic selelect before DAG combine gets a chance to constant fold the extend. We could add combines to turn SHRUNKBLENDs with constant condition back to vselect. But it seemed like it might be better to just send them to shuffles as early as possible so they never get a chance to become SHRUNKBLENDs. This the reason some tests went from blends controlled by a constant pool load to just move. Some of the constant pool entries changed because the sign_extend introduced by type legalization turned undef elements in select condition into 0s. While the select->shuffle used -1 in the shuffle mask. So now the shuffle lowering can do what it wants with them. I'll remove the lowering code as a follow up. We might be able to simplify some of the pre-checks for SHRUNKBLEND as the FIXME there says. Reviewers: spatel, RKSimon, efriedma, zvi, andreadb Reviewed By: spatel Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D43367 llvm-svn: 325417
* Use toString to print out garbage-collected sections.Rui Ueyama2018-02-175-12/+11
| | | | | | | | | | Currently, archive file name is missing in this message. In general, we should avoid constructing strings in an ad-hoc manner and instead use toString() to get consistent output strings. Differential Revision: https://reviews.llvm.org/D43420 llvm-svn: 325416
* [WebAssembly] Simplify FunctionSymbol::get/set/hasFunctionType. NFC.Sam Clegg2018-02-166-46/+35
| | | | | | Differential Revision: https://reviews.llvm.org/D43416 llvm-svn: 325415
* [WebAssembly] Remove unneeded Chunk::getFileName() method. NFC.Sam Clegg2018-02-162-2/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D43405 llvm-svn: 325414
* Remove "--full-shutdown" and instead use an environment variable LLD_IN_TEST.Rui Ueyama2018-02-168-21/+22
| | | | | | | | | | | | | | | | | We are running lld tests with "--full-shutdown" option because we don't want to call _exit() in lld if it is running tests. Regular shutdown is needed for leak sanitizer. This patch changes the way how we tell lld that it is running tests. Now "--full-shutdown" is removed, and LLD_IN_TEST environment variable is used instead. This patch enables full shutdown on all ports, e.g. ELF, COFF and wasm. Previously, we enabled it only for ELF. Differential Revision: https://reviews.llvm.org/D43410 llvm-svn: 325413
* [Basic] Fix some Clang-tidy modernize and Include What You Use warnings; ↵Eugene Zelenko2018-02-1610-216/+342
| | | | | | other minor fixes (NFC). llvm-svn: 325412
* [ThinLTO] Allow indexing to request backend to ignore the moduleVitaly Buka2018-02-168-13/+100
| | | | | | | | | | | | | | | | | | Summary: Gold plugin does not add pass to ThinLTO modules without useful symbols. In this case ThinLTO can't create corresponding index file and some features, like CFI, cannot be processes by backed correctly without index. Given that we don't need the backed output we can request it to avoid processing the module. This is implemented by this patch using new "SkipModuleByDistributedBackend" flag. Reviewers: pcc, tejohnson Subscribers: mehdi_amini, inglorion, eraman, cfe-commits Differential Revision: https://reviews.llvm.org/D42995 llvm-svn: 325411
* [ThinLTO] Ignore object files with no ThinLTO modules if -fthinlto-index= is setVitaly Buka2018-02-164-10/+33
| | | | | | | | | | | | | | | | | Summary: ThinLTO compilation may decide not to split module and keep at as regular LTO. In this can this module already processed during indexing and already a part of merged object file. So here we can just skip it. Reviewers: pcc, tejohnson Reviewed By: tejohnson Subscribers: mehdi_amini, inglorion, eraman, cfe-commits Differential Revision: https://reviews.llvm.org/D42680 llvm-svn: 325410
* [clangd] Rename some protocol field to lower caseMarc-Andre Laperle2018-02-164-17/+17
| | | | | | | | | | | | | Summary: Also fixes a GCC compilation error. Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com> Subscribers: klimek, ilya-biryukov, jkorous-apple, ioeric, cfe-commits Differential Revision: https://reviews.llvm.org/D43411 llvm-svn: 325409
* AMDGPU: Remove unused private member of AMDGPUTargetELFStreamerKonstantin Zhuravlyov2018-02-162-2/+1
| | | | llvm-svn: 325408
* Run these tests, the errors were old and not valid anymore.Eric Christopher2018-02-161-11/+8
| | | | llvm-svn: 325407
* Do not print out "no input files" twice.Rui Ueyama2018-02-162-6/+23
| | | | | | Differential Revision: https://reviews.llvm.org/D43408 llvm-svn: 325406
* Use wasm-ld instead of "lld -flavor wasm".Rui Ueyama2018-02-1632-51/+51
| | | | | | | | | | Invoking lld as ld.lld, ld.ld64, lld-link or wasm-ld is preferred than invoking lld as lld and pass an -flavor option. We have "lld" file mostly for historical reasons. Differential Revision: https://reviews.llvm.org/D43407 llvm-svn: 325405
* AMDGPU/LLD: Remove the use of binary file from one of the AMDGPU testsKonstantin Zhuravlyov2018-02-162-3/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D43413 llvm-svn: 325404
* Remove an unused function.Eric Christopher2018-02-161-4/+0
| | | | llvm-svn: 325403
* Silence an unsigned vs signed compare warning.Eric Christopher2018-02-161-7/+7
| | | | llvm-svn: 325402
* [GISel]: Make GlobalISelEmitter rule prioritization compatible with selectionDAGAditya Nandakumar2018-02-163-316/+355
| | | | | | | | | | | | This patch changes GlobalISelEmitter to rank patterns similar to how the DAG does it (ie it computes a score for a pattern and adds the added complexity to it). This is so that the decision tree for GISelSelector remains compatible with that of SelectionDAG. https://reviews.llvm.org/D43270 llvm-svn: 325401
* AMDGPU: Update elf flags in amdgpu-elf-flags.sKonstantin Zhuravlyov2018-02-161-2/+2
| | | | | | | | This is required after r325399: - EF_AMDGPU_ARCH_GCN got removed - In the test, EF_AMDGPU_ARCH_GCN is replaced with EF_AMDGPU_MACH_AMDGCN_GFX803 llvm-svn: 325400
* AMDGPU: Bring elf flags in sync with the specKonstantin Zhuravlyov2018-02-1621-273/+942
| | | | | | | | | | | - Add MACH flags - Add XNACK flag - Add reserved flags - Minor cleanups in docs Differential Revision: https://reviews.llvm.org/D43356 llvm-svn: 325399
* [Constant] add floating-point helpers for normal/finite-nz; NFCSanjay Patel2018-02-163-42/+47
| | | | | | | | | ...and delete the equivalent local functiona from InstCombine. These might be useful to other InstCombine files or other passes and makes FP queries more similar to integer constant queries. llvm-svn: 325398
* Make sure we invoke ld64.lld and ld-wasm in the build directory.Rui Ueyama2018-02-161-1/+1
| | | | llvm-svn: 325397
* [COFF] Add support for ARM64 secrel relocations for add/load instructionsMartin Storsjo2018-02-162-5/+57
| | | | | | Differential Revision: https://reviews.llvm.org/D43287 llvm-svn: 325396
* [clangd] Implement textDocument/hoverMarc-Andre Laperle2018-02-1614-8/+577
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Implemention of textDocument/hover as described in LSP definition. This patch adds a basic Hover implementation. When hovering a variable, function, method or namespace, clangd will return a text containing the declaration's scope, as well as the declaration of the hovered entity. For example, for a variable: Declared in class Foo::Bar int hello = 2 For macros, the macro definition is returned. This patch doesn't include: - markdown support (the client I use doesn't support it yet) - range support (optional in the Hover response) - comments associated to variables/functions/classes They are kept as future work to keep this patch simpler. I added tests in XRefsTests.cpp. hover.test contains one simple smoketest to make sure the feature works from a black box perspective. Reviewers: malaperle, krasimir, bkramer, ilya-biryukov Subscribers: sammccall, mgrang, klimek, rwols, ilya-biryukov, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D35894 Signed-off-by: Simon Marchi <simon.marchi@ericsson.com> Signed-off-by: William Enright <william.enright@polymtl.ca> llvm-svn: 325395
* [X86] In lowerVSELECTtoVectorShuffle, don't map undef select condition to ↵Craig Topper2018-02-161-3/+6
| | | | | | | | | | undef in shuffle mask. Undef in select condition means we should pick the element from one side or the other. An undef in a shuffle mask means pick any element from either source or worse. I suspect by the time we get here most of the undefs in a constant vector have been removed by other things, but doing this for safety. llvm-svn: 325394
* AMDGPU: Bring processors and features in sync with the specKonstantin Zhuravlyov2018-02-1615-72/+58
| | | | | | | | | | - Remove gfx800 - Make iceland gfx802 - Add xnack to gfx902 Differential Revision: https://reviews.llvm.org/D43355 llvm-svn: 325393
* Revert an accidental change to where "-flavor GNU" was used by intention.Rui Ueyama2018-02-161-2/+2
| | | | llvm-svn: 325392
* [OPENMP] Do not emit messages for templates in declare targetAlexey Bataev2018-02-162-19/+65
| | | | | | | | | constructs. The compiler may emit some extra warnings for functions, that are implicit specialization of the templates, declared in the target region. llvm-svn: 325391
* Replace -flavor {gnu,darwin} with ld64.lld or ld.lld.Rui Ueyama2018-02-16132-209/+209
| | | | llvm-svn: 325390
* Try again to fix the build.Zachary Turner2018-02-161-1/+3
| | | | | | | This doesn't repro with clang or MSVC so I'm just blindly guessing. llvm-svn: 325389
* Try to fix broken build with some compilers.Zachary Turner2018-02-161-25/+23
| | | | llvm-svn: 325388
* Remove `else` after `break`.Rui Ueyama2018-02-161-6/+4
| | | | llvm-svn: 325387
* Fix emission of PDB string table.Zachary Turner2018-02-169-188/+245
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was originally reported as a bug with the symptom being "cvdump crashes when printing an LLD-linked PDB that has an S_FILESTATIC record in it". After some additional investigation, I determined that this was a symptom of a larger problem, and in fact the real problem was in the way we emitted the global PDB string table. As evidence of this, you can take any lld-generated PDB, run cvdump -stringtable on it, and it would return no results. My hypothesis was that cvdump could not *find* the string table to begin with. Normally it would do this by looking in the "named stream map", finding the string /names, and using its value as the stream index. If this lookup fails, then cvdump would fail to load the string table. To test this hypothesis, I looked at the name stream map generated by a link.exe PDB, and I emitted exactly those bytes into an LLD-generated PDB. Suddenly, cvdump could read our string table! This code has always been hacky and we knew there was something we didn't understand. After all, there were some comments to the effect of "we have to emit strings in a specific order, otherwise things don't work". The key to fixing this was finally understanding this. The way it works is that it makes use of a generic serializable hash map that maps integers to other integers. In this case, the "key" is the offset into a buffer, and the value is the stream number. If you index into the buffer at the offset specified by a given key, you find the name. The underlying cause of all these problems is that we were using the identity function for the hash. i.e. if a string's offset in the buffer was 12, the hash value was 12. Instead, we need to hash the string *at that offset*. There is an additional catch, in that we have to compute the hash as a uint32 and then truncate it to uint16. Making this work is a little bit annoying, because we use the same hash table in other places as well, and normally just using the identity function for the hash function is actually what's desired. I'm not totally happy with the template goo I came up with, but it works in any case. The reason we never found this bug through our own testing is because we were building a /parallel/ hash table (in the form of an llvm::StringMap<>) and doing all of our lookups and "real" hash table work against that. I deleted all of that code and now everything goes through the real hash table. Then, to test it, I added a unit test which adds 7 strings and queries the associated values. I test every possible insertion order permutation of these 7 strings, to verify that it really does work as expected. Differential Revision: https://reviews.llvm.org/D43326 llvm-svn: 325386
* Remove useless comment - seems to be a copy+paste typo. NFCISimon Pilgrim2018-02-161-1/+0
| | | | llvm-svn: 325385
* Use write32le instead of write32<little>.Rui Ueyama2018-02-161-1/+2
| | | | llvm-svn: 325384
* Refactor wasm/WriterUtil.{cpp,h}.Rui Ueyama2018-02-164-40/+33
| | | | | | | | | | | | | | | | Summary: - Makes code more in line with LLVM style (e.g. const char * -> StringRef) - Do not use formatv since we can construct message just by `+` - Replace some odd types such as `const StringRef` with more common type - Do not use default arguments if they are not necessary Reviewers: sbc100 Subscribers: jfb, aheejin, llvm-commits, sunfish Differential Revision: https://reviews.llvm.org/D43403 llvm-svn: 325383
* [WebAssebmly] Remove unneeded cast. NFC.Sam Clegg2018-02-161-1/+1
| | | | llvm-svn: 325382
* [clang-include-fixer] Use add_clang_tool instead add_clang_executablePetr Hosek2018-02-161-1/+1
| | | | | | | | | This makes it possible to include clang-include-fixer as distribution component when building Clang based toolchain using CMake. Differential Revision: https://reviews.llvm.org/D43371 llvm-svn: 325381
OpenPOWER on IntegriCloud