1. Jun 24, 2016
  2. Jun 23, 2016
    • Ben Craig's avatar
      [Analyzer] Don't cache report generation ExplodedNodes · 4067e35f
      Ben Craig authored
      During the core analysis, ExplodedNodes are added to the
      ExplodedGraph, and those nodes are cached for deduplication purposes.
      
      After core analysis, reports are generated. Here, trimmed copies of
      the ExplodedGraph are made. Since the ExplodedGraph has already been
      deduplicated, there is no need to deduplicate again.
      
      This change makes it possible to add ExplodedNodes to an
      ExplodedGraph without the overhead of deduplication. "Uncached" nodes
      also cannot be iterated over, but none of the report generation code
      attempts to iterate over all nodes. This change reduces the analysis
      time of a large .C file from 3m43.941s to 3m40.256s (~1.6% speedup).
      It should slightly reduce memory consumption. Gains should be roughly
      proportional to the number (and path length) of static analysis
      warnings.
      
      This patch enables future work that should remove the need for an
      InterExplodedGraphMap inverse map. I plan on using the (now unused)
      ExplodedNode link to connect new nodes to the original nodes.
      
      http://reviews.llvm.org/D21229
      
      llvm-svn: 273572
      4067e35f
    • Reid Kleckner's avatar
      Use CreateFileA and add a FIXME to switch to the wide variant · 02d53152
      Reid Kleckner authored
      No functional change. Required to build with -DUNICODE, as is done in
      http://reviews.llvm.org/D21643
      
      llvm-svn: 273571
      02d53152
    • Renato Golin's avatar
      [docs] Bump minimum version of CMake in its own doc · c1bd4890
      Renato Golin authored
      llvm-svn: 273570
      c1bd4890
    • Simon Atanasyan's avatar
      [ELF][MIPS] Support MIPS TLS relocations · 002e2447
      Simon Atanasyan authored
      The patch adds one more partition to the MIPS GOT. This time it is for
      TLS related GOT entries. Such entries are located after 'local' and 'global'
      ones. We cannot get a final offset for these entries at the time of
      creation because we do not know size of 'local' and 'global' partitions.
      So we have to adjust the offset later using `getMipsTlsOffset()` method.
      
      All MIPS TLS relocations which need GOT entries operates MIPS style GOT
      offset - 'offset from the GOT's beginning' - MipsGPOffset constant. That
      is why I add new types of relocation expressions.
      
      One more difference from othe ABIs is that the MIPS ABI does not support
      any TLS relocation relaxations. I decided to make a separate function
      `handleMipsTlsRelocation` and put MIPS TLS relocation handling code
      there. It is similar to `handleTlsRelocation` routine and duplicates its
      code. But it allows to make the code cleaner and prevent pollution of
      the `handleTlsRelocation` by MIPS 'if' statements.
      
      Differential Revision: http://reviews.llvm.org/D21606
      
      llvm-svn: 273569
      002e2447
    • Artur Pilipenko's avatar
      Remangle intrinsics names when types are renamed · f0c9f813
      Artur Pilipenko authored
      This is a fix for the problem mentioned in "LTO and intrinsics mangling" llvm-dev mail thread:
      http://lists.llvm.org/pipermail/llvm-dev/2016-April/098387.html
      
      Reviewers: mehdi_amini, reames
      
      Differential Revision: http://reviews.llvm.org/D19373
      
      llvm-svn: 273568
      f0c9f813
    • Jonas Paulsson's avatar
      [SystemZ] Let z13 also support FeatureMiscellaneousExtensions. · b1a2b5a7
      Jonas Paulsson authored
      This processor feature had been left out by mistake from the z13
      ProcessorModel.
      
      Reviewed by Ulrich Weigand.
      
      llvm-svn: 273567
      b1a2b5a7
    • Rafael Espindola's avatar
      Restructure the propagation of -fPIC/-fPIE. · c9d336e5
      Rafael Espindola authored
      The PIC and PIE levels are not independent. In fact, if PIE is defined
      it is always the same as PIC.
      
      This is clear in the driver where ParsePICArgs returns a PIC level and
      a IsPIE boolean. Unfortunately that is currently lost and we pass two
      redundant levels down the pipeline.
      
      This patch keeps a bool and a PIC level all the way down to codegen.
      
      llvm-svn: 273566
      c9d336e5
    • Simon Dardis's avatar
      Revert "[misched] Extend scheduler to handle unsupported features" · fcc7f6fa
      Simon Dardis authored
      This reverts commit r273551.
      
      Patch contained a wrong check for isUnsupported.
      
      llvm-svn: 273565
      fcc7f6fa
    • Aaron Ballman's avatar
      Explicitly specify the ANSI version of these Win32 APIs. While these are... · 0da8b2ec
      Aaron Ballman authored
      Explicitly specify the ANSI version of these Win32 APIs. While these are seemingly unrelated changes, they are all NFC because we currently default to the ANSI versions of the APIs when building for Windows. This simply makes the ANSI usage explicit.
      
      llvm-svn: 273564
      0da8b2ec
    • Aaron Ballman's avatar
      Fixing a FIXME related to Unicode support on Windows. Converted the Win32 APIs... · b06a359b
      Aaron Ballman authored
      Fixing a FIXME related to Unicode support on Windows. Converted the Win32 APIs to explicitly use the W version when it involves strings that can hold non-ASCII characters (like file paths). Now explicitly using the A version for strings that will always be ASCII (like registry key paths).
      
      No extra tests required as this is currently covered by existing testing, and this is basically impossible to write Unicode-specific tests for.
      
      llvm-svn: 273563
      b06a359b
    • Michael Zolotukhin's avatar
      [LoopUnrollAnalyzer] Fix a bug in UnrolledInstAnalyzer::visitLoad. · 2d3592d4
      Michael Zolotukhin authored
      When simplifying a load we need to make sure that the type of the
      simplified value matches the type of the instruction we're processing.
      In theory, we can handle casts here as we deal with constant data, but
      since it's not implemented at the moment, we at least need to bail out.
      
      This fixes PR28262.
      
      llvm-svn: 273562
      2d3592d4
    • Valery Pykhtin's avatar
      a852d695
    • Simon Pilgrim's avatar
      [X86][AVX512] Added AVX512F vector sign extend tests · 595dddb1
      Simon Pilgrim authored
      Now that Elena has confirmed that PR26474 has been fixed
      
      llvm-svn: 273560
      595dddb1
    • Hal Finkel's avatar
      Allow DeadStoreElimination to track combinations of partial later wrties · a1271036
      Hal Finkel authored
      DeadStoreElimination can currently remove a small store rendered unnecessary by
      a later larger one, but could not remove a larger store rendered unnecessary by
      a series of later smaller ones. This adds that capability.
      
      It works by keeping a map, which is used as an effective interval map, for each
      store later overwritten only partially, and filling in that interval map as
      more such stores are discovered. No additional walking or aliasing queries are
      used. In the map forms an interval covering the the entire earlier store, then
      it is dead and can be removed. The map is used as an interval map by storing a
      mapping between the ending offset and the beginning offset of each interval.
      
      I discovered this problem when investigating a performance issue with code like
      this on PowerPC:
      
        #include <complex>
        using namespace std;
      
        complex<float> bar(complex<float> C);
        complex<float> foo(complex<float> C) {
          return bar(C)*C;
        }
      
      which produces this:
      
        define void @_Z4testSt7complexIfE(%"struct.std::complex"* noalias nocapture sret %agg.result, i64 %c.coerce) {
        entry:
          %ref.tmp = alloca i64, align 8
          %tmpcast = bitcast i64* %ref.tmp to %"struct.std::complex"*
          %c.sroa.0.0.extract.shift = lshr i64 %c.coerce, 32
          %c.sroa.0.0.extract.trunc = trunc i64 %c.sroa.0.0.extract.shift to i32
          %0 = bitcast i32 %c.sroa.0.0.extract.trunc to float
          %c.sroa.2.0.extract.trunc = trunc i64 %c.coerce to i32
          %1 = bitcast i32 %c.sroa.2.0.extract.trunc to float
          call void @_Z3barSt7complexIfE(%"struct.std::complex"* nonnull sret %tmpcast, i64 %c.coerce)
          %2 = bitcast %"struct.std::complex"* %agg.result to i64*
          %3 = load i64, i64* %ref.tmp, align 8
          store i64 %3, i64* %2, align 4 ; <--- ***** THIS SHOULD NOT BE HERE ****
          %_M_value.realp.i.i = getelementptr inbounds %"struct.std::complex", %"struct.std::complex"* %agg.result, i64 0, i32 0, i32 0
          %4 = lshr i64 %3, 32
          %5 = trunc i64 %4 to i32
          %6 = bitcast i32 %5 to float
          %_M_value.imagp.i.i = getelementptr inbounds %"struct.std::complex", %"struct.std::complex"* %agg.result, i64 0, i32 0, i32 1
          %7 = trunc i64 %3 to i32
          %8 = bitcast i32 %7 to float
          %mul_ad.i.i = fmul fast float %6, %1
          %mul_bc.i.i = fmul fast float %8, %0
          %mul_i.i.i = fadd fast float %mul_ad.i.i, %mul_bc.i.i
          %mul_ac.i.i = fmul fast float %6, %0
          %mul_bd.i.i = fmul fast float %8, %1
          %mul_r.i.i = fsub fast float %mul_ac.i.i, %mul_bd.i.i
          store float %mul_r.i.i, float* %_M_value.realp.i.i, align 4
          store float %mul_i.i.i, float* %_M_value.imagp.i.i, align 4
          ret void
        }
      
      the problem here is not just that the i64 store is unnecessary, but also that
      it blocks further backend optimizations of the other uses of that i64 value in
      the backend.
      
      In the future, we might want to add a special case for handling smaller
      accesses (e.g. using a bit vector) if the map mechanism turns out to be
      noticeably inefficient. A sorted vector is also a possible replacement for the
      map for small numbers of tracked intervals.
      
      Differential Revision: http://reviews.llvm.org/D18586
      
      llvm-svn: 273559
      a1271036
    • Saleem Abdulrasool's avatar
      CodeGen: support linker options on Windows ARM · 6e9e88b3
      Saleem Abdulrasool authored
      We would incorrectly emit the directive sections due to the missing overridden
      methods.  We now emit the expected "/DEFAULTLIB" rather than "-l" options for
      requested linkage
      
      llvm-svn: 273558
      6e9e88b3
    • Daniel Sanders's avatar
      [mips] Don't derive the default ABI from the CPU in the backend. · de393329
      Daniel Sanders authored
      Summary:
      The backend has no reason to behave like a driver and should generally do
      as it's told (and error out if it can't) instead of trying to figure out
      what the API user meant. The default ABI is still derived from the arch
      component as a concession to backwards compatibility.
      
      API-users that previously passed an explicit CPU and a triple that was
      inconsistent with the CPU (e.g. mips-linux-gnu and mips64r2) may get a
      different ABI to what they got before. However, it's expected that there
      are no such users on the basis that CodeGen has been asserting that the
      triple is consistent with the selected ABI for several releases. API-users
      that were consistent or passed '' or 'generic' as the CPU will see no
      difference.
      
      Reviewers: sdardis, rafael
      
      Subscribers: rafael, dsanders, sdardis, llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D21466
      
      llvm-svn: 273557
      de393329
    • Diana Picus's avatar
      [ARM] Use member initializers in ARMSubtarget. NFCI · eb3dd14b
      Diana Picus authored
      Move most of the initializations in ARMSubtarget::initializeEnvironment to
      member initializers.
      
      Change suggested by Matthias Braun (see http://reviews.llvm.org/D21432).
      
      llvm-svn: 273556
      eb3dd14b
    • Daniel Sanders's avatar
      [mips][ias] Integers are not registers. · 8e17bea7
      Daniel Sanders authored
      Summary:
      When parseAnyRegister() encounters a symbol alias, it parses integers and adds
      a corresponding expression to the operand list. This is clearly wrong since the
      only operands that parseAnyRegister() should be accepting are registers.
      
      It's not clear why this code was added and there are no test cases that cover
      it. I think it might be leftover from when searchSymbolAlias() was more widely
      used.
      
      Reviewers: sdardis
      
      Subscribers: dsanders, sdardis, llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D21377
      
      llvm-svn: 273555
      8e17bea7
    • Diana Picus's avatar
      [llc] Remove exit-on-error flag (PR27759) · 8e6aab38
      Diana Picus authored
      This flag was introduced in r269655 with the new diagnostic handler for llc. Its
      purpose was to keep the old behavior for some of the tests that didn't recover
      well after an error. Those tests have been fixed, so now it's safe to remove the
      flag entirely.
      
      Fixes PR27759.
      
      Differential Revision: http://reviews.llvm.org/D21368
      
      llvm-svn: 273554
      8e6aab38
    • Daniel Jasper's avatar
      clang-format: [Proto] Use more compact format for text-formatted options · 7f3b99fc
      Daniel Jasper authored
      Before:
        enum Type {
          UNKNOWN = 0 [(some_options) = {
            a: aa,
            b: bb
          }];
        };
      
      After:
        enum Type {
          UNKNOWN = 0 [(some_options) = {a: aa, b: bb}];
        };
      
      llvm-svn: 273553
      7f3b99fc
    • Daniel Sanders's avatar
      Attempt to fix MIPS buildbots after r273425. · e6ca7b6a
      Daniel Sanders authored
      MIPS has a 'signext' attribute that was causing the check to fail.
      
      llvm-svn: 273552
      e6ca7b6a