SuccessChanges

Summary

  1. [Driver][X86] Support branch align options with LTO (details)
  2. [JumpThreading] Use emplace_back instead of push_back (NFC) (details)
  3. [Analyzer][StreamChecker] Added check for "indeterminate file position". (details)
  4. [HardwareLoops] LangRef Intrinsic descriptions (details)
  5. [VE] Implements minimum MC layer for VE (3/4) (details)
  6. [gn build] Port 5921782f744 (details)
  7. Harden MLIR detection of misconfiguration when missing dialect registration (details)
  8. [DebugInfo] Upgrade DISubrange to support Fortran dynamic arrays (details)
Commit 49544499954912c5a0f02014de53e0bc0234c7af by shengchen.kan
[Driver][X86] Support branch align options with LTO

Summary: Before this patch, we use two different ways to pass options to align branch
depending on whether LTO is enabled. For example, `-mbranches-within-32B-boundaries`
w/o LTO and `-Wl,-plugin-opt=-x86-branches-within-32B-boundaries` w/ LTO.  It's
inconvenient, so this patch unifies the way: we only need to pass options like
`-mbranches-within-32B-boundaries` to align branches, no matter LTO is enabled or not.

Differential Revision: https://reviews.llvm.org/D80289
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
The file was modifiedclang/lib/Driver/ToolChains/CommonArgs.cpp
The file was modifiedclang/lib/Driver/ToolChains/CommonArgs.h
The file was modifiedclang/test/Driver/x86-malign-branch.c
Commit c4990a03c6c347df120c0dbf6039e900889c4a92 by kazu
[JumpThreading] Use emplace_back instead of push_back (NFC)

Summary: This patch replaces push_back with emplace_back where appropriate.

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D80688
The file was modifiedllvm/lib/Transforms/Scalar/JumpThreading.cpp
Commit 9081fa20991d101728434b354a96283b26495b71 by 1.int32
[Analyzer][StreamChecker] Added check for "indeterminate file position".

Summary:
According to the standard, after a `wread` or `fwrite` call the file position
becomes "indeterminate". It is assumable that a next read or write causes
undefined behavior, so a (fatal error) warning is added for this case.
The indeterminate position can be cleared by some operations, for example
`fseek` or `freopen`, not with `clearerr`.

Reviewers: Szelethus, baloghadamsoftware, martong, NoQ, xazax.hun, dcoughlin

Reviewed By: Szelethus

Subscribers: rnkovacs, NoQ, xazax.hun, baloghadamsoftware, szepet, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, gamesh411, Charusso, martong, ASDenysPetrov, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D80018
The file was modifiedclang/test/Analysis/stream-error.c
The file was modifiedclang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp
Commit 880c35a554952c3a64483502f3278431f8f06516 by sjoerd.meijer
[HardwareLoops] LangRef Intrinsic descriptions

The HardwareLoop intrinsics were missing and not described in LangRef. This
adds these descriptions/definitions.

Differential Revision: https://reviews.llvm.org/D80316
The file was modifiedllvm/docs/LangRef.rst
Commit 5921782f744deffb5f5bfd96f6a7932a4ff75666 by simon.moll
[VE] Implements minimum MC layer for VE (3/4)

Summary:
Define ELF binary code for VE and modify code where should use this new code.

Depends on D79544.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D79545
The file was addedllvm/unittests/Object/ELFTest.cpp
The file was modifiedllvm/tools/llvm-readobj/ELFDumper.cpp
The file was addedllvm/unittests/ObjectYAML/ELFYAMLTest.cpp
The file was modifiedllvm/include/llvm/BinaryFormat/ELF.h
The file was modifiedllvm/include/llvm/Object/ELFObjectFile.h
The file was modifiedllvm/lib/Object/ELF.cpp
The file was addedllvm/test/tools/llvm-readobj/ELF/file-header-machine-types.test
The file was modifiedllvm/unittests/ObjectYAML/CMakeLists.txt
The file was modifiedllvm/unittests/Object/CMakeLists.txt
The file was modifiedllvm/lib/ObjectYAML/ELFYAML.cpp
The file was addedllvm/include/llvm/BinaryFormat/ELFRelocs/VE.def
The file was addedllvm/unittests/Object/ELFObjectFileTest.cpp
Commit 4b94cee650ce9753214d562826b7f1b9663c2268 by llvmgnsyncbot
[gn build] Port 5921782f744
The file was modifiedllvm/utils/gn/secondary/llvm/unittests/Object/BUILD.gn
The file was modifiedllvm/utils/gn/secondary/llvm/unittests/ObjectYAML/BUILD.gn
Commit 213c6cdf2e7a30d722cee4cd66b7d48fc396d44b by joker.eph
Harden MLIR detection of misconfiguration when missing dialect registration

