1. fix symbol printing on windows (details)
  2. [WebAssembly] Prototype i8x16.popcnt (details)
  3. Revert "[clang] Add -fc++-abi= flag for specifying which C++ ABI to use" (details)
  4. Revert "[HIP] Change default --gpu-max-threads-per-block value to 1024" (details)
  5. [VE] Support fabs/fcos/fsin/fsqrt math functions (details)
  6. [VE] Add VGT/VSC/PFCHV instructions (details)
  7. Add an SB API to get the SBTarget from an SBBreakpoint (details)
  8. [MS] Apply `inreg` to AArch64 sret parms on instance methods (details)
  9. [CGBuiltin] Respect asm labels and redefine_extname for builtins with specialized emitting (details)
  10. Add missing 'override' (details)
  11. [mlir][vector] Add unrolling patterns for Transfer read/write (details)
  12. [GlobalISel] Remove scalar src from non-sequential fadd/fmul reductions. (details)
  13. [AArch64][GlobalISel] NFC: Refactor emitIntegerCompare (details)
  14. [PM/CC1] Add -f[no-]split-cold-code CC1 option to toggle splitting (details)
  15. [mlir] RewriterGen NativeCodeCall matcher with ConstantOp matcher (details)
  16. Switch the default of VerifyIntegerConstantExpression from constant (details)
  17. [MLIR] Fix gcc5 in D89161 (details)
Commit 122d92dfc31f27263f281244756f576147cec1f6 by vtjnash
fix symbol printing on windows

Similar to MCSymbol::print in 3d6c8ebb584375d01b1acead4c2056b3f0c501fc
(llvm-svn: 81682, PR4966), these symbols may need to be quoted to be handled by
the linker correctly.

Reviewed By: compnerd

Differential Revision:
The file was modifiedllvm/lib/IR/Mangler.cpp
The file was modifiedllvm/test/CodeGen/X86/dllexport.ll
Commit 1992e30c2d751f6f1f6ad5190f84e37dece04f7f by tlively
[WebAssembly] Prototype i8x16.popcnt

As proposed at Use a target
builtin and intrinsic rather than normal codegen patterns to make the
instruction opt-in until it is merged to the proposal and stabilized in engines.

Differential Revision:
The file was modifiedllvm/test/MC/WebAssembly/simd-encodings.s
The file was modifiedllvm/lib/Target/WebAssembly/
The file was modifiedllvm/test/CodeGen/WebAssembly/simd-intrinsics.ll
The file was modifiedclang/test/CodeGen/builtins-wasm.c
The file was modifiedllvm/include/llvm/IR/
The file was modifiedclang/include/clang/Basic/BuiltinsWebAssembly.def
The file was modifiedclang/lib/CodeGen/CGBuiltin.cpp
Commit 79829a47040512fe54001db839ac59146ca55aec by leonardchan
Revert "[clang] Add -fc++-abi= flag for specifying which C++ ABI to use"

This reverts commits 683b308c07bf827255fe1403056413f790e03729 and

We will go for a more restricted approach that does not give freedom to
everyone to change ABIs on whichever platform.

See the discussion on
The file was modifiedclang/include/clang/AST/ASTContext.h
The file was removedclang/include/clang/Basic/TargetCXXABI.def
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
The file was modifiedclang/include/clang/Basic/
The file was modifiedclang/include/clang/Basic/TargetCXXABI.h
The file was modifiedclang/include/clang/Driver/
The file was removedclang/test/Frontend/invalid-cxx-abi.cpp
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp
The file was modifiedclang/lib/AST/ASTContext.cpp
The file was modifiedclang/include/clang/Basic/LangOptions.h
The file was modifiedclang/lib/CodeGen/CodeGenModule.cpp
The file was modifiedclang/lib/CodeGen/ItaniumCXXABI.cpp
Commit e384e94fbe7c1d5c89fcdde33ffda04e9802c2ce by Yaxun.Liu
Revert "[HIP] Change default --gpu-max-threads-per-block value to 1024"

