SuccessChanges

Summary

  1. [clang-format] update trailing newline treatment in clang-format.py (details)
  2. update string comparison in clang-format.py (details)
  3. [NFC][AIX][XCOFF] if the size of Csect is zero, the Csect do not need (details)
  4. [ASTImporter] Implicitly declare parameters for imported ObjCMethodDecls (details)
  5. [MBP] Avoid tail duplication if it can't bring benefit (details)
  6. Add `QualType::hasAddressSpace`. NFC. (details)
  7. [InstCombine] improve readability; NFC (details)
  8. [InstCombine] reduce code duplication; NFC (details)
  9. [InstCombine] improve readability; NFC (details)
  10. [InstCombine] reduce indentation; NFC (details)
  11. [OPENMP]Reorganize OpenMP warning groups. (details)
  12. clang/AMDGPU: Fix default for frame-pointer attribute (details)
  13. [PGO][PGSO] Instrument the code gen / target passes. (details)
  14. [x86] add cost model special-case for insert/extract from element 0 (details)
  15. Revert "ARM-Darwin: keep the frame register reserved even if not (details)
  16. [libcxx{,abi}] Don't link libpthread and libdl on Fuchsia (details)
  17. Revert "[InstCombine] reduce indentation; NFC" (details)
  18. Revert "[InstCombine] improve readability; NFC" (details)
  19. Revert "[InstCombine] reduce code duplication; NFC" (details)
  20. Avoid naming variable after type to fix GCC 5.3 build (details)
  21. Stop checking whether std::strong_* has ::equivalent members. (details)
  22. [AutoFDO] Inline replay for cold/small callees from sample profile (details)
  23. [OPENMP50]Add if clause in distribute simd directive. (details)
  24. Revert "[PGO][PGSO] Instrument the code gen / target passes." (details)
  25. [clang-tidy] Pass -faligned-allocation on the compiler command line to (details)
  26. [X86] Don't setup and teardown memory for a musttail call (details)
  27. [WPD] Remove unused parameter (NFC) (details)
  28. [InstSimplify] add tests for copysign with fneg operand; NFC (details)
  29. [analyzer] Fix false positive on introspection of a block's internal (details)
  30. [TargetLowering] Fix another potential FPE in expandFP_TO_UINT (details)
  31. wrap an rst file to 80 cols, to cycle bots (details)
  32. [ObjC] Make sure that the implicit arguments for direct methods have (details)
  33. [X86] Fix prolog/epilog mismatch for stack protectors on win32-macho. (details)
  34. [MC] Rewrite tablegen for printInstrAlias to comiple faster, NFC (details)
  35. [WebAssebmly][MC] Support .import_name/.import_field asm directives (details)
  36. Make it possible control matcher traversal kind with ASTContext (details)
  37. [CommandLine] Add callbacks to Options (details)
  38. Remove Expr.h include from ASTContext.h, NFC (details)
  39. [Sema][X86] Consider target attribute into the checks in (details)
  40. Use ASTDumper to dump the AST from clang-query (details)
  41. Revert "[Sema][X86] Consider target attribute into the checks in (details)
  42. gn build: Change scudo's list of supported platforms to a whitelist. (details)
  43. Add matchDynamic convenience functions (details)