This changes will catch error where C++ op are used without being
registered, either through creation with the OpBuilder or when trying to
cast to the C++ op.

Differential Revision: https://reviews.llvm.org/D80651
The file was modifiedmlir/include/mlir/IR/MLIRContext.h
The file was modifiedmlir/include/mlir/IR/Builders.h
The file was modifiedmlir/include/mlir/IR/OpDefinition.h
The file was modifiedmlir/lib/IR/MLIRContext.cpp
Commit d20bf5a7258d4b6a7f017a81b125275dac1aa166 by SourabhSingh.Tomar
[DebugInfo] Upgrade DISubrange to support Fortran dynamic arrays

This patch upgrades DISubrange to support fortran requirements.

Summary:
Below are the updates/addition of fields.
lowerBound - Now accepts signed integer or DIVariable or DIExpression,
earlier it accepted only signed integer.
upperBound - This field is now added and accepts signed interger or
DIVariable or DIExpression.
stride - This field is now added and accepts signed interger or
DIVariable or DIExpression.
This is required to describe bounds of array which are known at runtime.

Testing:
unit test cases added (hand-written)
check clang
check llvm
check debug-info

Reviewed By: aprantl

Differential Revision: https://reviews.llvm.org/D80197
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
The file was modifiedllvm/lib/IR/AsmWriter.cpp
The file was addedllvm/test/Verifier/invalid-disubrange-lowerBound.ll
The file was modifiedllvm/test/DebugInfo/X86/nondefault-subrange-array.ll
The file was modifiedllvm/lib/IR/DebugInfoMetadata.cpp
The file was modifiedllvm/lib/AsmParser/LLParser.cpp
The file was addedllvm/test/Bitcode/fortranSubrange.ll
The file was modifiedllvm/test/Assembler/disubrange-empty-array.ll
The file was modifiedllvm/lib/IR/DIBuilder.cpp
The file was modifiedllvm/include/llvm/IR/DebugInfoMetadata.h
The file was modifiedllvm/lib/IR/LLVMContextImpl.h
The file was addedllvm/test/Bitcode/fortranSubrangeBackward.ll
The file was modifiedllvm/include/llvm/IR/DIBuilder.h
The file was modifiedllvm/lib/Bitcode/Reader/MetadataLoader.cpp
The file was modifiedllvm/test/Assembler/invalid-disubrange-count-missing.ll
The file was addedllvm/test/Verifier/invalid-disubrange-upperBound.ll
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
The file was modifiedllvm/test/Bindings/llvm-c/debug_info.ll
The file was modifiedllvm/unittests/IR/MetadataTest.cpp
The file was modifiedllvm/test/DebugInfo/X86/default-subrange-array.ll
The file was modifiedllvm/test/Assembler/debug-info.ll
The file was modifiedclang/lib/CodeGen/CGDebugInfo.cpp
The file was addedllvm/test/DebugInfo/fortranSubrangeExpr.ll
The file was addedllvm/test/Verifier/disubrange-count-upperBound.ll
The file was addedllvm/test/DebugInfo/cDefaultLower.ll
The file was addedllvm/test/Bitcode/fortranSubrangeBackward.ll.bc
The file was addedllvm/test/DebugInfo/fortranDefaultLower.ll
The file was addedllvm/test/DebugInfo/fortranSubrangeInt.ll
The file was modifiedllvm/lib/Bitcode/Writer/BitcodeWriter.cpp
The file was modifiedllvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
The file was addedllvm/test/Verifier/invalid-disubrange-stride.ll
The file was addedllvm/test/DebugInfo/fortranSubrangeVar.ll
The file was modifiedllvm/lib/IR/Verifier.cpp
The file was addedllvm/test/Verifier/disubrange-missing-upperBound.ll