This reverts commit 187658b8a6112446d9e7797d495bc7542ac83905 due to
AMDGPU backend issues.
The file was modifiedclang/include/clang/Basic/LangOptions.def
The file was modifiedclang/test/CodeGenCUDA/
The file was modifiedclang/lib/CodeGen/TargetInfo.cpp
The file was modifiedclang/test/CodeGenCUDA/
Commit 410e5b17cf11691de7775315dbf9d5e94f5c4808 by marukawa
[VE] Support fabs/fcos/fsin/fsqrt math functions

VE doesn't have instruction for fabs/fcos/fsin/fsqrt, so expand them.
Add regression tests also.  Update fcopysign regression test, also.

Reviewed By: simoll

Differential Revision:
The file was addedllvm/test/CodeGen/VE/fcopysign.ll
The file was addedllvm/test/CodeGen/VE/fabs.ll
The file was modifiedllvm/lib/Target/VE/VEISelLowering.cpp
The file was removedllvm/test/CodeGen/VE/fp_copysign.ll
The file was addedllvm/test/CodeGen/VE/fcos.ll
The file was addedllvm/test/CodeGen/VE/fsin.ll
The file was addedllvm/test/CodeGen/VE/fsqrt.ll
Commit a91dd3d37d3f10831e544c5a797b3837b7e5744a by marukawa
[VE] Add VGT/VSC/PFCHV instructions

Add VGT/VSC/PFCHV vector instructions and regression tests.

Reviewed By: simoll

Differential Revision:
The file was addedllvm/test/MC/VE/PFCHV.s
The file was addedllvm/test/MC/VE/VGT.s
The file was addedllvm/test/MC/VE/VSC.s
The file was modifiedllvm/lib/Target/VE/
Commit 6754caa9bf21a759c4080a797f23e2b7a77a71e1 by jingham
Add an SB API to get the SBTarget from an SBBreakpoint

Differential Revision:
The file was modifiedlldb/source/API/SBBreakpoint.cpp
The file was modifiedlldb/test/API/python_api/breakpoint/
The file was modifiedlldb/bindings/interface/SBBreakpoint.i
The file was modifiedlldb/include/lldb/API/SBBreakpoint.h
Commit 5fbab4025eb57b12f2842ab188ff07a110708e1d by rnk
[MS] Apply `inreg` to AArch64 sret parms on instance methods

The documentation rules indicate that instance methods should return
large, trivially copyable aggregates via X1/X0 and not X8 as is normally
done when returning such structs from free functions:

Fixes PR47836, a bug in the initial implementation of these rules.

I tried to simplify the logic a bit as well while I'm here.

Differential Revision:
The file was modifiedclang/lib/CodeGen/MicrosoftCXXABI.cpp
The file was modifiedclang/test/CodeGenCXX/microsoft-abi-sret-and-byval.cpp
Commit 5a338599fbaa805587227779bde0a9986cb4646d by i
[CGBuiltin] Respect asm labels and redefine_extname for builtins with specialized emitting

rL131311 added `asm()` support for builtin functions, but `asm()` for builtins with
specialized emitting (e.g. memcpy, various math functions) still do not work.

This patch makes these functions work for `asm()` and `#pragma redefine_extname`.
glibc uses `asm()` to redirect internal libc function calls to hidden aliases.

Limitation: such a function is a builtin in clang, but will not be recognized as
a libcall in optimization passes because Clang does not annotate the renamed
function as a libcall.  In GCC -O1 or above, `abs` can be optimized out but we can't.
Additionally, we cannot redirect `__builtin_sin` to `real_sin` in the following example:

  double sin(double x) asm("real_sin");
  double f(double d) { return __builtin_sin(d); }


According to @rsmith, the following three statements cannot be simultaneously true:

(1) The frontend function foo has known, builtin semantics X.
(2) The symbol foo has known, builtin semantics X.
(3) It's not correct to lower a call to the frontend function foo to the symbol foo.

People do want (1) (if it is profitable to expand a memcpy, do it).
This also means that people do not want to add -fno-builtin-memcpy.
People do want (3): that is why they use asm("__GI_memcpy") in the first place.

