1. Jul 27, 2022
    • Sam Estep's avatar
      [clang][dataflow] Analyze calls to in-TU functions · fa2b83d0
      Sam Estep authored
      Depends On D130305
      
      This patch adds initial support for context-sensitive analysis of simple functions whose definition is available in the translation unit, guarded by the `ContextSensitive` flag in the new `TransferOptions` struct. When this option is true, the `VisitCallExpr` case in the builtin transfer function has a fallthrough case which checks for a direct callee with a body. In that case, it constructs a CFG from that callee body, uses the new `pushCall` method on the `Environment` to make an environment to analyze the callee, and then calls `runDataflowAnalysis` with a `NoopAnalysis` (disabling context-sensitive analysis on that sub-analysis, to avoid problems with recursion). After the sub-analysis completes, the `Environment` from its exit block is simply assigned back to the environment at the callsite.
      
      The `pushCall` method (which currently only supports non-method functions with some restrictions) first calls `initGlobalVars`, then maps the `SourceLocation`s for all the parameters to the existing source locations for the corresponding arguments from the callsite.
      
      This patch adds a few tests to check that this context-sensitive analysis works on simple functions. More sophisticated functionality will be added later; the most important next step is to explicitly model context in some fields of the `DataflowAnalysisContext` class, as mentioned in a `TODO` comment in the `pushCall` implementation.
      
      Reviewed By: ymandel, xazax.hun
      
      Differential Revision: https://reviews.llvm.org/D130306
      fa2b83d0
    • Fangrui Song's avatar
      [MachineFunctionPass] Support -print-changed and -print-changed=quiet · f106525d
      Fangrui Song authored
      -print-changed for new pass manager is handy beside -print-after-all.
      Port it to MachineFunctionPass.
      
      Note: lib/Passes/StandardInstrumentations.cpp implements a number of
      misc features. If we want to use them for codegen, we may need to lift
      some functionality to LLVMIR.
      
      Reviewed By: aeubanks, jamieschmeiser
      
      Differential Revision: https://reviews.llvm.org/D130434
      f106525d
    • Jim Ingham's avatar
      StackFrame::GetValueObjectForFrameVariable holds the StackFrame lock too long. · 8b7775a4
      Jim Ingham authored
      This can cause a deadlock if other threads use the common pattern of
      "lock the StackFrameList, get a frame, lock the StackFrame."
      
      Differential Revision: https://reviews.llvm.org/D130524
      8b7775a4
    • Jacob Lambert's avatar
      [clang-offload-bundler] Library-ize ClangOffloadBundler · 8348c409
      Jacob Lambert authored
      Lifting the core functionalities of the clang-offload-bundler into a
      user-facing library/API. This will allow online and JIT compilers to
      bundle and unbundle files without spawning a new process.
      
      This patch lifts the classes and functions used to implement
      the clang-offload-bundler into a separate OffloadBundler.cpp,
      and defines three top-level API functions in OfflaodBundler.h.
              BundleFiles()
              UnbundleFiles()
              UnbundleArchives()
      
      This patch also introduces a Config class that locally stores the
      previously global cl::opt options and arrays to allow users to call
      the APIs in a multi-threaded context, and introduces an
      OffloadBundler class to encapsulate the top-level API functions.
      
      We also  lift the BundlerExecutable variable, which is specific
      to the clang-offload-bundler tool, from the API, and replace
      its use with an ObjcopyPath variable. This variable must be set
      in order to internally call llvm-objcopy.
      
      Finally, we move the API files from
      clang/tools/clang-offload-bundler into clang/lib/Driver and
      clang/include/clang/Driver.
      
      Differential Revision: https://reviews.llvm.org/D129873
      8348c409
    • Simon Pilgrim's avatar
      [DAG] matchRotateSub - set demanded bits to the shift amount type size, not the shift result size. · 1ea7b9c6
      Simon Pilgrim authored
      This should fix a report on D130251 of an assert due to a bitwidth mismatch in APInt::isSubSetOf
      1ea7b9c6
    • Fangrui Song's avatar
      [AArch64] Simplify BTI/PAC-RET module flags · de1b5c91
      Fangrui Song authored
      These module flags use the Min merge behavior with a default value of
      zero, so we don't need to emit them if zero.
      
      Reviewed By: danielkiss
      
      Differential Revision: https://reviews.llvm.org/D130145
      de1b5c91
    • Dmitry Preobrazhensky's avatar
      [AMDGPU][GFX10][DOC][NFC] Update assembler syntax description · 9891bb23
      Dmitry Preobrazhensky authored
      Summary of changes:
      - Update FLAT LDS syntax (see https://reviews.llvm.org/D125126)
      9891bb23
    • David Goldman's avatar
      [clangd] Improve XRefs support for ObjCMethodDecl · 88a2ac6a
      David Goldman authored
      - Correct nameLocation to point to the first selector fragment instead
        of the - or +
      
      - getDefinition now searches through the proper impl decls to find
        the definition of the ObjCMethodDecl if one exists
      
      Differential Revision: https://reviews.llvm.org/D130095
      88a2ac6a
    • Matthias Springer's avatar
      [mlir][transform] Add ForeachOp to transform dialect · bffec215
      Matthias Springer authored
      This op "unbatches" an op handle and executes the loop body for each payload op.
      
      Differential Revision: https://reviews.llvm.org/D130257
      bffec215
  2. Jul 26, 2022