Skip to content
  1. Jul 26, 2013
    • Chandler Carruth's avatar
      Re-implement the analysis of uses in mem2reg to be significantly more · 9af38fc2
      Chandler Carruth authored
      robust. It now uses an InstVisitor and worklist to actually walk the
      uses of the Alloca transitively and detect the pattern which we can
      directly promote: loads & stores of the whole alloca and instructions we
      can completely ignore.
      
      Also, with this new implementation teach both the predicate for testing
      whether we can promote and the promotion engine itself to use the same
      code so we no longer have strange divergence between the two code paths.
      
      I've added some silly test cases to demonstrate that we can handle
      slightly more degenerate code patterns now. See the below for why this
      is even interesting.
      
      Performance impact: roughly 1% regression in the performance of SROA or
      ScalarRepl on a large C++-ish test case where most of the allocas are
      basically ready for promotion. The reason is because of silly redundant
      work that I've left FIXMEs for and which I'll address in the next
      commit. I wanted to separate this commit as it changes the behavior.
      Once the redundant work in removing the dead uses of the alloca is
      fixed, this code appears to be faster than the old version. =]
      
      So why is this useful? Because the previous requirement for promotion
      required a *specific* visit pattern of the uses of the alloca to verify:
      we *had* to look for no more than 1 intervening use. The end goal is to
      have SROA automatically detect when an alloca is already promotable and
      directly hand it to the mem2reg machinery rather than trying to
      partition and rewrite it. This is a 25% or more performance improvement
      for SROA, and a significant chunk of the delta between it and
      ScalarRepl. To get there, we need to make mem2reg actually capable of
      promoting allocas which *look* promotable to SROA without have SROA do
      tons of work to massage the code into just the right form.
      
      This is actually the tip of the iceberg. There are tremendous potential
      savings we can realize here by de-duplicating work between mem2reg and
      SROA.
      
      llvm-svn: 187191
      9af38fc2
    • Craig Topper's avatar
      Remove trailing whitespace. · a97d7e77
      Craig Topper authored
      llvm-svn: 187190
      a97d7e77
    • Craig Topper's avatar
      Remove trailing whitespace. · 99e7927d
      Craig Topper authored
      llvm-svn: 187189
      99e7927d
    • Craig Topper's avatar
    • Craig Topper's avatar
    • Tobias Grosser's avatar
      Make .bc en/decoding of AttrKind stable · 0a8e12fd
      Tobias Grosser authored
      The bitcode representation attribute kinds are encoded into / decoded from
      should be independent of the current set of LLVM attributes and their position
      in the AttrKind enum. This patch explicitly encodes attributes to fixed bitcode
      values.
      
      With this patch applied, LLVM does not silently misread attributes written by
      LLVM 3.3. We also enhance the decoding slightly such that an error message is
      printed if an unknown AttrKind encoding was dected.
      
      Bonus: Dropping bitcode attributes from AttrKind is now easy, as old AttrKinds
             do not need to be kept to support the Bitcode reader.
      llvm-svn: 187186
      0a8e12fd
    • Jason Molenda's avatar
      Add an SBFrame::FindRegister() method to make it a little · ad9a53c5
      Jason Molenda authored
      easier to retrieve a register value.
      
      llvm-svn: 187184
      ad9a53c5
    • Eli Friedman's avatar
      Fix test for Release builds. · e701520a
      Eli Friedman authored
      Attempt 2.  Sorry about the noise.
      
      llvm-svn: 187183
      e701520a
    • Craig Topper's avatar
    • Bill Schmidt's avatar
      [PowerPC] Support powerpc64le as a syntax-checking target. · 778d3876
      Bill Schmidt authored
      This patch provides basic support for powerpc64le as an LLVM target.
      However, use of this target will not actually generate little-endian
      code.  Instead, use of the target will cause the correct little-endian
      built-in defines to be generated, so that code that tests for
      __LITTLE_ENDIAN__, for example, will be correctly parsed for
      syntax-only testing.  Code generation will otherwise be the same as
      powerpc64 (big-endian), for now.
      
      The patch leaves open the possibility of creating a little-endian
      PowerPC64 back end, but there is no immediate intent to create such a
      thing.
      
      The new test case variant ensures that correct built-in defines for
      little-endian code are generated.
      
      llvm-svn: 187180
      778d3876
    • Bill Schmidt's avatar
      [PowerPC] Support powerpc64le as a syntax-checking target. · 0a9170d9
      Bill Schmidt authored
      This patch provides basic support for powerpc64le as an LLVM target.
      However, use of this target will not actually generate little-endian
      code.  Instead, use of the target will cause the correct little-endian
      built-in defines to be generated, so that code that tests for
      __LITTLE_ENDIAN__, for example, will be correctly parsed for
      syntax-only testing.  Code generation will otherwise be the same as
      powerpc64 (big-endian), for now.
      
      The patch leaves open the possibility of creating a little-endian
      PowerPC64 back end, but there is no immediate intent to create such a
      thing.
      
      The LLVM portions of this patch simply add ppc64le coverage everywhere
      that ppc64 coverage currently exists.  There is nothing of any import
      worth testing until such time as little-endian code generation is
      implemented.  In the corresponding Clang patch, there is a new test
      case variant to ensure that correct built-in defines for little-endian
      code are generated.
      
      llvm-svn: 187179
      0a9170d9
    • Eli Friedman's avatar
      Fix test for Release builds. · db8ea01c
      Eli Friedman authored
      llvm-svn: 187178
      db8ea01c
    • Rui Ueyama's avatar
      afe731b7
    • Eli Friedman's avatar
      Tighten type-checking for vector attributes. · efe9fa62
      Eli Friedman authored
      Based on patch by Yunzhong Gao.
      
      llvm-svn: 187176
      efe9fa62
    • Eli Friedman's avatar
      Fix gcc search for cross-compiler on Ubuntu 13.04. · bf44f366
      Eli Friedman authored
      Just more craziness to find crtbegin.o etc.
      
      Patch by Stephen Kelly.
      
      llvm-svn: 187175
      bf44f366
    • Eli Friedman's avatar
      Fix GNU ObjC ABI for a message returning a struct. · f24bd3bd
      Eli Friedman authored
      This allows the ObjFW runtime to correctly implement message forwarding
      for messages which return a struct.
      
      Patch by Jonathan Schleifer.
      
      llvm-svn: 187174
      f24bd3bd
    • Jim Ingham's avatar
      Refine the fix in r187094 to only distrust the StackID comparision when we are... · a7d4822c
      Jim Ingham authored
      Refine the fix in r187094 to only distrust the StackID comparision when we are starting from an address with no symbols.
      If we don't do that "nexti" will stop too soon when stepping past a tail call jump.
      
      rdar://problem/14516227
      
      llvm-svn: 187173
      a7d4822c
    • Eli Friedman's avatar
      Partially revert r186903. · ab091875
      Eli Friedman authored
      It turns out that Plum Hall depends on us not emitting an error on
      integer literals which fit into long long, but fit into
      unsigned long long.  So C99 conformance requires not conforming to C99. :)
      
      llvm-svn: 187172
      ab091875
    • Eli Friedman's avatar
      Move friend warning into CXX11 warning group. · 60257756
      Eli Friedman authored
      Also, fix the wording to reflect this.
      
      llvm-svn: 187171
      60257756
    • Reid Kleckner's avatar
      Use env in a pecoff test so it passes with the lit shell test runner · f33c0e3a
      Reid Kleckner authored
      llvm-svn: 187170
      f33c0e3a
    • Sean Callanan's avatar
      Fixed several problems with watchpoint expressions. · 4d682d25
      Sean Callanan authored
      - First, the watchpoint size was being cast to the
        wrong type.  This is primarily cosmetic, but
        annoying.
      
      - Second, the options for the watchpoint command
        were not being initialized correctly, which led
        to the watchpoint size sometimes having absurdly
        large values.  This caused watchpoints to fail to
        be set in some cases.
      
      <rdar://problem/12658775>
      
      llvm-svn: 187169
      4d682d25
    • Hans Wennborg's avatar
      Options.td: fold the NoForward flag into DriverOption · 83859acd
      Hans Wennborg authored
      They seemed to have the same implications, and this makes for one
      less flag to worry about.
      
      Differential Revision: http://llvm-reviews.chandlerc.com/D1219
      
      llvm-svn: 187168
      83859acd
    • Richard Smith's avatar
      When we perform dependent name lookup during template instantiation, it's not · 0e5d7b8c
      Richard Smith authored
      sufficient to only consider names visible at the point of instantiation,
      because that may not include names that were visible when the template was
      defined. More generally, if the instantiation backtrace goes through a module
      M, then every declaration visible within M should be available to the
      instantiation. Any of those declarations might be part of the interface that M
      intended to export to a template that it instantiates.
      
      The fix here has two parts:
      
      1) If we find a non-visible declaration during name lookup during template
      instantiation, check whether the declaration was visible from the defining
      module of all entities on the active template instantiation stack. The defining
      module is not the owning module in all cases: we look at the module in which a
      template was defined, not the module in which it was first instantiated.
      
      2) Perform pending instantiations at the end of a module, not at the end of the
      translation unit. This is general goodness, since it significantly cuts down
      the amount of redundant work that is performed in every TU importing a module,
      and also implicitly adds the module containing the point of instantiation to
      the set of modules checked for declarations in a lookup within a template
      instantiation.
      
      There's a known issue here with template instantiations performed while
      building a module, if additional imports are added later on. I'll fix that
      in a subsequent commit.
      
      llvm-svn: 187167
      0e5d7b8c
    • Bill Wendling's avatar
      Add a bool->StringRef c'tor to StringRef. · bbf5a323
      Bill Wendling authored
      llvm-svn: 187166
      bbf5a323
    • Reid Kleckner's avatar
      Add yaml2obj to check-lld deps, since the PECOFF tests need it · 81810489
      Reid Kleckner authored
      llvm-svn: 187165
      81810489
    • Hans Wennborg's avatar
      Phabricator.rst: tiny fix · ac1d6a0c
      Hans Wennborg authored
      llvm-svn: 187164
      ac1d6a0c
    • Hans Wennborg's avatar
      Options.td: finish comment about CompileOnly_Group · 6de8bd25
      Hans Wennborg authored
      llvm-svn: 187163
      6de8bd25
    • Rui Ueyama's avatar
      [PECOFF][Driver] Add /nologo command line option. · dc6983ca
      Rui Ueyama authored
      llvm-svn: 187162
      dc6983ca
    • Rui Ueyama's avatar
      [PECOFF][Driver] Split WinLinkDriver::parse for readability. · 50e67c73
      Rui Ueyama authored
      llvm-svn: 187161
      50e67c73
    • Jordan Rose's avatar
      [analyzer] Remove dead optimization for MaterializeTemporaryExpr. · a7e7e7a2
      Jordan Rose authored
      Previously, we tried to avoid creating new temporary object regions if
      the value to be materialized itself came from a temporary object region.
      However, once we became more strict about lvalues vs. rvalues (months
      ago), this optimization became dead code, because the input to this
      function will always be an rvalue (i.e. a symbolic value or compound
      value rather than a region, at least for structs).
      
      This would be a nice optimization to keep, but removing it makes it
      simpler to reason about temporary regions.
      
      llvm-svn: 187160
      a7e7e7a2
    • Aaron Ballman's avatar
      Using a different loop induction variable than the enclosing scope. No... · 13235dad
      Aaron Ballman authored
      Using a different loop induction variable than the enclosing scope.  No functional changes intended.
      
      llvm-svn: 187159
      13235dad
  2. Jul 25, 2013
Loading