Skip to content
  1. Dec 12, 2014
  2. Dec 11, 2014
    • Fariborz Jahanian's avatar
      [Objective-C]. This patch extends objc_bridge attribute to support objc_bridge(id). · c9e266b8
      Fariborz Jahanian authored
      This means that a pointer to the struct type to which the attribute appertains 
      is a CF type (and therefore an Objective-C object of some type), but not of any 
      specific class. rdar://19157264
      
      llvm-svn: 224072
      c9e266b8
    • Hal Finkel's avatar
      [PowerPC] Better lowering for add/or of a FrameIndex · b5e9b042
      Hal Finkel authored
      If we have an add (or an or that is really an add), where one operand is a
      FrameIndex and the other operand is a small constant, we can combine the
      lowering of the FrameIndex (which is lowered as an add of the FI and a zero
      offset) with the constant operand.
      
      Amusingly, this is an old potential improvement entry from
      lib/Target/PowerPC/README.txt which had never been resolved. In short, we used
      to lower:
      
              %X = alloca { i32, i32 }
              %Y = getelementptr {i32,i32}* %X, i32 0, i32 1
              ret i32* %Y
      
      as:
      
              addi 3, 1, -8
              ori 3, 3, 4
              blr
      
      and now we produce:
      
              addi 3, 1, -4
              blr
      
      which is much more sensible.
      
      llvm-svn: 224071
      b5e9b042
    • Duncan P. N. Exon Smith's avatar
      Bitcode: Add `OLD_` prefix to metadata node records · 005f9f43
      Duncan P. N. Exon Smith authored
      I'm about to change these, so move the old ones out of the way.
      
      Part of PR21532.
      
      llvm-svn: 224070
      005f9f43
    • Jon Roelofs's avatar
      Add 'REQUIRES: long_tests' to one more long test · ebb54954
      Jon Roelofs authored
      llvm-svn: 224069
      ebb54954
    • Matt Arsenault's avatar
      Try to include operand counts for mismatches in tablegen. · 9ece3ce4
      Matt Arsenault authored
      llvm-svn: 224068
      9ece3ce4
    • Matt Arsenault's avatar
      R600/SI: Use unordered equal instructions · 58d502f0
      Matt Arsenault authored
      llvm-svn: 224067
      58d502f0
    • Matt Arsenault's avatar
      R600/SI: Make more unordered comparisons legal · 8b989efa
      Matt Arsenault authored
      This saves a second compare and an and / or by using
      the unordered comparison instructions.
      
      llvm-svn: 224066
      8b989efa
    • Matt Arsenault's avatar
      R600/SI: Use unordered not equal instructions · 9cded7a7
      Matt Arsenault authored
      llvm-svn: 224065
      9cded7a7
    • Jon Roelofs's avatar
      Add 'REQUIERS: long_tests' to a few more long tests · 7c2f55c3
      Jon Roelofs authored
      llvm-svn: 224064
      7c2f55c3
    • Alexey Samsonov's avatar
      [ASan] Change fake stack and local variables handling. · 0545f4b0
      Alexey Samsonov authored
      This commit changes the way we get fake stack from ASan runtime
      (to find use-after-return errors) and the way we represent local
      variables:
        - __asan_stack_malloc function now returns pointer to newly allocated
          fake stack frame, or NULL if frame cannot be allocated. It doesn't
          take pointer to real stack as an input argument, it is calculated
          inside the runtime.
        - __asan_stack_free function doesn't take pointer to real stack as
          an input argument. Now this function is never called if fake stack
          frame wasn't allocated.
        - __asan_init version is bumped to reflect changes in the ABI.
        - new flag "-asan-stack-dynamic-alloca" allows to store all the
          function local variables in a dynamic alloca, instead of the static
          one. It reduces the stack space usage in use-after-return mode
          (dynamic alloca will not be called if the local variables are stored
          in a fake stack), and improves the debug info quality for local
          variables (they will not be described relatively to %rbp/%rsp, which
          are assumed to be clobbered by function calls). This flag is turned
          off by default for now, but I plan to turn it on after more
          testing.
      
      llvm-svn: 224063
      0545f4b0
    • Alexey Samsonov's avatar
      [ASan] Change fake stack and local variables handling. · 4b7f413e
      Alexey Samsonov authored
      This commit changes the way we get fake stack from ASan runtime
      (to find use-after-return errors) and the way we represent local
      variables:
        - __asan_stack_malloc function now returns pointer to newly allocated
          fake stack frame, or NULL if frame cannot be allocated. It doesn't
          take pointer to real stack as an input argument, it is calculated
          inside the runtime.
        - __asan_stack_free function doesn't take pointer to real stack as
          an input argument. Now this function is never called if fake stack
          frame wasn't allocated.
        - __asan_init version is bumped to reflect changes in the ABI.
        - new flag "-asan-stack-dynamic-alloca" allows to store all the
          function local variables in a dynamic alloca, instead of the static
          one. It reduces the stack space usage in use-after-return mode
          (dynamic alloca will not be called if the local variables are stored
          in a fake stack), and improves the debug info quality for local
          variables (they will not be described relatively to %rbp/%rsp, which
          are assumed to be clobbered by function calls). This flag is turned
          off by default for now, but I plan to turn it on after more
          testing.
      
      llvm-svn: 224062
      4b7f413e
    • Duncan P. N. Exon Smith's avatar
      CodeGen: Stop using LeakDetector for MachineInstr · d6f8e4b0
      Duncan P. N. Exon Smith authored
      Since `MachineInstr` is required to have a trivial destructor, it cannot
      remove itself from `LeakDetection`.  Remove the calls.
      
      As it happens, this requirement is because `MachineFunction` allocates
      all `MachineInstr`s in a custom allocator; when the `MachineFunction` is
      destroyed they're dropped of the edge.  There's no benefit to detecting
      leaks.
      
      llvm-svn: 224061
      d6f8e4b0
    • Duncan P. N. Exon Smith's avatar
      IR: Store MDNodes in a separate LeakDetector container · 63eb6bf6
      Duncan P. N. Exon Smith authored
      This gives us better leak detection messages, like `Value` has.
      
      This also has the side effect of papering over a problem where
      `MachineInstr`s are added as garbage to the leak detector and then
      deleted without being removed.  If `MDNode::getTemporary()` allocates an
      `MDNodeFwdDecl` in the same spot, the leak detector asserts.  By
      separating `MDNode`s into their own container we lose that assertion.
      
      Since `MachineInstr` is required to have a trivial destructor, its usage
      of `LeakDetector` at all is pretty suspect.  I'll be sending a patch
      soon to strip that out.
      
      llvm-svn: 224060
      63eb6bf6
    • Matthias Braun's avatar
      [CodeGen] Add print and verify pass after each MachineFunctionPass by default · 7e37a5f5
      Matthias Braun authored
      Previously print+verify passes were added in a very unsystematic way, which is
      annoying when debugging as you miss intermediate steps and allows bugs to stay
      unnotice when no verification is performed.
      
      To make this change practical I added the possibility to explicitely disable
      verification. I used this option on all places where no verification was
      performed previously (because alot of places actually don't pass the
      MachineVerifier).
      In the long term these problems should be fixed properly and verification
      enabled after each pass. I'll enable some more verification in subsequent
      commits.
      
      This is the 2nd attempt at this after realizing that PassManager::add() may
      actually delete the pass.
      
      llvm-svn: 224059
      7e37a5f5
    • Duncan P. N. Exon Smith's avatar
      LeakDetector: Simplify code and fix comments, NFC · df036085
      Duncan P. N. Exon Smith authored
      Rather than requiring overloads in the wrapper and the impl, just
      overload the impl and use templates in the wrapper.  This makes it less
      error prone to add more overloads (`void *` defeats any chance the
      compiler has at noticing bugs, so the easier the better).
      
      At the same time, correct the comment that was lying about not changing
      functionality for `Value`.
      
      llvm-svn: 224058
      df036085
    • Jon Roelofs's avatar
      963bdd7c
    • David Majnemer's avatar
      AsmParser: Don't crash on an ill-formed MDNodeVector · 0a14c0ec
      David Majnemer authored
      llvm-svn: 224056
      0a14c0ec
    • Richard Smith's avatar
      [modules] When constructing paths relative to a module, strip out /./ directory · 54cc3c2f
      Richard Smith authored
      components. These sometimes get synthetically added, and we don't want -Ifoo
      and -I./foo to be treated fundamentally differently here.
      
      llvm-svn: 224055
      54cc3c2f
    • Andrea Di Biagio's avatar
      [InstCombine][X86] Improved folding of calls to Intrinsic::x86_sse4a_insertqi. · 72b05aa5
      Andrea Di Biagio authored
      This patch teaches the instruction combiner how to fold a call to 'insertqi' if
      the 'length field' (3rd operand) is set to zero, and if the sum between
      field 'length' and 'bit index' (4th operand) is bigger than 64.
      
      From the AMD64 Architecture Programmer's Manual:
      1. If the sum of the bit index + length field is greater than 64, then the
         results are undefined;
      2. A value of zero in the field length is defined as a length of 64.
      
      This patch improves the existing combining logic for intrinsic 'insertqi'
      adding extra checks to address both point 1. and point 2.
      
      Differential Revision: http://reviews.llvm.org/D6583
      
      llvm-svn: 224054
      72b05aa5
    • David Majnemer's avatar
      AsmParser: Don't crash on an ill-formed MDNodeVector · 06f960d5
      David Majnemer authored
      llvm-svn: 224053
      06f960d5
    • Paul Robinson's avatar
      Instead of having -Os/-Oz add OptimizeForSize/MinSize first, and later · 08556951
      Paul Robinson authored
      having OptimizeNone remove them again, just don't add them in the
      first place if the function already has OptimizeNone.
      
      Note that MinSize can still appear due to attributes on different
      declarations; a future patch will address that.
      
      llvm-svn: 224047
      08556951
    • Rafael Espindola's avatar
      Remove a convoluted way of calling close by moving the call to the only caller. · 7eb1f185
      Rafael Espindola authored
      As a bonus we can actually check the return value.
      
      llvm-svn: 224046
      7eb1f185
    • Rafael Espindola's avatar
      This reverts commit r224043 and r224042. · 01c73610
      Rafael Espindola authored
      check-llvm was failing.
      
      llvm-svn: 224045
      01c73610
    • Michael Ilseman's avatar
      Silence static analyzer warnings in LLVMSupport. · 4e654cd6
      Michael Ilseman authored
      The static analyzer catches a few potential bugs in LLVMSupport. Add
      in asserts to silence the warnings.
      
      llvm-svn: 224044
      4e654cd6
    • Matthias Braun's avatar
      Enable machineverifier in debug mode for X86, ARM, AArch64, Mips · 199aeff7
      Matthias Braun authored
      llvm-svn: 224043
      199aeff7
    • Matthias Braun's avatar
      [CodeGen] Add print and verify pass after each MachineFunctionPass by default · a7c82a9f
      Matthias Braun authored
      Previously print+verify passes were added in a very unsystematic way, which is
      annoying when debugging as you miss intermediate steps and allows bugs to stay
      unnotice when no verification is performed.
      
      To make this change practical I added the possibility to explicitely disable
      verification. I used this option on all places where no verification was
      performed previously (because alot of places actually don't pass the
      MachineVerifier).
      In the long term these problems should be fixed properly and verification
      enabled after each pass. I'll enable some more verification in subsequent
      commits.
      
      llvm-svn: 224042
      a7c82a9f
Loading