1. Dec 01, 2020
  2. Nov 30, 2020
    • Sanjay Patel's avatar
      [IR] improve code comment/logic in removePredecessor(); NFC · 1dc38f8c
      Sanjay Patel authored
      This was suggested in the post-commit review of ce134da4.
      1dc38f8c
    • Raphael Isemann's avatar
      [lldb] Always include template arguments that have their default value in the internal type name · e0e7bbeb
      Raphael Isemann authored
      Our type formatters/summaries match on the internal type name we generate in LLDB for Clang types.
      
      These names were generated using Clang's default printing policy. However Clang's
      default printing policy got tweaked over the last month to make the generated type
      names more readable (by for example excluding inline/anonymous namespaces and
      removing template arguments that have their default value). This broke the formatter
      system where LLDB's matching logic now no longer can format certain types as
      the new type names generated by Clang's default printing policy no longer match
      the type names that LLDB/the user specified.
      
      I already introduced LLDB's own type printing policy and fixed the inline/anonymous
      namespaces in da121fff (just to get the
      test suite passing again).
      
      This patch is restoring the old type printing behaviour where always include the template
      arguments in the internal type name (even if they match the default args). This should get
      template type formatters/summaries working again in the rare situation where we do
      know template default arguments within LLDB. This can only happen when either having
      a template that was parsed in the expression parser or when we get type information from a C++ module.
      
      The Clang change that removed defaulted template arguments from Clang's printing policy was
      e7f3e210
      
      Reviewed By: labath
      
      Differential Revision: https://reviews.llvm.org/D92311
      e0e7bbeb
    • Sanjay Patel's avatar
      Revert "[IR][LoopRotate] avoid leaving phi with no operands (PR48296)" · 355aee3d
      Sanjay Patel authored
      This reverts commit bfd2c216.
      This appears to be causing stage2 msan failures on buildbots:
        FAIL: LLVM :: Transforms/SimplifyCFG/X86/bug-25299.ll (65872 of 71835)
        ******************** TEST 'LLVM :: Transforms/SimplifyCFG/X86/bug-25299.ll' FAILED ********************
        Script:
        --
        : 'RUN: at line 1';   /b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/opt < /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/Transforms/SimplifyCFG/X86/bug-25299.ll -simplifycfg -S | /b/sanitizer-x86_64-linux-fast/build/llvm_build_msan/bin/FileCheck /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/Transforms/SimplifyCFG/X86/bug-25299.ll
        --
        Exit Code: 2
        Command Output (stderr):
        --
        ==87374==WARNING: MemorySanitizer: use-of-uninitialized-value
            #0 0x9de47b6 in getBasicBlockIndex /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/IR/Instructions.h:2749:5
            #1 0x9de47b6 in simplifyCommonResume /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Transforms/Utils/SimplifyCFG.cpp:4112:23
            #2 0x9de47b6 in simplifyResume /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Transforms/Utils/SimplifyCFG.cpp:4039:12
            #3 0x9de47b6 in (anonymous namespace)::SimplifyCFGOpt::simplifyOnce(llvm::BasicBlock*) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Transforms/Utils/SimplifyCFG.cpp:6330:16
            #4 0x9dcca13 in run /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Transforms/Utils/SimplifyCFG.cpp:6358:16
            #5 0x9dcca13 in llvm::simplifyCFG(llvm::BasicBlock*, llvm::TargetTransformInfo const&, llvm::SimplifyCFGOptions const&, llvm::SmallPtrSetImpl<llvm::BasicBlock*>*) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Transforms/Utils/SimplifyCFG.cpp:6369:8
            #6 0x974643d in iterativelySimplifyCFG(
      355aee3d
    • Nicolas Vasilache's avatar
    • Ben Dunbobbin's avatar
      [windows-itanium] handle dllimport/export code paths separately and share with PS4 · d5aaf602
      Ben Dunbobbin authored
      Similar to Windows Itanium, PS4 is also an Itanium C++ ABI variant
      which shares the goal of semantic compatibility with Microsoft C++
      code that uses dllimport/export.
      
      This change introduces a new function to determine from the triple
      if an environment aims for compatibility with MS C++ code w.r.t to
      these attributes and guards the relevant code paths using that
      function.
      
      Differential Revision: https://reviews.llvm.org/D90299
      d5aaf602
    • Nico Weber's avatar
      [lld-macho] Implement -fatal_warnings · c0e4020c
      Nico Weber authored
      Differential Revision: https://reviews.llvm.org/D91894
      c0e4020c
    • Sanjay Patel's avatar
      [IR][LoopRotate] avoid leaving phi with no operands (PR48296) · bfd2c216
      Sanjay Patel authored
      https://llvm.org/PR48296 shows an example where we delete all of the operands
      of a phi without actually deleting the phi, and that is currently considered
      invalid IR. The reduced test included here would crash for that reason.
      
      A suggested follow-up is to loosen the assert to allow 0-operand phis
      in unreachable blocks.
      
      Differential Revision: https://reviews.llvm.org/D92247
      bfd2c216
    • Dmitri Gribenko's avatar
      Add 'asserts' requiremnt to test/CodeGen/ARM/cortex-a57-misched-mla.mir · 234a5297
      Dmitri Gribenko authored
      '-debug-only=machine-scheduler' only works when asserts are enabled.
      234a5297
    • Pedro Tammela's avatar
      [LLDB/Lua] add support for one-liner breakpoint callback · a0d7406a
      Pedro Tammela authored
      These callbacks are set using the following:
         breakpoint command add -s lua -o "print('hello world!')"
      
      The user supplied script is executed as:
         function (frame, bp_loc, ...)
            <body>
         end
      
      So the local variables 'frame', 'bp_loc' and vararg are all accessible.
      Any global variables declared will persist in the Lua interpreter.
      A user should never hold 'frame' and 'bp_loc' in a global variable as
      these userdatas are context dependent.
      
      Differential Revision: https://reviews.llvm.org/D91508
      a0d7406a
    • Juneyoung Lee's avatar
      [LangRef] missing link, minor fix · 8e504615
      Juneyoung Lee authored
      8e504615
    • Juneyoung Lee's avatar
      [ConstantFold] Don't fold and/or i1 poison to poison (NFC) · 9c49dcc3
      Juneyoung Lee authored
      .. because it causes miscompilation when combined with select i1 -> and/or.
      
      It is the select fold which is incorrect; but it is costly to disable the fold, so hack this one.
      
      D92270
      9c49dcc3
    • David Spickett's avatar
      [llvm-objdump] Require x86 target for mcpu/attr test · c3d48467
      David Spickett authored
      This fixes test failure on clang-cmake-armv7-quick bot
      with change c2ead57c.
      
      This bot only builds Arm/AArch64 targets.
      c3d48467
    • Simon Pilgrim's avatar
    • Nico Weber's avatar
      [lld/mac] Add --reproduce option · 83e60f5a
      Nico Weber authored
      This adds support for ld.lld's --reproduce / lld-link's /reproduce:
      flag to the MachO port. This flag can be added to a link command
      to make the link write a tar file containing all inputs to the link
      and a response file containing the link command. This can be used
      to reproduce the link on another machine, which is useful for sharing
      bug report inputs or performance test loads.
      
      Since the linker is usually called through the clang driver and
      adding linker flags can be a bit cumbersome, setting the env var
      `LLD_REPRODUCE=foo.tar` triggers the feature as well.
      
      The file response.txt in the archive can be used with
      `ld64.lld.darwinnew $(cat response.txt)` as long as the contents are
      smaller than the command-line limit, or with `ld64.lld.darwinnew
      @response.txt` once D92149 is in.
      
      The support in this patch is sufficient to create a tar file for
      Chromium's base_unittests that can link after unpacking on a different
      machine.
      
      Differential Revision: https://reviews.llvm.org/D92274
      83e60f5a
    • Hans Wennborg's avatar
      25d54abc
    • Nico Weber's avatar
      [mac/lld] Add support for response files · d20abb1e
      Nico Weber authored
      ld64 learned about them in Xcode 12, so we should too.
      
      Differential Revision: https://reviews.llvm.org/D92149
      d20abb1e
    • Kazushi (Jam) Marukawa's avatar
      [VE] Optimize prologue/epilogue instructions · 686988a5
      Kazushi (Jam) Marukawa authored
      Optimize eliminate FP mechanism.  This time optimize a function which has
      no call but fixed stack objects.  LLVM eliminates FP on such functions now.
      Also, optimize GOT/PLT registers save/restore instructions if a given
      function doesn't uses them.  In addition, remove generating mechanism of
      `.cfi` instructions since those are taken from other architectures and not
      inspected yet.  Update regression tests, also.
      
      Reviewed By: simoll
      
      Differential Revision: https://reviews.llvm.org/D92251
      686988a5
    • Hans Wennborg's avatar