Skip to content
  1. Mar 30, 2021
    • Amara Emerson's avatar
      91887cd4
    • Sourabh Singh Tomar's avatar
      [DebugInfo] Support for signed constants inside DIExpression · f13f0505
      Sourabh Singh Tomar authored
      Negative numbers are represented using DW_OP_consts along with signed representation
      of the number as the argument.
      
      Test case IR is generated using Fortran front-end.
      
      Reviewed By: aprantl
      
      Differential Revision: https://reviews.llvm.org/D99273
      f13f0505
    • Eugene Zhulenev's avatar
      [mlir] Linalg: add tile interchange flag to test-linalg-codegen-strategy pass · 6c9fbcf5
      Eugene Zhulenev authored
      Interchange options was missing in the pass flags.
      
      Reviewed By: nicolasvasilache
      
      Differential Revision: https://reviews.llvm.org/D99397
      6c9fbcf5
    • spupyrev's avatar
      [SamplePGO] Keeping prof metadata for IndirectBrInst · 22998738
      spupyrev authored
      Currently prof metadata with branch counts is added only for BranchInst and SwitchInst, but not for IndirectBrInst. As a result, BPI/BFI make incorrect inferences for indirect branches, which can be very hot.
      This diff adds metadata for IndirectBrInst, in addition to BranchInst and SwitchInst.
      
      Reviewed By: wmi, wenlei
      
      Differential Revision: https://reviews.llvm.org/D99550
      22998738
    • Hongtao Yu's avatar
      [CSSPGO] Top-down processing order based on full profile. · 3e3fc431
      Hongtao Yu authored
      Use profiled call edges to augment the top-down order. There are cases that the top-down order computed based on the static call graph doesn't reflect real execution order. For example:
      
      1. Incomplete static call graph due to unknown indirect call targets. Adjusting the order by considering indirect call edges from the profile can enable the inlining of indirect call targets by allowing the caller processed before them.
      
      2. Mutual call edges in an SCC. The static processing order computed for an SCC may not reflect the call contexts in the context-sensitive profile, thus may cause potential inlining to be overlooked. The function order in one SCC is being adjusted to a top-down order based on the profile to favor more inlining.
      
      3. Transitive indirect call edges due to inlining. When a callee function is inlined into into a caller function in LTO prelink, every call edge originated from the callee will be transferred to the caller. If any of the transferred edges is indirect, the original profiled indirect edge, even if considered, would not enforce a top-down order from the caller to the potential indirect call target in LTO postlink since the inlined callee is gone from the static call graph.
      
      4. #3 can happen even for direct call targets, due to functions defined in header files. Header functions, when included into source files, are defined multiple times but only one definition survives due to ODR. Therefore, the LTO prelink inlining done on those dropped definitions can be useless based on a local file scope. More importantly, the inlinee, once fully inlined to a to-be-dropped inliner, will have no profile to consume when its outlined version is compiled. This can lead to a profile-less prelink compilation for the outlined version of the inlinee function which may be called from external modules. while this isn't easy to fix, we rely on the postlink AutoFDO pipeline to optimize the inlinee. Since the survived copy of the inliner (defined in headers) can be inlined in its local scope in prelink, it may not exist in the merged IR in postlink, and we'll need the profiled call edges to enforce a top-down order for the rest of the functions.
      
      Considering those cases, a profiled call graph completely independent of the static call graph is constructed based on profile data, where function objects are not even needed to handle case #3 and case 4.
      
      I'm seeing an average 0.4% perf win out of SPEC2017. For certain benchmark such as Xalanbmk and GCC, the win is bigger, above 2%.
      
      The change is an enhancement to https://reviews.llvm.org/D95988.
      
      Reviewed By: wmi, wenlei
      
      Differential Revision: https://reviews.llvm.org/D99351
      3e3fc431
    • John Brawn's avatar
      [clang][cli] Fix round-trip of OPT_plugin_arg · eae3b2a7
      John Brawn authored
      The test Frontend/plugin-delayed-template.cpp is failing when asserts
      are enabled because it hits an assertion in denormalizeStringImpl when
      trying to round-trip OPT_plugin_arg. Fix this by adjusting how the
      option is handled, as the first part is joined to -plugin-arg and the
      second is separate.
      
      Differential Revision: https://reviews.llvm.org/D99606
      eae3b2a7
    • Jessica Paquette's avatar
      [GlobalISel][AArch64] Combine G_SEXT_INREG + right shift -> G_SBFX · 70043112
      Jessica Paquette authored
      Basically a port of isBitfieldExtractOpFromSExtInReg in AArch64ISelDAGToDAG.
      
      This is only done post-legalization for now. Once the legalizer knows how to
      decompose these back into shifts, this requirement can probably be removed.
      
      Differential Revision: https://reviews.llvm.org/D99230
      70043112
    • Jonas Devlieghere's avatar
      e3d3327e
    • Mehdi Amini's avatar
      Add a "register_runtime" method to the mlir.execution_engine and show calling... · 7a4d6307
      Mehdi Amini authored
      Add a "register_runtime" method to the mlir.execution_engine and show calling back from MLIR into Python
      
      This exposes the ability to register Python functions with the JIT and
      exposes them to the MLIR jitted code. The provided test case illustrates
      the mechanism.
      
      Differential Revision: https://reviews.llvm.org/D99562
      7a4d6307
    • Nick Lewycky's avatar
      Add -disable-verify flag to llvm-link. · c8e56f39
      Nick Lewycky authored
      This flag allows the developer to see the result of linking even if it fails the verifier, as a step in debugging cases where the linked module fails the verifier.
      
      Differential Revision: https://reviews.llvm.org/D99382
      c8e56f39
    • Michał Górny's avatar
    • Craig Topper's avatar
      [RISCV] Pass 'half' in the lower 16 bits of an f32 value when F extension is... · a33fcafa
      Craig Topper authored
      [RISCV] Pass 'half' in the lower 16 bits of an f32 value when F extension is enabled, but Zfh is not.
      
      Without Zfh the half type isn't legal, but it could still be
      used as an argument/return in IR. Clang will not generate this today.
      
      Previously we promoted the half value to float for arguments and
      returns if the F extension is enabled but Zfh isn't. Then depending on
      which ABI is enabled we would pass it in either an FPR or a GPR in
      float format.
      
      If the F extension isn't enabled, it would get passed in the lower
      16 bits of a GPR in half format.
      
      With this patch the value will always in half format and will be
      in the lower bits of a GPR or FPR. This should be consistent
      with where the bits are located when Zfh is enabled.
      
      I've based this implementation off of how this is done on ARM.
      
      I've manually nan-boxed the value to 32 bits using integer ops.
      It looks like flw, fsw, fmv.s, fmv.w.x, fmf.x.w won't
      canonicalize nans so should leave the value alone. I think those
      are the instructions that could get used on this value.
      
      Reviewed By: kito-cheng
      
      Differential Revision: https://reviews.llvm.org/D98670
      a33fcafa
    • Amara Emerson's avatar
      [GlobalISel] Implement lowering for G_ROTR and G_ROTL. · f5e9be6f
      Amara Emerson authored
      This is a straightforward port.
      
      Differential Revision: https://reviews.llvm.org/D99449
      f5e9be6f
    • Tomas Matheson's avatar
      [NFC][CodeGen] Tidy up TargetRegisterInfo stack realignment functions · a9968c0a
      Tomas Matheson authored
      Currently needsStackRealignment returns false if canRealignStack returns false.
      This means that the behavior of needsStackRealignment does not correspond to
      it's name and description; a function might need stack realignment, but if it
      is not possible then this function returns false. Furthermore,
      needsStackRealignment is not virtual and therefore some backends have made use
      of canRealignStack to indicate whether a function needs stack realignment.
      
      This patch attempts to clarify the situation by separating them and introducing
      new names:
      
       - shouldRealignStack - true if there is any reason the stack should be
         realigned
      
       - canRealignStack - true if we are still able to realign the stack (e.g. we
         can still reserve/have reserved a frame pointer)
      
       - hasStackRealignment = shouldRealignStack && canRealignStack (not target
         customisable)
      
      Targets can now override shouldRealignStack to indicate that stack realignment
      is required.
      
      This change will make it easier in a future change to handle the case where we
      need to realign the stack but can't do so (for example when the register
      allocator creates an aligned spill after the frame pointer has been
      eliminated).
      
      Differential Revision: https://reviews.llvm.org/D98716
      
      Change-Id: Ib9a4d21728bf9d08a545b4365418d3ffe1af4d87
      a9968c0a
    • Nick Lewycky's avatar
      Remove dead CHECK-ERR line. · 9ca0b01e
      Nick Lewycky authored
      9ca0b01e
    • Craig Topper's avatar
      [RISCV] Don't set the SplatOperand flag on intrinsics that take a shift amount. · 292816d2
      Craig Topper authored
      The shift amount should always be a vector or an XLen scalar.
      The SplatOperand flag is used to indicate we need to legalize
      non-XLen scalars including special handling for i64 on RV32.
      This will prevent us from silently adjusting these operands if
      the intrinsics are misused.
      
      I'll probably adjust the name of the SplatOperand flag slightly
      in a follow up patch.
      
      Reviewed By: khchen, frasercrmck
      
      Differential Revision: https://reviews.llvm.org/D99545
      292816d2
    • Craig Topper's avatar
      [RISCV] Remove floating point condition code legalization from lowerFixedLengthVectorSetccToRVV. · f069000b
      Craig Topper authored
      After D98939, this is done by LegalizeVectorOps making this code dead.
      
      Reviewed By: frasercrmck
      
      Differential Revision: https://reviews.llvm.org/D99519
      f069000b
    • Pavel Labath's avatar
    • Pavel Labath's avatar
      [lldb] Add missing include in TestGdbRemote_vContThreads test · 97091866
      Pavel Labath authored
      should fix the arm builtbots.
      97091866
    • Pavel Labath's avatar
      [lldb] Fix TestStopOnSharedlibraryEvents.py on linux · bbae0665
      Pavel Labath authored
      and hopefully other ELF OSes. The problem was a missing "extra_images"
      startup argument (which ensures LD_LIBRARY_PATH is set properly).
      bbae0665
    • Guillaume Chatelet's avatar
      [libc] Fix msan/asan memcpy reentrancy · 77d81c22
      Guillaume Chatelet authored
      This is needed to prevent asan/msan instrumentation to redirect CopyBlock to `__asan_memcpy` (resp. `__msan_memcpy`).
      These functions would then differ operation to `memcpy` which leads to reentrancy issues.
      
      With this patch, `memcpy` is fully instrumented and covered by asan/msan.
      
      If this turns out to be too expensive, instrumentation can be selectively or fully disabled through the use of the `__attribute__((no_sanitize(address, memory)))` annotation.
      
      Differential Revision: https://reviews.llvm.org/D99598
      77d81c22
    • Thomas Preud'homme's avatar
      [test, ARM] Fix use of var defined in CHECK-NOT · a6950c33
      Thomas Preud'homme authored
      tries to check for the
          absence of a sequence of instructions with several CHECK-NOT with
      one of
          those directives using a variable defined in another.
      
      LLVM test CodeGenPrepare/ARM/sink-add-mul-shufflevector.ll tries to
      check for the absence of a sequence of instructions with several
      CHECK-NOT with one of those directives using a variable defined in
      another. However, CHECK-NOT are checked independently so that is using
      a variable defined in a pattern that should not occur in the input. The
      bug was then copied over in
      Transforms/CodeGenPrepare/ARM/sink-add-mul-shufflevector-inseltpoison.ll
      
      This commit removes the definition and uses of variable to check each
      line independently, making the check stronger than the current one.
      
      Reviewed By: dmgreen
      
      Differential Revision: https://reviews.llvm.org/D99597
      a6950c33
    • oToToT's avatar
      [Docs] Update googletest docs link. · 1363fb8c
      oToToT authored
      The documentation link of Google Test on GitHub have been moved to the
      top-level docs directory.
      Thus, the original link is invalid now.
      
      Reviewed By: Pavel Labath
      
      Differential Revision: https://reviews.llvm.org/D99559
      1363fb8c
    • Nico Rieck's avatar
      [clang-format] Fix east const pointer alignment of operators · bc4b0fc5
      Nico Rieck authored
      This patch fixes left pointer alignment after pointer qualifiers of
      operators. Currently "operator void const*()" is formatted with a space between
      const and pointer despite setting PointerAlignment to Left.
      
      AFAICS this has been broken since clang-format 10.
      
      Reviewed By: MyDeveloperDay, curdeius
      
      Differential Revision: https://reviews.llvm.org/D99458
      bc4b0fc5
    • Kevin Petit's avatar
      [OpenCL] Fix parsing of opencl-c.h in CL 3.0 · 9d25ce74
      Kevin Petit authored
      Ensure that the cl_khr_3d_image_writes pragma is enabled by making
      cl_khr_3d_image_writes an optional core feature in CL 3.0 in addition
      to being an available extension in 1.0 onwards and a core feature in
      CL 2.0.
      
      https://reviews.llvm.org/D99425
      
      
      
      Signed-off-by: default avatarKevin Petit <kevin.petit@arm.com>
      9d25ce74
    • Pavel Labath's avatar
      [lldb/test] Deflake TestGdbRemote_vContThreads even more · 04b766da
      Pavel Labath authored
      This patch fixes an issue, where if the thread has a signal blocked when
      we try to inject it into the process (via vCont), then instead of
      executing straight away, the injected signal will trigger another stop
      when the thread unblocks the signal.
      
      As (linux) threads start their life with SIGUSR1 (among others)
      disabled, and only enable it during initialization, injecting the signal
      during this window did not behave as expected. The fix is to change the
      test to ensure the signal gets injected with the signal unblocked.
      
      The simplest way to do this was to write a dedicated inferior for this
      test. I also created a new header to factor out the function retrieving
      the (os-specific) thread id.
      04b766da
    • Alexey Bataev's avatar
      bd334c79
    • Thomas Preud'homme's avatar
      [test, LoopVectorize] Fix use of var defined in CHECK-NOT · 8b5b03c2
      Thomas Preud'homme authored
      LLVM test Transforms/LoopVectorize/X86/x86-pr39099.ll tries to check for
      the absence of a sequence of instructions with several CHECK-NOT with
      one of those directives using a variable defined in another. However
      CHECK-NOT are checked independently so that is using a variable defined
      in a pattern that should not occur in the input.
      
      This commit only checks for the absence of a widened load which rules
      out the presence of the whole sequence and does not involve an undefined
      variable.
      
      Reviewed By: fhahn
      
      Differential Revision: https://reviews.llvm.org/D99583
      8b5b03c2
    • Inho Seo's avatar
      Added static verification for Linalg Ops. · f5846334
      Inho Seo authored
      This verification is to check if the indices for static shaped operands
      on linalgOps access out of bound memory or not. For dynamic shaped
      operands, we would be able to check it on runtime stage.
      
      Found several invalid Linalg ops testcases, and fixed them.
      
      Reviewed By: hanchung
      
      Differential Revision: https://reviews.llvm.org/D98390
      f5846334
    • Thomas Preud'homme's avatar
      [test, HardwareLoops] Fix use of var defined in CHECK-NOT · 80fb7434
      Thomas Preud'homme authored
      LLVM test Transforms/HardwareLoops/ARM/structure.ll tries to check for
      the absence of a sequence of instructions with several CHECK-NOT with
      one of those directives using a variable defined in another. However
      CHECK-NOT are checked independently so that is using a variable defined
      in a pattern that should not occur in the input.
      
      This commit only checks for the absence of llvm.loop.decrement.i32 which
      rules out the presence of the whole sequence and does not involve an
      undefined variable.
      
      Reviewed By: dmgreen
      
      Differential Revision: https://reviews.llvm.org/D99591
      80fb7434
    • Pavel Labath's avatar
      [lldb] Remove linux/mips debugging support · ce03a862
      Pavel Labath authored
      As discussed on lldb-dev
      <https://lists.llvm.org/pipermail/lldb-dev/2021-March/016777.html> the
      mips code is unmaintained and untested. It also carries a lot of
      technical debt which is not limited to mips-specific code.
      
      Generic mips support remains (and is going to be used by the upcoming
      freebsd code). Resurrecting mips support should be a matter of re-adding
      the relevant register context files (while avoiding reintroducing the
      debt).
      ce03a862
    • Sebastian Neubauer's avatar
      [AMDGPU] Remove outdated TODOs. NFC · 1c3b74f0
      Sebastian Neubauer authored
      spillSGPRToVGPR is already respected in these places since D95768.
      
      Differential Revision: https://reviews.llvm.org/D99570
      1c3b74f0
    • Michał Górny's avatar
      [lldb] [server] Support for multiprocess extension · 6c1a8039
      Michał Górny authored
      Add a minimal support for the multiprocess extension in lldb-server.
      The server indicates support for it via qSupported, and accepts
      thread-ids containing a PID.  However, it still does not support
      debugging more than one inferior, so any other PID value results
      in an error.
      
      Differential Revision: https://reviews.llvm.org/D98482
      6c1a8039
    • Valeriy Savchenko's avatar
    • Louis Dionne's avatar
      [libc++] Add a CI job to test the Runtimes build · 180e9e5e
      Louis Dionne authored
      Differential Revision: https://reviews.llvm.org/D97888
      180e9e5e
    • Valeriy Savchenko's avatar
      [analyzer] Support allocClassWithName in OSObjectCStyleCast checker · 90377308
      Valeriy Savchenko authored
      `allocClassWithName` allocates an object with the given type.
      The type is actually provided as a string argument (type's name).
      This creates a possibility for not particularly useful warnings
      from the analyzer.
      
      In order to combat with those, this patch checks for casts of the
      `allocClassWithName` results to types mentioned directly as its
      argument.  All other uses of this method should be reasoned about
      as before.
      
      rdar://72165694
      
      Differential Revision: https://reviews.llvm.org/D99500
      90377308
    • Gabor Marton's avatar
      [Analyzer] Track RValue expressions · efa7df16
      Gabor Marton authored
      It makes sense to track rvalue expressions in the case of special
      concrete integer values. The most notable special value is zero (later
      we may find other values). By tracking the origin of 0, we can provide a
      better explanation for users e.g. in case of division by 0 warnings.
      When the divisor is a product of a multiplication then now we can show
      which operand (or both) was (were) zero and why.
      
      Differential Revision: https://reviews.llvm.org/D99344
      efa7df16
    • Alexey Bataev's avatar
      [OPENMP]Fix PR48740: OpenMP declare reduction in C does not require an initializer · 1696b8ae
      Alexey Bataev authored
      If no initializer-clause is specified, the private variables will be
      initialized following the rules for initialization of objects with static
      storage duration.
      
      Need to adjust the implementation to the current version of the
      standard.
      
      Differential Revision: https://reviews.llvm.org/D99539
      1696b8ae
    • Martin Probst's avatar
      clang-format: [JS] do not collapse - - to --. · 2b30bd2b
      Martin Probst authored
      In JavaScript, `- -1;` is legal syntax, the language allows unary minus.
      However the two tokens must not collapse together: `--1` is prefix
      decrement, i.e. different syntax.
      
      Before:
      
          - -1; ==> --1;
      
      After:
      
          - -1; ==> - -1;
      
      This change makes no attempt to format this "nicely", given by all
      likelihood this represents a programming mistake by the user, or odd
      generated code.
      
      The check is not guarded by language: this appears to be a problem in
      Java as well, and will also be beneficial when formatting syntactically
      incorrect C++ (e.g. during editing).
      
      Differential Revision: https://reviews.llvm.org/D99495
      2b30bd2b
    • LLVM GN Syncbot's avatar
      [gn build] Port c51e91e0 · 69473d68
      LLVM GN Syncbot authored
      69473d68
Loading