Skip to content
  1. Jan 05, 2014
  2. Jan 04, 2014
    • Alp Toker's avatar
      Revert "Fix PR18361: Invalidate LoopDispositions after LoopSimplify hoists things." · 5e9f3265
      Alp Toker authored
      This commit was the source of crasher PR18384:
      
      While deleting: label %for.cond127
      An asserting value handle still pointed to this value!
      UNREACHABLE executed at llvm/lib/IR/Value.cpp:671!
      
      Reverting to get the builders green, feel free to re-land after fixing up.
      (Renato has a handy isolated repro if you need it.)
      
      This reverts commit r198478.
      
      llvm-svn: 198503
      5e9f3265
    • Venkatraman Govindaraju's avatar
      [SparcV9]: Implement RETURNADDR and FRAMEADDR lowering in SPARC64. · 96ab3bc5
      Venkatraman Govindaraju authored
      Fixes PR18356.
      
      llvm-svn: 198480
      96ab3bc5
    • Andrew Trick's avatar
      Fix PR18361: Invalidate LoopDispositions after LoopSimplify hoists things. · aceac974
      Andrew Trick authored
      getSCEV for an ashr instruction creates an intermediate zext
      expression when it truncates its operand.
      
      The operand is initially inside the loop, so the narrow zext
      expression has a non-loop-invariant loop disposition.
      
      LoopSimplify then runs on an outer loop, hoists the ashr operand, and
      properly invalidate the SCEVs that are mapped to value.
      
      The SCEV expression for the ashr is now an AddRec with the hoisted
      value as the now loop-invariant start value.
      
      The LoopDisposition of this wide value was properly invalidated during
      LoopSimplify.
      
      However, if we later get the ashr SCEV again, we again try to create
      the intermediate zext expression. We get the same SCEV that we did
      earlier, and it is still cached because it was never mapped to a
      Value. When we try to create a new AddRec we abort because we're using
      the old non-loop-invariant LoopDisposition.
      
      I don't have a solution for this other than to clear LoopDisposition
      when LoopSimplify hoists things.
      
      I think the long-term strategy should be to perform LoopSimplify on
      all loops before computing SCEV and before running any loop opts on
      individual loops. It's possible we may want to rerun LoopSimplify on
      individual loops, but it should rarely do anything, so rarely require
      invalidating SCEV.
      
      llvm-svn: 198478
      aceac974
  3. Jan 03, 2014
    • Ana Pazos's avatar
      [AArch64][NEON] Added SXTL and SXTL2 instruction aliases · e891c5f2
      Ana Pazos authored
      llvm-svn: 198437
      e891c5f2
    • David Blaikie's avatar
      Revert "Revert "Debug Info: Type Units: Simplify type hashing using IR-provided unique names."" · cfb2115e
      David Blaikie authored
      This reverts commit r198398, thus reapplying r198397.
      
      I had accidentally introduced an endianness issue when applying the hash
      to the type unit. Using support::ulittle64_t in the reinterpret_cast in
      addDwarfTypeUnitType fixes this issue.
      
      Original commit message:
      
      Debug Info: Type Units: Simplify type hashing using IR-provided unique
      names.
      
      What's good for LTO metadata size problems ought to be good for non-LTO
      debug info size too, so let's rely on the same uniqueness in both cases.
      If it's insufficient for non-LTO for whatever reason (since we now won't
      be uniquing CU-local types or any C types - but these are likely to not
      be the most significant contributors to type bloat) we should consider a
      frontend solution that'll help both LTO and non-LTO alike, rather than
      using DWARF-level DIE-hashing that only helps non-LTO debug info size.
      
      It's also much simpler this way and benefits C++ even more since we can
      deduplicate lexically separate definitions of the same C++ type since
      they have the same mangled name.
      
      llvm-svn: 198436
      cfb2115e
    • David Peixotto's avatar
      Fix loop rerolling pass failure with non-consant loop lower bound · ea9ba446
      David Peixotto authored
      The loop rerolling pass was failing with an assertion failure from a
      failed cast on loops like this:
      
        void foo(int *A, int *B, int m, int n) {
          for (int i = m; i < n; i+=4) {
            A[i+0] = B[i+0] * 4;
            A[i+1] = B[i+1] * 4;
            A[i+2] = B[i+2] * 4;
            A[i+3] = B[i+3] * 4;
          }
        }
      
      The code was casting the SCEV-expanded code for the new
      induction variable to a phi-node. When the loop had a non-constant
      lower bound, the SCEV expander would end the code expansion with an
      add insted of a phi node and the cast would fail.
      
      It looks like the cast to a phi node was only needed to get the
      induction variable value coming from the backedge to compute the end
      of loop condition. This patch changes the loop reroller to compare
      the induction variable to the number of times the backedge is taken
      instead of the iteration count of the loop. In other words, we stop
      the loop when the current value of the induction variable ==
      IterationCount-1. Previously, the comparison was comparing the
      induction variable value from the next iteration == IterationCount.
      
      This problem only seems to occur on 32-bit targets. For some reason,
      the loop is not rerolled on 64-bit targets.
      
      PR18290
      
      llvm-svn: 198425
      ea9ba446
    • Arnold Schwaighofer's avatar
      BasicAA: Use reachabilty instead of dominance for checking value equality in phi · 833a82ec
      Arnold Schwaighofer authored
      cycles
      
      This allows the value equality check to work even if we don't have a dominator
      tree. Also add some more comments.
      
      I was worried about compile time impacts and did not implement reachability but
      used the dominance check in the initial patch. The trade-off was that the
      dominator tree was required.
      The llvm utility function isPotentiallyReachable cuts off the recursive search
      after 32 visits. Testing did not show any compile time regressions showing my
      worries unjustfied.
      
      No compile time or performance regressions at O3 -flto -mavx on test-suite +
      externals.
      
      Addresses review comments from r198290.
      
      llvm-svn: 198400
      833a82ec
    • David Blaikie's avatar
      Revert "Debug Info: Type Units: Simplify type hashing using IR-provided unique names." · ab0ba249
      David Blaikie authored
      Reverting due to bot failure I won't have time to investigate until
      tomorrow.
      
      This reverts commit r198397.
      
      llvm-svn: 198398
      ab0ba249
    • David Blaikie's avatar
      Debug Info: Type Units: Simplify type hashing using IR-provided unique names. · ddb66281
      David Blaikie authored
      What's good for LTO metadata size problems ought to be good for non-LTO
      debug info size too, so let's rely on the same uniqueness in both cases.
      If it's insufficient for non-LTO for whatever reason (since we now won't
      be uniquing CU-local types or any C types - but these are likely to not
      be the most significant contributors to type bloat) we should consider a
      frontend solution that'll help both LTO and non-LTO alike, rather than
      using DWARF-level DIE-hashing that only helps non-LTO debug info size.
      
      It's also much simpler this way and benefits C++ even more since we can
      deduplicate lexically separate definitions of the same C++ type since
      they have the same mangled name.
      
      llvm-svn: 198397
      ddb66281
    • David Blaikie's avatar
      Revert "Reverting r193835 due to weirdness with Go..." · 22b29a5f
      David Blaikie authored
      The cgo problem was that it wants dwarf2 which doesn't support direct
      constant encoding of the location. So let's add support for dwarf2
      encoding (using a location expression) of data member locations.
      
      This reverts commit r198385.
      
      llvm-svn: 198389
      22b29a5f
    • David Blaikie's avatar
      Reverting r193835 due to weirdness with Go... · 2ada116a
      David Blaikie authored
      Apologies for the noise - we're seeing some Go failures with cgo
      interacting with Clang's debug info due to this change.
      
      llvm-svn: 198385
      2ada116a
  4. Jan 02, 2014
    • Quentin Colombet's avatar
      [RegAlloc] Make tryInstructionSplit less aggressive. · 1fb3362a
      Quentin Colombet authored
      The greedy register allocator tries to split a live-range around each
      instruction where it is used or defined to relax the constraints on the entire
      live-range (this is a last chance split before falling back to spill).
      The goal is to have a big live-range that is unconstrained (i.e., that can use
      the largest legal register class) and several small local live-range that carry
      the constraints implied by each instruction.
      E.g.,
      Let csti be the constraints on operation i.
      
      V1=
      op1 V1(cst1)
      op2 V1(cst2)
      
      V1 live-range is constrained on the intersection of cst1 and cst2.
      
      tryInstructionSplit relaxes those constraints by aggressively splitting each
      def/use point:
      V1=
      V2 = V1
      V3 = V2
      op1 V3(cst1)
      V4 = V2
      op2 V4(cst2)
      
      Because of how the coalescer infrastructure works, each new variable (V3, V4)
      that is alive at the same time as V1 (or its copy, here V2) interfere with V1.
      Thus, we end up with an uncoalescable copy for each split point.
      
      To make tryInstructionSplit less aggressive, we check if the split point
      actually relaxes the constraints on the whole live-range. If it does not, we do
      not insert it.
      Indeed, it will not help the global allocation problem:
      - V1 will have the same constraints.
      - V1 will have the same interference + possibly the newly added split variable
        VS.
      - VS will produce an uncoalesceable copy if alive at the same time as V1.
      
      <rdar://problem/15570057>
      
      llvm-svn: 198369
      1fb3362a
    • Matt Arsenault's avatar
      Fix all the verifier tests I added for address spaces. · ceae3356
      Matt Arsenault authored
      I originally had these using opt -verify, and I never removed the
      -verify when converting them to use llvm-as instead, so these were
      failing because of using the -verify argument which llvm-as doesn't have
      instead of what it's actually supposed to be testing.
      
      llvm-svn: 198352
      ceae3356
    • Matt Arsenault's avatar
      Allow addrspacecast in global aliases · 00436ea1
      Matt Arsenault authored
      llvm-svn: 198349
      00436ea1
    • Hal Finkel's avatar
      [TableGen] Correctly generate implicit anonymous prototype defs in multiclasses · a8c1f467
      Hal Finkel authored
      Even within a multiclass, we had been generating concrete implicit anonymous
      defs when parsing values (generally in value lists). This behavior was
      incorrect, and led to errors when multiclass parameters were used in the
      parameter list of the implicit anonymous def.
      
      If we had some multiclass:
      
      multiclass mc<string n> {
      
       ... : SomeClass<SomeOtherClass<n> >
      
      The capture of the multiclass parameter 'n' would not work correctly, and
      depending on how the implicit SomeOtherClass was used, either TableGen would
      ignore something it shouldn't, or would crash.
      
      To fix this problem, when inside a multiclass, we generate prototype anonymous
      defs for implicit anonymous defs (just as we do for explicit anonymous defs).
      Within the multiclass, the current record prototype is populated with a node
      that is essentially: !cast<SomeOtherClass>(!strconcat(NAME, anon_value_name)).
      This is then resolved to the correct concrete anonymous def, in the usual way,
      when NAME is resolved during multiclass instantiation.
      
      llvm-svn: 198348
      a8c1f467
    • Matt Arsenault's avatar
      Delete unread globals through addrspacecast · 461c8e0a
      Matt Arsenault authored
      llvm-svn: 198346
      461c8e0a
    • Matt Arsenault's avatar
      Fix addrspacecast with metadata globals · da1deabb
      Matt Arsenault authored
      llvm-svn: 198345
      da1deabb
    • Jordan Rose's avatar
      [CMake] Add missing set_output_directory after Takumi's change in r198205. · 353bdcde
      Jordan Rose authored
      Plugins need to go in build/Debug/lib as well (rather than build/lib/Debug).
      
      Also, fix the SHLIBDIR path for Xcode, which by default includes Xcode build
      settings rather than a simple %(build_mode)s parameter.
      
      llvm-svn: 198344
      353bdcde
    • Hal Finkel's avatar
      [TableGen] Use the same anonymous name as the prefix on all multiclass defs · f2a0b2b3
      Hal Finkel authored
      TableGen had been generating a different name for an anonymous multiclass's
      NAME for every def in the multiclass. This had an unfortunate side effect: it
      was impossible to reference one def within the multiclass from another (in the
      parameter list, for example). By making sure we only generate an anonymous name
      once per multiclass (which, as it turns out, requires only changing the name
      parameter to reference type), we can now concatenate NAME within the multiclass
      with a def name in order to generate a reference to that def.
      
      This does not matter so much, in and of itself, but is necessary for a
      follow-up commit that will fix variable capturing in implicit anonymous
      multiclass defs (and that is important).
      
      llvm-svn: 198340
      f2a0b2b3
    • Andrew Trick's avatar
      indvars: insert truncate at loop boundary to avoid redundant IVs. · 020dd898
      Andrew Trick authored
      When widening an IV to remove s/zext, we generally try to eliminate
      the original narrow IV. However, LCSSA phi nodes outside the loop were
      still using the original IV. Clean this up more aggressively to avoid
      redundancy in generated code.
      
      llvm-svn: 198338
      020dd898
    • Adrian Prantl's avatar
      Revert "Debug info: Add enumerators to the __apple_names accelerator table." · fd3279f2
      Adrian Prantl authored
      This reverts r197927 until the discussion on llvm-commits comes to a
      conclusion.
      
      llvm-svn: 198333
      fd3279f2
    • Logan Chien's avatar
      [arm] Add softvfp to supported FPU names. · 05ae7448
      Logan Chien authored
      llvm-svn: 198313
      05ae7448
    • Rafael Espindola's avatar
      Make the ARM ABI selectable via SubtargetFeature. · d89b16dc
      Rafael Espindola authored
      This patch makes it possible to select the ABI with -mattr. It will be used to
      forward clang's -target-abi option to llvm's CodeGen.
      
      llvm-svn: 198304
      d89b16dc
    • Arnold Schwaighofer's avatar
      BasicAA: Fix value equality and phi cycles · 0d10a9d5
      Arnold Schwaighofer authored
      When there are cycles in the value graph we have to be careful interpreting
      "Value*" identity as "value" equivalence. We interpret the value of a phi node
      as the value of its operands.
      When we check for value equivalence now we make sure that the "Value*" dominates
      all cycles (phis).
      
      %0 = phi [%noaliasval, %addr2]
      %l = load %ptr
      %addr1 = gep @a, 0, %l
      %addr2 = gep @a, 0, (%l + 1)
      store %ptr ...
      
      Before this patch we would return NoAlias for (%0, %addr1) which is wrong
      because the value of the load is from different iterations of the loop.
      
      Tested on x86_64 -mavx at O3 and O3 -flto with no performance or compile time
      regressions.
      
      PR18068
      radar://15653794
      
      llvm-svn: 198290
      0d10a9d5
  5. Jan 01, 2014
  6. Dec 31, 2013
  7. Dec 30, 2013
    • Saleem Abdulrasool's avatar
      ARM IAS: account for predicated pre-UAL mnemonics · e3a9dc13
      Saleem Abdulrasool authored
      Checking the trailing letter of the mnemonic is insufficient.  Be more thorough
      in the scanning of the instruction to ensure that we correctly work with the
      predicated mnemonics.
      
      llvm-svn: 198235
      e3a9dc13
    • Eric Christopher's avatar
      Revert r198208 and reapply: · d8667203
      Eric Christopher authored
            r198196: Use a pointer to keep track of the skeleton unit for each normal unit and construct it up front.
            r198199: Reapply r198196 with a fix to zero initialize the skeleton pointer.
            r198202: Fix aranges and split dwarf by ensuring that the symbol and relocation back to the compile unit from the aranges section is to the skeleton unit and not the one in the dwo.
      
      with a fix to use integer 0 for DW_AT_low_pc since the relocation to the text section symbol was causing issues with COFF. Accordingly remove addLocalLabelAddress and machinery since we're not currently using it.
      
      llvm-svn: 198222
      d8667203
    • NAKAMURA Takumi's avatar
      Revert r198199 (and r198202). It broke 3 DebugInfo tests for targeting i686-cygming. · 17b73108
      NAKAMURA Takumi authored
        r198196: Use a pointer to keep track of the skeleton unit for each normal unit and construct it up front.
        r198199: Reapply r198196 with a fix to zero initialize the skeleton pointer.
        r198202: Fix aranges and split dwarf by ensuring that the symbol and relocation back to the compile unit from the aranges section is to the skeleton unit and not the one in the dwo.
      
      They could be reproducible with explicit target.
      
        llvm/lib/MC/WinCOFFObjectWriter.cpp:224: bool {anonymous}::COFFSymbol::should_keep() const: Assertion `Section->Number != -1 && "Sections with relocations must be real!"' failed.
      
      llvm-svn: 198208
      17b73108
    • Eric Christopher's avatar
      Fix aranges and split dwarf by ensuring that the symbol and relocation · c2d401e9
      Eric Christopher authored
      back to the compile unit from the aranges section is to the skeleton
      unit and not the one in the dwo.
      
      Do this by adding a method to grab a forwarded on local sym and local
      section by querying the skeleton if one exists and using that. Add
      a few tests to verify the relocations are back to the correct section.
      
      llvm-svn: 198202
      c2d401e9
    • Eric Christopher's avatar
      d039baad
    • Eric Christopher's avatar
      Temporarily revert "Use a pointer to keep track of the skeleton unit for · be4c91c5
      Eric Christopher authored
      each normal unit" as it seems to be causing problems in the asan tests.
      
      llvm-svn: 198197
      be4c91c5
Loading