Skip to content
  1. Oct 12, 2017
    • Sanjay Patel's avatar
      [x86] replace isEqualTo with == for efficiency · 3a72909b
      Sanjay Patel authored
      This is a follow-up suggested in D37534.
      Patch by Yulia Koval.
      
      llvm-svn: 315589
      3a72909b
    • Simon Pilgrim's avatar
      [X86][SSE] Pull out repeated INSERT_VECTOR_ELT code from LowerBUILD_VECTOR... · 0903085e
      Simon Pilgrim authored
      [X86][SSE] Pull out repeated INSERT_VECTOR_ELT code from LowerBUILD_VECTOR v16i8/v8i16 insertion. NFCI.
      
      llvm-svn: 315587
      0903085e
    • Vlad Tsyrklevich's avatar
      [cfi-verify] Fix typo, actually check X86 target · 1d473652
      Vlad Tsyrklevich authored
      The typo in r315556 disabled the cfi-verify unit tests from building
      unconditionally, have it correctly check for the X86 target.
      
      llvm-svn: 315581
      1d473652
    • Diana Picus's avatar
      MachineInstr: Make isEqual agree with getHashValue in MachineInstrExpressionTrait · 4a5f522d
      Diana Picus authored
      MachineInstr::isIdenticalTo has a lot of logic for dealing with register
      Defs (i.e. deciding whether to take them into account or ignore them).
      This logic gets things wrong in some obscure cases, for instance if an
      operand is not a Def for both the current MI and the one we are
      comparing to.
      
      I'm not sure if it's possible for this to happen for regular register
      operands, but it may happen in the ARM backend for special operands
      which use sentinel values for the register (i.e. 0, which is neither a
      physical register nor a virtual one).
      
      This causes MachineInstrExpressionTrait::isEqual (which uses
      MachineInstr::isIdenticalTo) to return true for the following
      instructions, which are the same except for the fact that one sets the
      flags and the other one doesn't:
      %1114 = ADDrsi %1113, %216, 17, 14, _, def _
      %1115 = ADDrsi %1113, %216, 17, 14, _, _
      
      OTOH, MachineInstrExpressionTrait::getHashValue returns different values
      for the 2 instructions due to the different isDef on the last operand.
      In practice this means that when trying to add those instructions to a
      DenseMap, they will be considered different because of their different
      hash values, but when growing the map we might get an assertion while
      copying from the old buckets to the new buckets because isEqual
      misleadingly returns true.
      
      This patch makes sure that isEqual and getHashValue agree, by improving
      the checks in MachineInstr::isIdenticalTo when we are ignoring virtual
      register definitions (which is what the Trait uses). Firstly, instead of
      checking isPhysicalRegister, we use !isVirtualRegister, so that we cover
      both physical registers and sentinel values. Secondly, instead of
      checking MachineOperand::isReg, we use MachineOperand::isIdenticalTo,
      which checks isReg, isSubReg and isDef, which are the same values that
      the hash function uses to compute the hash.
      
      Note that the function is symmetric with this change, since if the
      current operand is not a Def, we check MachineOperand::isIdenticalTo,
      which returns false if the operands have different isDef's.
      
      Differential Revision: https://reviews.llvm.org/D38789
      
      llvm-svn: 315579
      4a5f522d
    • Daniel Jasper's avatar
      Reinstantiate old/bad deduplication logic that was removed in r315279. · 4d931202
      Daniel Jasper authored
      While this shouldn't be necessary anymore, we have cases where we run
      into the assertion below, i.e. cases with two non-fragment entries for the
      same variable at different frame indices.
      
      This should be fixed, but for now, we should revert to a version that
      does not trigger asserts.
      
      llvm-svn: 315576
      4d931202
    • NAKAMURA Takumi's avatar
      Fix warnings. [-Wdocumentation] · 12ab07e0
      NAKAMURA Takumi authored
      llvm-svn: 315573
      12ab07e0
    • Oliver Stannard's avatar
      [AsmParser] Suppress compile warning for targets with no register diags · dab52128
      Oliver Stannard authored
      This fixes the "switch statement contains 'default' but no 'case' labels"
      warnings in table-generated code introduced in r315295.
      
      llvm-svn: 315571
      dab52128
    • Hiroshi Inoue's avatar
      [ScheduleDAGInstrs] fix behavior of getUnderlyingObjectsForCodeGen when no... · b49b015b
      Hiroshi Inoue authored
      [ScheduleDAGInstrs] fix behavior of getUnderlyingObjectsForCodeGen when no identifiable object found
      
      This patch fixes the bug introduced in https://reviews.llvm.org/D35907; the bug is reported by http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20171002/491452.html.
      
      Before D35907, when GetUnderlyingObjects fails to find an identifiable object, allMMOsOkay lambda in getUnderlyingObjectsForInstr returns false and Objects vector is cleared. This behavior is unintentionally changed by D35907.
      
      This patch makes the behavior for such case same as the previous behavior.
      Since D35907 introduced a wrapper function getUnderlyingObjectsForCodeGen around GetUnderlyingObjects, getUnderlyingObjectsForCodeGen is modified to return a boolean value to ask the caller to clear the Objects vector.
      
      Differential Revision: https://reviews.llvm.org/D38735
      
      llvm-svn: 315565
      b49b015b
    • Mikael Holmen's avatar
      [RegisterCoalescer] Don't set read-undef in pruneValues, only clear · a079ef68
      Mikael Holmen authored
      Summary:
      The comments in the code said
      
       // Remove <def,read-undef> flags. This def is now a partial redef.
      
      but the code didn't just remove read-undef, it could introduce new ones which
      could cause errors.
      
      E.g. if we have something like
      
      %vreg1<def> = IMPLICIT_DEF
      %vreg2:subreg1<def, read-undef> = op %vreg3, %vreg4
      %vreg2:subreg2<def> = op %vreg6, %vreg7
      
      and we merge %vreg1 and %vreg2 then we should not set undef on the second subreg
      def, which the old code did.
      
      Now we solve this by actually do what the code comment says. We remove
      read-undef flags rather than remove or introduce them.
      
      Reviewers: qcolombet, MatzeB
      
      Reviewed By: MatzeB
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D38616
      
      llvm-svn: 315564
      a079ef68
    • Justin Bogner's avatar
      Re-commit "llvm-isel-fuzzer: Handle a subset of backend flags in the exec name" · 9ea7fbd1
      Justin Bogner authored
      Here we add a secondary option parser to llvm-isel-fuzzer (and provide
      it for use with other fuzzers). With this, you can copy the fuzzer to
      a name like llvm-isel-fuzzer=aarch64-gisel for a fuzzer that fuzzer
      AArch64 with GlobalISel enabled, or fuzzer=x86_64 to fuzz x86, with no
      flags required. This should be useful for running these in OSS-Fuzz.
      
      Note that this handrolls a subset of cl::opts to recognize, rather
      than embedding a complete command parser for argv[0]. If we find we
      really need the flexibility of handling arbitrary options at some
      point we can rethink this.
      
      This re-applies 315545 using "=" instead of ":" as a separator for
      arguments.
      
      llvm-svn: 315557
      9ea7fbd1
    • Vlad Tsyrklevich's avatar
      [cfi-verify] Fix unittest failures w/o x86 target · 85171866
      Vlad Tsyrklevich authored
      The llvm-cfi-verify unit tests fail if LLVM is built without the X86
      target, disable the unit tests from being built unless X86 is enabled
      for now.
      
      llvm-svn: 315556
      85171866
    • Hans Wennborg's avatar
      Revert r315545 "llvm-isel-fuzzer: Handle a subset of backend flags in the executable name" · 022829d8
      Hans Wennborg authored
      It broke some tests on Windows:
      
      Failing Tests (4):
          LLVM :: tools/llvm-isel-fuzzer/execname-options.ll
          LLVM :: tools/llvm-isel-fuzzer/missing-triple.ll
          LLVM :: tools/llvm-isel-fuzzer/x86-empty-bc.ll
          LLVM :: tools/llvm-isel-fuzzer/x86-empty.ll
      
      > llvm-isel-fuzzer: Handle a subset of backend flags in the executable name
      >
      > Here we add a secondary option parser to llvm-isel-fuzzer (and provide
      > it for use with other fuzzers). With this, you can copy the fuzzer to
      > a name like llvm-isel-fuzzer:aarch64-gisel for a fuzzer that fuzzer
      > AArch64 with GlobalISel enabled, or fuzzer:x86_64 to fuzz x86, with no
      > flags required. This should be useful for running these in OSS-Fuzz.
      >
      > Note that this handrolls a subset of cl::opts to recognize, rather
      > than embedding a complete command parser for argv[0]. If we find we
      > really need the flexibility of handling arbitrary options at some
      > point we can rethink this.
      
      llvm-svn: 315554
      022829d8
    • Hongbin Zheng's avatar
      [SimplifyIndVar] Replace IVUsers with loop invariant whenever possible · d36f2030
      Hongbin Zheng authored
      Differential Revision: https://reviews.llvm.org/D38415
      
      llvm-svn: 315551
      d36f2030
    • Justin Bogner's avatar
      docs: Add some links to OSS Fuzz · 8d85ced1
      Justin Bogner authored
      I'd left a couple of stray links here in a previous commit rather than
      writing a paragraph.
      
      llvm-svn: 315550
      8d85ced1
    • Justin Bogner's avatar
      docs: Try to fix sphinx build · 857ec155
      Justin Bogner authored
      llvm-svn: 315546
      857ec155
    • Justin Bogner's avatar
      llvm-isel-fuzzer: Handle a subset of backend flags in the executable name · a5969ce1
      Justin Bogner authored
      Here we add a secondary option parser to llvm-isel-fuzzer (and provide
      it for use with other fuzzers). With this, you can copy the fuzzer to
      a name like llvm-isel-fuzzer:aarch64-gisel for a fuzzer that fuzzer
      AArch64 with GlobalISel enabled, or fuzzer:x86_64 to fuzz x86, with no
      flags required. This should be useful for running these in OSS-Fuzz.
      
      Note that this handrolls a subset of cl::opts to recognize, rather
      than embedding a complete command parser for argv[0]. If we find we
      really need the flexibility of handling arbitrary options at some
      point we can rethink this.
      
      llvm-svn: 315545
      a5969ce1
    • Justin Bogner's avatar
      docs: Add some information about Fuzzing LLVM itself · fd5b2a08
      Justin Bogner authored
      This splits some content out of the libFuzzer docs and adds a fair
      amount of detail about the fuzzers in LLVM.
      
      llvm-svn: 315544
      fd5b2a08
    • Reid Kleckner's avatar
      Speculative build fix 2 · d925f983
      Reid Kleckner authored
      llvm-svn: 315542
      d925f983
    • Wei Mi's avatar
      Revert r307036 because of PR34919. · 1736efd1
      Wei Mi authored
      llvm-svn: 315540
      1736efd1
    • Reid Kleckner's avatar
    • Reid Kleckner's avatar
      [codeview] Disable FPO in functions using EH funclets · 29cfa6f1
      Reid Kleckner authored
      Funclets are emitted by WinException which doesn't have access to
      X86TargetStreamer so it's hard to make a quick fix for this.
      
      llvm-svn: 315538
      29cfa6f1
    • Zachary Turner's avatar
      Revert "[ADT] Make Twine's copy constructor private." · 41a9ee98
      Zachary Turner authored
      This reverts commit 4e4ee1c507e2707bb3c208e1e1b6551c3015cbf5.
      
      This is failing due to some code that isn't built on MSVC
      so I didn't catch.  Not immediately obvious how to fix this
      at first glance, so I'm reverting for now.
      
      llvm-svn: 315536
      41a9ee98
    • Reid Kleckner's avatar
      Fix AMDGPU build issue · c18c12e3
      Reid Kleckner authored
      llvm-svn: 315535
      c18c12e3
    • Reid Kleckner's avatar
      [X86] Sink X86AsmPrinter ctor into .cpp file, NFC · ec4ff24f
      Reid Kleckner authored
      I keep adding and removing code here, so let's sink it.
      
      llvm-svn: 315534
      ec4ff24f
    • Lang Hames's avatar
      [MC] Have MCObjectStreamer take its MCAsmBackend argument via unique_ptr. · 2241ffa4
      Lang Hames authored
      MCObjectStreamer owns its MCCodeEmitter -- this fixes the types to reflect that,
      and allows us to remove the last instance of MCObjectStreamer's weird "holding
      ownership via someone else's reference" trick.
      
      llvm-svn: 315531
      2241ffa4
    • Zachary Turner's avatar
      [ADT] Make Twine's copy constructor private. · 337462b3
      Zachary Turner authored
      There's a lot of misuse of Twine scattered around LLVM.  This
      ranges in severity from benign (returning a Twine from a function
      by value that is just a string literal) to pretty sketchy (storing
      a Twine by value in a class).  While there are some uses for
      copying Twines, most of the very compelling ones are confined
      to the Twine class implementation itself, and other uses are
      either dubious or easily worked around.
      
      This patch makes Twine's copy constructor private, and fixes up
      all callsites.
      
      Differential Revision: https://reviews.llvm.org/D38767
      
      llvm-svn: 315530
      337462b3
    • Vlad Tsyrklevich's avatar
      MC Helpers for llvm-cfi-verify. · 0ee26324
      Vlad Tsyrklevich authored
      Add instruction analysis and machinecode traversal helpers in
      preparation for control flow graph generation implementation.
      
      Reviewers: vlad.tsyrklevich
      
      Reviewed By: vlad.tsyrklevich
      
      Subscribers: mgorny, llvm-commits, pcc, kcc
      
      Differential Revision: https://reviews.llvm.org/D38424
      
      llvm-svn: 315528
      0ee26324
    • NAKAMURA Takumi's avatar
      bffdd9aa
    • Konstantin Zhuravlyov's avatar
      AMDGPU/NFC: Minor clean ups in HSA metadata · 516651b1
      Konstantin Zhuravlyov authored
        - Use HSA metadata streamer directly from AMDGPUAsmPrinter
        - Make naming consistent with PAL metadata
      
      Differential Revision: https://reviews.llvm.org/D38746
      
      llvm-svn: 315526
      516651b1
    • Konstantin Zhuravlyov's avatar
      AMDGPU/NFC: Minor clean ups in PAL metadata · c3beb6a0
      Konstantin Zhuravlyov authored
        - Move PAL metadata definitions to AMDGPUMetadata
        - Make naming consistent with HSA metadata
      
      Differential Revision: https://reviews.llvm.org/D38745
      
      llvm-svn: 315523
      c3beb6a0
    • Konstantin Zhuravlyov's avatar
      AMDGPU/NFC: Rename code object metadata as HSA metadata · a63b0f9d
      Konstantin Zhuravlyov authored
        - Rename AMDGPUCodeObjectMetadata to AMDGPUMetadata (PAL metadata will be included in this file in the follow up change)
        - Rename AMDGPUCodeObjectMetadataStreamer to AMDGPUHSAMetadataStreamer
        - Introduce HSAMD namespace
        - Other minor name changes in function and test names
      
      llvm-svn: 315522
      a63b0f9d
    • Hans Wennborg's avatar
      Support: Work around missing SetFileInformationByHandle on Wine · 17701ab5
      Hans Wennborg authored
      In r315079, fs::rename was reimplemented in terms of CreateFile and
      SetFileInformationByHandle. Unfortunately, the latter isn't supported by
      Wine. This adds a fallback to MoveFileEx for that case.
      
      Differential Revision: https://reviews.llvm.org/D38817
      
      llvm-svn: 315520
      17701ab5
  2. Oct 11, 2017
Loading