So unfortunately we make a compromise by not refuting (2) (see the limitation above).
For most libcalls, there is a small loss because compilers don't synthesize them.
For the few glibc cares about, it uses `asm("memcpy = __GI_memcpy");` to make
the assembly level redirection.
(Changing function names (e.g. `__memcpy`) is a hit to ergonomics which is not acceptable).

Reviewed By: rsmith

Differential Revision:
The file was modifiedclang/lib/CodeGen/CGBuiltin.cpp
The file was modifiedclang/test/CodeGen/redefine_extname.c
The file was modifiedclang/test/CodeGen/asm-label.c
Commit 4c1c88bbc114dc0abd9c2dc5548378d695124c84 by dblaikie
Add missing 'override'
The file was modifiedmlir/tools/mlir-tblgen/TypeDefGen.cpp
Commit edbdea7466d25c5e4d9f73e3043ac87efe433193 by thomasraoux
[mlir][vector] Add unrolling patterns for Transfer read/write

Adding unroll support for transfer read and transfer write operation. This
allows to pick the ideal size for the memory access for a given target.

Differential Revision:
The file was modifiedmlir/test/lib/Transforms/TestVectorTransforms.cpp
The file was modifiedmlir/include/mlir/Dialect/Vector/VectorTransforms.h
The file was addedmlir/test/Dialect/Vector/vector-transfer-unroll.mlir
The file was modifiedmlir/lib/Dialect/Vector/VectorTransforms.cpp
Commit c2551c1f4058d2c3cc4964b1d1d0ca5946036f6c by Amara Emerson
[GlobalISel] Remove scalar src from non-sequential fadd/fmul reductions.

It's probably better to split these into separate G_FADD/G_FMUL + G_VECREDUCE
operations in the translator rather than carrying the scalar around. The
majority of the time it'll get simplified away as the scalars are probably
identity values.

Differential Revision:
The file was modifiedllvm/lib/CodeGen/MachineVerifier.cpp
The file was modifiedllvm/test/MachineVerifier/test_vector_reductions.mir
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/legalizer-info-validation.mir
The file was modifiedllvm/include/llvm/Target/
Commit 609d765cd3b1a4f9558b654dbb1bc7c973f3408b by Jessica Paquette
[AArch64][GlobalISel] NFC: Refactor emitIntegerCompare

Simplify emitIntegerCompare and improve comments + asserts.

Mostly making the code a little easier to follow.

Also, this code is only used for G_ICMP. The legalizer ensures that the LHS/RHS
for every G_ICMP is either a s32 or s64. So, there's no need to handle anything
else. This lets us remove a bunch of checks for whether or not we successfully
emitted the compare.

Differential Revision:
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
Commit 273c299d5d649a0222fbde03c9a41e41913751b4 by Saleem Abdulrasool
[PM/CC1] Add -f[no-]split-cold-code CC1 option to toggle splitting

This patch adds -f[no-]split-cold-code CC1 options to clang. This allows
the splitting pass to be toggled on/off. The current method of passing
`-mllvm -hot-cold-split=true` to clang isn't ideal as it may not compose
correctly (say, with `-O0` or `-Oz`).

To implement the -fsplit-cold-code option, an attribute is applied to
functions to indicate that they may be considered for splitting. This
removes some complexity from the old/new PM pipeline builders, and
behaves as expected when LTO is enabled.

