1. Oct 26, 2019
    • Vedant Kumar's avatar
      [Driver] Force llvm to install its handlers before lldb's · 0877dd14
      Vedant Kumar authored
      Install llvm's signal handlers up front to prevent lldb's handlers from being
      ignored. This is (hopefully) a stopgap workaround.
      
      When lldb invokes an llvm API that installs signal handlers (e.g.
      llvm::sys::RemoveFileOnSignal, possibly via a compiler embedded within lldb),
      lldb's signal handlers are overriden if llvm is installing its handlers for the
      first time.
      
      To work around llvm's behavior, force it to install its handlers up front, and
      *then* install lldb's handlers. In practice this is used to prevent lldb test
      processes from exiting due to IO_ERR when SIGPIPE is received.
      
      Note that when llvm installs its handlers, it 1) records the old handlers it
      replaces and 2) re-installs the old handlers when its new handler is invoked.
      That means that a signal not explicitly handled by lldb can fall back to being
      handled by llvm's handler the first time it is received, and then by the
      default handler the second time it is received.
      
      Differential Revision: https://reviews.llvm.org/D69403
      0877dd14
    • Vedant Kumar's avatar
      72105b9d
    • Craig Topper's avatar
      [X86] Add a check for SSE2 to the top of combineReductionToHorizontal. · 3dd0a896
      Craig Topper authored
      Without this, we can create a PSADBW node that isn't legal.
      3dd0a896
    • Sanjay Patel's avatar
      [DAGCombiner] widen zext of popcount based on target support · e6c145e0
      Sanjay Patel authored
      zext (ctpop X) --> ctpop (zext X)
      
      This is a prerequisite step for canonicalizing in the other direction (narrow the popcount) in IR - PR43688:
      https://bugs.llvm.org/show_bug.cgi?id=43688
      
      I'm not sure if any other targets are affected, but I found a missing fold for PPC, so added tests based on that.
      The reason we widen all the way to 64-bit in these tests is because the initial DAG looks something like this:
      
        t5: i8 = ctpop t4
        t6: i32 = zero_extend t5  <-- created based on IR, but unused node?
          t7: i64 = zero_extend t5
      
      Differential Revision: https://reviews.llvm.org/D69127
      e6c145e0
    • Austin Kerbow's avatar
      AMDGPU/GlobalISel: Legalize FDIV16 · c35b358b
      Austin Kerbow authored
      Reviewers: arsenm
      
      Reviewed By: arsenm
      
      Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, rovka, dstuttard, tpr, t-tye, hiraditya, volkan, Petar.Avramovic, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D69347
      c35b358b
    • Sterling Augustine's avatar
      Crt files are special cased by name when dealing with ctor and dtor · 118ceea5
      Sterling Augustine authored
      sections, but the current code misses certain variants. In particular, those
      named when clang takes the code path in
      clang/lib/Driver/ToolChain.cpp:416, where crtfiles are named:
      
      clang_rt.<component>-<arch>-<env>.<suffix>
      
      Previously, the code only handled:
      clang_rt.<component>.<suffix>
      <component>.<suffix>
      
      This revision fixes that.
      118ceea5
    • Jon Chesterfield's avatar
      [NFC][libomptarget] move remaining device specific code out of omptarget-nvptx.h · 197b7b24
      Jon Chesterfield authored
      Summary:
      [NFC][libomptarget] move remaining device specific code out of omptarget-nvptx.h
      
      Strictly there is one remaining difference wrt amdgcn - parallelLevel is
      volatile qualified on amdgcn and not on nvptx. Determining whether this is
      correct - and how to represent the different semantics of 'volatile' under
      various conditions - is beyond the scope of this code motion patch.
      
      Reviewers: ABataev, jdoerfert, grokos
      
      Subscribers: openmp-commits
      
      Tags: #openmp
      
      Differential Revision: https://reviews.llvm.org/D69424
      197b7b24
    • Pavel Labath's avatar
      ValueObject: Fix a crash related to children address type computation · 96601ec2
      Pavel Labath authored
      Summary:
      This patch fixes a crash encountered when debugging optimized code. If some
      variable has been completely optimized out, but it's value is nonetheless known,
      the compiler can replace it with a DWARF expression computing its value. The
      evaluating these expressions results in a eValueTypeHostAddress Value object, as
      it's contents are computed into an lldb buffer. However, any value that is
      obtained by dereferencing pointers in this object should no longer have the
      "host" address type.
      
      Lldb had code to account for this, but it was only present in the
      ValueObjectVariable class. This wasn't enough when the object being described
      was a struct, as then the object holding the actual pointer was a
      ValueObjectChild. This caused lldb to dereference the contained pointer in the
      context of the host process and crash.
      
      Though I am not an expert on ValueObjects, it seems to me that this children
      address type logic should apply to all types of objects (and indeed, applying
      applying the same logic to ValueObjectChild fixes the crash). Therefore, I move
      this code to the base class, and arrange it to be run everytime the value is
      updated.
      
      The test case is a reduced and simplified version of the original debug info
      triggering the crash. Originally we were dealing with a local variable, but as
      these require a running process to display, I changed it to use a global one
      instead.
      
      Reviewers: jingham, clayborg
      
      Subscribers: aprantl, lldb-commits
      
      Differential Revision: https://reviews.llvm.org/D69273
      96601ec2
    • Philip Reames's avatar
    • David Goldman's avatar
      [Sema][Typo Correction] Fix another infinite loop on ambiguity · 7a2b704b
      David Goldman authored
      See also: D67515
      
      - For the given call expression we would end up repeatedly
         trying to transform the same expression over and over again
      
      - Fix is to keep the old TransformCache when checking for ambiguity
      
      Differential Revision: https://reviews.llvm.org/D69060
      7a2b704b
    • Jonas Devlieghere's avatar
      [TableGen] Add asserts to make sure default values match property type · 5934cd11
      Jonas Devlieghere authored
      This adds a few asserts to the property TableGen backend to prevent
      mismatches between property types and their default values. This
      would've prevented a copy-paste mistake we discovered downstream.
      5934cd11
    • Kevin P. Neal's avatar
      [FPEnv] Teach the IRBuilder about correct use of the strictfp attribute. · de798363
      Kevin P. Neal authored
      The IRBuilder needs to add the strictfp attribute to function
      definitions and calls when constrained floating point is enabled.
      
      Since so far all front ends have had to do is flip the constrained
      switch, I've made this patch always add the required attributes
      when said constrained switch is enabled. This continues to keep
      changes to front ends minimal.
      
      Differential Revision: D69312
      de798363
    • LLVM GN Syncbot's avatar
      gn build: Merge 8e567b07 · a153233c
      LLVM GN Syncbot authored
      a153233c
    • Louis Dionne's avatar
      [libcxx] [test] Run `chmod +x` on executables when testing via SSH · fd667b86
      Louis Dionne authored
      When running libc++ tests on a remote machine via SSH, we can encounter
      a 'Permission denied' error.
      
      Fix this with plain old 'chmod +x <executable>'.
      
      Thanks to Sergej Jaskiewicz for the patch.
      
      Differential Revision: https://reviews.llvm.org/D69170
      fd667b86
    • Sanjay Patel's avatar
      [PowerPC] add test for popcnt with any_extend; NFC · b74d7e5c
      Sanjay Patel authored
      A zext-specific variation of this case is proposed in D69127.
      b74d7e5c
    • Kadir Cetinkaya's avatar
    • Amy Huang's avatar
      Add an instruction marker field to the ExtraInfo in MachineInstrs. · b85b4e5a
      Amy Huang authored
      Summary:
      Add instruction marker to MachineInstr ExtraInfo. This does almost the
      same thing as Pre/PostInstrSymbols, except that it doesn't create a label until
      printing instructions. This allows for labels to be put around instructions that
      are deleted/duplicated somewhere.
      
      Also undo the workaround in r375137.
      
      Reviewers: rnk
      
      Subscribers: MatzeB, hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D69136
      b85b4e5a
  2. Oct 25, 2019