Skip to content
  1. Feb 24, 2014
  2. Feb 22, 2014
  3. Feb 21, 2014
  4. Feb 19, 2014
    • Rafael Espindola's avatar
      Add back r201608, r201622, r201624 and r201625 · daeafb4c
      Rafael Espindola authored
      r201608 made llvm corretly handle private globals with MachO. r201622 fixed
      a bug in it and r201624 and r201625 were changes for using private linkage,
      assuming that llvm would do the right thing.
      
      They all got reverted because r201608 introduced a crash in LTO. This patch
      includes a fix for that. The issue was that TargetLoweringObjectFile now has
      to be initialized before we can mangle names of private globals. This is
      trivially true during the normal codegen pipeline (the asm printer does it),
      but LTO has to do it manually.
      
      llvm-svn: 201700
      daeafb4c
    • Rafael Espindola's avatar
      This reverts commit r201625 and r201624. · 21736038
      Rafael Espindola authored
      Since r201608 got reverted, it is not safe to use private linkage in these cases
      until it is committed back.
      
      llvm-svn: 201688
      21736038
    • Tim Northover's avatar
      X86 CodeGenPrep: sink shufflevectors before shifts · aeb8e06d
      Tim Northover authored
      On x86, shifting a vector by a scalar is significantly cheaper than shifting a
      vector by another fully general vector. Unfortunately, because SelectionDAG
      operates on just one basic block at a time, the shufflevector instruction that
      reveals whether the right-hand side of a shift *is* really a scalar is often
      not visible to CodeGen when it's needed.
      
      This adds another handler to CodeGenPrepare, to sink any useful shufflevector
      instructions down to the basic block where they're used, predicated on a target
      hook (since on other architectures, doing so will often just introduce extra
      real work).
      
      rdar://problem/16063505
      
      llvm-svn: 201655
      aeb8e06d
    • Rafael Espindola's avatar
      Now that llvm always does the right thing with private, use it. · 8b27c4ed
      Rafael Espindola authored
      llvm-svn: 201625
      8b27c4ed
  5. Feb 18, 2014
  6. Feb 17, 2014
  7. Feb 16, 2014
  8. Feb 14, 2014
  9. Feb 13, 2014
    • Benjamin Kramer's avatar
      92040958
    • Benjamin Kramer's avatar
      Reduce code duplication resulting from the ConstantVector/ConstantDataVector split. · 989b9293
      Benjamin Kramer authored
      No intended functionality change.
      
      llvm-svn: 201344
      989b9293
    • Reid Kleckner's avatar
      GlobalOpt: Aliases don't have sections, don't copy them when replacing · 22b19da9
      Reid Kleckner authored
      As defined in LangRef, aliases do not have sections.  However, LLVM's
      GlobalAlias class inherits from GlobalValue, which means we can read and
      set its section.  We should probably ban that as a separate change,
      since it doesn't make much sense for an alias to have a section that
      differs from its aliasee.
      
      Fixes PR18757, where the section was being lost on the global in code
      from Clang like:
      
      extern "C" {
      __attribute__((used, section("CUSTOM"))) static int in_custom_section;
      }
      
      Reviewers: rafael.espindola
      
      Differential Revision: http://llvm-reviews.chandlerc.com/D2758
      
      llvm-svn: 201286
      22b19da9
    • Owen Anderson's avatar
      Remove a very old instcombine where we would turn sequences of selects into · 883b5add
      Owen Anderson authored
      logical operations on the i1's driving them.  This is a bad idea for every
      target I can think of (confirmed with micro tests on all of: x86-64, ARM,
      AArch64, Mips, and PowerPC) because it forces the i1 to be materialized into
      a general purpose register, whereas consuming it directly into a select generally
      allows it to exist only transiently in a predicate or flags register.
      
      Chandler ran a set of performance tests with this change, and reported no
      measurable change on x86-64.
      
      llvm-svn: 201275
      883b5add
    • Andrea Di Biagio's avatar
      [Vectorizer] Add a new 'OperandValueKind' in TargetTransformInfo called · b7882b3b
      Andrea Di Biagio authored
      'OK_NonUniformConstValue' to identify operands which are constants but
      not constant splats.
      
      The cost model now allows returning 'OK_NonUniformConstValue'
      for non splat operands that are instances of ConstantVector or
      ConstantDataVector.
      
      With this change, targets are now able to compute different costs
      for instructions with non-uniform constant operands.
      For example, On X86 the cost of a vector shift may vary depending on whether
      the second operand is a uniform or non-uniform constant.
      
      This patch applies the following changes:
       - The cost model computation now takes into account non-uniform constants;
       - The cost of vector shift instructions has been improved in
         X86TargetTransformInfo analysis pass;
       - BBVectorize, SLPVectorizer and LoopVectorize now know how to distinguish
         between non-uniform and uniform constant operands.
      
      Added a new test to verify that the output of opt
      '-cost-model -analyze' is valid in the following configurations: SSE2,
      SSE4.1, AVX, AVX2.
      
      llvm-svn: 201272
      b7882b3b
  10. Feb 11, 2014
    • Benjamin Kramer's avatar
      InstCombine: Teach icmp merging about the equivalence of bit tests and UGE/ULT with a power of 2. · 94fc18d0
      Benjamin Kramer authored
      This happens in bitfield code. While there reorganize the existing code
      a bit.
      
      llvm-svn: 201176
      94fc18d0
    • Chandler Carruth's avatar
      [LPM] Switch LICM to actively use LCSSA in addition to preserving it. · fc25854b
      Chandler Carruth authored
      Fixes PR18753 and PR18782.
      
      This is necessary for LICM to preserve LCSSA correctly and efficiently.
      There is still some active discussion about whether we should be using
      LCSSA, but we can't just immediately stop using it and we *need* LICM to
      preserve it while we are using it. We can restore the old SSAUpdater
      driven code if and when there is a serious effort to remove the reliance
      on LCSSA from all of the loop passes.
      
      However, this also serves as a great example of why LCSSA is very nice
      to have. This change significantly simplifies the process of sinking
      instructions for LICM, and makes it quite a bit less expensive.
      
      It wouldn't even be as complex as it is except that I had to start the
      process of removing the big recursive LCSSA formation hammer in order to
      switch even this much of the re-forming code to asserting that LCSSA was
      preserved. I'll fully remove that next just to tidy things up until the
      LCSSA debate settles one way or the other.
      
      llvm-svn: 201148
      fc25854b
    • Quentin Colombet's avatar
      [CodeGenPrepare] Undo changes that happened for the profitability check. · 5a69dda9
      Quentin Colombet authored
      The addressing mode matcher checks at some point the profitability of folding an
      instruction into the addressing mode. When the instruction to be folded has
      several uses, it checks that the instruction can be folded in each use.
      To do so, it creates a new matcher for each use and check if the instruction is
      in the list of the matched instructions of this new matcher.
      
      The new matchers may promote some instructions and this has to be undone to keep
      the state of the original matcher consistent.
      
      A test case will follow.
      
      <rdar://problem/16020230>
      
      llvm-svn: 201121
      5a69dda9
  11. Feb 10, 2014
    • Chandler Carruth's avatar
      [LPM] A terribly simple fix to a terribly complex bug: PR18773. · 756c22cd
      Chandler Carruth authored
      The crux of the issue is that LCSSA doesn't preserve stateful alias
      analyses. Before r200067, LICM didn't cause LCSSA to run in the LTO pass
      manager, where LICM runs essentially without any of the other loop
      passes. As a consequence the globalmodref-aa pass run before that loop
      pass manager was able to survive the loop pass manager and be used by
      DSE to eliminate stores in the function called from the loop body in
      Adobe-C++/loop_unroll (and similar patterns in other benchmarks).
      
      When LICM was taught to preserve LCSSA it had to require it as well.
      This caused it to be run in the loop pass manager and because it did not
      preserve AA, the stateful AA was lost. Most of LLVM's AA isn't stateful
      and so this didn't manifest in most cases. Also, in most cases LCSSA was
      already running, and so there was no interesting change.
      
      The real kicker is that LCSSA by its definition (injecting PHI nodes
      only) trivially preserves AA! All we need to do is mark it, and then
      everything goes back to working as intended. It probably was blocking
      some other weird cases of stateful AA but the only one I have is
      a 1000-line IR test case from loop_unroll, so I don't really have a good
      test case here.
      
      Hopefully this fixes the regressions on performance that have been seen
      since that revision.
      
      llvm-svn: 201104
      756c22cd
    • Benjamin Kramer's avatar
    • Kostya Serebryany's avatar
      [asan] support for FreeBSD, LLVM part. patch by Viktor Kutuzov · 8baa3866
      Kostya Serebryany authored
      llvm-svn: 201067
      8baa3866
  12. Feb 08, 2014
  13. Feb 06, 2014
    • Quentin Colombet's avatar
      [CodeGenPrepare] Move away sign extensions that get in the way of addressing · 3a4bf040
      Quentin Colombet authored
      mode.
      
      Basically the idea is to transform code like this:
      %idx = add nsw i32 %a, 1
      %sextidx = sext i32 %idx to i64
      %gep = gep i8* %myArray, i64 %sextidx
      load i8* %gep
      
      Into:
      %sexta = sext i32 %a to i64
      %idx = add nsw i64 %sexta, 1
      %gep = gep i8* %myArray, i64 %idx
      load i8* %gep
      
      That way the computation can be folded into the addressing mode.
      
      This transformation is done as part of the addressing mode matcher.
      If the matching fails (not profitable, addressing mode not legal, etc.), the
      matcher will revert the related promotions.
      
      <rdar://problem/15519855>
      
      llvm-svn: 200947
      3a4bf040
    • Nick Lewycky's avatar
      99384949
    • Manman Ren's avatar
      Set default of inlinecold-threshold to 225. · d4612449
      Manman Ren authored
      225 is the default value of inline-threshold. This change will make sure
      we have the same inlining behavior as prior to r200886.
      
      As Chandler points out, even though we don't have code in our testing
      suite that uses cold attribute, there are larger applications that do
      use cold attribute.
      
      r200886 + this commit intend to keep the same behavior as prior to r200886.
      We can later on tune the inlinecold-threshold.
      
      The main purpose of r200886 is to help performance of instrumentation based
      PGO before we actually hook up inliner with analysis passes such as BPI and BFI.
      For instrumentation based PGO, we try to increase inlining of hot functions and
      reduce inlining of cold functions by setting inlinecold-threshold.
      
      Another option suggested by Chandler is to use a boolean flag that controls
      if we should use OptSizeThreshold for cold functions. The default value
      of the boolean flag should not change the current behavior. But it gives us
      less freedom in controlling inlining of cold functions.
      
      llvm-svn: 200898
      d4612449
    • Paul Robinson's avatar
      Disable most IR-level transform passes on functions marked 'optnone'. · af4e64d0
      Paul Robinson authored
      Ideally only those transform passes that run at -O0 remain enabled,
      in reality we get as close as we reasonably can.
      Passes are responsible for disabling themselves, it's not the job of
      the pass manager to do it for them.
      
      llvm-svn: 200892
      af4e64d0
  14. Feb 05, 2014
  15. Feb 04, 2014
Loading