FailedChanges

Summary

  1. Revert [NFC] Better encapsulation of llvm::Optional Storage
  2. [NFC] Better encapsulation of llvm::Optional Storage, part II Fix for better Windows support.
  3. [NFC] Better encapsulation of llvm::Optional Storage Second attempt, trying to navigate out of the UB zone using union for storage instead of raw bytes. I'm prepared to revert that commit as soon as validation breaks, which is likely to happen.
  4. [LLVM-C] Add bindings to create enumerators Summary: The C API don't have the bindings to create enumerators, needed to create an enumeration. Reviewers: whitequark, CodaFi, harlanhaskins, deadalnix Reviewed By: whitequark, CodaFi, harlanhaskins Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58323
  5. [InstCombine] add even more tests for unsigned saturated add; NFC The pattern-matching from rL354221 / rL354224 doesn't cover these, so we're up to 8 different commuted possibilities. There may still be 1 more variant of this pattern.
  6. [analyzer] Make valist.Uninitialized depend on ValistBase Accidentally left this dependency out, resulting in an assert failure if only valist.Uninitialized is enabled from the valist package.
  7. [X86] In FP_TO_INTHelper, when moving data from SSE register to X87 register file via the stack, use the same stack slot we use for the integer conversion. No need for a separate stack slot. The lifetimes don't overlap. Also fix the MachinePointerInfo for the final load after the integer conversion to indicate it came from the stack slot.
  8. [NFC] Add a llvm_unreachable to silence a warning in SubstObjCTypeArgsVisitor All cases in the switch are covered. NFC.
  9. Recommit "[AST] Factor out the logic of the various Expr::Ignore*" (Originally commited in r354215 and reverted in r354216 because of a missed failing clang-tidy test (fix in r354228)) Now that the implementation of all of the Expr::Ignore* is in Expr.cpp we can try to remove some duplication. Do this by separating the logic of the Expr::Ignore* from the iterative loop. This is NFC, except for one change: IgnoreParenImpCasts now skips, among other things, everything that IgnoreImpCasts skips. This means FullExpr are now skipped by IgnoreParenImpCasts. This was likely an oversight when FullExpr was added to the nodes skipped by IgnoreImpCasts. Differential Revision: https://reviews.llvm.org/D57267 Reviewed By: aaron.ballman (with comments from void and rnk)
  10. [compiler-rt] Fix broken sanitizer bots (hopefully) According to the logs and local debugging there were two issues: 1) tsan tests listed libc++.a before the source file. That's usually ok for shared libraries, but the linker will not add symbols from a static library unless needed at that time. As a result the tests that rely upon symbols from the library (and not only include the headers) had undefined references. To solve this I'm adding a new substitution %link_libcxx_tsan which expands to libc++.a if available. 2) The target Fuzzer-x86_64-Test linked in SANITIZER_TEST_CXX_LIBRARIES which defaults to -lstdc++. This resulted in error messages like hidden symbol '_ZdlPv' is not defined locally hidden symbol '_Znwm' is not defined locally when using GNU gold (ld.bfd and lld are fine). Removing the linkage is fine because we build a custom libc++ for that purpose.
  11. [TEST] Remove 2>&1 from tests Avoid confusing CHECKS with debug dumps of sets that can be printed differently.
  12. [clang-tidy][NFCI] DanglingHandleCheck: Remove a superflous IgnoreParenImpCasts ExprWithCleanups is currently not skipped by IgnoreParenImpCasts, but is skipped by IgnoreImpCasts. In view of fixing this inconsistency in D57267, remove the IgnoreParenImpCasts between the ReturnStmt and the ExprWithCleanups which is not needed since ExprWithCleanups is always created as a direct child of ReturnStmt (by inspection of each ReturnStmt::Create in Sema/SemaStmt.cpp). NFC intended.
  13. [NFC] Teach getInnermostLoopFor walk up the loop trees This should be NFC in current use case of this method, but it will help to use it for solving more compex tasks in follow-up patches.
  14. [SelectionDAG] Extract [US]MULO expansion into TL method; NFC In preparation for supporting vector expansion. Add an isPostTypeLegalization flag to makeLibCall(), because this expansion relies on the legalized form using MERGE_VALUES. Drop the corresponding variant of ExpandLibCall, which is no longer used. Differential Revision: https://reviews.llvm.org/D58006
  15. [InstCombine] reduce more unsigned saturated add with 'not' op We want to use the sum in the icmp to allow matching with m_UAddWithOverflow and eliminate the 'not'. This is discussed in D51929 and is another step towards solving PR14613: https://bugs.llvm.org/show_bug.cgi?id=14613 Name: not op %notx = xor i32 %x, -1 %a = add i32 %x, %y %c = icmp ult i32 %notx, %y %r = select i1 %c, i32 -1, i32 %a => %a = add i32 %x, %y %c2 = icmp ult i32 %a, %y %r = select i1 %c2, i32 -1, i32 %a Name: not op ugt %notx = xor i32 %x, -1 %a = add i32 %x, %y %c = icmp ugt i32 %y, %notx %r = select i1 %c, i32 -1, i32 %a => %a = add i32 %x, %y %c2 = icmp ult i32 %a, %y %r = select i1 %c2, i32 -1, i32 %a https://rise4fun.com/Alive/niom (The matching here is still incomplete.)
  16. [InstCombine] add more tests for unsigned saturated add; NFC Extend the pattern-matching from rL354219 / rL354221.
  17. [RISCV] Default enable RISCV linker relaxation Differential Revision: https://reviews.llvm.org/D47127
  18. [InstCombine] reduce unsigned saturated add with 'not' op We want to use the sum in the icmp to allow matching with m_UAddWithOverflow and eliminate the 'not'. This is discussed in D51929 and is another step towards solving PR14613: https://bugs.llvm.org/show_bug.cgi?id=14613 (The matching here is incomplete. Trying to take minimal steps to make sure we don't induce infinite looping from existing canonicalizations of the 'select'.)
