Skip to content
  1. Jun 28, 2018
    • Artem Dergachev's avatar
      [analyzer] Remove redundant ';'. · 4ba041fa
      Artem Dergachev authored
      Fixes a compiler warning. No functionan change intended.
      
      llvm-svn: 335808
      4ba041fa
    • Richard Smith's avatar
      [modules] Do not serialize / deserialize pending new/delete mismatch · f5262c63
      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
      f5262c63
    • Craig Topper's avatar
      [X86] Use PatFrag with hardcoded numbers for FROUND_NO_EXC/FROUND_CURRENT... · ec5d568a
      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
      ec5d568a
    • Richard Smith's avatar
      [modules] Ensure that an in-class function definition is attached to the · 0b70de15
      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
      0b70de15
    • Craig Topper's avatar
      [X86] Change how we prefer shift by immediate over folding a load into a shift. · ab70f588
      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
      ab70f588
    • Artem Dergachev's avatar
      [analyzer] Use sufficiently large types for index bounds calculation. · 0bb974e3
      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
      0bb974e3
    • George Karpenkov's avatar
      [libFuzzer] [Tests] [NFC] Change seed for reduce_inputs.test · 348dd9dd
      George Karpenkov authored
      Differential Revision: https://reviews.llvm.org/D48686
      
      llvm-svn: 335802
      348dd9dd
    • Alex Lorenz's avatar
      [cmake][xcode-toolchain] add support for major Xcode version >= 10 · 3ddd210a
      Alex Lorenz authored
      The regex that extracts the Xcode version should support major versions with two
      digits.
      
      rdar://41465184
      
      llvm-svn: 335801
      3ddd210a
    • Artem Dergachev's avatar
      [analyzer] Add support for pre-C++17 copy elision. · 9a209ad1
      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
      9a209ad1
    • Douglas Yung's avatar
      Fixup test to compile with -frtti when trying to use typeid() as the PS4 does... · 3a670eac
      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
      3a670eac
    • Artem Dergachev's avatar
      [CFG] [analyzer] Simplify lifetime-extended temporary construction contexts. · d18639bd
      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
      d18639bd
    • Michael J. Spencer's avatar
      [CGProfile] Fix unused variable warning. · 98f5475f
      Michael J. Spencer authored
      llvm-svn: 335797
      98f5475f
    • Artem Dergachev's avatar
      [analyzer] Re-enable lifetime extension for temporaries without destructors. · 4fb586c3
      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
      4fb586c3
    • Artem Dergachev's avatar
      [CFG] [analyzer] Add construction contexts that explain pre-C++17 copy elision. · ff267df0
      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
      ff267df0
    • Michael J. Spencer's avatar
      Add support for generating a call graph profile from Branch Frequency Info. · 5bf1ead3
      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
      5bf1ead3
    • George Karpenkov's avatar
      [libFuzzer] [NFC] [Tests] Mark signal handling tests as UNSUPPORTED on Darwin · 0cad9cb9
      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
      0cad9cb9
    • Heejin Ahn's avatar
      [analyzer] Add clangFrontend to target_link_libraries · da6b81cd
      Heejin Ahn authored
      Without this, builds with `-DSHARED_LIB=ON` fail.
      
      llvm-svn: 335791
      da6b81cd
  2. Jun 27, 2018
Loading