- Jun 28, 2018
-
-
Artem Dergachev authored
Fixes a compiler warning. No functionan change intended. llvm-svn: 335808
-
Richard Smith authored
checks across module boundaries. This was causing us to load constructor definitions for all consumers of a module with a pending check. (In one case we saw ~7% of total frontend time spent loading constructors for this check.) llvm-svn: 335807
-
Craig Topper authored
[X86] Use PatFrag with hardcoded numbers for FROUND_NO_EXC/FROUND_CURRENT instead of ImmLeafs with predicates where one of the two numbers was hardcoded. This more efficient for the isel table generator since we can use CheckChildInteger instead of MoveChild, CheckPredicate, MoveParent. This reduced the table size by 1-2K. I wish there was a way to share the values with X86BaseInfo.h and still use a PatFrag like this. These numbers are fixed by the X86 intrinsic spec going back many years and we should never need to change them. So we shouldn't waste table bytes to support sharing. llvm-svn: 335806
-
Richard Smith authored
declaration of the function that ends up in the primary definition of the class. ... at least for class templates. This is necessary for us to be able to track when an inline friend function has a definition that needs to be (lazily) instantiated. llvm-svn: 335805
-
Craig Topper authored
BMI2 added new shift by register instructions that have the ability to fold a load. Normally without doing anything special isel would prefer folding a load over folding an immediate because the load folding pattern has higher "complexity". This would require an instruction to move the immediate into a register. We would rather fold the immediate instead and have a separate instruction for the load. We used to enforce this priority by artificially lowering the complexity of the load pattern. This patch changes this to instead reject the load fold in isProfitableToFoldLoad if there is an immediate. This is more consistent with other binops and feels less hacky. llvm-svn: 335804
-
Artem Dergachev authored
The ProgramState::assumeInBound() API is used by checkers to make an assumption that a certain array index is within the array's bounds (i.e. is greater than or equal to 0 and is less than the length of the array). When the type of the index was unspecified by the caller, it assumed that the type is 'int', which caused some indices and sizes to truncate during calculations. Use ArrayIndexTy by default instead, which is used by the analyzer to represent index types and is currently hardcoded to long long. Patch by Bevin Hansson! Differential Revision: https://reviews.llvm.org/D46944 llvm-svn: 335803
-
George Karpenkov authored
Differential Revision: https://reviews.llvm.org/D48686 llvm-svn: 335802
-
Alex Lorenz authored
The regex that extracts the Xcode version should support major versions with two digits. rdar://41465184 llvm-svn: 335801
-
Artem Dergachev authored
r335795 adds copy elision information to CFG. This commit allows static analyzer to elide elidable copy constructors by constructing the objects that were previously subject to elidable copy directly in the target region of the copy. The chain of elided constructors may potentially be indefinitely long. This only happens when the object is being returned from a function which in turn is returned from another function, etc. NRVO is not supported yet. Differential Revision: https://reviews.llvm.org/D47671 llvm-svn: 335800
-
Douglas Yung authored
Fixup test to compile with -frtti when trying to use typeid() as the PS4 does not have it on by default and it was failing on the PS4 linux bot because of this. llvm-svn: 335799
-
Artem Dergachev authored
When a temporary object is materialized and through that obtain lifetime that is longer than the duration of the full-expression, it does not require a temporary object destructor; it will be destroyed in a different manner. Therefore it's not necessary to include CXXBindTemporaryExpr into the construction context for such temporary in the CFG only to make clients throw it away. Differential Revision: https://reviews.llvm.org/D47667 llvm-svn: 335798
-
Michael J. Spencer authored
llvm-svn: 335797
-
Artem Dergachev authored
When an object's class provides no destructor, it's less important to materialize that object properly because we don't have to model the destructor correctly, so previously we skipped the support for these syntax patterns. Additionally, fix support for construction contexts of "static temporaries" (temporaries that are lifetime-extended by static references) because it turned out that we only had tests for them without destructors, which caused us to regress when we re-introduced the construction context for such temporaries. Differential Revision: https://reviews.llvm.org/D47658 llvm-svn: 335796
-
Artem Dergachev authored
Before C++17 copy elision was optional, even if the elidable copy/move constructor had arbitrary side effects. The elidable constructor is present in the AST, but marked as elidable. In these cases CFG now contains additional information that allows its clients to figure out if a temporary object is only being constructed so that to pass it to an elidable constructor. If so, it includes a reference to the elidable constructor's construction context, so that the client could elide the elidable constructor and construct the object directly at its final destination. Differential Revision: https://reviews.llvm.org/D47616 llvm-svn: 335795
-
Michael J. Spencer authored
=== Generating the CG Profile === The CGProfile module pass simply gets the block profile count for each BB and scans for call instructions. For each call instruction it adds an edge from the current function to the called function with the current BB block profile count as the weight. After scanning all the functions, it generates an appending module flag containing the data. The format looks like: ``` !llvm.module.flags = !{!0} !0 = !{i32 5, !"CG Profile", !1} !1 = !{!2, !3, !4} ; List of edges !2 = !{void ()* @a, void ()* @b, i64 32} ; Edge from a to b with a weight of 32 !3 = !{void (i1)* @freq, void ()* @a, i64 11} !4 = !{void (i1)* @freq, void ()* @b, i64 20} ``` Differential Revision: https://reviews.llvm.org/D48105 llvm-svn: 335794
-
George Karpenkov authored
Under load, these tests tend to fail sporadically on our bots. In my understanding, the signal handling is not guaranteed to happen within 2 seconds, and the test is inherently flaky. llvm-svn: 335792
-
Heejin Ahn authored
Without this, builds with `-DSHARED_LIB=ON` fail. llvm-svn: 335791
-
- Jun 27, 2018
-
-
Petr Hosek authored
Remove the return value check. Differential Revision: https://reviews.llvm.org/D48671 llvm-svn: 335790
-
Zachary Turner authored
The code to emit the pieces of the MSF file were actually in PDBFileBuilder. Move this to MSFBuilder so that we can theoretically emit an MSF without having a PDB file. llvm-svn: 335789
-
Benjamin Kramer authored
This is a benign race, but tsan likes to complain about it. Just make it happy. llvm-svn: 335788
-
Craig Topper authored
If we turn X86ISD::AND into ISD::AND, we delete N. But we were continuing onto the next block of code even though N no longer existed. Just happened to notice it. I assume asan didn't notice it because we explicitly unpoison deleted nodes and give them a DELETE_NODE opcode. llvm-svn: 335787
-
Sameer AbuAsal authored
Summary: In r333455 we added a peephole to fix the corner cases that result from separating base + offset lowering of global address.The peephole didn't handle some of the cases because it only has a basic block view instead of a function level view. This patch replaces that logic with a machine function pass. In addition to handling the original cases it handles uses of the global address across blocks in function and folding an offset from LW\SW instruction. This pass won't run for OptNone compilation, so there will be a negative impact overall vs the old approach at O0. Reviewers: asb, apazos, mgrang Reviewed By: asb Subscribers: MartinMosbeck, brucehoult, the_o, rogfer01, mgorny, rbar, johnrusso, simoncook, niosHD, kito-cheng, shiva0217, zzheng, llvm-commits, edward-jones Differential Revision: https://reviews.llvm.org/D47857 llvm-svn: 335786
-
Fangrui Song authored
Reviewers: paulsemel, echristo Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D48622 llvm-svn: 335785
-
Fangrui Song authored
llvm-svn: 335784
-
Eli Friedman authored
The number of SCEV expressions is usually linear in the number of IR instructions being modeled. However, a naive SCEV visitor is not. For an expression like x*x, "x" will be visited twice. If x is itself an expression like x*x, that will be visited twice, etc, and the overall runtime is O(2^N) in the number of SCEV expressions. To prevent this from happening, add a cache, so we only visit each SCEV expression once. Not sure this is the best solution. Maybe we can instead check whether the SCEV is scop-invariant (in which case we never need to map the value). But we don't have a utility for that at the moment. Differential Revision: https://reviews.llvm.org/D47087 llvm-svn: 335783
-
Richard Smith authored
llvm-svn: 335782
-
Richard Smith authored
conversions are only applied to operands of class type, and the second standard conversion sequence is not applied. When diagnosing an invalid builtin binary operator, talk about the original types rather than the converted types. If these differ by a user-defined conversion, tell the user what happened. llvm-svn: 335781
-
Bruno Cardoso Lopes authored
Using @import in framework headers inhibit the use of such headers when not using modules, this is specially bad for headers that end up in the SDK (or any other system framework). Add a warning to give users some indication that this is discouraged. rdar://problem/39192894 llvm-svn: 335780
-
Richard Smith authored
array subscript expression is an array prvalue. Also apply DR1213 to vector prvalues for consistency. llvm-svn: 335779
-
Sanjay Patel authored
llvm-svn: 335778
-
Vlad Tsyrklevich authored
The android buildbot moves the build outputs to a different directory and rewrites the executable path, the DSO passed as an argument does not get re-written. Use rpaths to load the DSO the same way the test/cfi/cross-dso/ tests do and test the DSO name differently. llvm-svn: 335777
-
Jonas Devlieghere authored
When running the test suite with .debug_names a bunch of tests were failing because GetCompleteObjCClass was not yet implemented for DebugNamesDWARFIndex. This patch adds the required logic. We use the .debug_names to find the Objective-C class and then rely on DW_AT_APPLE_objc_complete_type to find the complete type. If we can't find it or the attribute is not supported, we return a list of potential complete types. Differential revision: https://reviews.llvm.org/D48596 llvm-svn: 335776
-
Paul Robinson authored
Differential Revision: https://reviews.llvm.org/D48494 llvm-svn: 335775
-
Aaron Enye Shi authored
Summary: HIP should link the bitcodes with caller functions before callee functions. Also added lit test to check the ordering of the linked bitcodes is matches. Reviewers: yaxunl, b-sumner Reviewed By: yaxunl, b-sumner Subscribers: cfe-commits, yaxunl, b-sumner, scchan Differential Revision: https://reviews.llvm.org/D48667 llvm-svn: 335774
-
Nirav Dave authored
llvm-svn: 335773
-
Michael Kruse authored
Summary: The instantiation of the drop_begin function template usually fails because the functions begin() and end() do not exist. Only when using on a container from the std namespace (or `llvm::iterator_range`s of something derived from `std::iterator`), they are matched to std::begin() and std::end() due to Koenig-lookup. Explicitly use llvm::adl_begin and llvm::adl_end to make drop_begin applicable to anything iterable (including C-style arrays). A solution for general `llvm::iterator_range`s was already tried in r244620, but got reverted in r244621 due to MSVC not liking it. Reviewers: dblaikie, grosbach, aaron.ballman, ruiu Reviewed By: dblaikie, aaron.ballman Subscribers: aaron.ballman, llvm-commits Differential Revision: https://reviews.llvm.org/D48598 llvm-svn: 335772
-
Fangrui Song authored
llvm-svn: 335771
-
Ben Hamilton authored
Summary: This PR adds a few acronyms related to hashing algorithms to the standard list in `objc-property-declaration`. Reviewers: Wizard Reviewed By: Wizard Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D48652 llvm-svn: 335770
-
Fangrui Song authored
llvm-svn: 335769
-
Craig Topper authored
[X86] Teach the disassembler to use %eiz/%riz instead of NoRegister when the SIB byte is present, but doesn't encode an index register and there was another shorter encoding that would achieve the same result. The %eiz/%riz are dummy registers that force the encoder to emit a SIB byte when it normally wouldn't. By emitting them in the disassembly output we ensure that assembling the disassembler output would also produce a SIB byte. This should match the behavior of objdump from binutils. llvm-svn: 335768
-