Revision 354240 by serge_sans_paille:
Revert [NFC] Better encapsulation of llvm::Optional Storage
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/ADT/Optional.h (diff)llvm.src/include/llvm/ADT/Optional.h
Revision 354239 by serge_sans_paille:
[NFC] Better encapsulation of llvm::Optional Storage, part II

Fix for better Windows support.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/ADT/Optional.h (diff)llvm.src/include/llvm/ADT/Optional.h
Revision 354238 by serge_sans_paille:
[NFC] Better encapsulation of llvm::Optional Storage

Second attempt, trying to navigate out of the UB zone using
union for storage instead of raw bytes.

I'm prepared to revert that commit as soon as validation breaks,
which is likely to happen.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/ADT/Optional.h (diff)llvm.src/include/llvm/ADT/Optional.h
Revision 354237 by codafi:
[LLVM-C] Add bindings to create enumerators

Summary: The C API don't have the bindings to create enumerators, needed to create an enumeration.

Reviewers: whitequark, CodaFi, harlanhaskins, deadalnix

Reviewed By: whitequark, CodaFi, harlanhaskins

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D58323
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm-c/DebugInfo.h (diff)llvm.src/include/llvm-c/DebugInfo.h
The file was modified/llvm/trunk/lib/IR/DebugInfo.cpp (diff)llvm.src/lib/IR/DebugInfo.cpp
Revision 354236 by spatel:
[InstCombine] add even more tests for unsigned saturated add; NFC

The pattern-matching from rL354221 / rL354224 doesn't cover
these, so we're up to 8 different commuted possibilities.

There may still be 1 more variant of this pattern.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/test/Transforms/InstCombine/saturating-add-sub.ll (diff)llvm.src/test/Transforms/InstCombine/saturating-add-sub.ll
Revision 354235 by szelethus:
[analyzer] Make valist.Uninitialized depend on ValistBase

Accidentally left this dependency out, resulting in an assert failure if
only valist.Uninitialized is enabled from the valist package.
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/include/clang/StaticAnalyzer/Checkers/Checkers.td (diff)clang.src/include/clang/StaticAnalyzer/Checkers/Checkers.td
The file was modified/cfe/trunk/test/Analysis/valist-uninitialized.c (diff)clang.src/test/Analysis/valist-uninitialized.c
Revision 354234 by ctopper:
[X86] In FP_TO_INTHelper, when moving data from SSE register to X87 register file via the stack, use the same stack slot we use for the integer conversion.

No need for a separate stack slot. The lifetimes don't overlap.

Also fix the MachinePointerInfo for the final load after the integer conversion to indicate it came from the stack slot.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (diff)llvm.src/lib/Target/X86/X86ISelLowering.cpp
The file was modified/llvm/trunk/test/CodeGen/X86/scalar-fp-to-i64.ll (diff)llvm.src/test/CodeGen/X86/scalar-fp-to-i64.ll
The file was modified/llvm/trunk/test/CodeGen/X86/vec_cast3.ll (diff)llvm.src/test/CodeGen/X86/vec_cast3.ll
Revision 354233 by brunoricci:
[NFC] Add a llvm_unreachable to silence a warning in SubstObjCTypeArgsVisitor

All cases in the switch are covered. NFC.
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/lib/AST/Type.cpp (diff)clang.src/lib/AST/Type.cpp
Revision 354232 by brunoricci:
Recommit "[AST] Factor out the logic of the various Expr::Ignore*"