Co-authored by: Saleem Abdulrasool <>
Differential Revision:
Reviewed By: Aditya Kumar, Vedant Kumar
Reviewers: Teresa Johnson, Aditya Kumar, Fedor Sergeev, Philip Pfaffe, Vedant Kumar
The file was modifiedllvm/lib/Transforms/IPO/PassManagerBuilder.cpp
The file was modifiedclang/lib/CodeGen/CodeGenModule.cpp
The file was modifiedllvm/test/Transforms/HotColdSplit/outline-multiple-entry-region.ll
The file was modifiedllvm/test/Transforms/HotColdSplit/phi-with-distinct-outlined-values.ll
The file was modifiedllvm/test/Transforms/HotColdSplit/stale-assume-in-original-func.ll
The file was modifiedllvm/test/Transforms/HotColdSplit/lifetime-markers-on-inputs-2.ll
The file was modifiedllvm/test/Transforms/HotColdSplit/swifterror.ll
The file was modifiedllvm/test/Transforms/HotColdSplit/noreturn.ll
The file was modifiedllvm/test/Transforms/HotColdSplit/update-split-loop-metadata.ll
The file was modifiedllvm/lib/Passes/PassBuilder.cpp
The file was modifiedllvm/test/Transforms/HotColdSplit/transfer-debug-info.ll
The file was modifiedllvm/test/Transforms/HotColdSplit/outline-disjoint-diamonds.ll
The file was modifiedllvm/test/Transforms/HotColdSplit/section-splitting-default.ll
The file was modifiedllvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/generated_funcs.ll
The file was modifiedllvm/test/Transforms/HotColdSplit/split-phis-in-exit-blocks.ll
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp
The file was modifiedclang/include/clang/Driver/
The file was modifiedllvm/test/Other/opt-hot-cold-split.ll
The file was modifiedllvm/test/Transforms/HotColdSplit/lifetime-markers-on-inputs-1.ll
The file was addedclang/test/CodeGen/split-cold-code.c
The file was modifiedllvm/test/Transforms/HotColdSplit/succ-block-with-self-edge.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/opt-pipeline.ll
The file was modifiedllvm/test/Transforms/HotColdSplit/outline-cold-asm.ll
The file was modifiedllvm/test/Other/new-pm-thinlto-defaults.ll
The file was modifiedllvm/test/Transforms/HotColdSplit/addr-taken.ll
The file was modifiedllvm/test/Transforms/HotColdSplit/section-splitting-custom.ll
The file was modifiedllvm/test/Transforms/HotColdSplit/X86/do-not-split.ll
The file was modifiedllvm/test/Transforms/HotColdSplit/retain-section.ll
The file was modifiedllvm/test/Transforms/CodeExtractor/extract-assume.ll
The file was modifiedllvm/test/Transforms/HotColdSplit/eh-typeid-for.ll
The file was modifiedllvm/test/Transforms/HotColdSplit/outline-while-loop.ll
The file was modifiedllvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/generated_funcs.ll.generated.expected
The file was modifiedllvm/test/Other/opt-Os-pipeline.ll
The file was modifiedllvm/test/Other/opt-O3-pipeline.ll
The file was modifiedllvm/test/Transforms/HotColdSplit/multiple-exits.ll
The file was modifiedllvm/test/Transforms/HotColdSplit/split-cold-2.ll
The file was modifiedllvm/test/Transforms/HotColdSplit/delete-use-without-def-dbg-val.ll
The file was modifiedllvm/test/Other/new-pm-thinlto-postlink-pgo-defaults.ll
The file was modifiedllvm/test/Transforms/HotColdSplit/split-out-dbg-val-of-arg.ll
The file was modifiedllvm/test/Transforms/HotColdSplit/minsize.ll
The file was modifiedllvm/test/Transforms/HotColdSplit/apply-penalty-for-outputs.ll
The file was addedclang/test/Frontend/split-cold-code.c
The file was modifiedllvm/test/Other/opt-O3-pipeline-enable-matrix.ll
The file was modifiedllvm/test/Transforms/HotColdSplit/outline-if-then-else.ll
The file was modifiedllvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/generated_funcs.ll.nogenerated.expected
The file was modifiedllvm/test/Other/opt-O2-pipeline.ll
The file was modifiedllvm/test/Transforms/HotColdSplit/assumption-cache-invalidation.ll
The file was modifiedllvm/test/Transforms/HotColdSplit/forward-dfs-reaches-marked-block.ll
The file was modifiedllvm/test/Other/new-pm-defaults.ll
The file was modifiedclang/include/clang/Basic/CodeGenOptions.def
The file was modifiedllvm/test/Other/pass-pipelines.ll
The file was modifiedllvm/test/Transforms/HotColdSplit/apply-penalty-for-inputs.ll
The file was modifiedllvm/test/Transforms/HotColdSplit/coldentrycount.ll
The file was modifiedllvm/test/Transforms/HotColdSplit/duplicate-phi-preds-crash.ll
The file was modifiedllvm/test/Transforms/HotColdSplit/apply-noreturn-bonus.ll
The file was modifiedllvm/test/Transforms/HotColdSplit/region-overlap.ll
The file was modifiedllvm/test/Transforms/HotColdSplit/eh-pads.ll
The file was modifiedllvm/test/Transforms/HotColdSplit/mark-the-whole-func-cold.ll
The file was modifiedllvm/test/Transforms/HotColdSplit/unwind.ll
The file was modifiedllvm/test/Other/new-pm-thinlto-postlink-samplepgo-defaults.ll
The file was modifiedllvm/test/Transforms/HotColdSplit/apply-successor-penalty.ll
The file was modifiedclang/include/clang/Basic/
The file was modifiedllvm/test/Other/X86/lto-hot-cold-split.ll
The file was modifiedllvm/include/llvm/Transforms/IPO/HotColdSplitting.h
The file was modifiedllvm/lib/Transforms/IPO/HotColdSplitting.cpp
The file was modifiedllvm/test/Transforms/HotColdSplit/resume.ll
The file was modifiedllvm/test/Other/new-pm-pgo.ll
The file was modifiedllvm/test/Transforms/HotColdSplit/split-out-dbg-label.ll
The file was modifiedllvm/test/Other/new-pm-lto-defaults.ll
Commit 2bf423b0218c9583e3a372950a34facbf93e63d3 by rob.suderman
[mlir] RewriterGen NativeCodeCall matcher with ConstantOp matcher

