1. Jan 19, 2022
    • Terry Wilmarth's avatar
      [OpenMP] Add use of TPAUSE · 2e02579a
      Terry Wilmarth authored
      Add use of TPAUSE (from WAITPKG) to the runtime for Intel hardware,
      with an envirable to turn it on in a particular C-state.  Always uses
      TPAUSE if it is selected and enabled by Intel hardware and presence of
      WAITPKG, and if not, falls back to old way of checking
      __kmp_use_yield, etc.
      
      Differential Revision: https://reviews.llvm.org/D115758
      2e02579a
    • Alex Zinenko's avatar
      [mlir] handle nested regions in llvm-legalize-for-export · 1ad48d6d
      Alex Zinenko authored
      The translation from the MLIR LLVM dialect to LLVM IR includes a mechanism that
      ensures the successors of a block to be different blocks in case block
      arguments are passed to them since the opposite cannot be expressed in LLVM IR.
      This mechanism previously only worked for functions because it was written
      prior to the introduction of other region-carrying operations such as the
      OpenMP dialect, which also translates directly to LLVM IR. Modify this
      mechanism to handle all regions in the module and not only functions.
      
      Reviewed By: wsmoses
      
      Differential Revision: https://reviews.llvm.org/D117548
      1ad48d6d
    • Alex Zinenko's avatar
      Revert "[mlir] fix crash in PybindAdaptors.h" · 7b1ceee6
      Alex Zinenko authored
      This reverts commit 289021a4.
      7b1ceee6
    • Nikita Popov's avatar
      [DebugInstrRef] Use DenseMap for ValueToLoc (NFC) · cbaae614
      Nikita Popov authored
      Just replacing std::map with DenseMap here is a major regression
      -- because this code used an identity hash for ValueIDNum.
      Because ValueIDNum is composed of multiple components, it is
      important that we use a reasonably good hash function here, so
      switch it to hash_value. DenseMapInfo::getHashValue<uint64_t>
      would not be sufficient.
      
      This gives a -0.8% geomean improvement on CTMark ReleaseLTO-g.
      cbaae614
  2. Jan 18, 2022
    • Louis Dionne's avatar
      [libc++] Persistently cache memoized operations during Lit configuration · 4afa9c17
      Louis Dionne authored
      When invoking Lit repeatedly, we perform all the configuration checks
      over and over again, which takes a lot of time. This patch allows caching
      the result of configuration checks persistently across Lit invocations to
      speed this up.
      
      In theory, this should still be functionally correct since the cache
      key should contain everything that determines the output of the
      configuration check. However, in cases where e.g. the compiler has
      changed but is at the same path as previously, the Lit configuration
      checks will be cached even though technically the cache should have
      been invalidated.
      
      Differential Revision: https://reviews.llvm.org/D117361
      4afa9c17
    • Simon Pilgrim's avatar
      [X86] getTargetShuffleInputs - ensure we limit the maximum recursion depth to... · ce2345d8
      Simon Pilgrim authored
      [X86] getTargetShuffleInputs - ensure we limit the maximum recursion depth to match SelectionDAG::MaxRecursionDepth
      
      Regressions were pre-handled by rG62e36b12
      
      Fixes Issue #52960
      ce2345d8
    • Stanislav Gatev's avatar
      [clang][dataflow] Remove obsolete FIXME · d7c19f94
      Stanislav Gatev authored
      The FIXME is no longer relevant as ControlFlowContext centralizes the
      construction of the CFG.
      
      This is part of the implementation of the dataflow analysis framework.
      See "[RFC] A dataflow analysis framework for Clang AST" on cfe-dev.
      
      Reviewed-by: xazax.hun
      
      Differential Revision: https://reviews.llvm.org/D117563
      d7c19f94
    • Simon Pilgrim's avatar
      [X86] canLowerByDroppingEvenElements - generalize to drop even or odd elements · 62e36b12
      Simon Pilgrim authored
      This allows us to match shuffle<1,3,5,7,9,11,13,15> style shift+trunc/pack patterns as well as the existing shuffle<0,2,4,6,8,10,12,14> style shuffle trunc/pack patterns
      
      In the future, interleaving patterns might benefit from an even more general implementation for higher strides
      62e36b12
    • Endre Fülöp's avatar
      [analyzer][NFC] Refactor GenericTaintChecker to use CallDescriptionMap · 17f74240
      Endre Fülöp authored
      GenericTaintChecker now uses CallDescriptionMap to describe the possible
      operation in code which trigger the introduction (sources), the removal
      (filters), the passing along (propagations) and detection (sinks) of
      tainted values.
      
      Reviewed By: steakhal, NoQ
      
      Differential Revision: https://reviews.llvm.org/D116025
      17f74240
    • Jan Svoboda's avatar
      [clang][lex] NFC: Simplify calls to `LookupFile` · 105c9131
      Jan Svoboda authored
      The `{HeaderSearch,Preprocessor}::LookupFile()` functions take an out-parameter `const DirectoryLookup *&`. Most callers end up creating a `const DirectoryLookup *` variable that's otherwise unused.
      
      This patch changes the out-parameter from reference to a pointer, making it possible to simply pass `nullptr` to the function without the ceremony.
      
      Reviewed By: ahoppen
      
      Differential Revision: https://reviews.llvm.org/D117312
      105c9131
    • Jan Svoboda's avatar
      [clang] NFC: Remove unused `DirectoryLookup` · 8b21e074
      Jan Svoboda authored
      This patch removes bitrotten/dead uses of `DirectoryLookup` in `InclusionRewriter.cpp`.
      
      Reviewed By: ahoppen
      
      Differential Revision: https://reviews.llvm.org/D117309
      8b21e074
    • Vang Thao's avatar
      [MachineSink] Allow sinking of constant or ignorable physreg uses · 10ed1eca
      Vang Thao authored
      For AMDGPU, any use of the physical register EXEC prevents sinking even if it is not a real physical register read. Add check to see if a physical
      register use can be ignored for sinking.
      
      Also perform same constant and ignorable physical register check when considering sinking in loops.
      
      https://reviews.llvm.org/D116053
      10ed1eca
    • Qichao Gu's avatar
      [Driver] Pass the flag -dI to cc1 invocation · 67ac3f1f
      Qichao Gu authored
      Hook up the flag -dI in the driver to pass it to cc1 invocation.
      
      Differential Revision: https://reviews.llvm.org/D117292
      67ac3f1f
    • Denys Petrov's avatar
      [analyzer] Produce SymbolCast symbols for integral types in SValBuilder::evalCast · d835dd4c
      Denys Petrov authored
      Summary: Produce SymbolCast for integral types in `evalCast` function. Apply several simplification techniques while producing the symbols. Added a boolean option `handle-integral-cast-for-ranges` under `-analyzer-config` flag. Disabled the feature by default.
      
      Differential Revision: https://reviews.llvm.org/D105340
      d835dd4c
    • Pavel Labath's avatar
      [lldb] Delete TestStopReplyContainsThreadPcs · 7f4d66f2
      Pavel Labath authored
      This was meant to be a replacement for the lldb-server sub-test suite of
      the API tests, but it never got off the ground and it's making the
      windows bot flaky.
      
      Deleting it does not reduce test coverage as the original api test is
      still around.
      7f4d66f2
    • Florian Hahn's avatar
      Revert "[AArch64] Revive optimize add/sub with immediate through MIPeepholeOpt" · 62476c7c
      Florian Hahn authored
      This reverts commit e6698f09.
      
      This commit appears to introduce new machine verifier failures when
      building the llvm-test-suite with `-mllvm -verify-machineinstrs` enabled:
      
      https://green.lab.llvm.org/green/job/test-suite-verify-machineinstrs-aarch64-O3/11061/
      
      FAILED: MultiSource/Benchmarks/Olden/health/CMakeFiles/health.dir/health.c.o
      /Users/buildslave/jenkins/workspace/test-suite-verify-machineinstrs-aarch64-O3/test-suite-build/tools/timeit --summary MultiSource/Benchmarks/Olden/health/CMakeFiles/health.dir/health.c.o.time /Users/buildslave/jenkins/workspace/test-suite-verify-machineinstrs-aarch64-O3/compiler/bin/clang -DNDEBUG  -B /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin    -Wno-unused-command-line-argument -mllvm -verify-machineinstrs -O3 -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.5.sdk   -w -Werror=date-time -DTORONTO -MD -MT MultiSource/Benchmarks/Olden/health/CMakeFiles/health.dir/health.c.o -MF MultiSource/Benchmarks/Olden/health/CMakeFiles/health.dir/health.c.o.d -o MultiSource/Benchmarks/Olden/health/CMakeFiles/health.dir/health.c.o   -c /Users/buildslave/jenkins/workspace/test-suite-verify-machineinstrs-aarch64-O3/test-suite/MultiSource/Benchmarks/Olden/health/health.c
      *** Bad machine code: Illegal virtual register for instruction ***
      - function:    alloc_tree
      - basic block: %bb.1 if.else (0x7fc0db8f8bb0)
      - instruction: %31:gpr64 = nsw MADDXrrr killed %39:gpr64sp, killed %25:gpr64, $xzr
      - operand 1:   killed %39:gpr64sp
      Expected a GPR64 register, but got a GPR64sp register
      fatal error: error in backend: Found 1 machine code errors.
      PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
      Stack dump:
      0.	Program arguments: /Users/buildslave/jenkins/workspace/test-suite-verify-machineinstrs-aarch64-O3/compiler/bin/clang -DNDEBUG -B /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin -Wno-unused-command-line-argument -mllvm -verify-machineinstrs -O3 -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.5.sdk -w -Werror=date-time -DTORONTO -MD -MT MultiSource/Benchmarks/Olden/health/CMakeFiles/health.dir/health.c.o -MF MultiSource/Benchmarks/Olden/health/CMakeFiles/health.dir/health.c.o.d -o MultiSource/Benchmarks/Olden/health/CMakeFiles/health.dir/health.c.o -c /Users/buildslave/jenkins/workspace/test-suite-verify-machineinstrs-aarch64-O3/test-suite/MultiSource/Benchmarks/Olden/health/health.c
      1.	<eof> parser at end of file
      2.	Code generation
      3.	Running pass 'Function Pass Manager' on module '/Users/buildslave/jenkins/workspace/test-suite-verify-machineinstrs-aarch64-O3/test-suite/MultiSource/Benchmarks/Olden/health/health.c'.
      4.	Running pass 'Verify generated machine code' on function '@alloc_tree'
      Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
      0  clang         0x000000011191896b llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 43
      1  clang         0x00000001119179b5 llvm::sys::RunSignalHandlers() + 85
      2  clang         0x00000001119180e2 llvm::sys::CleanupOnSignal(unsigned long) + 210
      3  clang         0x0000000111849f6a (anonymous namespace)::CrashRecoveryContextImpl::HandleCrash(int, unsigned long) + 106
      4  clang         0x0000000111849ee8 llvm::CrashRecoveryContext::HandleExit(int) + 24
      5  clang         0x0000000111914acc llvm::sys::Process::Exit(int, bool) + 44
      6  clang         0x000000010f4e9be9 LLVMErrorHandler(void*, char const*, bool) + 89
      7  clang         0x0000000114eba333 llvm::report_fatal_error(llvm::Twine const&, bool) + 323
      8  clang         0x0000000110d8c620 (anonymous namespace)::MachineVerifier::BBInfo::~BBInfo() + 0
      9  clang         0x0000000110cdddca llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 378
      10 clang         0x00000001110b0154 llvm::FPPassManager::runOnFunction(llvm::Function&) + 1092
      11 clang         0x00000001110b6268 llvm::FPPassManager::runOnModule(llvm::Module&) + 72
      12 clang         0x00000001110b074a llvm::legacy::PassManagerImpl::run(llvm::Module&) + 986
      13 clang         0x0000000111c20ad4 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, std::__1::unique_ptr<llvm::raw_pwrite_stream, std::__1::default_delete<llvm::raw_pwrite_stream> >) + 3764
      14 clang         0x0000000111f6dd31 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) + 1905
      15 clang         0x00000001131a28b3 clang::ParseAST(clang::Sema&, bool, bool) + 643
      16 clang         0x00000001122b02a4 clang::FrontendAction::Execute() + 84
      17 clang         0x000000011222d6a9 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 873
      18 clang         0x000000011232faf5 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 661
      19 clang         0x000000010f4e9860 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) + 2544
      20 clang         0x000000010f4e7168 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) + 312
      21 clang         0x00000001120ab187 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*, bool*) const::$_1>(long) + 23
      22 clang         0x0000000111849eb4 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) + 228
      23 clang         0x00000001120aac24 clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*, bool*) const + 324
      24 clang         0x000000011207b85d clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&) const + 221
      25 clang         0x000000011207bdad clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::__1::pair<int, clang::driver::Command const*> >&) const + 125
      26 clang         0x0000000112092f7c clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::__1::pair<int, clang::driver::Command const*> >&) + 204
      27 clang         0x000000010f4e6977 main + 10375
      28 libdyld.dylib 0x00007fff6be90cc9 start + 1
      29 libdyld.dylib 0x0000000000000018 start + 18446603338705728336
      clang-14: error: clang frontend command failed with exit code 70 (use -v to see invocation)
      clang version 14.0.0 (https://github.com/llvm/llvm-project.git c90d136b)
      Target: arm64-apple-darwin19.5.0
      Thread model: posix
      InstalledDir: /Users/buildslave/jenkins/workspace/test-suite-verify-machineinstrs-aarch64-O3/compiler/bin
      clang-14: note: diagnostic msg:
      ********************
      62476c7c
    • Simon Pilgrim's avatar
    • Daniil Kovalev's avatar
      [InstCombine] Simplify addends reordering logic · d8e0e125
      Daniil Kovalev authored
      Previously some constants were not pushed to the top of the resulting
      expression tree as intended by the algorithm. We can remove the logic
      from simplifyFAdd and rely on SimplifyAssociativeOrCommutative to do
      that.
      
      Differential Revision: https://reviews.llvm.org/D117302
      d8e0e125
    • Tim Northover's avatar
      TableGen: sort SearchableTable emission order by fields, not top-level name · 51f743db
      Tim Northover authored
      This is often used for anonymous definitions, so we were sorting by
      "anonymous_1234" record names, which while less bad than pointers can be easily
      perturbed by adding code even in completely unrelated systems. That causes test
      failures on AArch64 when sysregs with multiple valid names suddenly start
      printing a different one.
      51f743db
    • Florian Hahn's avatar
      Revert "[AIX] Support of Big archive (read)" · 1b9d323a
      Florian Hahn authored
      This appears to be causing the following build failures on green
      dragon during stage2 builds on macOS:
      
       /System/Volumes/Data/jenkins/workspace/apple-clang-stage2-configure-RA_osceola/clang.roots/BuildRecords/clang-9999.99_install/Objects/obj-llvm/./bin/clang++ -fno-stack-protector -fno-common -Wno-profile-instr-unprofiled -Wno-unknown-warning-option -Werror=unguarded-availability-new -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -fmodules -fmodules-cache-path=/System/Volumes/Data/jenkins/workspace/apple-clang-stage2-configure-RA_osceola/clang.roots/BuildRecords/clang-9999.99_install/Objects/obj-llvm/tools/clang/stage2-bins/module.cache -fcxx-modules -Xclang -fmodules-local-submodule-visibility -gmodules -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-class-memaccess -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -fdiagnostics-color -O2 -gline-tables-only -DNDEBUG -arch x86_64 -arch arm64 -arch arm64e -isysroot /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.0.sdk -mmacosx-version-min=10.10 -Wl,-search_paths_first -Wl,-headerpad_max_install_names -Wl,-dead_strip tools/llvm-cov/CMakeFiles/llvm-cov.dir/llvm-cov.cpp.o tools/llvm-cov/CMakeFiles/llvm-cov.dir/gcov.cpp.o tools/llvm-cov/CMakeFiles/llvm-cov.dir/CodeCoverage.cpp.o tools/llvm-cov/CMakeFiles/llvm-cov.dir/CoverageExporterJson.cpp.o tools/llvm-cov/CMakeFiles/llvm-cov.dir/CoverageExporterLcov.cpp.o tools/llvm-cov/CMakeFiles/llvm-cov.dir/CoverageFilters.cpp.o tools/llvm-cov/CMakeFiles/llvm-cov.dir/CoverageReport.cpp.o tools/llvm-cov/CMakeFiles/llvm-cov.dir/CoverageSummaryInfo.cpp.o tools/llvm-cov/CMakeFiles/llvm-cov.dir/SourceCoverageView.cpp.o tools/llvm-cov/CMakeFiles/llvm-cov.dir/SourceCoverageViewHTML.cpp.o tools/llvm-cov/CMakeFiles/llvm-cov.dir/SourceCoverageViewText.cpp.o tools/llvm-cov/CMakeFiles/llvm-cov.dir/TestingSupport.cpp.o -o bin/llvm-cov  -Wl,-rpath,@loader_path/../lib  lib/libLLVMCore.a  lib/libLLVMSupport.a  lib/libLLVMObject.a  lib/libLLVMCoverage.a  lib/libLLVMProfileData.a  lib/libLLVMDebugInfoDWARF.a  lib/libLLVMObject.a  lib/libLLVMBitReader.a  lib/libLLVMCore.a  lib/libLLVMRemarks.a  lib/libLLVMBitstreamReader.a  lib/libLLVMMCParser.a  lib/libLLVMTextAPI.a  lib/libLLVMMC.a  lib/libLLVMBinaryFormat.a  lib/libLLVMDebugInfoCodeView.a  lib/libLLVMSupport.a  -lm  /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.0.sdk/usr/lib/libz.tbd  /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.0.sdk/usr/lib/libcurses.tbd  lib/libLLVMDemangle.a && cd /System/Volumes/Data/jenkins/workspace/apple-clang-stage2-configure-RA_osceola/clang.roots/BuildRecords/clang-9999.99_install/Objects/obj-llvm/tools/clang/stage2-bins/tools/llvm-cov && xcrun dsymutil -o=llvm-cov.dSYM /System/Volumes/Data/jenkins/workspace/apple-clang-stage2-configure-RA_osceola/clang.roots/BuildRecords/clang-9999.99_install/Objects/obj-llvm/tools/clang/stage2-bins/bin/llvm-cov
      Undefined symbols for architecture x86_64:
        "llvm::object::CommonArchiveMemberHeader<llvm::object::BigArMemHdrType>::getRawAccessMode() const", referenced from:
            vtable for llvm::object::BigArchiveMemberHeader in libLLVMObject.a(Archive.cpp.o)
        "llvm::object::CommonArchiveMemberHeader<llvm::object::BigArMemHdrType>::getRawUID() const", referenced from:
            vtable for llvm::object::BigArchiveMemberHeader in libLLVMObject.a(Archive.cpp.o)
        "llvm::object::CommonArchiveMemberHeader<llvm::object::BigArMemHdrType>::getRawGID() const", referenced from:
            vtable for llvm::object::BigArchiveMemberHeader in libLLVMObject.a(Archive.cpp.o)
        "llvm::object::CommonArchiveMemberHeader<llvm::object::UnixArMemHdrType>::getRawAccessMode() const", referenced from:
            vtable for llvm::object::ArchiveMemberHeader in libLLVMObject.a(Archive.cpp.o)
        "llvm::object::CommonArchiveMemberHeader<llvm::object::UnixArMemHdrType>::getRawLastModified() const", referenced from:
            vtable for llvm::object::ArchiveMemberHeader in libLLVMObject.a(Archive.cpp.o)
        "llvm::object::CommonArchiveMemberHeader<llvm::object::BigArMemHdrType>::getRawLastModified() const", referenced from:
            vtable for llvm::object::BigArchiveMemberHeader in libLLVMObject.a(Archive.cpp.o)
        "llvm::object::CommonArchiveMemberHeader<llvm::object::BigArMemHdrType>::getOffset() const", referenced from:
            vtable for llvm::object::BigArchiveMemberHeader in libLLVMObject.a(Archive.cpp.o)
        "llvm::object::CommonArchiveMemberHeader<llvm::object::UnixArMemHdrType>::getRawUID() const", referenced from:
            vtable for llvm::object::ArchiveMemberHeader in libLLVMObject.a(Archive.cpp.o)
        "llvm::object::CommonArchiveMemberHeader<llvm::object::UnixArMemHdrType>::getRawGID() const", referenced from:
            vtable for llvm::object::ArchiveMemberHeader in libLLVMObject.a(Archive.cpp.o)
        "llvm::object::CommonArchiveMemberHeader<llvm::object::UnixArMemHdrType>::getOffset() const", referenced from:
            vtable for llvm::object::ArchiveMemberHeader in libLLVMObject.a(Archive.cpp.o)
      ld: symbol(s) not found for architecture x86_64
      
      https://smooshbase.apple.com/ci/job/apple-clang-stage2-configure-RA_osceola/30276/console
      1b9d323a
    • David Sherwood's avatar
      [LoopVectorize][AArch64] Use get.active.lane.mask intrinsic when SVE is enabled · e781620d
      David Sherwood authored
      When SVE is enabled for AArch64 targets it makes more sense to use the
      get.active.lane.mask intrinsic, because SVE has an exact 1-1 mapping
      from the intrinsic to the 'whilelo' instruction for legal vector types.
      This instruction neatly takes overflow into account as well. This patch
      fixes an issue in VPInstruction::generateInstruction that assumed we are
      only dealing with fixed-width vectors.
      
      Differential Revision: https://reviews.llvm.org/D117109
      e781620d
    • Stanislav Gatev's avatar
      [clang][dataflow] Add transfer function for addrof · 59e031ff
      Stanislav Gatev authored
      This is part of the implementation of the dataflow analysis framework.
      See "[RFC] A dataflow analysis framework for Clang AST" on cfe-dev.
      
      Reviewed-by: xazax.hun
      
      Differential Revision: https://reviews.llvm.org/D117496
      59e031ff
    • Nikita Popov's avatar
      [AttrBuilder] Add string attribute getter (NFC) · 54132254
      Nikita Popov authored
      This avoids the need to scan through td_attrs() in AutoUpgrade,
      decoupling it from AttrBuilder implementation details.
      54132254
    • Simon Moll's avatar
      [VE] VECustomDAG builder class · 1b09d0c4
      Simon Moll authored
      VECustomDAG's functions simplify emitting VE custom ISD nodes. The class
      is just a stub now. We add more functions, in particular for the
      VP->VVP->VE lowering, to VECustomDAG as we build up vector isel.
      
      Reviewed By: kaz7
      
      Differential Revision: https://reviews.llvm.org/D116103
      1b09d0c4
    • Simon Moll's avatar
      [VE] vp_select+vectorBinOp passthru isel and tests · 43994e9a
      Simon Moll authored
      Extend the VE binaryop vector isel patterns to use passthru when the
      result of a SDNode is used in a vector select or merge.
      
      Reviewed By: kaz7
      
      Differential Revision: https://reviews.llvm.org/D117495
      43994e9a
    • Nikita Popov's avatar
      [LVI] Handle implication from icmp of trunc (PR51867) · 3ec7f46e
      Nikita Popov authored
      Similar to the existing urem code, if we have (trunc X) >= C,
      then also X >= C.
      
      Proof: https://alive2.llvm.org/ce/z/RF4YR2
      
      Fixes https://github.com/llvm/llvm-project/issues/51867.
      3ec7f46e
    • Victor Perez's avatar
      [LegalizeTypes][VP] Add widening support for vp.reduce.* · b7bf96a2
      Victor Perez authored
      When widening these intrinsics, we do not have to insert neutral
      elements at the end of the vector as when widening vector.reduce.*
      intrinsics, thanks to vector predication semantics.
      
      Reviewed By: craig.topper
      
      Differential Revision: https://reviews.llvm.org/D117467
      b7bf96a2
    • Nikita Popov's avatar
      0861fbe1
    • Hans Wennborg's avatar
      Revert "[DAG] Extend SearchForAndLoads with any_extend handling" · f4615fea
      Hans Wennborg authored
      This caused builds to fail with
      
        llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:5638:
        bool (anonymous namespace)::DAGCombiner::BackwardsPropagateMask(llvm::SDNode *):
        Assertion `NewLoad && "Shouldn't be masking the load if it can't be narrowed"' failed.
      
      See the code review for a link to a reproducer.
      
      > This extends the code in SearchForAndLoads to be able to look through
      > ANY_EXTEND nodes, which can be created from mismatching IR types where
      > the AND node we begin from only demands the low parts of the register.
      > That turns zext and sext into any_extends as only the low bits are
      > demanded. To be able to look through ANY_EXTEND nodes we need to handle
      > mismatching types in a few places, potentially truncating the mask to
      > the size of the final load.
      >
      > Differential Revision: https://reviews.llvm.org/D117457
      
      This reverts commit 57800878.
      f4615fea
    • Nikita Popov's avatar
      [LVI] Handle commuted SPF min/max operands · 9e68557e
      Nikita Popov authored
      We need to check that the operands of the min/max are the operands
      of the select, but we don't care which order they are in.
      9e68557e
    • Nikita Popov's avatar
      [LVI] Compute SPF range even if one operands is overdefined · d15823e3
      Nikita Popov authored
      If we have a constant range for one operand but not the other,
      we can generally still compute a useful results for SPF min/max.
      d15823e3
    • Pavel Labath's avatar
      [lldb] s/dyn_cast/isa in TypeSystemClang · afb196c3
      Pavel Labath authored
      afb196c3
    • Pavel Labath's avatar
      [lldb] Fix compiler warning in CommunicationTest · 04f13da6
      Pavel Labath authored
      "0x80 changes value when converted to char"
      04f13da6
    • Nicolas Vasilache's avatar
    • Victor Perez's avatar
      [LegalizeTypes][VP] Add splitting support for vp.reduction.* · fd1dce35
      Victor Perez authored
      Split vp.reduction.* intrinsics by splitting the vector to reduce in
      two halves, perform the reduction operation in each one of them and
      accumulate the results of both operations.
      
      Reviewed By: craig.topper
      
      Differential Revision: https://reviews.llvm.org/D117469
      fd1dce35
    • Pavel Labath's avatar
      [lldb/python] Use PythonObject in LLDBSwigPython functions · c154f397
      Pavel Labath authored
      Return our PythonObject wrappers instead of raw PyObjects (obfuscated as
      void *). This ensures that ownership (reference counts) of python
      objects is automatically tracked.
      
      Differential Revision: https://reviews.llvm.org/D117462
      c154f397
    • Nicolas Vasilache's avatar
    • Alex Zinenko's avatar
      [mlir] fix crash in PybindAdaptors.h · 289021a4
      Alex Zinenko authored
      The constructor function was being defined without indicating its "__init__"
      name, which made it interpret it as a regular fuction rather than a
      constructor. When overload resolution failed, Pybind would attempt to print the
      arguments actually passed to the function, including "self", which is not
      initialized since the constructor couldn't be called. This would result in
      "__repr__" being called with "self" referencing an uninitialized MLIR C API
      object, which in turn would cause undefined behavior when attempting to print
      in C++.
      
      Fix this by specifying the correct name.
      
      This in turn uncovers the fact the the mechanism used by PybindAdaptors.h to
      bind constructors directly as "__init__" functions taking "self" is deprecated
      by Pybind. Instead, leverage the fact that the adaptors are intended for
      attrbutes/types that cannot have additional data members and are all ultimately
      instances of "PyAttribute"/"PyType" C++ class. In constructors of derived
      classes, construct an instance of the base class first, then steal its internal
      pointer to the C++ object to construct the instance of the derived class.
      
      On top of that, the definition of the function was incorrectly indicated as the
      method on the "None" object instead of being the method of its parent class.
      This would result in a second problem when Pybind would attempt to print
      warnings pointing to the parent class since the "None" does not have a
      "__name__" field or its C API equivalent.
      
      Fix this by specifying the correct parent class by looking it up by name in the
      parent module.
      
      Reviewed By: stellaraccident
      
      Differential Revision: https://reviews.llvm.org/D117325
      289021a4
    • Haojian Wu's avatar
      [clangd] Bring back early-claim approach to fix a selection-tree regression. · fd598e18
      Haojian Wu authored
      The early-claim hack was removed in 96f5cc1e,
      we see a regression about captured var-decl in lambda.
      
      Fixes https://github.com/clangd/clangd/issues/990.
      
      Differential Revision: https://reviews.llvm.org/D117472
      fd598e18
    • Nikita Popov's avatar
      [LVI] Consistently intersect assumes · 202d590a
      Nikita Popov authored
      Integrate intersection with assumes into getBlockValue(), to ensure
      that it is consistently performed.
      
      We were doing it in nearly all places, but for example missed it
      for select inputs.
      202d590a