(Originally commited in r354215 and reverted in r354216 because of a
missed failing clang-tidy test (fix in r354228))

Now that the implementation of all of the Expr::Ignore* is in Expr.cpp
we can try to remove some duplication. Do this by separating the logic
of the Expr::Ignore* from the iterative loop.

This is NFC, except for one change: IgnoreParenImpCasts now skips,
among other things, everything that IgnoreImpCasts skips. This means
FullExpr are now skipped by IgnoreParenImpCasts. This was likely an
oversight when FullExpr was added to the nodes skipped by IgnoreImpCasts.

Differential Revision: https://reviews.llvm.org/D57267

Reviewed By: aaron.ballman (with comments from void and rnk)
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/include/clang/AST/Expr.h (diff)clang.src/include/clang/AST/Expr.h
The file was modified/cfe/trunk/lib/AST/Expr.cpp (diff)clang.src/lib/AST/Expr.cpp
Revision 354231 by hahnfeld:
[compiler-rt] Fix broken sanitizer bots (hopefully)

According to the logs and local debugging there were two issues:
1) tsan tests listed libc++.a before the source file. That's usually
   ok for shared libraries, but the linker will not add symbols from
   a static library unless needed at that time. As a result the tests
   that rely upon symbols from the library (and not only include the
   headers) had undefined references.
   To solve this I'm adding a new substitution %link_libcxx_tsan which
   expands to libc++.a if available.
2) The target Fuzzer-x86_64-Test linked in SANITIZER_TEST_CXX_LIBRARIES
   which defaults to -lstdc++. This resulted in error messages like
     hidden symbol '_ZdlPv' is not defined locally
     hidden symbol '_Znwm' is not defined locally
   when using GNU gold (ld.bfd and lld are fine). Removing the linkage
   is fine because we build a custom libc++ for that purpose.
Change TypePath in RepositoryPath in Workspace
The file was modified/compiler-rt/trunk/lib/fuzzer/tests/CMakeLists.txt (diff)compiler-rt.src/lib/fuzzer/tests/CMakeLists.txt
The file was modified/compiler-rt/trunk/test/tsan/dl_iterate_phdr.cc (diff)compiler-rt.src/test/tsan/dl_iterate_phdr.cc
The file was modified/compiler-rt/trunk/test/tsan/dlclose.cc (diff)compiler-rt.src/test/tsan/dlclose.cc
The file was modified/compiler-rt/trunk/test/tsan/ignore_lib0.cc (diff)compiler-rt.src/test/tsan/ignore_lib0.cc
The file was modified/compiler-rt/trunk/test/tsan/ignore_lib1.cc (diff)compiler-rt.src/test/tsan/ignore_lib1.cc
The file was modified/compiler-rt/trunk/test/tsan/ignore_lib2.cc (diff)compiler-rt.src/test/tsan/ignore_lib2.cc
The file was modified/compiler-rt/trunk/test/tsan/ignore_lib3.cc (diff)compiler-rt.src/test/tsan/ignore_lib3.cc
The file was modified/compiler-rt/trunk/test/tsan/ignore_lib4.cc (diff)compiler-rt.src/test/tsan/ignore_lib4.cc
The file was modified/compiler-rt/trunk/test/tsan/ignore_lib5.cc (diff)compiler-rt.src/test/tsan/ignore_lib5.cc
The file was modified/compiler-rt/trunk/test/tsan/libcxx/std_shared_ptr.cc (diff)compiler-rt.src/test/tsan/libcxx/std_shared_ptr.cc
The file was modified/compiler-rt/trunk/test/tsan/lit.cfg (diff)compiler-rt.src/test/tsan/lit.cfg
The file was modified/compiler-rt/trunk/test/tsan/load_shared_lib.cc (diff)compiler-rt.src/test/tsan/load_shared_lib.cc
The file was modified/compiler-rt/trunk/test/tsan/real_deadlock_detector_stress_test.cc (diff)compiler-rt.src/test/tsan/real_deadlock_detector_stress_test.cc
Revision 354229 by mkazantsev:
[TEST] Remove 2>&1 from tests

Avoid confusing CHECKS with debug dumps of sets that can be printed differently.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/test/Transforms/LoopSimplifyCFG/constant-fold-branch.ll (diff)llvm.src/test/Transforms/LoopSimplifyCFG/constant-fold-branch.ll
Revision 354228 by brunoricci:
[clang-tidy][NFCI] DanglingHandleCheck: Remove a superflous IgnoreParenImpCasts

