Skip to content
  1. Aug 03, 2017
    • Quentin Colombet's avatar
      [GlobalISel] Make GlobalISel a non-optional library. · 250e050a
      Quentin Colombet authored
      With this change, the GlobalISel library gets always built. In
      particular, this is not possible to opt GlobalISel out of the build
      using the LLVM_BUILD_GLOBAL_ISEL variable any more.
      
      llvm-svn: 309990
      250e050a
    • Davide Italiano's avatar
      [NewGVN] Fix the case where we have a phi-of-ops which goes away. · 5974c31d
      Davide Italiano authored
      Patch by Daniel Berlin, fixes PR33196 (and probably something else).
      
      llvm-svn: 309988
      5974c31d
    • Reid Kleckner's avatar
      [PDB] Fix section contributions · 175af4bc
      Reid Kleckner authored
      Summary:
      PDB section contributions are supposed to use output section indices and
      offsets, not input section indices and offsets.
      
      This allows the debugger to look up the index of the module that it
      should look up in the modules stream for symbol information. With this
      change, windbg can now find line tables, but it still cannot print local
      variables.
      
      Fixes PR34048
      
      Reviewers: zturner
      
      Subscribers: hiraditya, ruiu, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D36285
      
      llvm-svn: 309987
      175af4bc
    • Hiroshi Yamauchi's avatar
      [LVI] Constant-propagate a zero extension of the switch condition value through case edges · 144ee2b4
      Hiroshi Yamauchi authored
      Summary:
      (This is a second attempt as https://reviews.llvm.org/D34822 was reverted.)
      
      LazyValueInfo currently computes the constant value of the switch condition through case edges, which allows the constant value to be propagated through the case edges.
      
      But we have seen a case where a zero-extended value of the switch condition is used past case edges for which the constant propagation doesn't occur.
      
      This patch adds a small logic to handle such a case in getEdgeValueLocal().
      
      This is motivated by the Python 2.7 eval loop in PyEval_EvalFrameEx() where the lack of the constant propagation causes longer live ranges and more spill code than necessary.
      
      With this patch, we see that the code size of PyEval_EvalFrameEx() decreases by ~5.4% and a performance test improves by ~4.6%.
      
      Reviewers: sanjoy
      
      Reviewed By: sanjoy
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D36247
      
      llvm-svn: 309986
      144ee2b4
    • Taewook Oh's avatar
      Move unit test to the proper location · 424c88c3
      Taewook Oh authored
      Summary: Move test/CodeGen/AArch64/reg-bank-128bit.mir to test/CodeGen/AArch64/GlobalISel/reg-bank-128bit.mir so that the test is executed only when global-isel is enabled. lit.local.cfg under test/CodeGen/AArch64/GlobalISel checks if 'global-isel' is in the available_features while the same file under test/CodeGen/AArch64 doesn't.
      
      Reviewers: qcolombet, davide
      
      Reviewed By: davide
      
      Subscribers: davide, aemerson, javed.absar, igorb, kristof.beyls, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D36282
      
      llvm-svn: 309985
      424c88c3
    • Zachary Turner's avatar
      [llvm-pdbutil] Allow diff to force module equivalencies. · 33eee191
      Zachary Turner authored
      Sometimes the normal module equivalence detection algorithm doesn't
      quite work.  For example, you might build the same program with
      MSVC and clang-cl, outputting to different object files, exes, and
      PDBs, then compare them.  If the object files have different names
      though, then they won't be treated as equivalent.  This way we
      can force specific module indices to be treated as equivalent.
      
      llvm-svn: 309983
      33eee191
    • George Karpenkov's avatar
      f020c989
    • Connor Abbott's avatar
      test commit · 82267a55
      Connor Abbott authored
      llvm-svn: 309981
      82267a55
    • Nico Weber's avatar
      Fix llvm-for-windows-on-linux build after LLVM r272701. · 0a920e76
      Nico Weber authored
      The file is called "intrin.h". When building targeting Windows on a Linux
      system, with the SDK mounted in a case-insensitive file system, "Intrin.h" will
      miss clang's intrin.h header (because that's not in a case-insensitive file
      system) but then find intrin.h in the Microsoft SDK. clang can't handle the
      SDK's intrin.h.
      
      https://reviews.llvm.org/D36281
      
      llvm-svn: 309980
      0a920e76
    • Greg Bedwell's avatar
      Fix check-lit compatibility with multi-config CMake generators · fd2c3795
      Greg Bedwell authored
      Multi-configuration CMake generators such as those for Visual Studio or Xcode do not
      specify a build config at configure time, but let the user choose at build
      time.  In these cases binaries go into build/${Configuration}/bin rather than
      build/bin.  Prior to this commit, check-lit would fail when using multi-configuration
      generators as it did not know how to resolve ${Configuration} in order
      to find tools such as FileCheck.  This commit teaches it to resolve
      llvm_tools_dir within lit using the value specified with --param
      build_mode.
      
      Differential Revision: https://reviews.llvm.org/D36263
      
      llvm-svn: 309967
      fd2c3795
    • Teresa Johnson's avatar
      Disable loop peeling during full unrolling pass. · 9a18a6f0
      Teresa Johnson authored
      Summary:
      Peeling should not occur during the full unrolling invocation early
      in the pipeline, but rather later with partial and runtime loop
      unrolling. The later loop unrolling invocation will also eventually
      utilize profile summary and branch frequency information, which
      we would like to use to control peeling. And for ThinLTO we want
      to delay peeling until the backend (post thin link) phase, just as
      we do for most types of unrolling.
      
      Ensure peeling doesn't occur during the full unrolling invocation
      by adding a parameter to the shared implementation function, similar
      to the way partial and runtime loop unrolling are disabled.
      
      Performance results for ThinLTO suggest this has a neutral to positive
      effect on some internal benchmarks.
      
      Reviewers: chandlerc, davidxl
      
      Subscribers: mzolotukhin, llvm-commits, mehdi_amini
      
      Differential Revision: https://reviews.llvm.org/D36258
      
      llvm-svn: 309966
      9a18a6f0
    • Dehao Chen's avatar
      Do not want to use BFI to get profile count for sample pgo · f58df395
      Dehao Chen authored
      Summary: For SamplePGO, we already record the callsite count in the call instruction itself. So we do not want to use BFI to get profile count as it is less accurate.
      
      Reviewers: tejohnson, davidxl, eraman
      
      Reviewed By: eraman
      
      Subscribers: sanjoy, llvm-commits, mehdi_amini
      
      Differential Revision: https://reviews.llvm.org/D36025
      
      llvm-svn: 309964
      f58df395
    • Simon Pilgrim's avatar
      [X86] Adding a test for vector shuffle extractions. · 99d0ab38
      Simon Pilgrim authored
      When both the vector inputs of the shuffle vector is comprising of same vector or shuffle mask is accessing elements from only one operand vector (like in PR33758 test already present).
      
      Committed on behalf of @jbhateja (Jatin Bhateja)
      
      Differential Revision: https://reviews.llvm.org/D36271
      
      llvm-svn: 309963
      99d0ab38
    • Tim Northover's avatar
      Revert "[AArch64] Simplify AES*Tied pseudo expansion (NFC)." · 869fa74d
      Tim Northover authored
      This reverts commit r309821.
      
      My suggestion was wrong because it left the MachineOperands tied which
      confused the verifier. Since there's no easy way to untie operands, the
      original BuildMI solution is probably best.
      
      llvm-svn: 309962
      869fa74d
    • Simon Pilgrim's avatar
      [X86][AVX512] Tidied up v64i8 vector shuffle tests with triple · 0dfd4fa8
      Simon Pilgrim authored
      llvm-svn: 309961
      0dfd4fa8
    • Changpeng Fang's avatar
      AMDGPU/SI: Don't fix a PHI under uniform branch in SIFixSGPRCopies only when... · ef4dbb46
      Changpeng Fang authored
      AMDGPU/SI: Don't fix a PHI under uniform branch in SIFixSGPRCopies only when sources and destination are all sgprs
      
      Summary:
        If a PHI has at lease one VGPR operand, we have to fix the PHI
      in SIFixSGPRCopies.
      
      Reviewer:
        Matt
      
      Differential Revision:
        http://reviews.llvm.org/D34727
      
      llvm-svn: 309959
      ef4dbb46
    • Benjamin Kramer's avatar
      Fix use after free in unit test. · a73b4108
      Benjamin Kramer authored
      llvm-svn: 309952
      a73b4108
    • Nirav Dave's avatar
      [DAG] Allow merging of stores of vector loads · 3fc1c236
      Nirav Dave authored
      Remove restriction disallowing merging of stores vector loads into
      larger store of larger vector load.
      
      Reviewers: RKSimon, efriedma, spatel
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D36158
      
      llvm-svn: 309951
      3fc1c236
    • Nico Weber's avatar
      Revert r309923, it caused PR34045. · bfde70b0
      Nico Weber authored
      llvm-svn: 309950
      bfde70b0
    • Nirav Dave's avatar
      [TableGen] AsmMatcher: fix OpIdx computation when HasOptionalOperands is true · a0003984
      Nirav Dave authored
      Consider the following instruction: "inst.eq $dst, $src" where ".eq"
      is an optional flag operand.  The $src and $dst operands are
      registers.  If we parse the instruction "inst r0, r1", the flag is not
      present and it will be marked in the "OptionalOperandsMask" variable.
      After the matching is complete we call the "convertToMCInst" method.
      
      The current implementation works only if the optional operands are at
      the end of the array.  The "Operands" array looks like [token:"inst",
      reg:r0, reg:r1].  The first operand that must be added to the MCInst
      is the destination, the r0 register.  The "OpIdx" (in the Operands
      array) for this register is 2.  However, since the flag is not present
      in the Operands, the actual index for r0 should be 1.  The flag is not
      present since we rely on the default value.
      
      This patch removes the "NumDefaults" variable and replaces it with an
      array (DefaultsOffset).  This array contains an index for each operand
      (excluding the mnemonic).  At each index, the array contains the
      number of optional operands that should be subtracted.  For the
      previous example, this array looks like this: [0, 1, 1].  When we need
      to access the r0 register, we compute its index as 2 -
      DefaultsOffset[1] = 1.
      
      Patch by Alexandru Guduleasa!
      
      Reviewers: SamWot, nhaustov, niravd
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D35998
      
      llvm-svn: 309949
      a0003984
    • Sanjay Patel's avatar
      [NewGVN] fix typos; NFC · 7cf745cc
      Sanjay Patel authored
      llvm-svn: 309946
      7cf745cc
    • Sanjay Patel's avatar
      [BDCE] add tests to show invalid/incomplete transforms · c0fc1c0c
      Sanjay Patel authored
      llvm-svn: 309945
      c0fc1c0c
    • Florian Hahn's avatar
      [GlobalISel] Only merge memory ops for mayLoad or mayStore instrs. · 3bc3ec66
      Florian Hahn authored
      Summary:
      We only need to merge memory operands for instructions that access
       memory. This slightly reduces the number of actions executed. 
      
      Reviewers: MatzeB, rovka, dsanders
      
      Reviewed By: dsanders
      
      Subscribers: aemerson, igorb, kristof.beyls, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D36151
      
      llvm-svn: 309944
      3bc3ec66
    • Robert Lougher's avatar
      [LiveDebugVariables] Use lexical scope to trim debug value live intervals · 10f740df
      Robert Lougher authored
      The debug value live intervals computed by Live Debug Variables may extend
      beyond the range of the debug location's lexical scope. In this case,
      splitting of an interval can result in an interval outside of the scope being
      created, causing extra unnecessary DBG_VALUEs to be emitted. To prevent this,
      trim the intervals to the lexical scope.
      
      This resolves PR33730.
      
      Reviewers: aprantl
      
      Differential Revision: https://reviews.llvm.org/D35953
      
      llvm-svn: 309933
      10f740df
    • NAKAMURA Takumi's avatar
      Prune linefeed at eof. · 2c43dce3
      NAKAMURA Takumi authored
      llvm-svn: 309932
      2c43dce3
    • NAKAMURA Takumi's avatar
    • Simon Dardis's avatar
      [SelectionDAG] Resolve PR33978. · 51296593
      Simon Dardis authored
      rL306209 taught SelectionDAG how to add the dereferenceable flag when
      expanding memcpy and memmove. The fix however contained a nit where
      the offset + size was constructed as an APInt of PointerSize rather
      than PointerSizeInBits.
      
      This lead to isDereferenceableAndAlignedPointer() get truncated values or
      values which would be sign extended within that function leading to
      incorrect results.
      
      Thanks to Alex Crichton for reporting the issue!
      
      This resolves PR33978.
      
      Reviewers: inouehrs
      
      Differential Revision: https://reviews.llvm.org/D36236
      
      llvm-svn: 309930
      51296593
    • Max Kazantsev's avatar
      Removed unused variabled from unit test · cd50b5cb
      Max Kazantsev authored
      llvm-svn: 309929
      cd50b5cb
    • Ewan Crawford's avatar
      [Cloning] Move distinct GlobalVariable debug info metadata in CloneModule · e18490c8
      Ewan Crawford authored
      Duplicating the distinct Subprogram and CU metadata nodes seems like the incorrect thing to do in CloneModule for GlobalVariable debug info. As it results in the scope of the GlobalVariable DI no longer being consistent with the rest of the module, and the new CU is absent from llvm.dbg.cu.
      
      Fixed by adding RF_MoveDistinctMDs to MapMetadata flags for GlobalVariables.
      
      Current unit test IR after clone:
      ```
      @gv = global i32 1, comdat($comdat), !dbg !0, !type !5
      
      define private void @f() comdat($comdat) personality void ()* @persfn !dbg !14 {
      
      !llvm.dbg.cu = !{!10}
      
      !0 = !DIGlobalVariableExpression(var: !1)
      !1 = distinct !DIGlobalVariable(name: "gv", linkageName: "gv", scope: !2, file: !3, line: 1, type: !9, isLocal: false, isDefinition: true)
      !2 = distinct !DISubprogram(name: "f", linkageName: "f", scope: null, file: !3, line: 4, type: !4, isLocal: true, isDefinition: true, scopeLine: 3, isOptimized: false, unit: !6, variables: !5)
      !3 = !DIFile(filename: "filename.c", directory: "/file/dir/")
      !4 = !DISubroutineType(types: !5)
      !5 = !{}
      !6 = distinct !DICompileUnit(language: DW_LANG_C99, file: !7, producer: "CloneModule", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !5, globals: !8)
      !7 = !DIFile(filename: "filename.c", directory: "/file/dir")
      !8 = !{!0}
      !9 = !DIBasicType(tag: DW_TAG_unspecified_type, name: "decltype(nullptr)")
      !10 = distinct !DICompileUnit(language: DW_LANG_C99, file: !7, producer: "CloneModule", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !5, globals: !11)
      !11 = !{!12}
      !12 = !DIGlobalVariableExpression(var: !13)
      !13 = distinct !DIGlobalVariable(name: "gv", linkageName: "gv", scope: !14, file: !3, line: 1, type: !9, isLocal: false, isDefinition: true)
      !14 = distinct !DISubprogram(name: "f", linkageName: "f", scope: null, file: !3, line: 4, type: !4, isLocal: true, isDefinition: true, scopeLine: 3, isOptimized: false, unit: !10, variables: !5)
      ```
      
      Patched IR after clone:
      ```
      @gv = global i32 1, comdat($comdat), !dbg !0, !type !5
      
      define private void @f() comdat($comdat) personality void ()* @persfn !dbg !2 {
      
      !llvm.dbg.cu = !{!6}
      
      !0 = !DIGlobalVariableExpression(var: !1)
      !1 = distinct !DIGlobalVariable(name: "gv", linkageName: "gv", scope: !2, file: !3, line: 1, type: !9, isLocal: false, isDefinition: true)
      !2 = distinct !DISubprogram(name: "f", linkageName: "f", scope: null, file: !3, line: 4, type: !4, isLocal: true, isDefinition: true, scopeLine: 3, isOptimized: false, unit: !6, variables: !5)
      !3 = !DIFile(filename: "filename.c", directory: "/file/dir/")
      !4 = !DISubroutineType(types: !5)
      !5 = !{}
      !6 = distinct !DICompileUnit(language: DW_LANG_C99, file: !7, producer: "CloneModule", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !5, globals: !8)
      !7 = !DIFile(filename: "filename.c", directory: "/file/dir")
      !8 = !{!0}
      !9 = !DIBasicType(tag: DW_TAG_unspecified_type, name: "decltype(nullptr)")
      ```
      
      Reviewers: aprantl, probinson, dblaikie, echristo, loladiro
      Reviewed By: aprantl
      Subscribers: llvm-commits
      Differential Revision: https://reviews.llvm.org/D36082
      
      llvm-svn: 309928
      e18490c8
    • Diana Picus's avatar
      [ARM] GlobalISel: Select simple G_GLOBAL_VALUE instructions · 930e6ec8
      Diana Picus authored
      Add support in the instruction selector for G_GLOBAL_VALUE for ELF and
      MachO for the static relocation model. We don't handle Windows yet
      because that's Thumb-only, and we don't handle Thumb in general at the
      moment.
      
      Support for PIC, ROPI, RWPI and TLS will be added in subsequent commits.
      
      Differential Revision: https://reviews.llvm.org/D35883
      
      llvm-svn: 309927
      930e6ec8
    • Dinar Temirbulatov's avatar
      [X86] SET0 to use XMM registers where possible PR26018 PR32862 · a0beedef
      Dinar Temirbulatov authored
      Differential Revision: https://reviews.llvm.org/D35965
      
      llvm-svn: 309926
      a0beedef
    • Max Kazantsev's avatar
      [SCEV] Re-enable "Cache results of computeExitLimit" · 2cb36534
      Max Kazantsev authored
      The patch rL309080 was reverted because it did not clean up the cache on "forgetValue"
      method call. This patch re-enables this change, adds the missing check and introduces
      two new unit tests that make sure that the cache is cleaned properly.
      
      Differential Revision: https://reviews.llvm.org/D36087
      
      llvm-svn: 309925
      2cb36534
    • Daniel Sanders's avatar
    • Roger Ferrer Ibanez's avatar
      [ARM] Use ADDCARRY / SUBCARRY · 85498034
      Roger Ferrer Ibanez authored
      This patch:
      
      - makes nodes ISD::ADDCARRY and ISD::SUBCARRY legal for i32
      - lowering is done by first converting the boolean value into the carry flag
        using (_, C) <- (ARMISD::ADDC R, -1) and converted back to an integer value
        using (R, _) <- (ARMISD::ADDE 0, 0, C). An ARMISD::ADDE between the two
        operations does the actual addition.
      - for subtraction, given that ISD::SUBCARRY second result is actually a
        borrow, we need to invert the value of the second operand and result before
        and after using ARMISD::SUBE. We need to invert the carry result of
        ARMISD::SUBE to preserve the semantics.
      - given that the generic combiner may lower ISD::ADDCARRY and
        ISD::SUBCARRY into ISD::UADDO and ISD::USUBO we need to update their lowering
        as well otherwise i64 operations now would require branches. This implies
        updating the corresponding test for unsigned.
      - add new combiner to remove the redundant conversions from/to carry flags
        to/from boolean values (ARMISD::ADDC (ARMISD::ADDE 0, 0, C), -1) -> C
      
      Differential Revision: https://reviews.llvm.org/D35192
      
      llvm-svn: 309923
      85498034
    • Daniel Jasper's avatar
      Fix WebAssembly target after r309911. · 314ed201
      Daniel Jasper authored
      llvm-svn: 309922
      314ed201
    • Rafael Espindola's avatar
      Fix the ppc jit tests. · 27834695
      Rafael Espindola authored
      llvm-svn: 309921
      27834695
    • Tobias Grosser's avatar
      [unittest] Remove TODO comment which caused concern · bd351eff
      Tobias Grosser authored
      Remove the second part of the TODO comment that highlighted an issue with
      possibly connecting all nodes to the exit of the CFG. This caused concerns
      with Jakub Kuderski regarding its feasability, hence we remove it. Such
      points are better discussed outside of CFG. If connecting all nodes makes
      sense and what the impact is is currently part of an active review discussion.
      
      llvm-svn: 309919
      bd351eff
    • Rafael Espindola's avatar
      Add LLVM_FALLTHROUGH. · 8c549de7
      Rafael Espindola authored
      llvm-svn: 309918
      8c549de7
    • Sameer AbuAsal's avatar
      [RegisterCoalescer] Add wrapper for Erasing Instructions · c8befe68
      Sameer AbuAsal authored
      Summary:
            To delete an instruction the coalescer needs to call eraseFromParent()
            on the MachineInstr, insert it in the ErasedInstrs list and update the
            Live Ranges structure. This patch re-factors the code to do all that in
            one function. This will also fix cases where previous code wasn't
            inserting deleted instructions in the ErasedList.
      
      Reviewers: qcolombet, kparzysz
      
      Reviewed By: qcolombet
      
      Subscribers: MatzeB, llvm-commits, qcolombet
      
      Differential Revision: https://reviews.llvm.org/D36204
      
      llvm-svn: 309915
      c8befe68
    • Rafael Espindola's avatar
      Delete Default and JITDefault code models · 79e238af
      Rafael Espindola authored
      IMHO it is an antipattern to have a enum value that is Default.
      
      At any given piece of code it is not clear if we have to handle
      Default or if has already been mapped to a concrete value. In this
      case in particular, only the target can do the mapping and it is nice
      to make sure it is always done.
      
      This deletes the two default enum values of CodeModel and uses an
      explicit Optional<CodeModel> when it is possible that it is
      unspecified.
      
      llvm-svn: 309911
      79e238af
Loading