1. Oct 23, 2014
  2. Oct 22, 2014
    • Sanjay Patel's avatar
      Shrinkify libcalls: use float versions of double libm functions with fast-math (bug 17850) · a92fa447
      Sanjay Patel authored
      When a call to a double-precision libm function has fast-math semantics 
      (via function attribute for now because there is no IR-level FMF on calls), 
      we can avoid fpext/fptrunc operations and use the float version of the call
      if the input and output are both float.
      
      We already do this optimization using a command-line option; this patch just
      adds the ability for fast-math to use the existing functionality.
      
      I moved the cl::opt from InstructionCombining into SimplifyLibCalls because
      it's only ever used internally to that class.
      
      Modified the existing test cases to use the unsafe-fp-math attribute rather
      than repeating all tests.
      
      This patch should solve: http://llvm.org/bugs/show_bug.cgi?id=17850
      
      Differential Revision: http://reviews.llvm.org/D5893
      
      llvm-svn: 220390
      a92fa447
    • Rafael Espindola's avatar
      Make two helper functions static. · dbc0416b
      Rafael Espindola authored
      llvm-svn: 220389
      dbc0416b
    • Jan Vesely's avatar
      r600: Fix get_work_dim range metadata · ae50c895
      Jan Vesely authored
      
      
      Reviewed-by: default avatarMatt Arsenault <Matthew.Arsenault@amd.com>
      Signed-off-by: default avatarJan Vesely <jan.vesely@rutgers.edu>
      llvm-svn: 220388
      ae50c895
    • Rafael Espindola's avatar
      Remove unused StmtVector& parameters from declaration parsing functions. · 1bd906d5
      Rafael Espindola authored
      Patch by Eelis van der Weegen!
      
      llvm-svn: 220387
      1bd906d5
    • Diego Novillo's avatar
      Change error to warning when a profile cannot be found. · a67c0b43
      Diego Novillo authored
      When the profile for a function cannot be applied, we use to emit an
      error. This seems extreme. The compiler can continue, it's just that the
      optimization opportunities won't include profile information.
      
      llvm-svn: 220386
      a67c0b43
    • Bill Schmidt's avatar
      [PowerPC] Support select-cc for VSX · 61e65233
      Bill Schmidt authored
      The tests test/CodeGen/Generic/select-cc.ll and
      test/CodeGen/PowerPC/select-cc.ll both fail with VSX enabled.  The
      problem is that the lowering logic for the SELECT and SELECT_CC
      operations doesn't currently support the VSX registers.  This patch
      fixes that.
      
      In lib/Target/PowerPC/PPCInstrInfo.td, we have pseudos to handle this
      for other register classes.  Similar pseudos are added in
      PPCInstrVSX.td (they must be there, because the "vsrc" register class
      definition appears there) for the VSRC register class.  The
      SELECT_VSRC pseudo is then used in pattern matching for SELECT_CC.
      
      The rest of the patch just adds logic for SELECT_VSRC wherever similar
      logic appears for SELECT_VRRC.
      
      There are no new test cases because the existing tests above test
      this, along with a variant in test/CodeGen/PowerPC/vsx.ll.
      
      After discussion with Hal, a future patch will add similar _VSFRC
      variants to override f64 type handling (currently using F8RC).
      
      llvm-svn: 220385
      61e65233
    • Aaron Ballman's avatar
      Fixing a -Wsign-compare warning; NFC. · 4934e4b5
      Aaron Ballman authored
      I think it might make sense to make COFF::MaxNumberOfSections16 be a uint32_t, however, that may have wider-reaching implications in other projects, which is why I did not change that declaration.
      
      llvm-svn: 220384
      4934e4b5
    • Diego Novillo's avatar
      Support using sample profiles with partial debug info (driver) · 795f53ba
      Diego Novillo authored
      Summary:
      When using a profile, we used to require the use -gmlt so that we could
      get access to the line locations. This is used to match line numbers in
      the input profile to the line numbers in the function's IR.
      
      But this is actually not necessary. The driver can provide source
      location tracking without the emission of debug information. In these
      cases, the annotation 'llvm.dbg.cu' is missing from the IR, but the
      actual line location annotations are still present.
      
      This patch tells the driver to only emit source location tracking
      when -fprofile-sample-use is present in the command line.
      
      Reviewers: echristo, dblaikie
      
      Subscribers: llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D5888
      
      llvm-svn: 220383
      795f53ba
    • Diego Novillo's avatar
      Support using sample profiles with partial debug info. · 8027b80b
      Diego Novillo authored
      Summary:
      When using a profile, we used to require the use -gmlt so that we could
      get access to the line locations. This is used to match line numbers in
      the input profile to the line numbers in the function's IR.
      
      But this is actually not necessary. The driver can provide source
      location tracking without the emission of debug information. In these
      cases, the annotation 'llvm.dbg.cu' is missing from the IR, but the
      actual line location annotations are still present.
      
      This patch adds a new way of looking for the start of the current
      function. Instead of looking through the compile units in llvm.dbg.cu,
      we can walk up the scope for the first instruction in the function with
      a debug loc. If that describes the function, we use it. Otherwise, we
      keep looking until we find one.
      
      If no such instruction is found, we then give up and produce an error.
      
      Reviewers: echristo, dblaikie
      
      Subscribers: llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D5887
      
      llvm-svn: 220382
      8027b80b
    • Arnaud A. de Grandmaison's avatar
      [AArch64] Cleanup A57PBQPConstraints · 9b333054
      Arnaud A. de Grandmaison authored
      And add a long awaited testcase.
      
      llvm-svn: 220381
      9b333054
    • Bruno Cardoso Lopes's avatar
      [InstSimplify] Support constant folding to vector of pointers · c29520c5
      Bruno Cardoso Lopes authored
      ConstantFolding crashes when trying to InstSimplify the following load:
      
      @a = private unnamed_addr constant %mst {
           i8* inttoptr (i64 -1 to i8*),
           i8* inttoptr (i64 -1 to i8*)
      }, align 8
      
      %x = load <2 x i8*>* bitcast (%mst* @a to <2 x i8*>*), align 8
      
      This patch fix this by adding support to this type of folding:
      
      %x = load <2 x i8*>* bitcast (%mst* @a to <2 x i8*>*), align 8
      ==> gets folded to:
        %x = <2 x i8*> <i8* inttoptr (i64 -1 to i8*), i8* inttoptr (i64 -1 to i8*)>
      
      llvm-svn: 220380
      c29520c5
    • Jyoti Allur's avatar