ExprWithCleanups is currently not skipped by IgnoreParenImpCasts, but is skipped
by IgnoreImpCasts. In view of fixing this inconsistency in D57267, remove the
IgnoreParenImpCasts between the ReturnStmt and the ExprWithCleanups which
is not needed since ExprWithCleanups is always created as a direct child of
ReturnStmt (by inspection of each ReturnStmt::Create in Sema/SemaStmt.cpp).

NFC intended.
Change TypePath in RepositoryPath in Workspace
The file was modified/clang-tools-extra/trunk/clang-tidy/bugprone/DanglingHandleCheck.cpp (diff)clang-tools-extra.src/clang-tidy/bugprone/DanglingHandleCheck.cpp
Revision 354227 by mkazantsev:
[NFC] Teach getInnermostLoopFor walk up the loop trees

This should be NFC in current use case of this method, but it will
help to use it for solving more compex tasks in follow-up patches.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Transforms/Scalar/LoopSimplifyCFG.cpp (diff)llvm.src/lib/Transforms/Scalar/LoopSimplifyCFG.cpp
Revision 354226 by nikic:
[SelectionDAG] Extract [US]MULO expansion into TL method; NFC

In preparation for supporting vector expansion.

Add an isPostTypeLegalization flag to makeLibCall(), because this
expansion relies on the legalized form using MERGE_VALUES. Drop
the corresponding variant of ExpandLibCall, which is no longer used.

Differential Revision: https://reviews.llvm.org/D58006
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/CodeGen/TargetLowering.h (diff)llvm.src/include/llvm/CodeGen/TargetLowering.h
The file was modified/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (diff)llvm.src/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
The file was modified/llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp (diff)llvm.src/lib/CodeGen/SelectionDAG/TargetLowering.cpp
Revision 354224 by spatel:
[InstCombine] reduce more unsigned saturated add with 'not' op

We want to use the sum in the icmp to allow matching with
m_UAddWithOverflow and eliminate the 'not'. This is discussed
in D51929 and is another step towards solving PR14613:
https://bugs.llvm.org/show_bug.cgi?id=14613

  Name: not op
  %notx = xor i32 %x, -1
  %a = add i32 %x, %y
  %c = icmp ult i32 %notx, %y
  %r = select i1 %c, i32 -1, i32 %a
  =>
  %a = add i32 %x, %y
  %c2 = icmp ult i32 %a, %y
  %r = select i1 %c2, i32 -1, i32 %a

  Name: not op ugt
  %notx = xor i32 %x, -1
  %a = add i32 %x, %y
  %c = icmp ugt i32 %y, %notx
  %r = select i1 %c, i32 -1, i32 %a
  =>
  %a = add i32 %x, %y
  %c2 = icmp ult i32 %a, %y
  %r = select i1 %c2, i32 -1, i32 %a

https://rise4fun.com/Alive/niom

(The matching here is still incomplete.)
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Transforms/InstCombine/InstCombineSelect.cpp (diff)llvm.src/lib/Transforms/InstCombine/InstCombineSelect.cpp
The file was modified/llvm/trunk/test/Transforms/InstCombine/saturating-add-sub.ll (diff)llvm.src/test/Transforms/InstCombine/saturating-add-sub.ll
Revision 354223 by spatel:
[InstCombine] add more tests for unsigned saturated add; NFC

Extend the pattern-matching from rL354219 / rL354221.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/test/Transforms/InstCombine/saturating-add-sub.ll (diff)llvm.src/test/Transforms/InstCombine/saturating-add-sub.ll
Revision 354222 by shiva:
[RISCV] Default enable RISCV linker relaxation

Differential Revision: https://reviews.llvm.org/D47127
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/lib/Driver/ToolChains/Arch/RISCV.cpp (diff)clang.src/lib/Driver/ToolChains/Arch/RISCV.cpp
The file was modified/cfe/trunk/test/Driver/riscv-features.c (diff)clang.src/test/Driver/riscv-features.c
Revision 354221 by spatel:
[InstCombine] reduce unsigned saturated add with 'not' op

We want to use the sum in the icmp to allow matching with
m_UAddWithOverflow and eliminate the 'not'. This is discussed
in D51929 and is another step towards solving PR14613:
https://bugs.llvm.org/show_bug.cgi?id=14613

(The matching here is incomplete. Trying to take minimal steps
to make sure we don't induce infinite looping from existing
canonicalizations of the 'select'.)
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Transforms/InstCombine/InstCombineSelect.cpp (diff)llvm.src/lib/Transforms/InstCombine/InstCombineSelect.cpp
The file was modified/llvm/trunk/test/Transforms/InstCombine/saturating-add-sub.ll (diff)llvm.src/test/Transforms/InstCombine/saturating-add-sub.ll