Added an underlying matcher for generic constant ops. This
included a rewriter of RewriterGen to make variable use more

Differential Revision:
The file was modifiedmlir/lib/TableGen/Pattern.cpp
The file was modifiedmlir/test/lib/Dialect/Test/TestDialect.cpp
The file was modifiedmlir/test/lib/Dialect/Test/
The file was modifiedmlir/test/mlir-tblgen/pattern.mlir
The file was addedmlir/test/mlir-tblgen/
The file was modifiedmlir/test/lib/Dialect/Test/TestPatterns.cpp
The file was modifiedmlir/tools/mlir-tblgen/RewriterGen.cpp
The file was modifiedmlir/include/mlir/IR/
The file was modifiedmlir/include/mlir/TableGen/Pattern.h
Commit fc031d29bea856f2b91a250fd81c5f9fb79dbe07 by richard
Switch the default of VerifyIntegerConstantExpression from constant
folding to not constant folding.

Constant folding of ICEs is done as a GCC compatibility measure, but new
code was picking it up, presumably by accident, due to the bad default.

While here, also switch the flag from a bool to an enum to make it more
obvious what it means at call sites. This highlighted a couple of places
where our behavior is different between C++11 and C++14 due to switching
from checking for an ICE to checking for a converted constant
expression (where there is no 'fold' codepath).
The file was modifiedclang/lib/Sema/SemaDeclCXX.cpp
The file was modifiedclang/lib/Sema/SemaType.cpp
The file was modifiedclang/lib/Sema/SemaOpenMP.cpp
The file was modifiedclang/lib/Sema/SemaExceptionSpec.cpp
The file was modifiedclang/lib/Sema/SemaInit.cpp
The file was modifiedclang/test/SemaCXX/new-delete.cpp
The file was modifiedclang/lib/Sema/SemaDeclAttr.cpp
The file was modifiedclang/lib/Sema/SemaStmt.cpp
The file was modifiedclang/test/SemaCXX/enum.cpp
The file was modifiedclang/lib/Sema/SemaTemplate.cpp
The file was modifiedclang/lib/Sema/SemaDecl.cpp
The file was modifiedclang/lib/Sema/SemaExpr.cpp
The file was modifiedclang/include/clang/Sema/Sema.h
The file was modifiedclang/lib/Sema/SemaExprCXX.cpp
Commit ad1fe3963f30d0e7ef6796ad90bd4ddb6f7b117b by rob.suderman
[MLIR] Fix gcc5 in D89161

Missing .str() makes gcc5 unable to infer the template to use.

Differential Revision:
The file was modifiedmlir/lib/TableGen/Pattern.cpp