1. Mar 25, 2015
    • Justin Bogner's avatar
      test: Fix the dependencies for the check-llvm-* targets · 35b4b1a4
      Justin Bogner authored
      In r233009 we gained specific check-llvm-* build targets for invoking
      specific parts of the test suite, but they were copying the
      dependencies for check-all, rather than just listing the dependencies
      for check-llvm.
      
      This moves the creation of these targets next to the check-llvm
      target, and uses that target's configuration rather than the check-all
      config.
      
      llvm-svn: 233174
      35b4b1a4
    • Daniel Jasper's avatar
      Temporarily disable one more non-determinism flag. · cb47d8d1
      Daniel Jasper authored
      This turned the bots to red after r233172 which reverted r233156.
      
      llvm-svn: 233173
      cb47d8d1
    • Rafael Espindola's avatar
      Revert "[Modules] When writing out the on-disk hash table for the decl context... · c606b3e6
      Rafael Espindola authored
      Revert "[Modules] When writing out the on-disk hash table for the decl context lookup tables, we need to establish a stable ordering for constructing the hash table. This is trickier than it might seem."
      
      This reverts commit r233156. It broke the bots.
      
      llvm-svn: 233172
      c606b3e6
    • Rafael Espindola's avatar
      Fix build. · 6d0c397e
      Rafael Espindola authored
      llvm-svn: 233171
      6d0c397e
    • Craig Topper's avatar
      [X86] Remove GetCpuIDAndInfo, GetCpuIDAndInfoEx and DetectFamilyModel... · f2071f26
      Craig Topper authored
      [X86] Remove GetCpuIDAndInfo, GetCpuIDAndInfoEx and DetectFamilyModel functions from X86 MC layer. They haven't been used since CPU autodetection was removed from X86Subtarget.cpp.
      
      llvm-svn: 233170
      f2071f26
    • Justin Bogner's avatar
      InstrProf: Handle whitespace and comments at the ends of macros · f14b2078
      Justin Bogner authored
      When we try to find the end loc for a token, we have to re-lex the
      token. This was running into a problem when we'd store the end loc of
      a macro's coverage region, since we wouldn't actually be at the
      beginning of a token when we tried to re-lex it, leading us to do
      silly things (and eventually assert) when whitespace or comments
      followed.
      
      This pushes our use of getPreciseTokenLocEnd earlier, so that we won't
      call it when it doesn't make sense to. It also removes an unnecessary
      adjustment by 1 that was working around this problem in some cases.
      
      llvm-svn: 233169
      f14b2078
    • Lang Hames's avatar
      [Orc] Remove extraneous 'typename'. This should cheer the bots up. · 506d031d
      Lang Hames authored
      llvm-svn: 233168
      506d031d
    • Jason Molenda's avatar
      4f57d6ab
    • Lang Hames's avatar
      [Orc] Refactor JITCompileCallbackManagerBase and CompileOnDemandLayer to support · 8389b552
      Lang Hames authored
      target-independent callback management.
      
      This is a prerequisite for adding orc-based lazy-jitting to lli.
      
      llvm-svn: 233166
      8389b552
    • Duncan P. N. Exon Smith's avatar
      Linker: Temporarily disable dwarfdump checks from r233164 · 419d523d
      Duncan P. N. Exon Smith authored
      At least one Linux bot [1] doesn't like my dwarfdump checks, so I've
      disable those until I can investigate what's going on there.  I'll
      continue to track this in PR22792.
      
      [1]: http://bb.pgr.jp/builders/cmake-llvm-x86_64-linux/builds/22863
      
      llvm-svn: 233165
      419d523d
    • Duncan P. N. Exon Smith's avatar
      Linker: Drop function pointers for overridden subprograms · 004ced3b
      Duncan P. N. Exon Smith authored
      Instead of dropping subprograms that have been overridden, just set
      their function pointers to `nullptr`.  This is a minor adjustment to the
      stop-gap fix for PR21910 committed in r224487, and fixes the crasher
      from PR22792.
      
      The problem that r224487 put a band-aid on: how do we find the canonical
      subprogram for a `Function`?  Since the backend currently relies on
      `DebugInfoFinder` (which does a naive in-order traversal of compile
      units and picks the first subprogram) for this, r224487 tried dropping
      non-canonical subprograms.
      
      Dropping subprograms fails because the backend *also* builds up a map
      from subprogram to compile unit (`DwarfDebug::SPMap`) based on the
      subprogram lists.  A missing subprogram causes segfaults later when an
      inlined reference (such as in this testcase) is created.
      
      Instead, just drop the `Function` pointer to `nullptr`, which nicely
      mirrors what happens when an already-inlined `Function` is optimized
      out.  We can't really be sure that it's the same definition anyway, as
      the testcase demonstrates.
      
      This still isn't completely satisfactory.  Two flaws at least that I can
      think of:
      
        - I still haven't found a straightforward way to make this symmetric
          in the IR.  (Interestingly, the DWARF output is already symmetric,
          and I've tested for that to be sure we don't regress.)
        - Using `DebugInfoFinder` to find the canonical subprogram for a
          function is kind of crazy.  We should just attach metadata to the
          function, like this:
      
              define weak i32 @foo(i32, i32) !dbg !MDSubprogram(...) {
      
      llvm-svn: 233164
      004ced3b
    • Chandler Carruth's avatar
      [Modules] Disable the diff of the merged module, there is still some · d5f1db6b
      Chandler Carruth authored
      non-determinism here, I just got lucky a bunch of times on my system.
      
      llvm-svn: 233163
      d5f1db6b
    • Chandler Carruth's avatar
      [Modules] Make the DeclUpdates map be processed in insertion order. · 75fc6a7f
      Chandler Carruth authored
      This fixes my stress tests non-determinism so far. However, I've not
      started playing with templates, friends, or terrible macros. I've found
      at least two more seeming instabilities and am just waiting for a test
      case to actually trigger them.
      
      llvm-svn: 233162
      75fc6a7f
    • Ehsan Akhgari's avatar
      Diagnose ref-qualifiers occuring after virt-specifier-seq and generate fixit hints · c07d1e23
      Ehsan Akhgari authored
      Summary: Follow-up to the fix of PR22075.
      
      Reviewers: rsmith
      
      Subscribers: cfe-commits
      
      Differential Revision: http://reviews.llvm.org/D7012
      
      llvm-svn: 233161
      c07d1e23
    • Ehsan Akhgari's avatar
      Diagnose declspecs occuring after virt-specifier-seq and generate fixit hints · 93ed5cf5
      Ehsan Akhgari authored
      Summary: This fixes PR22075.
      
      Reviewers: rsmith
      
      Subscribers: cfe-commits
      
      Differential Revision: http://reviews.llvm.org/D6828
      
      llvm-svn: 233160
      93ed5cf5
    • Chandler Carruth's avatar
      [ADT] Teach MapVector to support a swap member. Will be used in · d811ffa5
      Chandler Carruth authored
      a subsequent commit in Clang.
      
      llvm-svn: 233159
      d811ffa5
    • Rafael Espindola's avatar
      Fix warning on non-assert build. · 44cc6548
      Rafael Espindola authored
      llvm-svn: 233158
      44cc6548
    • Ying Chen's avatar
      xfail tests that failed with clang-3.7, gcc4.8.2 and on i386 to get buildbot green · 4e0587d2
      Ying Chen authored
      Summary:
      -Refer to bug https://buganizer.corp.google.com/issues/19893563
      -Test log http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-cmake/builds/1145
      
      Test Plan: Run tests with different compiler and archs locally
      
      Reviewers: sivachandra, ovyalov, chaoren, vharron
      
      Subscribers: llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D8573
      
      llvm-svn: 233157
      4e0587d2
    • Chandler Carruth's avatar
      [Modules] When writing out the on-disk hash table for the decl context · 75c9f13a
      Chandler Carruth authored
      lookup tables, we need to establish a stable ordering for constructing
      the hash table. This is trickier than it might seem.
      
      Most of these cases are easily handled by sorting the lookup results
      associated with a specific name that has an identifier. However for
      constructors and conversion functions, the story is more complicated.
      Here we need to merge all of the constructors or conversion functions
      together and this merge needs to be stable. We don't have any stable
      ordering for either constructors or conversion functions as both would
      require a stable ordering across types.
      
      Instead, when we have constructors or conversion functions in the
      results, we reconstruct a stable order by walking the decl context in
      lexical order and merging them in the order their particular declaration
      names are encountered. This doesn't generalize as there might be found
      declaration names which don't actually occur within the lexical context,
      but for constructors and conversion functions it is safe. It does
      require loading the entire decl context if necessary to establish the
      ordering but there doesn't seem to be a meaningful way around that.
      
      Many thanks to Richard for talking through all of the design choices
      here. While I wrote the code, he guided all the actual decisions about
      how to establish the order of things.
      
      No test case yet because the test case I have doesn't pass yet -- there
      are still more sources of non-determinism. However, this is complex
      enough that I wanted it to go into its own commit in case it causes some
      unforseen issue or needs to be reverted.
      
      llvm-svn: 233156
      75c9f13a
    • Rafael Espindola's avatar
      dbb4021b
    • Rui Ueyama's avatar
      Add a test for r233128: PECOFF: Reduce import table size. · 103e0304
      Rui Ueyama authored
      This test checks for the size of .idata section. Before r233128,
      the size of the section is 0x45, but it's now 0x27.
      
      llvm-svn: 233154
      103e0304
    • Paul Robinson's avatar
      'optnone' should not disable DAG combiner. · 284f0451
      Paul Robinson authored
      Reverts the code change from r221168 and the relevant test.
      It was a mistake to disable the combiner, and based on the ultimate
      definition of 'optnone' we shouldn't have considered the test case
      as failing in the first place.
      
      llvm-svn: 233153
      284f0451
    • Philip Reames's avatar
      !invariant.load semantics with potentially clobbering calls · 4dbd88f3
      Philip Reames authored
      A load from an invariant location is assumed to not alias any otherwise potentially aliasing stores. Our implementation only applied this rule to store instructions themselves whereas they it should apply for any memory accessing instruction. This results in both FRE and PRE becoming more effective at eliminating invariant loads.
      
      Note that as a follow on change I will likely move this into AliasAnalysis itself. That's where the TBAA constant flag is handled and the semantics are essentially the same. I'd like to separate the semantic change from the refactoring and thus have extended the hack that's already in MemoryDependenceAnalysis for this change.
      
      Differential Revision: http://reviews.llvm.org/D8591
      
      llvm-svn: 233140
      4dbd88f3
    • Rafael Espindola's avatar
      Don't be over eager in evaluating a subtraction with a weak symbol. · c9e7068c
      Rafael Espindola authored
      In a subtraction of the form A - B, if B is weak, there is no way to represent
      that on ELF since all relocations add the value of a symbol.
      
      llvm-svn: 233139
      c9e7068c
    • Reid Kleckner's avatar
      Fix obviously broken assertion, NFC · 5a63d707
      Reid Kleckner authored
      llvm-svn: 233138
      5a63d707
    • Reid Kleckner's avatar
      X86: Fix frameescape when not using an FP · 11470c48
      Reid Kleckner authored
      We can't use TargetFrameLowering::getFrameIndexOffset directly, because
      Win64 really wants the offset from the stack pointer at the end of the
      prologue. Instead, use X86FrameLowering::getFrameIndexOffsetFromSP(),
      which is a pretty close approximiation of that. It fails to handle cases
      with interestingly large stack alignments, which is pretty uncommon on
      Win64 and is TODO.
      
      llvm-svn: 233137
      11470c48
    • Oleksiy Vyalov's avatar
      Fix ModuleCache usage in Platform - ask remote platform for module's... · 037f6b9c
      Oleksiy Vyalov authored
      Fix ModuleCache usage in Platform - ask remote platform for module's ModuleSpec beforehand so we can look for a module by UUID locally without need to download it.
      
      http://reviews.llvm.org/D8557
      
      llvm-svn: 233136
      037f6b9c
    • Ahmed Bougacha's avatar
      [CodeGen] Support native half inc/dec amounts. · 6ba3831e
      Ahmed Bougacha authored
      We previously defaulted to long double, but it's also possible to have
      a half inc/dec amount, when LangOpts NativeHalfType is set.
      Currently, that's only true for OpenCL.
      
      llvm-svn: 233135
      6ba3831e
    • Justin Bogner's avatar
      Update a test I missed in r233132 · 96966c7b
      Justin Bogner authored
      llvm-svn: 233134
      96966c7b
    • Andrew Kaylor's avatar
      Disabling warnings for MSVC build to enable /W4 use. · 5c73e1f8
      Andrew Kaylor authored
      Differential Revision: http://reviews.llvm.org/D8572
      
      llvm-svn: 233133
      5c73e1f8
    • Justin Bogner's avatar
      llvm-cov: Require a subcommand when invoked as llvm-cov · 5a07bb8b
      Justin Bogner authored
      A while ago llvm-cov gained support for clang's instrumentation based
      profiling in addition to its gcov support, and subcommands were added
      to choose which behaviour to use. When no subcommand was specified, we
      fell back to gcov compatibility with a warning that a subcommand would
      be required in the future. Now, we require the subcommand.
      
      Note that if the basename of llvm-cov is gcov (via symlink or
      hardlink, for example), we still use the gcov compatible behaviour
      with no subcommand required.
      
      llvm-svn: 233132
      5a07bb8b
    • David Blaikie's avatar
      Opaque Pointer Types: GEP API migrations to specify the gep type explicitly · 156d46ed
      David Blaikie authored
      The changes to InstCombine (& SCEV) do seem a bit silly - it doesn't make
      anything obviously better to have the caller access the pointers element
      type (the thing I'm trying to remove) than the GEP itself, but it's a
      helpful migration step. This will allow me to more obviously lock down
      GEP (& Load, etc) API usage, then fix all the code that accesses pointer
      element types except the places that need to be removed (most of the
      InstCombines) anyway - at which point I'll need to just remove all that
      code because it won't be meaningful anymore (there will be no pointer
      types, so no bitcasts to combine)
      
      SCEV looks like it'll need some restructuring - we'll have to do a bit
      more work for GEP canonicalization, since it'll depend on how it's used
      if we can even manage to canonicalize it to a non-ugly GEP. I guess we
      can do some fun stuff like voting (do 2 out of 3 load from the GEP with
      a certain type that gives a pretty GEP? Does every typed use of the GEP
      use either a specific type or a generic type (i8*, etc)?)
      
      llvm-svn: 233131
      156d46ed
    • Frederic Riss's avatar
      [dsymutil] Temporarily disable some tests on windows. · 10e728a4
      Frederic Riss authored
      It seems one windows bot fails since I added ilne table linking to
      llvm-dsymutil (see r232333 commit thread).
      Disable the affected tests until I can figure out what's happening.
      
      llvm-svn: 233130
      10e728a4
    • Chaoren Lin's avatar
      ComputeSupportExeDirectory for Linux · f9e915ae
      Chaoren Lin authored
      Summary:
      Fixes http://reviews.llvm.org/D8511
      
      The original method of using dladdr() could return the incorrect relative
      path if not dynamically linked against liblldb and the working directory
      has changed. This is not a problem when built with python, since
      ScriptInterpreterPython::InitializePrivate calls
      HostInfo::GetLLDBPath(ePathTypeLLDBShlibDir, ...) and caches the
      correct path before any changes to the working directory.
      
      The /proc/self/exe approach fails if run using Python, but works for all other
      cases (including for android, which doesn't have dladdr()).
      
      So if we combine the two, we should reasonably cover all corner cases.
      
      Reviewers: vharron, ovyalov, clayborg
      
      Reviewed By: ovyalov, clayborg
      
      Subscribers: lldb-commits
      
      Differential Revision: http://reviews.llvm.org/D8570
      
      llvm-svn: 233129
      f9e915ae
    • Rui Ueyama's avatar
      PECOFF: Reduce import table size. · c756b2df
      Rui Ueyama authored
      Import Lookup Table in Import Directory Table has the same contents
      as Hint/Name Table. Symbol names imported from DLLs are pointed by
      both Import Directory Table and Hint/Name Table. We had duplicate
      strings there.
      
      This patch eliminates that duplication to make the table smaller.
      This should reduce binary size by the sum of lengths of imported
      symbols.
      
      llvm-svn: 233128
      c756b2df
    • Sanjay Patel's avatar
      optimize the AVX2 (integer) version of vperm2 into a shuffle · e304bea0
      Sanjay Patel authored
      ...because this is what happens when an instruction
      set puts its underwear on after its pants.
      
      This is an extension of r232852, r233100, and 233110:
      http://llvm.org/viewvc/llvm-project?view=revision&revision=232852
      http://llvm.org/viewvc/llvm-project?view=revision&revision=233100
      http://llvm.org/viewvc/llvm-project?view=revision&revision=233110
      
      llvm-svn: 233127
      e304bea0
    • David Blaikie's avatar
      Opaque Pointer Types: GEP API migrations to specify the gep type explicitly · 68d535c4
      David Blaikie authored
      The changes to InstCombine do seem a bit silly - it doesn't make
      anything obviously better to have the caller access the pointers element
      type (the thing I'm trying to remove) than the GEP itself, but it's a
      helpful migration step. This will allow me to more obviously lock down
      GEP (& Load, etc) API usage, then fix all the code that accesses pointer
      element types except the places that need to be removed (most of the
      InstCombines) anyway - at which point I'll need to just remove all that
      code because it won't be meaningful anymore (there will be no pointer
      types, so no bitcasts to combine)
      
      llvm-svn: 233126
      68d535c4
    • Philip Reames's avatar
      Merge empty landing pads in SimplifyCFG · 2b969d70
      Philip Reames authored
      This patch tries to merge duplicate landing pads when they branch to a common shared target.
      
      Given IR that looks like this:
      lpad1:
        %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
               cleanup
        br label %shared_resume
      lpad2:
        %exn2 = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
                cleanup
        br label %shared_resume
      shared_resume:
        call void @fn()
        ret void
      }
      
      We can rewrite the users of both landing pad blocks to use one of them. This will generally allow the shared_resume block to be merged with the common landing pad as well.
      
      Without this change, tail duplication would likely kick in - creating N (2 in this case) copies of the shared_resume basic block.
      
      Differential Revision: http://reviews.llvm.org/D8297
      
      llvm-svn: 233125
      2b969d70
    • Rafael Espindola's avatar
      Add -m -m elf_x86_64 to gold invocations. · 14ebbc6d
      Rafael Espindola authored
      Otherwise the tests would fail if the default was not elf_x86_64.
      
      This fixes PR22966.
      
      Patch by H.J. Lu!
      
      llvm-svn: 233124
      14ebbc6d
    • David Blaikie's avatar