Commit b8e03ff50389d83dabf800203f689e227697c996 by paulhoad
[clang-format] update trailing newline treatment in clang-format.py
Summary: The current clang-format.py does not handle trailing newlines
at the end of a file correctly. Trailing empty lines get removed except
one. As far as I understand this is because clang-format gets fed from
stdin and writes to stdout when called from clang-format.py. In a
"normal" file (with no trailing empty lines) the string that gets passed
to clang-format does not contain a trailing '\n' after the '\n'.join
from python. The clang-format binary does not add a trailing newline to
input from stdin, but (if there are multiple trailing '\n', all except
one get removed).
When reading back this means that we see in python from a "normal" file
a string with no trailing '\n'. From a file with (potentially multiple)
empty line(s) at the end, we get a string with one trailing '\n' back in
python. In the former case all is fine, in the latter case split('\n')
makes one empty line at the end of the file out of the clang-format
output. Desired would be instead that the **file** ends with a newline,
but not with an empty line.
For the case that a user specifies a range to format (and wants to keep
trailing empty lines) I did **not** try to fix this by simply removing
all trailing newlines from the clang-format output. Instead, I add a
'\n' to the unformatted file content (i.e. newline-terminate what is
passed to clang-format) and then strip off the last newline from the
output (which itself is now for sure the newline termination of the
clang-format output).
(Should this get approved, I'll need someone to help me land this.)
Reviewers: klimek, MyDeveloperDay
Reviewed By: MyDeveloperDay
Patch By: pseyfert
Subscribers: cfe-commits, llvm-commits
Tags: #clang-format, #clang
Differential Revision: https://reviews.llvm.org/D70864 update trailing
newline treatment in clang-format.py
The file was modifiedclang/tools/clang-format/clang-format.py
Commit 79f8c20e2cb634c1b8e42f01b42fc5ab2a512d60 by paulhoad
update string comparison in clang-format.py
Summary: Python 3.8 introduces a SyntaxWarning about string comparisons
with 'is'. This commit updates the string comparison in clang-format.py
that is done with 'is not' to '!='. This should not break compatibility
with older python versions (tested 3.4.9, 2.7.17, 2.7.5, 3.8.0).
Reviewers: MyDeveloperDay, klimek, llvm-commits, cfe-commits
Reviewed By: MyDeveloperDay, klimek
Patch By: pseyfert
Tags: #clang-format, #clang
Differential Revision: https://reviews.llvm.org/D70664
The file was modifiedclang/tools/clang-format/clang-format.py
Commit 50d72fa1461b71d898237f3ce19ab367d0508c87 by diggerlin
[NFC][AIX][XCOFF] if the size of Csect is zero, the Csect do not need
write any data into sections
SUMMARY:
if the size of Csect is zero, the Csect do not need write any data into
sections for example, the TOC Csect has zero size, it do not need invoke
a Asm.writeSectionData(W.OS, Csect.MCCsect, Layout);
Reviewers: daltenty Subscribers: rupprecht, seiyai,hiraditya
Differential Revision: https://reviews.llvm.org/D71120
The file was modifiedllvm/lib/MC/XCOFFObjectWriter.cpp
Commit 164e0fc5c7f782b174db5c87b37725ea0e174853 by Raphael Isemann
[ASTImporter] Implicitly declare parameters for imported ObjCMethodDecls
Summary: When Sema encounters a ObjCMethodDecl definition it declares
the implicit parameters for the ObjCMethodDecl. When importing such a
method with the ASTImporter we need to do the same for the imported
method otherwise we will crash when generating code (where CodeGen
expects that this was called by Sema).
Note I had to implement Objective-C[++] support in Language.cpp as this
is the first test for Objective-C and this would otherwise just hit this
'not implemented' assert when running the unit test.
Reviewers: martong, a.sidorin, shafik
Reviewed By: martong
Subscribers: rnkovacs, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D71112
The file was modifiedclang/unittests/AST/Language.cpp
The file was modifiedclang/unittests/AST/ASTImporterTest.cpp
The file was modifiedclang/lib/AST/ASTImporter.cpp
Commit 72942459d070cbfe6f3524e89c3ac37440be7890 by carrot
[MBP] Avoid tail duplication if it can't bring benefit
Current tail duplication integrated in bb layout is designed to increase
the fallthrough from a BB's predecessor to its successor, but we have
observed cases that duplication doesn't increase fallthrough, or it
brings too much size overhead.
To overcome these two issues in function canTailDuplicateUnplacedPreds I
add two checks:
  make sure there is at least one duplication in current work set.
the number of duplication should not exceed the number of successors.
The modification in hasBetterLayoutPredecessor fixes a bug that
potential predecessor must be at the bottom of a chain.
Differential Revision: https://reviews.llvm.org/D64376
The file was modifiedllvm/lib/CodeGen/MachineBlockPlacement.cpp
The file was modifiedllvm/test/CodeGen/RISCV/atomic-rmw.ll
The file was modifiedllvm/test/CodeGen/Thumb2/LowOverheadLoops/mve-float-loops.ll
The file was modifiedllvm/test/CodeGen/PowerPC/expand-contiguous-isel.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/loop_header_nopred.mir
The file was modifiedllvm/test/CodeGen/Thumb2/2010-02-11-phi-cycle.ll
The file was modifiedllvm/test/CodeGen/X86/mmx-coalescing.ll
The file was modifiedllvm/test/CodeGen/RISCV/remat.ll
The file was modifiedllvm/test/CodeGen/X86/tail-dup-repeat.ll
The file was modifiedllvm/test/CodeGen/X86/tail-merge-after-mbp.mir
The file was modifiedllvm/test/CodeGen/X86/shadow-stack.ll
The file was modifiedllvm/test/CodeGen/Thumb2/cbnz.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/uniform-cfg.ll
The file was modifiedllvm/test/CodeGen/X86/ragreedy-hoist-spill.ll
The file was modifiedllvm/test/CodeGen/X86/speculative-load-hardening.ll
The file was modifiedllvm/test/CodeGen/X86/pr38795.ll
The file was modifiedllvm/test/CodeGen/AArch64/swifterror.ll
The file was modifiedllvm/test/CodeGen/X86/tail-opts.ll
The file was modifiedllvm/test/CodeGen/PowerPC/branch-opt.ll
The file was modifiedllvm/test/CodeGen/AArch64/tbz-tbnz.ll
The file was modifiedllvm/test/CodeGen/X86/reverse_branches.ll
The file was modifiedllvm/test/CodeGen/X86/tail-dup-merge-loop-headers.ll
The file was modifiedllvm/test/CodeGen/AArch64/callbr-asm-obj-file.ll
The file was addedllvm/test/CodeGen/PowerPC/no-duplicate.ll
The file was modifiedllvm/test/CodeGen/PowerPC/block-placement.mir
Commit f2ace9d6005b4ffc6f6fc068c1aac897d871df7a by michael.hliao
Add `QualType::hasAddressSpace`. NFC.
- Add that as a shorthand of <T>.getQualifiers().hasAddressSpace().
- Simplify related code.
The file was modifiedclang/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp
The file was modifiedclang/lib/Sema/SemaInit.cpp
The file was modifiedclang/lib/Sema/SemaDecl.cpp
The file was modifiedclang/lib/Sema/SemaExpr.cpp
The file was modifiedclang/lib/Sema/SemaType.cpp
The file was modifiedclang/lib/Sema/SemaOverload.cpp
The file was modifiedclang/include/clang/AST/Type.h
Commit 6bb62a9d970b677cbaee848d5e4800e1c3fb42c9 by spatel
[InstCombine] improve readability; NFC
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
Commit db5739658467e20a52f20e769d3580412e13ff87 by spatel
[InstCombine] reduce code duplication; NFC
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
Commit 7250ef3613cc6b81145b9543bafb86d7f9466cde by spatel
[InstCombine] improve readability; NFC
CreateIntCast returns the input if its type matches, so need to
duplicate that check.
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
Commit 8bf8ef7116bd0daec570b35480ca969b74e66c6e by spatel
[InstCombine] reduce indentation; NFC
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
Commit 543ffb4a2d6435004f7e41f2b3d9040aeb3e78ef by a.bataev
[OPENMP]Reorganize OpenMP warning groups.
openmp-mapping group is a subgroup of openmp-target warning group. Also,
added global openmp group to control all other OpenMP warning groups.
The file was modifiedclang/test/OpenMP/nesting_of_regions.cpp
The file was modifiedclang/test/OpenMP/simd_loop_messages.cpp
The file was modifiedclang/test/OpenMP/target_map_messages.cpp
The file was modifiedclang/test/OpenMP/simd_aligned_messages.cpp
The file was modifiedclang/include/clang/Basic/DiagnosticGroups.td
The file was modifiedclang/include/clang/Basic/DiagnosticSemaKinds.td
Commit 2cc11941a2e88236e0b4842229454ae6d85142cd by arsenm2
clang/AMDGPU: Fix default for frame-pointer attribute
Enabling optimization should allow frame pointer elimination.
The file was addedclang/test/Driver/frame-pointer-elim.cl
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
Commit 9a0b5e14075a1f42a72eedb66fd4fde7985d37ac by yamauchi
[PGO][PGSO] Instrument the code gen / target passes.
Summary: Split off of D67120.
Add the profile guided size optimization instrumentation / queries in
the code gen or target passes. This doesn't enable the size
optimizations in those passes yet as they are currently disabled in
shouldOptimizeForSize (for non-IR pass queries).
Reviewers: davidxl
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71072
The file was modifiedllvm/test/CodeGen/AArch64/O0-pipeline.ll
The file was modifiedllvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
The file was modifiedllvm/test/CodeGen/AArch64/O3-pipeline.ll
The file was modifiedllvm/include/llvm/CodeGen/TailDuplicator.h
The file was modifiedllvm/test/CodeGen/X86/O3-pipeline.ll
The file was modifiedllvm/test/CodeGen/ARM/O3-pipeline.ll
The file was modifiedllvm/test/CodeGen/X86/O0-pipeline.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
The file was modifiedllvm/lib/CodeGen/BranchFolding.h
The file was modifiedllvm/lib/CodeGen/TailDuplicator.cpp
The file was modifiedllvm/lib/Target/X86/X86PadShortFunction.cpp
The file was modifiedllvm/lib/CodeGen/ExpandMemCmp.cpp
The file was modifiedllvm/lib/Target/X86/X86OptimizeLEAs.cpp
The file was modifiedllvm/lib/Target/X86/X86FixupBWInsts.cpp
The file was modifiedllvm/lib/CodeGen/BranchFolding.cpp
The file was modifiedllvm/include/llvm/CodeGen/AsmPrinter.h
The file was modifiedllvm/lib/CodeGen/MachineCombiner.cpp
The file was modifiedllvm/lib/CodeGen/TailDuplication.cpp
The file was modifiedllvm/lib/CodeGen/IfConversion.cpp
The file was modifiedllvm/lib/CodeGen/CodeGenPrepare.cpp
The file was modifiedllvm/lib/CodeGen/MachineBlockPlacement.cpp
Commit 7ff0fcb53f6e71bc22d37494fdfa68bbf2d3709b by spatel
[x86] add cost model special-case for insert/extract from element 0
This is a follow-up to D70607 where we made any extract element on SLM
more costly than default. But that is pessimistic for extract from
element 0 because that corresponds to x86 movd/movq instructions. These
generally have >1 cycle latency, but they are probably implemented as
single uop instructions.
Note that no vectorization tests are affected by this change. Also, no
targets besides SLM are affected because those are falling through to
the default cost of 1 anyway. But this will become visible/important if
we add more specializations via cost tables.
Differential Revision: https://reviews.llvm.org/D71023
The file was modifiedllvm/test/Analysis/CostModel/X86/vector-extract.ll
The file was modifiedllvm/test/Analysis/CostModel/X86/shuffle-extract_subvector.ll
The file was modifiedllvm/test/Analysis/CostModel/X86/fptoui.ll
The file was modifiedllvm/lib/Target/X86/X86TargetTransformInfo.cpp
The file was modifiedllvm/test/Analysis/CostModel/X86/fptosi.ll
Commit c7faa6814248cf2443cce856a74247fc70699f98 by asbirlea
Revert "ARM-Darwin: keep the frame register reserved even if not
updated."
This reverts commit a7d90af1be48234ce583e00fb16e33633d44ae38.
This revision came back as the root-cause for crashes in internal
ARM-IOS apps. Reproducer in https://bugs.llvm.org/show_bug.cgi?id=44231.
The file was modifiedllvm/test/CodeGen/Thumb2/2010-03-15-AsmCCClobber.ll
The file was removedllvm/test/CodeGen/ARM/r7-fixed-darwin.ll
The file was modifiedllvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp
The file was modifiedllvm/test/CodeGen/Thumb/long.ll
Commit 1aa17023819216dae77c7798510f178dae07a57f by phosek
[libcxx{,abi}] Don't link libpthread and libdl on Fuchsia
These are a part of the libc so linking these explicitly isn't necessary
and embedding these as deplibs causes link time error.
This issues was introduced in a9b5fff which changed how we emit deplibs.
Differential Revision: https://reviews.llvm.org/D71135
The file was modifiedlibcxxabi/cmake/config-ix.cmake
The file was modifiedlibcxx/cmake/config-ix.cmake
Commit 142a75a9b16632d5bad60ae50b9171bfddbe422a by spatel
Revert "[InstCombine] reduce indentation; NFC"
This reverts commit 8bf8ef7116bd0daec570b35480ca969b74e66c6e. At least 1
of these supposedly NFC commits wasn't - sanitizer bot is angry.
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
Commit b6d6f5470f281db4716db8b2306113924afc6887 by spatel
Revert "[InstCombine] improve readability; NFC"
This reverts commit 7250ef3613cc6b81145b9543bafb86d7f9466cde. At least 1
of these supposedly NFC commits wasn't - sanitizer bot is angry.
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
Commit 43e2a901e1521759a0176cdec3aad4d00919142e by spatel
Revert "[InstCombine] reduce code duplication; NFC"
This reverts commit db5739658467e20a52f20e769d3580412e13ff87. At least 1
of these supposedly NFC commits wasn't - sanitizer bot is angry.
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
Commit 7f63db197e7453a6438c15e50a5508cc7613a293 by rnk
Avoid naming variable after type to fix GCC 5.3 build
GCC says:
.../llvm/lib/DebugInfo/GSYM/FunctionInfo.cpp:195:12: error: ‘InfoType’
is not a class, namespace, or enumeration
      case InfoType::EndOfList:
                  ^
Presumably, GCC thinks InfoType is a variable here. Work around it by
using the name IT as is done above.
The file was modifiedllvm/lib/DebugInfo/GSYM/FunctionInfo.cpp
Commit dbd112972416f48f7e5b117e7a14b6e4b4d38146 by richard
Stop checking whether std::strong_* has ::equivalent members.
Any attempt to use these would be a bug, so we shouldn't even look for
them.
The file was modifiedclang/test/SemaCXX/std-compare-cxx2a.cpp
The file was modifiedclang/lib/AST/ComparisonCategories.cpp
Commit 7b61ae68ecd7a127e69c9e0d2563bddb7eccad7a by aktoon
[AutoFDO] Inline replay for cold/small callees from sample profile
loader
Summary: Sample profile loader of AutoFDO tries to replay previous
inlining using context sensitive profile. The replay only repeats
inlining if the call site block is hot. As a result it punts inlining of
small functions, some of which can be beneficial for size, and will
still be inlined by CSGCC inliner later. The oscillation between sample
profile loader's inlining and regular CGSSC inlining cause unnecessary
loss of context-sensitive profile. It doesn't have much impact for
inline decision itself, but it negatively affects post-inline profile
quality as CGSCC inliner have to scale counts which is not as accurate
as the original context sensitive profile, and bad post-inline profile
can misguide code layout.
This change added regular Inline Cost calculation for sample profile
loader, so we can inline small functions upfront under switch
-sample-profile-inline-size. In addition
-sample-profile-cold-inline-threshold is added so we can tune the
separate size threshold - currently the default is chosen to be the same
as regular inliner's cold call-site threshold.
Reviewers: wmi, davidxl
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70750
The file was addedllvm/test/Transforms/SampleProfile/Inputs/inline-cold.prof
The file was addedllvm/test/Transforms/SampleProfile/inline-cold.ll
The file was modifiedllvm/lib/Transforms/IPO/SampleProfile.cpp
Commit 779a180d964bf362f26f4c493db749cbbae550c5 by a.bataev
[OPENMP50]Add if clause in distribute simd directive.
According to OpenMP 5.0, if clause can be used in for simd directive. If
condition in the if clause if false, the non-vectorized version of the
loop must be executed.
The file was modifiedclang/lib/CodeGen/CGStmtOpenMP.cpp
The file was modifiedclang/test/OpenMP/distribute_simd_ast_print.cpp
The file was modifiedclang/lib/Sema/SemaOpenMP.cpp
The file was modifiedclang/include/clang/Basic/OpenMPKinds.def
The file was addedclang/test/OpenMP/distribute_simd_if_messages.cpp
The file was modifiedclang/lib/Basic/OpenMPKinds.cpp
The file was modifiedclang/test/OpenMP/distribute_simd_codegen.cpp
Commit 2eb30fafa5f95d60353909c7c676431f2a29a745 by yamauchi
Revert "[PGO][PGSO] Instrument the code gen / target passes."
This reverts commit 9a0b5e14075a1f42a72eedb66fd4fde7985d37ac.
This seems to break buildbots.
The file was modifiedllvm/lib/Target/X86/X86OptimizeLEAs.cpp
The file was modifiedllvm/test/CodeGen/AArch64/O0-pipeline.ll
The file was modifiedllvm/include/llvm/CodeGen/TailDuplicator.h
The file was modifiedllvm/lib/Target/X86/X86FixupBWInsts.cpp
The file was modifiedllvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
The file was modifiedllvm/lib/CodeGen/CodeGenPrepare.cpp
The file was modifiedllvm/include/llvm/CodeGen/AsmPrinter.h
The file was modifiedllvm/lib/CodeGen/TailDuplicator.cpp
The file was modifiedllvm/lib/Target/X86/X86PadShortFunction.cpp
The file was modifiedllvm/lib/CodeGen/BranchFolding.cpp
The file was modifiedllvm/lib/CodeGen/ExpandMemCmp.cpp
The file was modifiedllvm/lib/CodeGen/BranchFolding.h
The file was modifiedllvm/lib/CodeGen/TailDuplication.cpp
The file was modifiedllvm/lib/CodeGen/IfConversion.cpp
The file was modifiedllvm/test/CodeGen/X86/O3-pipeline.ll
The file was modifiedllvm/test/CodeGen/ARM/O3-pipeline.ll
The file was modifiedllvm/lib/CodeGen/MachineCombiner.cpp
The file was modifiedllvm/test/CodeGen/X86/O0-pipeline.ll
The file was modifiedllvm/lib/CodeGen/MachineBlockPlacement.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
The file was modifiedllvm/test/CodeGen/AArch64/O3-pipeline.ll
Commit a7bdab2e9d59ba0fdf06390f4ddadfd00fe50f2e by Akira
[clang-tidy] Pass -faligned-allocation on the compiler command line to
fix compile error
The test was failing when run on OSes older than MacOSX10.14 because
aligned deallocation functions are unavailable on older OSes.
rdar://problem/57706710
The file was modifiedclang-tools-extra/test/clang-tidy/checkers/cert-mem57-cpp-cpp17.cpp
Commit c089f0289856b8f72b06c30daa7848e431c8e36e by rnk
[X86] Don't setup and teardown memory for a musttail call
Summary: musttail calls should not require allocating extra stack for
arguments. Updates to arguments passed in memory should happen in place
before the epilogue.
This bug was mostly a missed optimization, unless inalloca was used and
store to push conversion fired.
If a reserved call frame was used for an inalloca musttail call, the
call setup and teardown instructions would be deleted, and SP
adjustments would be inserted in the prologue and epilogue. You can see
these are removed from several test cases in this change.
In the case where the stack frame was not reserved, i.e. call frame
optimization fires and turns argument stores into pushes, then the
imbalanced call frame setup instructions created for inalloca calls
become a problem. They remain in the instruction stream, resulting in a
call setup that allocates zero bytes (expected for inalloca), and a call
teardown that deallocates the inalloca pack. This deallocation was
unbalanced, leading to subsequent crashes.
Reviewers: hans
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71097
The file was modifiedllvm/test/CodeGen/X86/cfguard-checks.ll
The file was modifiedllvm/test/CodeGen/X86/musttail-tailcc.ll
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
The file was modifiedllvm/test/CodeGen/X86/musttail-varargs.ll
The file was addedllvm/test/CodeGen/X86/musttail-inalloca.ll
Commit c8e36862f594a50fdd141337a3209965dabf4858 by tejohnson
[WPD] Remove unused parameter (NFC)
Remove unused parameter.
The file was modifiedllvm/lib/Transforms/IPO/WholeProgramDevirt.cpp
Commit d5abaaf140ac7f6d59ac11c0ecbdb8fa93972bf6 by spatel
[InstSimplify] add tests for copysign with fneg operand; NFC
The file was modifiedllvm/test/Transforms/InstSimplify/call.ll
Commit 040c39d50fb9c60de9020caf86e1a1fccfd6f861 by Artem Dergachev
[analyzer] Fix false positive on introspection of a block's internal
layout.
When implementation of the block runtime is available, we should not
warn that block layout fields are uninitialized simply because they're
on the stack.
The file was modifiedclang/lib/StaticAnalyzer/Core/RegionStore.cpp
The file was modifiedclang/test/Analysis/blocks.m
Commit 28b573d2497e394d54d47778012887ab66d51f6f by craig.topper
[TargetLowering] Fix another potential FPE in expandFP_TO_UINT
D53794 introduced code to perform the FP_TO_UINT expansion via
FP_TO_SINT in a way that would never expose floating-point exceptions in
the intermediate steps. Unfortunately, I just noticed there is still a
way this can happen. As discussed in D53794, the compiler now generates
this sequence:
// Sel = Src < 0x8000000000000000
// Val = select Sel, Src, Src - 0x8000000000000000
// Ofs = select Sel, 0, 0x8000000000000000
// Result = fp_to_sint(Val) ^ Ofs The problem is with the Src -
0x8000000000000000 expression. As I mentioned in the original review,
that expression can never overflow or underflow if the original value is
in range for FP_TO_UINT. But I missed that we can get an Inexact
exception in the case where Src is a very small positive value. (In this
case the result of the sub is ignored, but that doesn't help.)
Instead, I'd suggest to use the following sequence:
// Sel = Src < 0x8000000000000000
// FltOfs = select Sel, 0, 0x8000000000000000
// IntOfs = select Sel, 0, 0x8000000000000000
// Result = fp_to_sint(Val - FltOfs) ^ IntOfs In the case where the
value is already in range of FP_TO_SINT, we now simply compute Val - 0,
which now definitely cannot trap (unless Val is a NaN in which case we'd
want to trap anyway).
In the case where the value is not in range of FP_TO_SINT, but still in
range of FP_TO_UINT, the sub can never be inexact, as Val is between
2^(n-1) and (2^n)-1, i.e. always has the 2^(n-1) bit set, and the sub is
always simply clearing that bit.
There is a slight complication in the case where Val is a constant, so
we know at compile time whether Sel is true or false. In that scenario,
the old code would automatically optimize the sub away, while this no
longer happens with the new code. Instead, I've added extra code to
check for this case and then just fall back to FP_TO_SINT directly.
(This seems to catch even slightly more cases.)
Original version of the patch by Ulrich Weigand. X86 changes added by
Craig Topper
Differential Revision: https://reviews.llvm.org/D67105
The file was modifiedllvm/test/CodeGen/X86/fp-intrinsics.ll
The file was modifiedllvm/test/CodeGen/SystemZ/fp-strict-conv-12.ll
The file was modifiedllvm/test/CodeGen/X86/vector-constrained-fp-intrinsics.ll
The file was modifiedllvm/test/CodeGen/SystemZ/fp-strict-conv-10.ll
The file was modifiedllvm/test/CodeGen/X86/scalar-fp-to-i64.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
The file was modifiedllvm/test/CodeGen/X86/fp-cvt.ll
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
Commit 3b42eb3512e680caa75c0c5016abf060b1c10bb6 by thakis
wrap an rst file to 80 cols, to cycle bots
The file was modifiedllvm/docs/HowToAddABuilder.rst
Commit f3efd6957474bfd3b9b232ac6e4b3608174c3b79 by Alex Lorenz
[ObjC] Make sure that the implicit arguments for direct methods have
been setup
This commit sets the Self and Imp declarations for ObjC method
declarations, in addition to the definitions. It also fixes a bunch of
code in clang that had wrong assumptions about when getSelfDecl() would
be set:
- CGDebugInfo::getObjCMethodName and AnalysisConsumer::getFunctionName
would assume that it was
set for method declarations part of a protocol, which they never were,
and that self would be a Class type, which it isn't as it is id for a
protocol.
Also use the Canonical Decl to index the set of Direct methods so that
when calls and implementations interleave, the same llvm::Function is
used and the same symbol name emitted.
Radar-Id: rdar://problem/57661767
Patch by: Pierre Habouzit
Differential Revision: https://reviews.llvm.org/D71091
The file was modifiedclang/lib/CodeGen/CGDebugInfo.cpp
The file was modifiedclang/lib/Sema/SemaDeclObjC.cpp
The file was modifiedclang/test/CodeGenObjC/direct-method.m
The file was modifiedclang/lib/CodeGen/CGObjCMac.cpp
The file was modifiedclang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
The file was modifiedclang/lib/Serialization/ASTWriterDecl.cpp
The file was modifiedclang/lib/Serialization/ASTReaderDecl.cpp
Commit 84fdd9d7a50b9b41148e5ae8b93bfc4d2613feea by Amara Emerson
[X86] Fix prolog/epilog mismatch for stack protectors on win32-macho.
The xor'ing behaviour is only used for msvc/crt environments, when we're
targeting macho the guard load code doesn't know about the xor in the
epilog. Disable xor'ing when targeting win32-macho to be consistent.
Differential Revision: https://reviews.llvm.org/D71095
The file was addedllvm/test/CodeGen/X86/stack-protector-strong-macho-win32-xor.ll
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
Commit 1d9291cc785c453ac189d131271e91f8aaf6858c by rnk
[MC] Rewrite tablegen for printInstrAlias to comiple faster, NFC
Before this change, the *InstPrinter.cpp files of each target where some
of the slowest objects to compile in all of LLVM. See this snippet
produced by ClangBuildAnalyzer: https://reviews.llvm.org/P8171$96 Search
for "InstPrinter", and see that it shows up in a few places.
Tablegen was emitting a large switch containing a sequence of operand
checks, each of which created many conditions and many BBs. Register
allocation and jump threading both did not scale well with such a large
repetitive sequence of basic blocks.
So, this change essentially turns those control flow structures into
data. The previous structure looked like:
  switch (Opc) {
case TGT::ADD:
   // check alias 1
   if (MI->getOperandCount() == N && // check num opnds
       MI->getOperand(0).isReg() && // check opnd 0
       ...
       MI->getOperand(1).isImm() && // check opnd 1
    AsmString = "foo";
    break;
  }
  // check alias 2
  if (...)
    ...
  return false;
The new structure looks like:
  OpToPatterns: Sorted table of opcodes mapping to pattern indices.
  \->
    Patterns: List of patterns. Previous table points to subrange of
              patterns to match.
     \->
       Conds: The if conditions above encoded as a kind and 32-bit
value.
See MCInstPrinter.cpp for the details of how the new data structures are
interpreted.
Here are some before and after metrics. Time to compile
AArch64InstPrinter.cpp:
0m29.062s vs. 0m2.203s size of the obj:
3.9M vs. 676K size of clang.exe:
97M vs. 96M
I have not benchmarked disassembly performance, but typically
disassemblers are bottlenecked on IO and string processing, not alias
matching, so I'm not sure it's interesting enough to be worth doing.
Reviewers: RKSimon, andreadb, xbolva00, craig.topper
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D70650
The file was modifiedllvm/utils/TableGen/AsmWriterEmitter.cpp
The file was modifiedllvm/lib/MC/MCInstPrinter.cpp
The file was modifiedllvm/include/llvm/MC/MCInstPrinter.h
Commit b4f4e370b59a753a51f11848f54e9705f43cccaf by sbc
[WebAssebmly][MC] Support .import_name/.import_field asm directives
Convert the MC test to use asm rather than bitcode.
This is a precursor to https://reviews.llvm.org/D70520.
Differential Revision: https://reviews.llvm.org/D70877
The file was modifiedllvm/lib/MC/WasmObjectWriter.cpp
The file was addedlld/test/wasm/import-name.ll
The file was modifiedllvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp
The file was modifiedclang/include/clang/Basic/AttrDocs.td
The file was removedllvm/test/MC/WebAssembly/import-module.ll
The file was modifiedllvm/include/llvm/MC/MCSymbolWasm.h
The file was addedllvm/test/MC/WebAssembly/import-module.s
The file was removedlld/test/wasm/import-names.ll
Commit 0a717d5b5d31fc2d5bc98ca695031fb09e65beb0 by steveire
Make it possible control matcher traversal kind with ASTContext
Summary: This will eventually allow traversal of an AST while ignoring
invisible AST nodes.  Currently it depends on the available enum values
for TraversalKinds.  That can be extended to ignore all invisible nodes
in the future.
Reviewers: klimek, aaron.ballman
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D61837
The file was modifiedclang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp
The file was modifiedclang/include/clang/ASTMatchers/ASTMatchersInternal.h
The file was modifiedclang/include/clang/AST/ASTContext.h
The file was modifiedclang/include/clang/ASTMatchers/ASTMatchers.h
The file was modifiedclang/lib/ASTMatchers/ASTMatchFinder.cpp
The file was modifiedclang/include/clang/AST/ASTNodeTraverser.h
The file was modifiedclang/lib/ASTMatchers/ASTMatchersInternal.cpp
The file was modifiedclang/lib/AST/ASTContext.cpp
Commit 6555995a6d4545ff59dcf3388f9acfce3b6129a5 by donh
[CommandLine] Add callbacks to Options
Summary: Add a new cl::callback attribute to Option.
This attribute specifies a callback function that is called when an
option is seen, and can be used to set other options, as in option A
implies option B.  If the option is a `cl::list`, and
`cl::CommaSeparated` is also specified, the callback will fire once for
each value.  This could be used to validate combinations or selectively
set other options.
Reviewers: beanz, thomasfinch, MaskRay, thopre, serge-sans-paille
Reviewed By: beanz
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70620
The file was modifiedllvm/unittests/Support/CommandLineTest.cpp
The file was modifiedllvm/docs/CommandLine.rst
The file was modifiedllvm/include/llvm/Support/CommandLine.h
The file was modifiedllvm/docs/ReleaseNotes.rst
Commit 60573ae6fe509b618dc6a2c5c55d921bccd77608 by rnk
Remove Expr.h include from ASTContext.h, NFC
ASTContext.h is popular, prune its includes. Expr.h brings in Attr.h,
which is also expensive.
Move BlockVarCopyInit to Expr.h to accomplish this.
The file was modifiedclang/lib/Index/USRGeneration.cpp
The file was modifiedclang/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp
The file was modifiedclang/lib/AST/ASTTypeTraits.cpp
The file was modifiedclang/include/clang/StaticAnalyzer/Checkers/SValExplainer.h
The file was modifiedclang/lib/AST/ASTContext.cpp
The file was modifiedclang/lib/AST/ExprConstant.cpp
The file was modifiedclang/include/clang/AST/Expr.h
The file was modifiedclang/lib/AST/Decl.cpp
The file was modifiedclang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp
The file was modifiedclang/lib/AST/TypeLoc.cpp
The file was modifiedclang/lib/Tooling/Refactoring/ASTSelectionRequirements.cpp
The file was modifiedclang/lib/StaticAnalyzer/Core/CallEvent.cpp
The file was modifiedclang/lib/AST/DeclCXX.cpp
The file was modifiedclang/lib/Index/IndexSymbol.cpp
The file was modifiedclang/lib/Serialization/ASTWriterDecl.cpp
The file was modifiedclang/include/clang/AST/ASTTypeTraits.h
The file was modifiedclang/lib/StaticAnalyzer/Checkers/MacOSXAPIChecker.cpp
The file was modifiedclang/include/clang/AST/ASTFwd.h
The file was modifiedclang/lib/StaticAnalyzer/Checkers/MoveChecker.cpp
The file was modifiedclang/lib/Analysis/CloneDetection.cpp
The file was modifiedclang/lib/StaticAnalyzer/Checkers/MIGChecker.cpp
The file was modifiedclang/lib/Index/IndexingContext.cpp
The file was modifiedclang/include/clang/AST/ASTContext.h
The file was modifiedclang/lib/Index/IndexDecl.cpp
The file was modifiedclang/include/clang/AST/TypeLoc.h
Commit e1578fd2b79fe5af5f80c0c166a8abd0f816c022 by craig.topper
[Sema][X86] Consider target attribute into the checks in
validateOutputSize and validateInputSize.
The validateOutputSize and validateInputSize need to check whether AVX
or AVX512 are enabled. But this can be affected by the target attribute
so we need to factor that in.
This patch copies some of the code from CodeGen to create an appropriate
feature map that we can pass to the function. Probably need some
refactoring here to share more code with Codegen. Is there a good place
to do that? Also need to support the cpu_specific attribute as well.
Differential Revision: https://reviews.llvm.org/D68627
The file was modifiedclang/include/clang/AST/ASTContext.h
The file was modifiedclang/include/clang/Basic/TargetInfo.h
The file was modifiedclang/lib/CodeGen/CodeGenModule.cpp
The file was modifiedclang/lib/AST/ASTContext.cpp
The file was modifiedclang/test/CodeGen/x86_32-inline-asm.c
The file was modifiedclang/lib/CodeGen/CodeGenModule.h
The file was modifiedclang/lib/Sema/SemaStmtAsm.cpp
The file was modifiedclang/lib/CodeGen/CodeGenFunction.cpp
The file was modifiedclang/lib/Basic/Targets/X86.h
The file was modifiedclang/lib/Basic/Targets/X86.cpp
Commit b22d8ae7f436bfe63b28ceddea743071a6601eb1 by steveire
Use ASTDumper to dump the AST from clang-query
Summary: This way, the output is not limited by the various API
differences between the dump() member functions.  For example, all dumps
are now in color, while that used to be the case only for Decls and
Stmts, but not Types.
Additionally, while DynTypedNode::dump (which was used up to now) was
limited to dumping only Decls, Stmts and Types, this makes clang-query
support everything ASTNodeTraverser supports.
Reviewers: aaron.ballman
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D62056
The file was modifiedclang-tools-extra/clang-query/Query.cpp
Commit eff08f40976e177923fe95759917e59375458f71 by rnk
Revert "[Sema][X86] Consider target attribute into the checks in
validateOutputSize and validateInputSize."
This reverts commit e1578fd2b79fe5af5f80c0c166a8abd0f816c022.
It introduces a dependency on Attr.h which I am removing from
ASTContext.h.
The file was modifiedclang/lib/CodeGen/CodeGenModule.h
The file was modifiedclang/lib/CodeGen/CodeGenFunction.cpp
The file was modifiedclang/test/CodeGen/x86_32-inline-asm.c
The file was modifiedclang/lib/Sema/SemaStmtAsm.cpp
The file was modifiedclang/lib/AST/ASTContext.cpp
The file was modifiedclang/lib/Basic/Targets/X86.cpp
The file was modifiedclang/lib/Basic/Targets/X86.h
The file was modifiedclang/lib/CodeGen/CodeGenModule.cpp
The file was modifiedclang/include/clang/Basic/TargetInfo.h
The file was modifiedclang/include/clang/AST/ASTContext.h
Commit 3131249204bcb85e506332ea07a3101b7f656fce by peter
gn build: Change scudo's list of supported platforms to a whitelist.
Scudo only supports building for android/linux/fuchsia, so require
target_os to be one of linux/fuchsia to do a stage2_unix scudo build.
Android is already covered by the stage2_android* toolchains below.
Differential Revision: https://reviews.llvm.org/D71131
The file was modifiedllvm/utils/gn/secondary/compiler-rt/lib/scudo/BUILD.gn
Commit 2e8dc8590d8b412a131b127e7aa4aad0d7fc7fa0 by steveire
Add matchDynamic convenience functions
Summary: These correspond to the existing match() free functions.
Reviewers: aaron.ballman
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D54406
The file was modifiedclang/unittests/ASTMatchers/ASTMatchersNodeTest.cpp
The file was modifiedclang/include/clang/ASTMatchers/ASTMatchFinder.h