1. Jun 06, 2019
  2. Jun 05, 2019
    • Whitney Tsang's avatar
      Revert "Title: [LOOPINFO] Extend Loop object to add utilities to get the loop" · 590b1aee
      Whitney Tsang authored
      This reverts commit d34797df.
      
      llvm-svn: 362615
      590b1aee
    • George Rimar's avatar
      [llvm-readobj] - Remove TODOs from gnu-hash-symbols.test and demangle.test test cases. · 5da70230
      George Rimar authored
      We can remove this TODOs now.
      
      Differential revision: https://reviews.llvm.org/D62846
      
      llvm-svn: 362614
      5da70230
    • Dinar Temirbulatov's avatar
      [SLP] Fix regression in broadcasts caused by operand reordering patch D59973. · 15c657d1
      Dinar Temirbulatov authored
          
      This patch fixes a regression caused by the operand reordering refactoring patch https://reviews.llvm.org/D59973 .
      The fix changes the strategy to Splat instead of Opcode, if broadcast opportunities are found.
      Please see the lit test for some examples.
      
      Committed on behalf of @vporpo (Vasileios Porpodas)
          
      Differential Revision: https://reviews.llvm.org/D62427
      
      llvm-svn: 362613
      15c657d1
    • Sanjay Patel's avatar
      [LoopUtils][SLPVectorizer] clean up management of fast-math-flags · ad62a3a2
      Sanjay Patel authored
      Instead of passing around fast-math-flags as a parameter, we can set those
      using an IRBuilder guard object. This is no-functional-change-intended.
      
      The motivation is to eventually fix the vectorizers to use and set the
      correct fast-math-flags for reductions. Examples of that not behaving as
      expected are:
      https://bugs.llvm.org/show_bug.cgi?id=23116 (should be able to reduce with less than 'fast')
      https://bugs.llvm.org/show_bug.cgi?id=35538 (possible miscompile for -0.0)
      D61802 (should be able to reduce with IR-level FMF)
      
      Differential Revision: https://reviews.llvm.org/D62272
      
      llvm-svn: 362612
      ad62a3a2
    • Anastasia Stulova's avatar
      [OpenCL][PR42031] Prevent deducing addr space in type alias. · 7ca9b978
      Anastasia Stulova authored
       
      Similar to typedefs we shouldn't deduce addr space in
      type alias.
       
      Differential Revision: https://reviews.llvm.org/D62591
      
      llvm-svn: 362611
      7ca9b978
    • Benjamin Kramer's avatar
      [LoopInfo] Fix unused variable warning. NFC. · b90b3547
      Benjamin Kramer authored
      llvm-svn: 362610
      b90b3547
    • Whitney Tsang's avatar
      Title: [LOOPINFO] Extend Loop object to add utilities to get the loop · d34797df
      Whitney Tsang authored
      bounds, step, and loop induction variable.
      
      Summary: This PR extends the loop object with more utilities to get loop
      bounds, step, and loop induction variable. There already exists passes
      which try to obtain the loop induction variable in their own pass, e.g.
      loop interchange. It would be useful to have a common area to get these
      information.
      
      /// Example:
      /// for (int i = lb; i < ub; i+=step)
      ///   <loop body>
      /// --- pseudo LLVMIR ---
      /// beforeloop:
      ///   guardcmp = (lb < ub)
      ///   if (guardcmp) goto preheader; else goto afterloop
      /// preheader:
      /// loop:
      ///   i1 = phi[{lb, preheader}, {i2, latch}]
      ///   <loop body>
      ///   i2 = i1 + step
      /// latch:
      ///   cmp = (i2 < ub)
      ///   if (cmp) goto loop
      /// exit:
      /// afterloop:
      ///
      /// getBounds
      ///   getInitialIVValue      --> lb
      ///   getStepInst            --> i2 = i1 + step
      ///   getStepValue           --> step
      ///   getFinalIVValue        --> ub
      ///   getCanonicalPredicate  --> '<'
      ///   getDirection           --> Increasing
      /// getInductionVariable          --> i1
      /// getAuxiliaryInductionVariable --> {i1}
      /// isCanonical                   --> false
      
      Reviewers: kbarton, hfinkel, dmgreen, Meinersbur, jdoerfert, syzaara,
      fhahn
      Reviewed By: kbarton
      Subscribers: tvvikram, bmahjour, etiotto, fhahn, jsji, hiraditya,
      llvm-commits
      Tag: LLVM
      Differential Revision: https://reviews.llvm.org/D60565
      
      llvm-svn: 362609
      d34797df
    • Erich Keane's avatar
      Avoid using NoThrow Exception Specifier in non-C++ Modes. · da59652c
      Erich Keane authored
      As reported in https://bugs.llvm.org/show_bug.cgi?id=42113, there are a
      number of locations in Clang where it is assumed that exception
      specifications are only valid in C++ mode. Since the original
      justification for the NoThrow Exception Specifier Type was C++ related,
      this patch just makes C mode use the attribute-based nothrow handling.
      
      Additionally, I noticed that the handling of non-prototype functions
      regressed the behavior of the nothrow attribute, in part because it is
      was listed in the function type macro(which I did in the previous
      patch).  In reality, it should only be doing so in a conditional nature,
      so this patch removes it there and puts it directly in the switch to be
      handled correctly.
      
      llvm-svn: 362607
      da59652c
    • Roman Lebedev's avatar
      25308623
    • Roman Lebedev's avatar
      UpdateTestChecks: hexagon support · 54bd6c84
      Roman Lebedev authored
      Summary:
      These tests are being affected by an upcoming patch,
      so having an understandable (autogenerated) diff is helpful.
      
      This target, again, prefers `-march`:
      ```
      llvm/test/CodeGen/Hexagon$ grep -r triple | wc -l
      467
      llvm/test/CodeGen/Hexagon$ grep -r march | wc -l
      1167
      ```
      
      Reviewers: RKSimon, kparzysz
      
      Reviewed By: kparzysz
      
      Subscribers: xbolva00, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D62867
      
      llvm-svn: 362605
      54bd6c84
    • Anastasia Stulova's avatar
      [Sema] Prevent binding incompatible addr space ref to temporaries · 5145b1e4
      Anastasia Stulova authored
      References to arbitrary address spaces can't always be bound to
      temporaries. This change extends the reference binding logic to
      check that the address space of a temporary can be implicitly
      converted to the address space in a reference when temporary
      materialization is performed.
      
      Differential Revision: https://reviews.llvm.org/D61318
      
      llvm-svn: 362604
      5145b1e4
    • Petar Avramovic's avatar
      [MIPS GlobalISel] Select fcmp · 22e99c43
      Petar Avramovic authored
      Select floating point compare for MIPS32.
      
      Differential Revision: https://reviews.llvm.org/D62721
      
      llvm-svn: 362603
      22e99c43
    • George Rimar's avatar
      [yaml2obj] - Change how we handle implicit sections. · 66296dc3
      George Rimar authored
      We have a few sections that can be added implicitly to the output:
      ".dynsym", ".dynstr", ".symtab", ".strtab" and ".shstrtab".
      
      Problem appears when such section is listed explicitly in YAML.
      In that case it's content is written twice:
      first time during writing of regular sections listed in the document
      and second time during special handling.
      
      Because of that their file offsets can become unexpectedly broken:
      (yaml file for sample below lists .dynsym explicitly before .text.foo)
      
      Before patch:
        [Nr] Name              Type             Address           Offset
             Size              EntSize          Flags  Link  Info  Align
        [ 0]                   NULL             0000000000000000  00000000
             0000000000000000  0000000000000000           0     0     0
        [ 1] .dynsym           DYNSYM           0000000000000100  00000250
             0000000000000030  0000000000000018   A       6     0     8
        [ 2] .text.foo         PROGBITS         0000000000000200  00000200
             0000000000000000  0000000000000000  AX       0     0     0
      
      After patch:
      Section Headers:
        [Nr] Name         Type             Address           Offset
             Size              EntSize          Flags  Link  Info  Align
        [ 0]                   NULL             0000000000000000  00000000
             0000000000000000  0000000000000000           0     0     0
        [ 1] .dynsym           DYNSYM           0000000000000100  00000200
             0000000000000030  0000000000000018   A       6     0     8
        [ 2] .text.foo         PROGBITS         0000000000000200  00000230
             0000000000000000  0000000000000000  AX       0     0     0
      
      This patch reorganizes our code and fixes the issue described.
      
      Differential revision: https://reviews.llvm.org/D62809
      
      llvm-svn: 362602
      66296dc3
    • Sjoerd Meijer's avatar
      [ARM] Allow "-march=foo+fp" to vary with foo · f95e6c06
      Sjoerd Meijer authored
      Now, when clang processes an argument of the form "-march=foo+x+y+z",
      then instead of calling getArchExtFeature() for each of the extension
      names "x", "y", "z" and appending the returned string to its list of
      low-level subtarget features, it will call appendArchExtFeatures()
      which does the appending itself.
      
      The difference is that appendArchExtFeatures can add _more_ than one
      low-level feature name to the output feature list if it has to, and
      also, it gets told some information about what base architecture and
      CPU the extension is going to go with, which means that "+fp" can now
      mean something different for different CPUs. Namely, "+fp" now selects
      whatever the _default_ FPU is for the selected CPU and/or
      architecture, as defined in the ARM_ARCH or ARM_CPU_NAME macros in
      ARMTargetParser.def.
      
      On the clang side, I adjust DecodeARMFeatures to call the new
      appendArchExtFeatures function in place of getArchExtFeature. This
      means DecodeARMFeatures needs to be passed a CPU name and an ArchKind,
      which meant changing its call sites to make those available, and also
      sawing getLLVMArchSuffixForARM in half so that you can get an ArchKind
      enum value out of it instead of a string.
      
      Also, I add support here for the extension name "+fp.dp", which will
      automatically look through the FPU list for something that looks just
      like the default FPU except for also supporting double precision.
      
      Differential Revision: https://reviews.llvm.org/D60697
      
      llvm-svn: 362601
      f95e6c06
    • Sjoerd Meijer's avatar
      [ARM] Allow "-march=foo+fp" to vary with foo · a1bb4fb7
      Sjoerd Meijer authored
      This is the LLVM part of this change, the Clang part contains the full
      description in its commit message.
      
      Differential Revision: https://reviews.llvm.org/D60697
      
      llvm-svn: 362600
      a1bb4fb7
    • Simon Pilgrim's avatar
      [X86][AVX] combineX86ShuffleChain - combine shuffle(extractsubvector(x),extractsubvector(y)) · 886a55ea
      Simon Pilgrim authored
      We already handle the case where we combine shuffle(extractsubvector(x),extractsubvector(x)), this relaxes the requirement to permit different sources as long as they have the same value type.
      
      This causes a couple of cases where the VPERMV3 binary shuffles occur at a wider width than before, which I intend to improve in future commits - but as only the subvector's mask indices are defined, these will broadcast so we don't see any increase in constant size.
      
      llvm-svn: 362599
      886a55ea
    • Nico Weber's avatar
      gn build: Merge r362578 · 2121a4f7
      Nico Weber authored
      llvm-svn: 362598
      2121a4f7
    • Benjamin Kramer's avatar
      Revert "Factor out duplicated code building a MemberExpr and marking it" and... · 9b2b8ad8
      Benjamin Kramer authored
      Revert "Factor out duplicated code building a MemberExpr and marking it" and "Convert MemberExpr creation and serialization to work the same way as"
      
      This reverts commits r362551 and r362563. Crashes during modules selfhost.
      
      llvm-svn: 362597
      9b2b8ad8
    • George Rimar's avatar
      [llvm-objdump] - Disassemble non-executable sections if specifically requested. · b4219666
      George Rimar authored
      This is https://bugs.llvm.org/show_bug.cgi?id=41897.
      
      Previously -d + -j .data had no effect, that wasn't consistent with GNU,
      which proccesses .data in that case. With this patch we follow this behavior.
      
      Diffeential revision: https://reviews.llvm.org/D62848
      
      llvm-svn: 362596
      b4219666
    • Simon Pilgrim's avatar
      [TargetLowering] SimplifyDemandedBits - pull out shift value type. NFCI. · 5a81af54
      Simon Pilgrim authored
      Will be used more in an upcoming patch.
      
      llvm-svn: 362595
      5a81af54
    • Simon Pilgrim's avatar
      [X86][SSE] Add some nt-store test cases inspired by PR42123 · ddfbfd61
      Simon Pilgrim authored
      llvm-svn: 362594
      ddfbfd61
    • Serge Guelton's avatar
      Sanitize llvm-size help · daeeb33f
      Serge Guelton authored
      Remove irrelevant options from standard help output.
      
      New output:
      
          OVERVIEW: llvm object size dumper
      
          USAGE: llvm-size [options] <input files>
      
          OPTIONS:
      
          Generic Options:
      
            --help           - Display available options (--help-hidden for more)
            --help-list      - Display list of available options (--help-list-hidden for more)
            --version        - Display the version of this program
      
          llvm-size Options:
      
            Specify output format
                -A             - System V format
                -B             - Berkeley format
                -m             - Darwin -m format
            --arch=<string>  - architecture(s) from a Mach-O file to dump
            --common         - Print common symbols in the ELF file.  When using Berkely format, this is added to bss.
            Print size in radix:
                -o             - Print size in octal
                -d             - Print size in decimal
                -x             - Print size in hexadecimal
            --format=<value> - Specify output format
              =sysv          -   System V format
              =berkeley      -   Berkeley format
              =darwin        -   Darwin -m format
            -l               - When format is darwin, use long format to include addresses and offsets.
            --radix=<value>  - Print size in radix
              =8             -   Print size in octal
              =10            -   Print size in decimal
              =16            -   Print size in hexadecimal
            --totals         - Print totals of all objects - Berkeley format only
      
      Differential Revision: https://reviews.llvm.org/D62482
      
      llvm-svn: 362593
      daeeb33f
    • Simon Pilgrim's avatar
      [IPO] Disabled 'default only' switch statements to fix MSVC warnings. · db134aae
      Simon Pilgrim authored
      @jdoerfert Looks like these are placeholders for incoming abstract attributes patches so I've just commented the code out, even though this is usually frowned upon.
      
      llvm-svn: 362592
      db134aae
    • Peter Smith's avatar
      [ELF] Allow reading of more than one FEATURE_1_AND in same object. · e12334a0
      Peter Smith authored
      Although many relocatable objects will have a single
      GNU_PROPERTY_X86_FEATURE_1_AND in the .note.gnu.property section it is
      permissible to have more than one, and there are tests in ld.bfd that use
      it. The behavior that ld.bfd follows is to set the feature bit for a
      relocatable object if any of the GNU_PROPERTY_X86_FEATURE_1_AND
      have the feature bit set.
      
      Differential Revision: https://reviews.llvm.org/D62862
      
      llvm-svn: 362591
      e12334a0
    • Dmitri Gribenko's avatar
      Include what you use in PPCFrameLowering.h · 6fc4c1cc
      Dmitri Gribenko authored
      llvm-svn: 362590
      6fc4c1cc
    • Stefan Granitz's avatar
      [CMake] Add configuration dirs as potential locations for llvm-lit and... · c7694624
      Stefan Granitz authored
      [CMake] Add configuration dirs as potential locations for llvm-lit and llvm-tblgen in standalone builds
      
      Summary:
      If the provided LLVM build-tree used a multi-configuration generator like Xcode, `LLVM_TOOLS_BINARY_DIR` will have a generator-specific placeholder to express `CMAKE_CFG_INTDIR`. Thus `llvm-lit` and `llvm-tblgen` won't be found.
      D62878 exports the actual configuration types so we can fix the path and add them to the search paths for `find_program()`.
      
      Reviewers: xiaobai, labath, stella.stamenova
      
      Reviewed By: xiaobai, stella.stamenova
      
      Subscribers: mgorny, lldb-commits
      
      Tags: #lldb
      
      Differential Revision: https://reviews.llvm.org/D62879
      
      llvm-svn: 362589
      c7694624
    • Stefan Granitz's avatar
      [CMake] Export CMAKE_CONFIGURATION_TYPES for the LLVM build-tree · 3c850ca5
      Stefan Granitz authored
      Summary: Useful info for standalone builds of subprojects. If a multi-configuration generator was used for the provided LLVM build-tree, standalone builds should consider actual subdirectories per configuration in `find_program()` (e.g. looking for `llvm-lit` or `llvm-tblgen`).
      
      Reviewers: labath, beanz, mgorny
      
      Subscribers: lldb-commits, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D62878
      
      llvm-svn: 362588
      3c850ca5
    • Michal Gorny's avatar
      [clang] [test] Add a (xfailing) test for PR41027 · 2ae86d20
      Michal Gorny authored
      Add a test for tracking PR41027 (8.0 regression breaking assembly code
      relying on __builtin_constant_p() to identify compile-time constants).
      Mark it as expected to fail everywhere.
      
      Differential Revision: https://reviews.llvm.org/D60728
      
      llvm-svn: 362587
      2ae86d20
    • Pavel Labath's avatar
      Ignore DIEs in the skeleton unit in a DWO scenario · da7f0336
      Pavel Labath authored
      Summary:
      r362103 exposed a bug, where we could read incorrect data if a skeleton
      unit contained more than the single unit DIE. Clang emits these kinds of
      units with -fsplit-dwarf-inlining (which is also the default).
      
      Changing lldb to handle these DIEs is nontrivial, as we'd have to change
      the UID encoding logic to be able to reference these DIEs, and fix up
      various places which are assuming that all DIEs come from the separate
      compile unit.
      
      However, it turns out this is not necessary, as the DWO unit contains
      all the information that the skeleton unit does. So, this patch just
      skips parsing the extra DIEs if we have successfully found the DWO file.
      This enforces the invariant that the rest of the code is already
      operating under.
      
      This patch fixes a couple of existing tests, but I've also included a
      simpler test which does not depend on execution of binaries, and would
      have helped us in catching this sooner.
      
      Reviewers: clayborg, JDevlieghere, aprantl
      
      Subscribers: probinson, dblaikie, lldb-commits
      
      Differential Revision: https://reviews.llvm.org/D62852
      
      llvm-svn: 362586
      da7f0336