summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Remove superfluous break after return. NFC.Simon Pilgrim2019-11-091-2/+0
|
* Fix shadow variable warning by reducing scope of CC/InverseCC CondCodes. NFCI.Simon Pilgrim2019-11-091-3/+3
|
* Remarks - fix shadow variable warnings. NFCI.Simon Pilgrim2019-11-092-14/+16
| | | | Avoid conflict with llvm::remarks::Magic global variable.
* [cxx_status] Update with Belfast motions.Richard Smith2019-11-091-11/+40
|
* Refactor SimplifySelectsFeedingBinaryOp for D64713. NFC.Jay Foad2019-11-091-25/+32
|
* [Diagnostics] Fixed crash with non pointer type (PR43950)Dávid Bolvanský2019-11-091-1/+2
|
* [analyzer] Fix skipping the call during inlined defensive check suppression.Artem Dergachev2019-11-082-11/+25
| | | | | | | | | | | | | | | | | | | | | When bugreporter::trackExpressionValue() is invoked on a DeclRefExpr, it tries to do most of its computations over the node in which this DeclRefExpr is computed, rather than on the error node (or whatever node is stuffed into it). One reason why we can't simply use the error node is that the binding to that variable might have already disappeared from the state by the time the bug is found. In case of the inlined defensive checks visitor, the DeclRefExpr node is in fact sometimes too *early*: the call in which the inlined defensive check has happened might have not been entered yet. Change the visitor to be fine with tracking dead symbols (which it is totally capable of - the collapse point for the symbol is still well-defined), and fire it up directly on the error node. Keep using "LVState" to find out which value should we be tracking, so that there weren't any problems with accidentally loading an ill-formed value from a dead variable. Differential Revision: https://reviews.llvm.org/D67932
* [analyzer] Nullability: Don't infer nullable when passing as nullable parameter.Artem Dergachev2019-11-082-5/+12
| | | | You can't really infer anything from that.
* Temporarily change the default for use-g-packet-for-reading to false,Jason Molenda2019-11-083-2/+5
| | | | | | | | until we can automatically fall back to p/P if g/G are not supported; it looks like there is a bug in debugserver's g/G packets taht needs to be fixed, or debugserver should stop supporting g/G until that bug is fixed. But we need lldb to be able to fall back to p/P correctly for that to be a viable workaround.
* Revert "Add a testcase for .dSYM path remapping dictionaries."Jonas Devlieghere2019-11-083-69/+0
| | | | This reverts commit 2bbc4fdd8fa0ed58d610ab6260cb664c7cfef204.
* [clang][IFS][test] Fixing buildbot test fails for clang-ifs.Puyan Lotfi2019-11-088-16/+16
| | | | | Checking for the exact triple fails on many bots. Leaving the triple check blank.
* [clang][IFS] Adds support for more decl types in clang interface stubs.Puyan Lotfi2019-11-0811-6/+157
| | | | | | | | | | | | | Adding support for processing the following Decls: NonTypeTemplateParmDecl, CXXConversionDecl, UnresolvedUsingValueDecl, UsingDecl, UsingShadowDecl, TypeAliasTemplateDecl, TypeAliasDecl, VarTemplateDecl, VarTemplateSpecializationDecl, UsingDirectiveDecl, TemplateTemplateParmDecl, ClassTemplatePartialSpecializationDecl, IndirectFieldDecl. Also, this allows for processing NamedDecls that don't have an identifier and skips over VarDecls that are dependent on template types. Differential Revision: https://reviews.llvm.org/D69995
* ThinLTO : Import always_inline functions irrespective of the thresholdTeresa Johnson2019-11-0815-14/+67
| | | | | | | | | | | | | | | | Summary: A user can force a function to be inlined by specifying the always_inline attribute. Currently, thinlto implementation is not aware of always_inline functions and does not guarantee import of such functions, which in turn can prevent inlining of such functions. Patch by Bharathi Seshadri <bseshadr@cisco.com> Reviewers: tejohnson Reviewed By: tejohnson Subscribers: mehdi_amini, inglorion, hiraditya, steven_wu, dexonsmith, arphaman, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70014
* Test case to verify that lldb falls back to p/P if g is unsupportedJason Molenda2019-11-081-0/+98
| | | | | | | | | and that lldb uses the expedited register values in the ? packet aka stop packet (T11 etc) and does not re-fetch them with the p packet. This test is currently failing from the "[lldb-server] Add setting to force 'g' packet use" commit; I'm marking it as @expectedFailureAll until we can get this fixed.
* DebugInfo: Remove redundant conditionals/checks from macro info emissionDavid Blaikie2019-11-081-18/+8
| | | | | These checks fall out naturally from the current implementation without needing to be explicitly considered anymore.
* DebugInfo: Do not create a debug_macinfo section if no CUs have associated ↵David Blaikie2019-11-0810-46/+31
| | | | | | macros Patch based on Sourabh Singh's D69839 patch.
* llvm-ranlib/nm: Don't print usage message except for usage errorsSam Clegg2019-11-084-26/+50
| | | | | | | Also, fix a bug in ranlib where it didn't correctly detect being run without any argument and would try to operate on the empty string. Differential Revision: https://reviews.llvm.org/D70021
* NVPTX: Don't insert an extra empty line at the end of the last section.David Blaikie2019-11-086-7/+0
| | | | | | | This was arbitrarily appearing in only the last section emitted - which made tests more sensitive than they needed to be (removing the last section - like the macinfo section change that's coming after this) would, surprisingly, move the blank line to the previous section.
* Debug Info: Nest Objective-C property function decls inside their container.Adrian Prantl2019-11-083-25/+82
| | | | | | | | | | | | | | | | | | This has the nice side-effect of also fixing a crash in Clang. Starting with DWARF 5 we are emitting ObjC method declarations as children of their containing entity. This worked for interfaces, but didn't consider the case of synthessized properties. When a property of a protocol is synthesized in an interface implementation the ObjCMethodDecl that was passed to CGF::StartFunction was the property *declaration* which obviously couldn't have a containing interface. This patch passes the containing interface all the way through to CGDebugInfo, so the function declaration can be created with the correct parent (= the class implementing the protocol). rdar://problem/53782400 Differential Revision: https://reviews.llvm.org/D66121
* [clangd] NFC, reuse the source manager variable in the RawStringLiteral ↵Alex Lorenz2019-11-081-2/+1
| | | | | | apply method Differential Revision: https://reviews.llvm.org/D69544
* [MC] Emit unused undefined symbol even if its binding is not setFangrui Song2019-11-085-9/+37
| | | | | | | | | | | | | | | | | | | | | | | | Recommit r373168, which was reverted by r373242. This actually exposed a boringssl bug which has been fixed for more than one month. For the following two cases, we currently suppress the symbols. This patch emits them (compatible with GNU as). * `test2_a = undef`: if `undef` is otherwise unused. * `.hidden hidden`: if `hidden` is unused. This is the main point of the patch, because omitting the symbol would cause a linker semantic difference. It causes a behavior change that is not compatible with GNU as: .weakref foo1, bar1 When neither foo1 nor bar1 is used, we now emit bar1, which is arguably more consistent. Another change is that we will emit .TOC. for .TOC.@tocbase . For this directive, suppressing .TOC. can be seen as a size optimization, but we choose to drop it for simplicity and consistency.
* [www] More HTTPS and outdated link fixes.Stephan T. Lavavej2019-11-087-16/+16
| | | | Resolves D69981.
* clang-format: refresh the list of optionsSylvestre Ledru2019-11-081-45/+52
|
* Reland "[compiler-rt] Fix tests after 03b84e4f6d0"Jan Korous2019-11-082-2/+2
| | | | This reverts commit d6be9273c6035c07b25dd1494f76cd61d523b878.
* Revert "Reland "[clang] Report sanitizer blacklist as a dependency in cc1""Jan Korous2019-11-086-21/+62
| | | | This reverts commit cae4a28864f4e8a55920e2b94e2cd43617902dec.
* clang-format: Add to the release notes the new --dry-run/-n optionSylvestre Ledru2019-11-081-0/+3
|
* Revert "Reapply "Fix crash on switch conditions of non-integer types in ↵Melanie Blower2019-11-089-32/+8
| | | | | | | templates"" This reverts commit 759948467ea3181615d44d80f74ffeb260180fd0. There were build bot failures in clang-tidy
* [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine ↵joanlluch2019-11-083-0/+88
| | | | | | | | | | | | | | | | | | | | | (3) (baseline tests) Summary: This is baseline tests for D69326 Incorporates a command line flag for the MSP430 and adds a test cases to help showing the effects of applying D69326 More details and motivation for this patch in D69326 Reviewers: spatel, asl, lebedev.ri Reviewed By: spatel, asl Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D69975
* Don't attempt to upgrade debug-info-tests to Python3.Adrian Prantl2019-11-081-35/+0
| | | | | | | | There was CMake code that would attempt to detect Python 3 even if LLVM was configured with Python 2, but it messed with the environment for the other LLVM projects. This commit removes this functionality and just lkeaves a hard error if Python < 3 is detected and debuginfo-tests are required.
* Add a testcase for .dSYM path remapping dictionaries.Adrian Prantl2019-11-083-0/+69
| | | | rdar://problem/56924558
* Basic: fix FileManager invalidation issue for file redirectAlex Suhan2019-11-081-7/+11
| | | | | Insertion into SeenFileEntries can invalidate iterators, we need to do another lookup on the re-intern path.
* [llvm-xray] Add basic test for AArch64 supportShoaib Meenai2019-11-082-0/+173
| | | | Based on a test provided by Ian Levesque <ianlevesque@fb.com>.
* [clang] Fix -fsanitize-system-blacklist processing in cc1Jan Korous2019-11-081-0/+5
|
* Reland "[clang] Report sanitizer blacklist as a dependency in cc1"Jan Korous2019-11-086-62/+21
| | | | This reverts commit 3182027282c59c51d5080d83365917fccd695854.
* Reland "[clang] Report sanitizer blacklist as a dependency in cc1"Jan Korous2019-11-086-21/+62
| | | | This reverts commit 9b8413ac6e56e7a6e0ba884773d13bcf9414bd43.
* DebugInfo: Use separate macinfo contributions for each CUDavid Blaikie2019-11-0811-63/+69
| | | | | | | | | | | | | | | | The macinfo support was broken for LTO situations, by terminating macinfo lists only once - multiple macinfo contributions were correctly labeled, but they all continued/flowed into later contributions until only one terminator appeared at the end of the section. Correctly terminate each contribution & fix the parsing to handle this situation too. The parsing fix is also necessary for dumping linked binaries - the previous code would stop at the end of the first contribution - missing all later contributions in a linked binary. It'd be nice to improve the dumping to print the offsets of each contribution so it'd be easier to know which CU AT_macro_info refers to which macinfo contribution.
* [clang-format] NFC allow Format.h to be clang-formatted but still maintain ↵paul_hoad2019-11-082-7/+14
| | | | | | | | | | | | | | | | | | | | | the same doc layout in ClangFormatStyleOptions.rst Summary: Format.h is used to generate ClangFormatStyleOptions.rst, the layout of the comments is critical to the rst file. Accidentally clang-formatting Format.h can lead to the .rst changing. This revision simply add // clang-format off/on statement around the areas who formatting needs to be maintained, mainly around the options that are related to what happens when the line breaks due to `ColumnLimit` (which is what is happening to the comment) This allows Format.h to be clang-formatted without causing a change in the documentation when dump_format_style.py is rerun, which is also part of the revision. Reviewers: mitchell-stellar, klimek, sammccall, owenpan Reviewed By: mitchell-stellar Subscribers: cfe-commits Tags: #clang, #clang-format Differential Revision: https://reviews.llvm.org/D69951
* gn build: Merge f0af11d86f8LLVM GN Syncbot2019-11-081-0/+1
|
* [DDG] Data Dependence Graph - Pi Blockbmahjour2019-11-0811-318/+751
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds Pi Blocks to the DDG. A pi-block represents a group of DDG nodes that are part of a strongly-connected component of the graph. Replacing all the SCCs with pi-blocks results in an acyclic representation of the DDG. For example if we have: {a -> b}, {b -> c, d}, {c -> a} the cycle a -> b -> c -> a is abstracted into a pi-block "p" as follows: {p -> d} with "p" containing: {a -> b}, {b -> c}, {c -> a} In this implementation the edges between nodes that are part of the pi-block are preserved. The crossing edges (edges where one end of the edge is in the set of nodes belonging to an SCC and the other end is outside that set) are replaced with corresponding edges to/from the pi-block node instead. Authored By: bmahjour Reviewer: Meinersbur, fhahn, myhsu, xtian, dmgreen, kbarton, jdoerfert Reviewed By: Meinersbur Subscribers: ychen, arphaman, simoll, a.elovikov, mgorny, hiraditya, jfb, wuzish, llvm-commits, jsji, Whitney, etiotto, ppc-slack Tag: #llvm Differential Revision: https://reviews.llvm.org/D68827
* [AArch64][X86] Don't assume __powidf2 is available on Windows.Eli Friedman2019-11-087-64/+144
| | | | | | | | | | We had some code for this for 32-bit ARM, but this doesn't really need to be in target-specific code; generalize it. (I think this started showing up recently because we added an optimization that converts pow to powi.) Differential Revision: https://reviews.llvm.org/D69013
* Revert "[LV] Apply sink-after & interleave-groups as VPlan transformations ↵Gil Rapaport2019-11-088-209/+131
| | | | | | (NFCI)" This reverts commit 11ed1c0239fd51fd2f064311dc7725277ed0a994 - causes an assert failure.
* [ELF] Fix stack-use-after-scope after D69592 and 69650Fangrui Song2019-11-081-2/+4
|
* Reapply [LVI] Normalize pointer behaviorNikita Popov2019-11-082-90/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix cache invalidation by not guarding the dereferenced pointer cache erasure by SeenBlocks. SeenBlocks is only populated when actually caching a value in the block, which doesn't necessarily have to happen just because dereferenced pointers were calculated. ----- Related to D69686. As noted there, LVI currently behaves differently for integer and pointer values: For integers, the block value is always valid inside the basic block, while for pointers it is only valid at the end of the basic block. I believe the integer behavior is the correct one, and CVP relies on it via its getConstantRange() uses. The reason for the special pointer behavior is that LVI checks whether a pointer is dereferenced in a given basic block and marks it as non-null in that case. Of course, this information is valid only after the dereferencing instruction, or in conservative approximation, at the end of the block. This patch changes the treatment of dereferencability: Instead of including it inside the block value, we instead treat it as something similar to an assume (it essentially is a non-nullness assume) and incorporate this information in intersectAssumeOrGuardBlockValueConstantRange() if the context instruction is the terminator of the basic block. This happens either when determining an edge-value internally in LVI, or when a terminator was explicitly passed to getValueAt(). The latter case makes this change not fully NFC, because we can now fold terminator icmps based on the dereferencability information in the same block. This is the reason why I changed one JumpThreading test (it would optimize the condition away without the change). Of course, we do not want to recompute dereferencability on each intersectAssume call, so we need a new cache for this. The dereferencability analysis requires walking the entire basic block and computing underlying objects of all memory operands. This was previously done separately for each queried pointer value. In the new implementation (both because this makes the caching simpler, and because it is faster), I instead only walk the full BB once and cache all the dereferenced pointers. So the traversal is now performed only once per BB, instead of once per queried pointer value. I think the overall model now makes more sense than before, and there will be no more pitfalls due to differing integer/pointer behavior. Differential Revision: https://reviews.llvm.org/D69914
* [clang] Add VFS support for sanitizers' blacklistsJan Korous2019-11-087-10/+69
| | | | Differential Revision: https://reviews.llvm.org/D69648
* [cmake] Remove LLVM_{BUILD,LINK}_LLVM_DYLIB options on WindowsTom Stellard2019-11-085-7/+18
| | | | | | | | | | | | | | Summary: The options aren't supported so they can be removed. Reviewers: beanz, smeenai, compnerd Reviewed By: compnerd Subscribers: mgorny, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D69877
* Reapply "Fix crash on switch conditions of non-integer types in templates"Melanie Blower2019-11-089-8/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch reapplies commit 76945821b9cad3. The first version broke buildbots due to clang-tidy test fails. The fails are because some errors in templates are now diagnosed earlier (does not wait till instantiation). I have modified the tests to add checks for these diagnostics/prevent these diagnostics. There are no additional code changes. Summary of code changes: Clang currently crashes for switch statements inside a template when the condition is a non-integer field member because contextual implicit conversion is skipped when parsing the condition. This conversion is however later checked in an assert when the case statement is handled. The conversion is skipped when parsing the condition because the field member is set as type-dependent based on its containing class. This patch sets the type dependency based on the field's type instead. This patch fixes Bug 40982. Reviewers: rnk, gribozavr2 Patch by: Elizabeth Andrews (eandrews) Differential revision: https://reviews.llvm.org/D69950
* [ThinLTO] Fix bug when importing writeonly variablesevgeny2019-11-085-8/+80
| | | | | | | | Patch enables import of write-only variables with non-trivial initializers to fix linker errors. Initializers of imported variables are converted to 'zeroinitializer' to avoid promotion of referenced objects. Differential revision: https://reviews.llvm.org/D70006
* [cmake] Remove SVN support from VersionFromVCS.cmakeTom Stellard2019-11-082-79/+30
| | | | | | | | | | Reviewers: phosek Subscribers: mgorny, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D69682
* [PowerPC][compiler-rt][builtins]Fix __fixunstfti builtin on PowerPCLei Huang2019-11-082-10/+662
| | | | | | | | | | | __fixunstfti converts a long double (IBM double-double) to an unsigned 128 bit integer. This patch enables it to handle a previously unhandled case in which a negative low double may impact the result of the conversion. Collaborated with @masoud.ataei and @renenkel. Patch By: Baptiste Saleil Differential Revision: https://reviews.llvm.org/D69193
* Properly propagate is_variadic.Adrian Prantl2019-11-081-1/+1
| | | | | This fixes a copy&paste error made when adapting to new clang API which was promptly caught by the bots.
OpenPOWER on IntegriCloud