Skip to content
  1. Jul 30, 2013
    • Saleem Abdulrasool's avatar
      [ARM] check bitwidth in PerformORCombine · 0c2ee5a2
      Saleem Abdulrasool authored
      
      
      When simplifying a (or (and B A) (and C ~A)) to a (VBSL A B C) ensure that the
      bitwidth of the second operands to both ands match before comparing the negation
      of the values.
      
      Split the check of the value of the second operands to the ands.  Move the cast
      and variable declaration slightly higher to make it slightly easier to follow.
      
      Bug-Id: 16700
      Signed-off-by: default avatarSaleem Abdulrasool <compnerd@compnerd.org>
      llvm-svn: 187404
      0c2ee5a2
    • Venkatraman Govindaraju's avatar
      [Sparc] Use call's debugloc for the unimp instruction. · fdcc498a
      Venkatraman Govindaraju authored
      llvm-svn: 187402
      fdcc498a
    • Bill Schmidt's avatar
      [PowerPC] Skeletal FastISel support for 64-bit PowerPC ELF. · 0cf702fa
      Bill Schmidt authored
      This is the first of many upcoming patches for PowerPC fast
      instruction selection support.  This patch implements the minimum
      necessary for a functional (but extremely limited) FastISel pass.  It
      allows the table-generated portions of the selector to be created and
      used, but in most cases selection will fall back to the DAG selector.
      None of the block terminator instructions are implemented yet, and
      most interesting instructions require some special handling.
      Therefore there aren't any new test cases with this patch.  There will
      be quite a few tests coming with future patches.
      
      This patch adds the make/CMake support for the new code (including
      tablegen -gen-fast-isel) and creates the FastISel object for PPC64 ELF
      only.  It instantiates the necessary virtual functions
      (TargetSelectInstruction, TargetMaterializeConstant,
      TargetMaterializeAlloca, tryToFoldLoadIntoMI, and FastLowerArguments),
      but of these, only TargetMaterializeConstant contains any useful
      implementation.  This is present since the table-generated code
      requires the ability to materialize integer constants for some
      instructions.
      
      This patch has been tested by building and running the
      projects/test-suite code with -O0.  All tests passed with the
      exception of a couple of long-running tests that time out using -O0
      code generation.
      
      llvm-svn: 187399
      0cf702fa
    • Quentin Colombet's avatar
      [R600] Replicate old DAGCombiner behavior in target specific DAG combine. · e2e0548d
      Quentin Colombet authored
      build_vector is lowered to REG_SEQUENCE, which is something the register
      allocator does a good job at optimizing.
      
      llvm-svn: 187397
      e2e0548d
    • Quentin Colombet's avatar
      [DAGCombiner] insert_vector_elt: Avoid building a vector twice. · 6bf4baa4
      Quentin Colombet authored
      This patch prevents the following combine when the input vector is used more
      than once.
      insert_vector_elt (build_vector elt0, ..., eltN), NewEltIdx, idx
      =>
      build_vector elt0, ..., NewEltIdx, ..., eltN 
      
      The reasons are:
      - Building a vector may be expensive, so try to reuse the existing part of a
        vector instead of creating a new one (think big vectors).
      - elt0 to eltN now have two users instead of one. This may prevent some other
        optimizations.
      
      llvm-svn: 187396
      6bf4baa4
    • Eric Christopher's avatar
      Fix a truly egregious thinko in anonymous namespace check, · e414ece7
      Eric Christopher authored
      update testcase to make sure we generate debug info for walrus
      by adding a non-trivial constructor and verify that we don't
      emit an ODR signature for the type.
      
      llvm-svn: 187393
      e414ece7
    • Eric Christopher's avatar
      Make sure we don't emit an ODR hash for types with no name and make · d853ea31
      Eric Christopher authored
      sure the comments for each testcase are a bit easier to distinguish.
      
      llvm-svn: 187392
      d853ea31
    • Eric Christopher's avatar
      Elaborate a bit on the type unit and ODR conditional code. · f8542ec3
      Eric Christopher authored
      llvm-svn: 187385
      f8542ec3
  2. Jul 29, 2013
    • Rafael Espindola's avatar
      Make file_status::getUniqueID const. · d123099a
      Rafael Espindola authored
      llvm-svn: 187383
      d123099a
    • Rafael Espindola's avatar
      Include st_dev to make the result of getUniqueID actually unique. · 7f822a93
      Rafael Espindola authored
      This will let us use getUniqueID instead of st_dev directly on clang.
      
      llvm-svn: 187378
      7f822a93
    • Akira Hatanaka's avatar
      [mips] Add comment and simplify function. · 52dd808b
      Akira Hatanaka authored
      llvm-svn: 187371
      52dd808b
    • Nadav Rotem's avatar
      SLPVectorier: update the debug location for the new instructions. · d9c74cc6
      Nadav Rotem authored
      llvm-svn: 187363
      d9c74cc6
    • Nico Rieck's avatar
      Use proper section suffix for COFF weak symbols · 7fdaee8f
      Nico Rieck authored
      32-bit symbols have "_" as global prefix, but when forming the name of
      COMDAT sections this prefix is ignored. The current behavior assumes that
      this prefix is always present which is not the case for 64-bit and names
      are truncated.
      
      llvm-svn: 187356
      7fdaee8f
    • Nico Rieck's avatar
      Proper va_arg/va_copy lowering on win64 · 06d17c80
      Nico Rieck authored
      Win64 uses CharPtrBuiltinVaList instead of X86_64ABIBuiltinVaList like
      other 64-bit targets.
      
      llvm-svn: 187355
      06d17c80
    • Rafael Espindola's avatar
      Add support for the 's' operation to llvm-ar. · b6b5f52e
      Rafael Espindola authored
      If no other operation is specified, 's' becomes an operation instead of an
      modifier. The s operation just creates a symbol table. It is the same as
      running ranlib.
      
      We assume the archive was created by a sane ar (like llvm-ar or gnu ar) and
      if the symbol table is present, then it is current. We use that to optimize
      the most common case: a broken build system that thinks it has to run ranlib.
      
      llvm-svn: 187353
      b6b5f52e
    • Nico Rieck's avatar
      MC: Support larger COFF string tables · 2c9c89b2
      Nico Rieck authored
      Single-slash encoded entries do not require a terminating null. This bumps
      the maximum table size from ~1MB to ~9.5MB.
      
      llvm-svn: 187352
      2c9c89b2
    • Benjamin Kramer's avatar
      Some Intel Penryn CPUs come with SSE4 disabled. Detect them as core 2. · fb34989a
      Benjamin Kramer authored
      PR16721.
      
      llvm-svn: 187350
      fb34989a
    • Silviu Baranga's avatar
      Allow generation of vmla.f32 instructions when targeting Cortex-A15. The patch... · 91ddaa1b
      Silviu Baranga authored
      Allow generation of vmla.f32 instructions when targeting Cortex-A15. The patch also adds the VFP4 feature to Cortex-A15 and fixes the DontUseFusedMAC predicate so that we can still generate vmla.f32 instructions on non-darwin targets with VFP4.
      
      llvm-svn: 187349
      91ddaa1b
    • Robert Lytton's avatar
      test commit · 862b0451
      Robert Lytton authored
      llvm-svn: 187348
      862b0451
    • Chandler Carruth's avatar
      Teach the AllocaPromoter which is wrapped around the SSAUpdater · cd7c8cdf
      Chandler Carruth authored
      infrastructure to do promotion without a domtree the same smarts about
      looking through GEPs, bitcasts, etc., that I just taught mem2reg about.
      This way, if SROA chooses to promote an alloca which still has some
      noisy instructions this code can cope with them.
      
      I've not used as principled of an approach here for two reasons:
      1) This code doesn't really need it as we were already set up to zip
         through the instructions used by the alloca.
      2) I view the code here as more of a hack, and hopefully a temporary one.
      
      The SSAUpdater path in SROA is a real sore point for me. It doesn't make
      a lot of architectural sense for many reasons:
      - We're likely to end up needing the domtree anyways in a subsequent
        pass, so why not compute it earlier and use it.
      - In the future we'll likely end up needing the domtree for parts of the
        inliner itself.
      - If we need to we could teach the inliner to preserve the domtree. Part
        of the re-work of the pass manager will allow this to be very powerful
        even in large SCCs with many functions.
      - Ultimately, computing a domtree has gotten significantly faster since
        the original SSAUpdater-using code went into ScalarRepl. We no longer
        use domfrontiers, and much of domtree is lazily done based on queries
        rather than eagerly.
      - At this point keeping the SSAUpdater-based promotion saves a total of
        0.7% on a build of the 'opt' tool for me. That's not a lot of
        performance given the complexity!
      
      So I'm leaving this a bit ugly in the hope that eventually we just
      remove all of this nonsense.
      
      I can't even readily test this because this code isn't reachable except
      through SROA. When I re-instate the patch that fast-tracks allocas
      already suitable for promotion, I'll add a testcase there that failed
      before this change. Before that, SROA will fix any test case I give it.
      
      llvm-svn: 187347
      cd7c8cdf
    • Nadav Rotem's avatar
      Don't vectorize when the attribute NoImplicitFloat is used. · 750e42cb
      Nadav Rotem authored
      llvm-svn: 187340
      750e42cb
    • Rafael Espindola's avatar
      Fix -Wdocumentation warnings. · caa776be
      Rafael Espindola authored
      llvm-svn: 187336
      caa776be
    • Chandler Carruth's avatar
      Update comments for SSAUpdater to use the modern doxygen comment · 6b55dbea
      Chandler Carruth authored
      standards for LLVM. Remove duplicated comments on the interface from the
      implementation file (implementation comments are left there of course).
      Also clean up, re-word, and fix a few typos and errors in the commenst
      spotted along the way.
      
      This is in preparation for changes to these files and to keep the
      uninteresting tidying in a separate commit.
      
      llvm-svn: 187335
      6b55dbea
  3. Jul 28, 2013
  4. Jul 27, 2013
    • Michael Gottesman's avatar
      [APFloat] Make all arithmetic operations with NaN produce positive NaNs. · b0e688e8
      Michael Gottesman authored
      IEEE-754R 1.4 Exclusions states that IEEE-754R does not specify the
      interpretation of the sign of NaNs. In order to remove an irrelevant
      variable that most floating point implementations do not use,
      standardize add, sub, mul, div, mod so that operating anything with
      NaN always yields a positive NaN.
      
      In a later commit I am going to update the APIs for creating NaNs so
      that one can not even create a negative NaN.
      
      llvm-svn: 187314
      b0e688e8
    • Michael Gottesman's avatar
      [APFloat] Move setting fcNormal in zeroSignificand() to calling code. · 30a90eb1
      Michael Gottesman authored
      Zeroing the significand of a floating point number does not necessarily cause a
      floating point number to become finite non zero. For instance, if one has a NaN,
      zeroing the significand will cause it to become +/- infinity.
      
      llvm-svn: 187313
      30a90eb1
    • Matt Arsenault's avatar
      Minor code simplification suggested by Duncan · 517cf483
      Matt Arsenault authored
      llvm-svn: 187309
      517cf483
    • Benjamin Kramer's avatar
      DwarfDebug: MD5 is always little endian, bswap on big endian platforms. · 409afcf1
      Benjamin Kramer authored
      This makes LLVM emit the same signature regardless of host and target endianess.
      
      llvm-svn: 187304
      409afcf1
    • Chandler Carruth's avatar
      Create a constant pool symbol for the GOT in the ARMCGBR the same way we · 26ad41ed
      Chandler Carruth authored
      do in the SDag when lowering references to the GOT: use
      ARMConstantPoolSymbol rather than creating a dummy global variable. The
      computation of the alignment still feels weird (it uses IR types and
      datalayout) but it preserves the exact previous behavior. This change
      fixes the memory leak of the global variable detected on the valgrind
      leak checking bot.
      
      Thanks to Benjamin Kramer for pointing me at ARMConstantPoolSymbol to
      handle this use case.
      
      llvm-svn: 187303
      26ad41ed
    • Chandler Carruth's avatar
      Fix yet another memory leak found by the vg-leak bot. Folks (including · 1c82d331
      Chandler Carruth authored
      me) should start watching this bot more as its catching lots of bugs.
      
      The fix here is to not construct the global if we aren't going to need
      it. That's cheaper anyways, and globals have highly predictable types in
      practice. I've added an assert to catch skew between our manual testing
      of the type and the actual type just for paranoia's sake.
      
      Note that this pattern is actually fine in most globals because when you
      build a global with a module it automatically is moved to be owned by
      that module. But here, we're in isel and don't really want to do that.
      The solution of not creating a global is simpler anyways.
      
      llvm-svn: 187302
      1c82d331
    • Chandler Carruth's avatar
      Fix a memory leak in the debug emission by simply not allocating memory. · 2a1c0d2c
      Chandler Carruth authored
      There doesn't appear to be any reason to put this variable on the heap.
      I'm suspicious of the LexicalScope above that we stuff in a map and then
      delete afterward, but I'm just trying to get the valgrind bot clean.
      
      llvm-svn: 187301
      2a1c0d2c
    • Chandler Carruth's avatar
      Fix a memory leak in the hexagon scheduler. We call initialize here more · c18e39ca
      Chandler Carruth authored
      than once, and the second time through we leaked memory. Found thanks to
      the vg-leak bot, but I can't locally reproduce it with valgrind. The
      debugger confirms that it is in fact leaking here.
      
      This whole code is totally gross. Why is initialize being called on each
      runOnFunction??? Why aren't these OwningPtr<>s, and why aren't their
      lifetimes better defined? Anyways, this is just a surgical change to
      help out the leak checking bots.
      
      llvm-svn: 187299
      c18e39ca
    • Chandler Carruth's avatar
      Don't use all the #ifdefs to hide the stats counters and instead rely on · 8e3c4dc5
      Chandler Carruth authored
      their being optimized out in debug mode. Realistically, this just isn't
      going to be the slow part anyways. This also fixes unused variable
      warnings that are breaking LLD build bots. =/ I didn't see these at
      first, and kept losing track of the fact that they were broken.
      
      llvm-svn: 187297
      8e3c4dc5
Loading