summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [X86] Remove 'opaque ptr' from the intel syntax parser and printer.Craig Topper2018-05-0110-75/+66
| | | | | | | | Previously for instructions like fxsave we would print "opaque ptr" as part of the memory operand. Now we print nothing. We also no longer accept "opaque ptr" in the parser. We still accept any size to be specified for these instructions, but we may want to consider only parsing when no explicit size is specified. This what gas does. llvm-svn: 331243
* Fix type_lookup test to make buildbots happyEugene Zemtsov2018-05-013-3/+3
| | | | llvm-svn: 331242
* Fix return type of isinf(double) and isnan(double) where possible.Richard Smith2018-05-012-6/+36
| | | | | | | | | | | When using an old version of glibc, a ::isinf(double) and ::isnan(double) function is provided, rather than just the macro required by C and C++. Displace this function using _LIBCPP_PREFERRED_OVERLOAD where possible. The only remaining case where we should get the wrong return type is now glibc + libc++ + a non-clang compiler. llvm-svn: 331241
* Log to the process channel, not target twice.Jason Molenda2018-05-011-1/+1
| | | | llvm-svn: 331239
* [ShadowCallStack] fix the docsKostya Serebryany2018-05-011-2/+2
| | | | llvm-svn: 331238
* Temporarily revert "[DEBUG] Initial adaptation of NVPTX target for debug ↵Eric Christopher2018-05-0116-9150/+308
| | | | | | | | | | | | | | | | | info emission." This appears to have some issues associated with the file directive output causing multiple global symbols with the name "file" to be emitted into a startup section. I'm investigating more specific causes and working with the original author. This reverts commit r330271. Also Revert "[DEBUGINFO, NVPTX] Add the test for the debug info of the local" This reverts commit r330592 and the follow up of 330779 as the testcase is dependent upon r330271. llvm-svn: 331237
* Add logging when ArchSpec::SetArchitecture is given a cputype andJason Molenda2018-05-011-0/+5
| | | | | | | | cpusubtype that don't map to any known core definition. <rdar://problem/39779398> llvm-svn: 331236
* Refactor GetNextPersistentVariableName into a non-virtual methodAdrian Prantl2018-04-3010-37/+39
| | | | | | | | | | | | that takes a prefix string. This simplifies the implementation and allows plugins such as the Swift plugin to supply different prefixes for return and error variables. rdar://problem/39299889 Differential Revision: https://reviews.llvm.org/D46088 llvm-svn: 331235
* Move the persistent variable counter into TargetAdrian Prantl2018-04-3011-19/+30
| | | | | | | | | | | | | | | | | so it can be shared across multiple language plugins. In a multi-language project it is counterintuitive to have a result variables reuse numbers just because they are using a different language plugin in LLDB (but not for example, when they are Objective-C versus C++, since they are both handled by Clang). This is NFC on llvm.org except for the Go plugin. rdar://problem/39299889 Differential Revision: https://reviews.llvm.org/D46083 llvm-svn: 331234
* [Modules] Fix testcases from r331232Bruno Cardoso Lopes2018-04-302-3/+2
| | | | llvm-svn: 331233
* [Modules] Handle ObjC/C ODR-like semantics for EnumConstantDeclBruno Cardoso Lopes2018-04-306-4/+44
| | | | | | | | | | | | | | Support for ObjC/C ODR-like semantics with structural equivalence checking was added back in r306918. There enums are handled and also checked for structural equivalence. However, at use time of EnumConstantDecl, support was missing for preventing ambiguous name lookup. Add the missing bits for properly merging EnumConstantDecl. rdar://problem/38374569 llvm-svn: 331232
* [CodeGen] Fix typo in comment form->from. NFCCraig Topper2018-04-301-1/+1
| | | | llvm-svn: 331231
* Remove premature caching of the global variables list in CompileUnit.Adrian Prantl2018-04-303-5/+20
| | | | | | | | | | | | | | | | | | | | | | | | This fixes a bug where (lldb) target var g_ptr would populate the global variables list with exactly one entry because SymbolFileDWARF::ParseVariables() was invoked with a list of DIEs pre-filtered by name, such that a subsequent call to (lldb) fr var --show-globals would only list that one variable, because CompileUnit::m_variables was already initialized, fooling CompileUnit::GetVariableList(). CompileUnit::GetVariableList() grabs the *complete* list of variables via (SymbolFileDWARF, ...)::ParseVariablesForContext and that still calls CompileUnit::SetVariableList(variables) which acts as the caching mechanism. Differential Revision: https://reviews.llvm.org/D46220 llvm-svn: 331230
* Protect DWARFCompileUnit::m_die_array by a new mutexJan Kratochvil2018-04-302-3/+18
| | | | | | | | | | | | | | Multiple DW_TAG_compile_unit being indexed in a multithreaded way can request reading of the same DW_TAG_partial_unit. Unfortunately one cannot detect DWZ file ahead of time to disable such locking overhead as DWARFCompileUnit::Extract does not read the first DIE which is the only place one could find early enough if the DWARF file is using any DW_TAG_partial_unit. Differential revision: https://reviews.llvm.org/D40470 llvm-svn: 331229
* [InstCombine] fix test to restore intentSanjay Patel2018-04-301-3/+2
| | | | | | | | | This test had values that differed in only in capitalization, and that causes problems for the auto-generating check line script. So I changed that in rL331226, but I accidentally forgot to change a subsequent use of a param. llvm-svn: 331228
* Fix expression parser to not accept any type whose basename matches for a ↵Greg Clayton2018-04-305-5/+173
| | | | | | | | | | type that must exist at root level This patch fixes an issue where we weren't looking for exact matches in the expression parser and also fixed the type lookup logic in the Module.cpp. Tests added to make sure we don't regress. Differential Revision: https://reviews.llvm.org/D46128 llvm-svn: 331227
* [InstCombine] add tests, update checks; NFCSanjay Patel2018-04-301-86/+120
| | | | llvm-svn: 331226
* [docs] Fix docs/InternalsManual.rst heading.Fangrui Song2018-04-301-1/+1
| | | | llvm-svn: 331225
* Stop setting LLVM_ON_WIN32 in config.h and llvm-config.h.Nico Weber2018-04-304-7/+3
| | | | | | | | | | | | | | See thread "Replacing LLVM_ON_WIN32 with just _WIN32" on llvm-dev and cfe-dev. I replaced all uses of LLVM_ON_WIN32 with _WIN32 in r331127 (llvm), r331069 (clang), r329697 (lldb), r329696 (lld), r329696 (clang-tools-extra). If your out-of-tree program used LLVM_ON_WIN32, just use _WIN32 instead, which is set at exactly the same time to exactly the same value. https://reviews.llvm.org/D46264 llvm-svn: 331224
* [ModRefInfo] Rename local variable IsMustAlias to avoid shadowing MustAlias ↵Alina Sbirlea2018-04-301-3/+3
| | | | | | enum entry. llvm-svn: 331222
* [SimplifyCFG] Use BB::instructionsWithoutDebug to skip DbgInfo (NFC).Florian Hahn2018-04-301-37/+14
| | | | | | | | | | | | | | This patch updates some code responsible the skip debug info to use BasicBlock::instructionsWithoutDebug. I think this makes things slightly simpler and more direct. Reviewers: aprantl, vsk, hans, danielcdh Reviewed By: hans Differential Revision: https://reviews.llvm.org/D46252 llvm-svn: 331221
* [WebAssembly] MC: Improve debug outputSam Clegg2018-04-302-8/+34
| | | | llvm-svn: 331220
* [LivePhysRegs] Remove registers clobbered by regmasks from the live setKrzysztof Parzyszek2018-04-303-6/+44
| | | | | | | | Dead defs were being removed from the live set (in stepForward), but registers clobbered by regmasks weren't (more specifically, they were actually removed by removeRegsInMask, but then they were added back in). llvm-svn: 331219
* [MC] Change AsmParser to leverage Assembler during evaluationNirav Dave2018-04-3017-23/+153
| | | | | | | | | | | | | | | | | | | | | | | | | | Teach AsmParser to check with Assembler for when evaluating constant expressions. This improves the handing of preprocessor expressions that must be resolved at parse time. This idiom can be found as assembling-time assertion checks in source-level assemblers. Note that this relies on the MCStreamer to keep sufficient tabs on Section / Fragment information which the MCAsmStreamer does not. As a result the textual output may fail where the equivalent object generation would pass. This can most easily be resolved by folding the MCAsmStreamer and MCObjectStreamer together which is planned for in a separate patch. Currently, this feature is only enabled for assembly input, keeping IR compilation consistent between assembly and object generation. Reviewers: echristo, rnk, probinson, espindola, peter.smith Reviewed By: peter.smith Subscribers: eraman, peter.smith, arichardson, jyknight, hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D45164 llvm-svn: 331218
* [LoopSimplify] Use BB::instructionsWithoutDebug to skip DbgInfo (NFC).Florian Hahn2018-04-301-4/+1
| | | | | | | | | | | | | | This patch updates some code responsible the skip debug info to use BasicBlock::instructionsWithoutDebug. I think this makes things slightly simpler and more direct. Reviewers: aprantl, vsk, chandlerc Reviewed By: aprantl Differential Revision: https://reviews.llvm.org/D46253 llvm-svn: 331217
* AMDGPU: Add Vega12 and Vega20Matt Arsenault2018-04-308-2/+113
| | | | | | | | Changes by Matt Arsenault Konstantin Zhuravlyov llvm-svn: 331216
* AMDGPU: Add Vega12 and Vega20Matt Arsenault2018-04-3043-322/+2133
| | | | | | | | Changes by Matt Arsenault Konstantin Zhuravlyov llvm-svn: 331215
* clang-cl: Expose -fmerge-all-constantsHans Wennborg2018-04-302-1/+2
| | | | | | | Now that constant merging is off by default, we'd like a way to enable it on Windows. llvm-svn: 331214
* [MIR] Reset unique MBB numbering in MachineFunction::reset()Roman Tereshin2018-04-302-2/+8
| | | | | | | | | | | | | | No need to waste space nor number MBBs differently if MF gets recreated. Reviewers: qcolombet, stoklund, t.p.northover, bogner, javed.absar Reviewed By: qcolombet Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D46078 llvm-svn: 331213
* [OpenMP][OMPT] Fix api_calls_from_other_thread.cppJonathan Peyton2018-04-301-3/+3
| | | | | | | Removed environment setting in RUN: line that was being ignored anyways. Changed a few specific checks to "any number" llvm-svn: 331212
* [OPENMP] Do not emit warning about non-declared target function params.Alexey Bataev2018-04-302-4/+4
| | | | | | | | We should not emit warning that the parameters are not marked as declare target, these declaration are local and cannot be marked as declare target. llvm-svn: 331211
* [DAGCombiner] rename function attribute for disabling ftrunc transformSanjay Patel2018-04-303-8/+7
| | | | | | | | | | This is the matching name change for the Clang patch at: D46236 rL331209 Differential Revision: https://reviews.llvm.org/D46237 llvm-svn: 331210
* [Driver, CodeGen] rename options to disable an FP cast optimizationSanjay Patel2018-04-309-43/+49
| | | | | | | | | | | | | | As suggested in the post-commit thread for rL331056, we should match these clang options with the established vocabulary of the corresponding sanitizer option. Also, the use of 'strict' is well-known for these kinds of knobs, and we can improve the descriptive text in the docs. So this intends to match the logic of D46135 but only change the words. Matching LLVM commit to match this spelling of the attribute to follow shortly. Differential Revision: https://reviews.llvm.org/D46236 llvm-svn: 331209
* [X86] Introduce X86SchedWriteWidths schedule wrapper for different vector ↵Simon Pilgrim2018-04-303-93/+160
| | | | | | | | | | | | | | widths. We need to split most of the scheduler classes by vector width to remove more of the InstRW overrides, this patch should make this easier/tidier by allowing us to pass the X86SchedWriteWidths wrapper to multi-width multiclasses and then split as required. I've included fields for Scl (scalar float/double), MMX (MMX integer), XMM, YMM and ZMM widths. These fields mostly share the same classes but it should give us the flexibility that we may need in the future. This patch has replaced a set of example SSE/AVX512 instruction cases but isn't exhaustive as it gets very noisy before we really need the functionality. Differential Revision: https://reviews.llvm.org/D46266 llvm-svn: 331208
* Regenerated AST Matchers doc.Alexander Kornienko2018-04-302-7/+9
| | | | | | Backported a minor fix to the comment in the header. llvm-svn: 331207
* [OPENMP] Do not crash on codegen for CXX member functions.Alexey Bataev2018-04-302-0/+9
| | | | | | | Non-static member functions should not be emitted as a standalone functions, this leads to compiler crash. llvm-svn: 331206
* [InstCombine] Unfold masked merge with constant maskRoman Lebedev2018-04-303-70/+80
| | | | | | | | | | | | | | | | | Summary: As discussed in D45733, we want to do this in InstCombine. https://rise4fun.com/Alive/LGk Reviewers: spatel, craig.topper Reviewed By: spatel Subscribers: chandlerc, xbolva00, llvm-commits Differential Revision: https://reviews.llvm.org/D45867 llvm-svn: 331205
* [InstCombine][NFC] Add tests for unfolding masked merge with constant maskRoman Lebedev2018-04-302-0/+643
| | | | | | | | Summary: As discussed in D45733, we want to do this in InstCombine. Differential Revision: https://reviews.llvm.org/D45866 llvm-svn: 331204
* [SystemZ] Handle SADDO et.al. and ADD/SUBCARRYUlrich Weigand2018-04-3051-79/+11018
| | | | | | | | | | | | | | | | This provides an optimized implementation of SADDO/SSUBO/UADDO/USUBO as well as ADDCARRY/SUBCARRY on top of the new CC implementation. In particular, multi-word arithmetic now uses UADDO/ADDCARRY instead of the old ADDC/ADDE logic, which means we no longer need to use "glue" links for those instructions. This also allows making full use of the memory-based instructions like ALSI, which couldn't be recognized due to limitations in the DAG matcher previously. Also, the llvm.sadd.with.overflow et.al. intrinsincs now expand to directly using the ADD instructions and checking for a CC 3 result. llvm-svn: 331203
* [SystemZ] Do not use glue to represent condition code dependenciesUlrich Weigand2018-04-3015-249/+540
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, an instruction setting the condition code is linked to the instruction using the condition code via a "glue" link in the SelectionDAG. This has a number of drawbacks; in particular, it means the same CC cannot be used by multiple users. It also makes it more difficult to efficiently implement SADDO et. al. This patch changes the back-end to represent CC dependencies as normal values during SelectionDAG matching, along the lines of how this is handled in the X86 back-end already. In addition to the core mechanics of updating all relevant patterns, this requires a number of additional changes: - We now need to be able to spill/restore a CC value into a GPR if necessary. This means providing a copyPhysReg implementation for moves involving CC, and defining getCrossCopyRegClass. - Since we still prefer to avoid such spills, we provide an override for IsProfitableToFold to avoid creating a merged LOAD / ICMP if this would result in multiple users of the CC. - combineCCMask no longer requires a single CC user, and no longer need to be careful about preventing invalid glue/chain cycles. - emitSelect needs to be more careful in marking CC live-in to the basic block it generates. Also, we can now optimize the case of multiple subsequent selects with the same condition just like X86 does. llvm-svn: 331202
* Fix infinite loop after r331115Daniel Sanders2018-04-303-1/+67
| | | | | | | | There are two separate fixes here: * The lowering code for non-extending loads should report UnableToLegalize instead of emitting the same instruction. * The target should not be requesting lowering of non-extending loads. llvm-svn: 331201
* [DebugInfo] Prevent infinite recursion for malformed DWARFJonas Devlieghere2018-04-302-10/+326
| | | | | | | | | | | This prevents infinite recursion in DWARFDie::findRecursively for malformed DWARF where a DIE references itself. This fixes PR36257. Differential revision: https://reviews.llvm.org/D43092 llvm-svn: 331200
* [SLPVectorizer] Debug info shouldn't impact spill cost computation.Davide Italiano2018-04-302-1/+97
| | | | | | | | | | <rdar://problem/39794738> (Also, PR32761). Differential Revision: https://reviews.llvm.org/D46199 llvm-svn: 331199
* [X86][Atom] Remove unnecessary x87 load/move instrw overrides.Simon Pilgrim2018-04-301-3/+2
| | | | llvm-svn: 331198
* Reflow paragraphs in comments.Adrian Prantl2018-04-30604-13438/+11190
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is intended as a clean up after the big clang-format commit (r280751), which unfortunately resulted in many of the comment paragraphs in LLDB being very hard to read. FYI, the script I used was: import textwrap import commands import os import sys import re tmp = "%s.tmp"%sys.argv[1] out = open(tmp, "w+") with open(sys.argv[1], "r") as f: header = "" text = "" comment = re.compile(r'^( *//) ([^ ].*)$') special = re.compile(r'^((([A-Z]+[: ])|([0-9]+ )).*)|(.*;)$') for line in f: match = comment.match(line) if match and not special.match(match.group(2)): # skip intentionally short comments. if not text and len(match.group(2)) < 40: out.write(line) continue if text: text += " " + match.group(2) else: header = match.group(1) text = match.group(2) continue if text: filled = textwrap.wrap(text, width=(78-len(header)), break_long_words=False) for l in filled: out.write(header+" "+l+'\n') text = "" out.write(line) os.rename(tmp, sys.argv[1]) Differential Revision: https://reviews.llvm.org/D46144 llvm-svn: 331197
* AMDGPU: Remove some dead codeTom Stellard2018-04-301-4/+0
| | | | llvm-svn: 331196
* [OPENMP] Do not crash on incorrect input data.Alexey Bataev2018-04-303-12/+63
| | | | | | | | Emit error messages instead of compiler crashing when the target region does not exist in the device code + fix crash when the location comes from macros. llvm-svn: 331195
* Match also DW_TAG_partial_unit when DW_TAG_compile_unit is matchedJan Kratochvil2018-04-309-19/+42
| | | | | | | | | | Code commonly checks if the parent DIE is DW_TAG_compile_unit. But DW_TAG_partial_unit also acts as DW_TAG_compile_unit for DWZ as DWZ is using DW_TAG_imported_unit only at the top unit level. Differential revision: https://reviews.llvm.org/D40469 llvm-svn: 331194
* [llvm-mca] Correctly handle zero-latency stores that consume pipeline resources.Andrea Di Biagio2018-04-303-2/+48
| | | | | | | | | | | | | | | | This fixes PR37293. We can have scheduling classes with no write latency entries, that still consume processor resources. We don't want to treat those instructions as zero-latency instructions; they still have to be issued to the underlying pipelines, so they still consume resource cycles. This is likely to be a regression which I have accidentally introduced at revision 330807. Now, if an instruction has a non-empty set of write processor resources, we conservatively treat it as a normal (i.e. non zero-latency) instruction. llvm-svn: 331193
* [SystemZ] Refactor some VT casts in DAG match patternsUlrich Weigand2018-04-301-59/+59
| | | | | | | | | | | | | | In patterns where we need to specify a result VT, prefer [(set (tr.vt tr.op:$V1), (operator ...))] over [(set tr.op:$V1, (tr.vt (operator ...)))] This is NFC now, but simplifies some future changes. llvm-svn: 331192
OpenPOWER on IntegriCloud