summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Attempt to fix issue with unresolved lit test in TableGenJessica Paquette2019-08-131-0/+1
| | | | | | | | Build bots are unhappy about the Common directory. Add an excludes list to lit.local.cfg. llvm-svn: 368760
* Initial support for native debugging of x86/x64 Windows processesAaron Smith2019-08-1325-9/+2916
| | | | | | | | | | | | | | | | Summary: Thanks to Hui Huang and the reviewers for all the help with this patch. Reviewers: labath, Hui, jfb, clayborg, amccarth Reviewed By: labath Subscribers: amccarth, compnerd, dexonsmith, mgorny, jfb, teemperor, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D63165 llvm-svn: 368759
* [NFCI] Explicitly provide user-defined constructor for SectionRefAlex Langford2019-08-131-1/+1
| | | | | | | | | I am changing this to work around an issue that is being hit when building with clang 3.8. Specifically, clang 3.8 requires that we have a user defined default constructor for SectionRef for the default initialization of a const SectionRef. llvm-svn: 368758
* [GlobalISel][NFC] Factor out common target code from GlobalISelEmitterTestsJessica Paquette2019-08-134-47/+26
| | | | | | | | | | | | Factor out commonly-used target code from the GlobalISelEmitter tests into a GlobalISelEmitterCommon.td file. This is tested by the original GlobalISelEmitter.td test. This reduces the amount of boilerplate code necessary for tests like this. Differential Revision: https://reviews.llvm.org/D65777 llvm-svn: 368757
* Relax opcode checks in test to check for only a number instead of a specific ↵Douglas Yung2019-08-131-5/+5
| | | | | | number. llvm-svn: 368756
* [analyzer][NFC] Make sure that the BugReport is not modified during the ↵Kristof Umann2019-08-135-18/+28
| | | | | | | | | | | | construction of non-visitor pieces I feel this is kinda important, because in a followup patch I'm adding different kinds of interestingness, and propagating the correct kind in BugReporter.cpp is just one less thing to worry about. Differential Revision: https://reviews.llvm.org/D65578 llvm-svn: 368755
* Add a missing header comment, NFCErik Pilkington2019-08-131-0/+13
| | | | llvm-svn: 368754
* [GlobalISel]: Fix lowering of G_SHUFFLE_VECTOR with scalar sourcesAditya Nandakumar2019-08-133-5/+34
| | | | | | https://reviews.llvm.org/D66171 llvm-svn: 368753
* [analyzer][NFC] Refactoring BugReporter.cpp P6.: Completely get rid of ↵Kristof Umann2019-08-131-97/+0
| | | | | | | | | | | | | | | | interestingness propagation Apparently this does literally nothing. When you think about this, it makes sense. If something is really important, we're tracking it anyways, and that system is sophisticated enough to mark actually interesting statements as such. I wouldn't say that it's even likely that subexpressions are also interesting (array[10 - x + x]), so I guess even if this produced any effects, its probably undesirable. Differential Revision: https://reviews.llvm.org/D65487 llvm-svn: 368752
* Factor architecture dependent code out of loop.cuJon Chesterfield2019-08-132-9/+49
| | | | | | | | | | | | | | | | | | | | | Summary: [libomptarget] Factor architecture dependent code out of loop.cu Related to the patch series starting D64217. Added subscribers to said series as reviewers. This effort is smaller in scope. This patch factors out just enough architecture dependent code from loop.cu to allow the same source to be used with amdgcn, given a different target_impl.h. Testing is that the same bitcode (modulo variable names) is generated for libomptarget before and after the refactor, for nvptx and the out of tree amdgcn. Reviewers: jdoerfert, ABataev, bollu, jfb, tra, grokos, Hahnfeld, guansong, xtian, gregrodgers, ronlieb, hfinkel, gtbercea, guraypp, arpith-jacob Reviewed By: jdoerfert, ABataev Subscribers: dexonsmith, openmp-commits Tags: #openmp Differential Revision: https://reviews.llvm.org/D65836 llvm-svn: 368751
* [WebAssembly] Make clang emit correct va_arg code for structsGuanzhong Chen2019-08-132-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | Summary: In the WebAssembly backend, when lowering variadic function calls, non-single member aggregate type arguments are always passed by pointer. However, when emitting va_arg code in clang, the arguments are instead read as if they are passed directly. This results in the pointer being read as the actual structure. Fixes https://github.com/emscripten-core/emscripten/issues/9042. Reviewers: tlively, sbc100, kripken, aheejin, dschuff Reviewed By: dschuff Subscribers: dschuff, jgravelle-google, sunfish, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66168 llvm-svn: 368750
* [libc++] Mark two <chrono> tests as unsupported on AppleClang 11Louis Dionne2019-08-132-2/+2
| | | | | | | The operator""y and operator""d will eventually be supported by AppleClang, but no released version supports them at the moment. llvm-svn: 368749
* Remove the extra `;`.Michael Liao2019-08-131-1/+1
| | | | llvm-svn: 368748
* [GISel] Pass MachineRegisterInfo by const reference to matcher.Mark Lacey2019-08-131-9/+11
| | | | | | | | | | | | | | Summary: NFC. Reviewers: aditya_nandakumar, volkan Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65971 llvm-svn: 368747
* [DWARF] Guess the path styleJonas Devlieghere2019-08-131-2/+6
| | | | | | Try to guess the FileSpec path style before defaulting to native. llvm-svn: 368746
* [analyzer][NFC] Address inlines of D65484Kristof Umann2019-08-131-37/+38
| | | | llvm-svn: 368745
* [AIX]Lowering global address for 32/64bit small/large code modelsXiangling Liao2019-08-138-46/+195
| | | | | | | | | | | | This patch implements global address lowering for 32/64 bit with small/large code models. 1.For 32bit large code model on AIX, there are newly added pseudo opcode LWZtocL & ADDIStocHA32, the support of which on MC layer will be provided by future patches. 2.The default code model on AIX should be small code model. 3.Since AIX does not have medium code model, "report_fatal_error" when users specify it. Differential Revision: https://reviews.llvm.org/D63547 llvm-svn: 368744
* [Refactor] Moving SourceExtraction header from lib to includeShaurya Gupta2019-08-133-5/+5
| | | | | | | | | | | | | | | Summary: - Moved the SourceExtraction header from lib to include so that it can be used in clangd. Reviewers: arphaman Subscribers: ilya-biryukov, dexonsmith, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65878 llvm-svn: 368743
* [DWARF} Use LLVM's debug line parser in LLDB.Jonas Devlieghere2019-08-137-1210/+187
| | | | | | | | | | | | | | | | The line number table header was substantially revised in DWARF 5 and is not fully supported by LLDB's current debug line implementation. This patch replaces the LLDB debug line parser with its counterpart in LLVM. This was possible because of the limited contact surface between the code to parse the DWARF debug line section and the rest of LLDB. We pay a small cost in terms of performance and memory usage. This is something we plan to address in the near future. Differential revision: https://reviews.llvm.org/D62570 llvm-svn: 368742
* [Symbol] Decouple clang from CompilerTypeAlex Langford2019-08-1311-494/+584
| | | | | | | | | | Summary: Ideally CompilerType would have no knowledge of clang or any individual TypeSystem. Decoupling clang is relatively straightforward. Differential Revision: https://reviews.llvm.org/D66102 llvm-svn: 368741
* [ORC] Fix BuildingAJIT tutorial code broken by r368707.Lang Hames2019-08-132-2/+2
| | | | llvm-svn: 368740
* Don't use std::errcAlexey Bataev2019-08-131-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: As noted on Errc.h: // * std::errc is just marked with is_error_condition_enum. This means that // common patters like AnErrorCode == errc::no_such_file_or_directory take // 4 virtual calls instead of two comparisons. And on some libstdc++ those virtual functions conclude that ------------------------ int main() { std::error_code foo = std::make_error_code(std::errc::no_such_file_or_directory); return foo == std::errc::no_such_file_or_directory; } ------------------------- should exit with 0. Reviewers: thakis, rnk, jfb Reviewed By: thakis Subscribers: lebedev.ri, dexonsmith, xbolva00, cfe-commits, caomhin Tags: #clang Differential Revision: https://reviews.llvm.org/D66143 llvm-svn: 368739
* Revert "Fix crash on switch conditions of non-integer types in templates"Dmitri Gribenko2019-08-136-27/+6
| | | | | | This reverts commit r368706. It broke ClangTidy tests. llvm-svn: 368738
* [analyzer][NFC] Refactoring BugReporter.cpp P5.: Compact mile long function ↵Kristof Umann2019-08-134-379/+459
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | invocations into objects In D65379, I briefly described the construction of bug paths from an ExplodedGraph. This patch is about refactoring the code processing the bug path into a bug report. A part of finding a valid bug report was running all visitors on the bug path, so we already have a (possibly empty) set of diagnostics for each ExplodedNode in it. Then, for each diagnostic consumer, we construct non-visitor diagnostic pieces. * We first construct the final diagnostic piece (the warning), then * We start ascending the bug path from the error node's predecessor (since the error node itself was used to construct the warning event). For each node * We check the location (whether its a CallEnter, CallExit) etc. We simultaneously keep track of where we are with the execution by pushing CallStack when we see a CallExit (keep in mind that everything is happening in reverse!), popping it when we find a CallEnter, compacting them into a single PathDiagnosticCallEvent. void f() { bar(); } void g() { f(); error(); // warning } === The bug path === (root) -> f's CallEnter -> bar() -> f's CallExit -> (error node) === Constructed report === f's CallEnter -> bar() -> f's CallExit ^ / \ V (root) ---> f's CallEvent --> (error node) * We also keep track of different PathPieces different location contexts * (CallEvent::path in the above example has f's LocationContext, while the CallEvent itself is in g's context) in a LocationContextMap object. Construct whatever piece, if any, is needed for the note. * If we need to generate edges (or arrows) do so. Make sure to also connect these pieces with the ones that visitors emitted. * Clean up the constructed PathDiagnostic by making arrows nicer, pruning function calls, etc. So I complained about mile long function invocations with seemingly the same parameters being passed around. This problem, as I see it, a natural candidate for creating classes and tying them all together. I tried very hard to make the implementation feel natural, like, rolling off the tongue. I introduced 2 new classes: PathDiagnosticBuilder (I mean, I kept the name but changed almost everything in it) contains every contextual information (owns the bug path, the diagnostics constructed but the visitors, the BugReport itself, etc) needed for constructing a PathDiagnostic object, and is pretty much completely immutable. BugReportContruct is the object containing every non-contextual information (the PathDiagnostic object we're constructing, the current location in the bug path, the location context map and the call stack I meantioned earlier), and is passed around all over the place as a single entity instead of who knows how many parameters. I tried to used constness, asserts, limiting visibility of fields to my advantage to clean up the code big time and dramatically improve safety. Also, whenever I found the code difficult to understand, I added comments and/or examples. Here's a complete list of changes and my design philosophy behind it: * Instead of construcing a ReportInfo object (added by D65379) after finding a valid bug report, simply return an optional PathDiagnosticBuilder object straight away. Move findValidReport into the class as a static method. I find GRBugReporter::generatePathDiagnostics a joy to look at now. * Rename generatePathDiagnosticForConsumer to generate (maybe not needed, but felt that way in the moment) and moved it to PathDiagnosticBuilder. If we don't need to generate diagnostics, bail out straight away, like we always should have. After that, construct a BugReportConstruct object, leaving the rest of the logic untouched. * Move all static methods that would use contextual information into PathDiagnosticBuilder, reduce their parameter count drastically by simply passing around a BugReportConstruct object. * Glance at the code I removed: Could you tell what the original PathDiagnosticBuilder::LC object was for? It took a gooood long while for me to realize that nothing really. It is always equal with the LocationContext associated with our current position in the bug path. Remove it completely. * The original code contains the following expression quite a bit: LCM[&PD.getActivePath()], so what does it mean? I said that we collect the contexts associated with different PathPieces, but why would we ever modify that, shouldn't it be set? Well, theoretically yes, but in the implementation, the address of PathDiagnostic::getActivePath doesn't change if we move to an outer, previously unexplored function. Add both descriptive method names and explanations to BugReportConstruct to help on this. * Add plenty of asserts, both for safety and as a poor man's documentation. Differential Revision: https://reviews.llvm.org/D65484 llvm-svn: 368737
* [AMDGPU] Fix to 'Fold readlane from copy of SGPR or imm'Tim Renouf2019-08-132-2/+5
| | | | | | | | | That change (r363670) could leave a copy from vgpr to sgpr. Fixed. Differential Revision: https://reviews.llvm.org/D66133 Change-Id: I00c3fe6fda2e8e1e36f53195b881b1449c777ea4 llvm-svn: 368736
* [analyzer][NFC] Refactoring BugReporter.cpp P4.: If it can be const, make it ↵Kristof Umann2019-08-1315-98/+110
| | | | | | | | | | | | | | const When I'm new to a file/codebase, I personally find C++'s strong static type system to be a great aid. BugReporter.cpp is still painful to read however: function calls are made with mile long parameter lists, seemingly all of them taken with a non-const reference/pointer. This patch fixes nothing but this: make a few things const, and hammer it until it compiles. Differential Revision: https://reviews.llvm.org/D65382 llvm-svn: 368735
* [NFC][clang] Adding argument based Phase list filtering to getComplicationPhasesPuyan Lotfi2019-08-133-10/+67
| | | | | | | | | | This patch removes usage of FinalPhase from anywhere outside of the scope where it is used to do argument handling. It also adds argument based trimming of the Phase list pulled out of the Types.def table. Differential Revision: https://reviews.llvm.org/D65993 llvm-svn: 368734
* [ARM] Add MVE beats vector cost modelDavid Green2019-08-1311-686/+1066
| | | | | | | | | | | | | | | | | | | | | | | | The MVE architecture has the idea of "beats", where a vector instruction can be executed over several ticks of the architecture. This adds a similar system into the Arm backend cost model, multiplying the cost of all vector instructions by a factor. This factor essentially becomes the expected difference between scalar code and vector code, on average. MVE Vector instructions can also overlap so the a true cost of them is often lower. But equally scalar instructions can in some situations be dual issued, or have other optimisations such as unrolling or make use of dsp instructions. The default is chosen as 2. This should not prevent vectorisation is a most cases (as the vector instructions will still be doing at least 4 times the work), but it will help prevent over vectorising in cases where the benefits are less likely. This adds things so far to the obvious places in ARMTargetTransformInfo, and updates a few related costs like not treating float instructions as cost 2 just because they are floats. Differential Revision: https://reviews.llvm.org/D66005 llvm-svn: 368733
* [clang] Refactor doc comments to Decls attributionJan Korous2019-08-138-278/+355
| | | | | | | | | | | | - Create ASTContext::attachCommentsToJustParsedDecls so we don't have to load external comments in Sema when trying to attach existing comments to just parsed Decls. - Keep comments ordered and cache their decomposed location - faster SourceLoc-based searching. - Optimize work with redeclarations. - Keep one comment per redeclaration chain (represented by canonical Decl) instead of comment per redeclaration. - For redeclaration chains with no comment attached keep just the last declaration in chain that had no comment instead of every comment-less redeclaration. Differential Revision: https://reviews.llvm.org/D65301 llvm-svn: 368732
* [llvm-profdata] Profile dump for compact binary formatWenlei He2019-08-134-6/+29
| | | | | | | | | | | | | | Summary: Fix "llvm-profdata show" so it can work with compact binary format profile. The change is to mark all functions "used" so SampleProfileReaderCompactBinary::read will read in all profiles available for dumping. The function names will be MD5 hash for compact binary format. Reviewers: wmi, davidxl, danielcdh Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65162 llvm-svn: 368731
* [AutoUpgrader] Make ArcRuntime Autoupgrader more conservativeSteven Wu2019-08-135-48/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is a tweak to r368311 and r368646 which auto upgrades the calls to objc runtime functions to objc runtime intrinsics, in order to make sure that the auto upgrader does not trigger with up-to-date bitcode. It is possible for bitcode that is up-to-date to contain direct calls to objc runtime function and those are not inserted by compiler as part of ARC and they should not be upgraded. Now auto upgrader only triggers as when the old style of ARC marker is used so it is guaranteed that it won't trigger on update-to-date bitcode. This also means it won't do this upgrade for bitcode from llvm-8 and llvm-9, which preserves the behavior of those releases. Ideally they should be upgraded as well but it is more important to make sure AutoUpgrader will not trigger on up-to-date bitcode. Reviewers: ahatanak, rjmccall, dexonsmith, pete Reviewed By: dexonsmith Subscribers: hiraditya, jkorous, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66153 llvm-svn: 368730
* [NFC] Fixed testDavid Bolvansky2019-08-131-1/+1
| | | | llvm-svn: 368729
* clang: Don't warn on unused momit-leaf-frame-pointer when frame pointers are ↵Nico Weber2019-08-132-3/+24
| | | | | | | | | | | | | | | | | | | | off. This fixes a regression from r365860: As that commit message states, there are 3 valid states targeted by the combination of -f(no-)omit-frame-pointer and -m(no-)omit-leaf-frame-pointer. After r365860 it's impossible to get from state 10 (omit just leaf frame pointers) to state 11 (omit all frame pointers) in a single command line without getting a warning. This change restores that functionality. Fixes PR42966. Differential Revision: https://reviews.llvm.org/D66142 llvm-svn: 368728
* Use Register over unsigned in LateEHPrepare (NFC)Heejin Ahn2019-08-131-1/+1
| | | | | | | | | | | | | | | | Summary: While D65962 is pending for review, I landed D65475 that added one more use of `unsigned`. Changed it to `Register`. Reviewers: dsanders Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66064 llvm-svn: 368727
* [util] Allow callsigns when running git llvm revertJordan Rupprecht2019-08-131-3/+3
| | | | llvm-svn: 368726
* [NFC] Updated tests after r368724David Bolvansky2019-08-131-7/+7
| | | | llvm-svn: 368725
* [SimplifyLibCalls] Add noalias from known callsitesDavid Bolvansky2019-08-1316-40/+130
| | | | | | | | | | | | | | | | | | Summary: Should be fine for memcpy, strcpy, strncpy. Reviewers: jdoerfert, efriedma Reviewed By: jdoerfert Subscribers: uenoku, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66135 llvm-svn: 368724
* [ValueTracking] Improve reverse assumption inferenceNikita Popov2019-08-132-3/+9
| | | | | | | | | | | | | | | Use isGuaranteedToTransferExecutionToSuccessor() instead of isSafeToSpeculativelyExecute() when seeing whether we can propagate the information in an assume backwards in isValidAssumeForContext(). The latter is more general - it also allows arbitrary loads/stores - and is also the condition we want: if our assume is guaranteed to execute, its condition not holding would be UB. Original patch by arielb1. Differential Revision: https://reviews.llvm.org/D37215 llvm-svn: 368723
* [NFC] Revisited/updated testsDavid Bolvansky2019-08-131-4/+22
| | | | llvm-svn: 368722
* Reland r368691: "[AIX] Implement LR prolog/epilog save/restore"Hubert Tong2019-08-134-8/+66
| | | | | | | | | | | | | | | | | | | | | | Trying again with the code changes (and not just the new test). Summary: This patch fixes the offsets of fields in the stack frame linkage save area for AIX. Reviewers: sfertile, hubert.reinterpretcast, jasonliu, Xiangling_L, xingxue, ZarkoCA, daltenty Reviewed By: hubert.reinterpretcast Subscribers: wuzish, nemanjai, hiraditya, kbarton, MaskRay, jsji, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64424 Patch by Chris Bowler! llvm-svn: 368721
* [NFC][AIX] Use assert instead of llvm_unreachableDavid Tenty2019-08-134-12/+12
| | | | | | | | | | Addresses post-commit comments on https://reviews.llvm.org/D64825. Use assert instead of llvm_unreachable to check if invalid csect types are being generated. Use report_fatal_error on unimplemented XCOFF features. Differential Revision: https://reviews.llvm.org/D64825 llvm-svn: 368720
* [lld][WebAssembly] Allow linking of pic code into static binariesSam Clegg2019-08-138-14/+165
| | | | | | | | | | | | Summary: See https://github.com/emscripten-core/emscripten/issues/9013 Subscribers: dschuff, jgravelle-google, aheejin, sunfish, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65922 llvm-svn: 368719
* [Dwarf] Complete the list of type tags.Jonas Devlieghere2019-08-135-112/+109
| | | | | | | | | | | | An incorrect verification error revealed that the list of type tags was incomplete. This patch adds the missing types by adding a tag kind to the Dwarf.def file, which is used by the `isType` function. A test was added for the original verification error. Differential revision: https://reviews.llvm.org/D65914 llvm-svn: 368718
* [analyzer][NFC] Refactoring BugReporter.cpp P3.: ↵Kristof Umann2019-08-1324-277/+251
| | | | | | | | | | | | | std::shared_pointer<PathDiagnosticPiece> -> PathDiagnosticPieceRef find clang/ -type f -exec sed -i 's/std::shared_ptr<PathDiagnosticPiece>/PathDiagnosticPieceRef/g' {} \; git diff -U3 --no-color HEAD^ | clang-format-diff-6.0 -p1 -i Just as C++ is meant to be refactored, right? Differential Revision: https://reviews.llvm.org/D65381 llvm-svn: 368717
* [X86] Add some vXi8 extract subvector cost model testsSimon Pilgrim2019-08-131-0/+367
| | | | | | We don't have full 512-bit test coverage yet - but there's enough to help test D65892 llvm-svn: 368716
* [SLC] Improve dereferenceable bytes annotationDavid Bolvansky2019-08-132-2/+6
| | | | llvm-svn: 368715
* GlobalISel: Partially implement fewerElementsVector G_UNMERGE_VALUESMatt Arsenault2019-08-1325-372/+1076
| | | | | | Odd sized vectors aren't handled yet. llvm-svn: 368713
* [ARM] Fix detection of duplicates when parsing reg list operandsMomchil Velikov2019-08-132-19/+109
| | | | | | Differential Revision: https://reviews.llvm.org/D65957 llvm-svn: 368712
* [ARM] Fix encoding of APSR in CLRM instructionMomchil Velikov2019-08-133-19/+13
| | | | | | | | | The APSR is encoded by setting bit 15 in the register list of the CLRM instruction (cf. https://static.docs.arm.com/ddi0553/bh/DDI0553B_h_armv8m_arm.pdf). Differential Revision: https://reviews.llvm.org/D65873 llvm-svn: 368711
* [lld][test] Update test to print ELF note description dataJordan Rupprecht2019-08-131-0/+1
| | | | llvm-svn: 368710
OpenPOWER on IntegriCloud