SuccessChanges

Summary

  1. [NFC][AMDGPU] Improve fused fmul+fadd tests. (details)
  2. [OpenMP] Refactored the function `target` (details)
  3. [NFC] Move findAllocaForValue into ValueTracking.h (details)
  4. [OpenMP] Refactored the function `targetDataEnd` (details)
  5. [ValueTracking] Remove AllocaForValue parameter (details)
  6. [flang] Fixes for RESHAPE() (details)
  7. [NewPM] Don't print 'Invalidating all non-preserved analyses' (details)
  8. [tbaa] Rename type-based-aa -> tbaa (details)
  9. [X86] Pass the OperandVector by reference to ParseIntelOperand and ParseRoundingMode. NFCI (details)
  10. [test] Fix thinlto-distributed-newpm.ll (details)
  11. Make a test case more flexible on Windows wrt the number of backslashes. (details)
  12. [NFC] GetUnderlyingObject -> getUnderlyingObject (details)
  13. debguserver's type sniffer to only treat .app things that end in .app (details)
  14. Fix a crash when the sample profile uses md5 and -sample-profile-merge-inlinee (details)
  15. [SimpleLoopUnswitch] Drop make.implicit metadata in case of non-trivial unswitching (details)
  16. [SimpleLoopUnswitch] Preserve make.implicit in non-trivial unswitch if legal (details)
  17. [X86] Remove x86_sse42_crc32_64_64 from X86TTIImpl::simplifyDemandedUseBitsIntrinsic (details)
  18. [JITLink] Use correct Addressable constructor. (details)
  19. [JumpThreading] Add a test for D84944 ; NFC (details)
  20. [MC] Support infix operator ! (details)
  21. [JumpThreading] Let SimplifyPartiallyRedundantLoad look into freeze (details)
  22. [Driver] Render -e for Gnu.cpp (details)
  23. [Driver] Exclude options::LinkerInput for GCC linking (details)
  24. [PowerPC] Retrieve the offset from load/store if it stores to stack slots (details)
Commit aa77232a63e3f7ca2f0077434d46e0f269499eae by dfukalov
[NFC][AMDGPU] Improve fused fmul+fadd tests.

Reviewed By: rampitec

Differential Revision: https://reviews.llvm.org/D84903
The file was modifiedllvm/test/CodeGen/AMDGPU/fmuladd.v2f16.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/fmuladd.f64.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/fmuladd.f32.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/fmuladd.f16.ll
Commit 8218eee269c382472b9809cb3cce7a98eed7a31b by tianshilei1992
[OpenMP] Refactored the function `target`

Refactored the function `target` to make preparation for fixing the
issue of ahead-of-time device memory deallocation.

Reviewed By: ye-luo

Differential Revision: https://reviews.llvm.org/D84816
The file was modifiedopenmp/libomptarget/src/omptarget.cpp
Commit 61cab352e377d5a37d47555bc56e11f052d7eb8b by Vitaly Buka
[NFC] Move findAllocaForValue into ValueTracking.h

Differential Revision: https://reviews.llvm.org/D84616
The file was modifiedllvm/include/llvm/Transforms/Utils/Local.h
The file was modifiedllvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
The file was modifiedllvm/include/llvm/Analysis/ValueTracking.h
The file was modifiedllvm/lib/Transforms/Utils/Local.cpp
The file was modifiedllvm/lib/Analysis/ValueTracking.cpp
Commit 0f1016562648e0c5ab0618823d5d6b7280ca86ba by tianshilei1992
[OpenMP] Refactored the function `targetDataEnd`

Refactored the function `targetDataEnd` to make preparation of fixing
the issue of ahead-of-time target memory deallocation. This patch only
renamed `targetDataEnd` related variables and functions to conform
with LLVM code standard.

Reviewed By: ye-luo

Differential Revision: https://reviews.llvm.org/D84991
The file was modifiedopenmp/libomptarget/src/private.h
The file was modifiedopenmp/libomptarget/src/device.cpp
The file was modifiedopenmp/libomptarget/src/device.h
The file was modifiedopenmp/libomptarget/src/api.cpp
The file was modifiedopenmp/libomptarget/src/omptarget.cpp
Commit b256cb88a716dfd270745af1bb98b49c22521a99 by Vitaly Buka
[ValueTracking] Remove AllocaForValue parameter

findAllocaForValue uses AllocaForValue to cache resolved values.
The function is used only to resolve arguments of lifetime
intrinsic which usually are not fare for allocas. So result reuse
is likely unnoticeable.

In followup patches I'd like to replace the function with
GetUnderlyingObjects.

Depends on D84616.

Differential Revision: https://reviews.llvm.org/D84617
The file was modifiedllvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
The file was modifiedllvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64StackTagging.cpp
The file was modifiedllvm/lib/Analysis/ValueTracking.cpp
The file was modifiedllvm/include/llvm/Analysis/ValueTracking.h
Commit 2cf52504bb076d24c23f161e92340828052b69f7 by psteinfeld
[flang] Fixes for RESHAPE()

I fixed an assert caused by passing an empty array as the source= argument to
RESHAPE().  In the process, I noticed that there were no tests for RESHAPE(),
so I wrote a test that covers all the description in 16.9.163.  In the process,
I made the error messages more consistent and descriptive.  I also changed the
test to see if a reference to an intrinsic function was a constant to say that
it is a constant if it's a refererence to an invalid intrinsic.  This avoids
emitting multiple messages for the same erroneous source.

Differential Revision: https://reviews.llvm.org/D84904
The file was modifiedflang/lib/Evaluate/check-expression.cpp
The file was modifiedflang/lib/Evaluate/constant.cpp
The file was modifiedflang/include/flang/Evaluate/constant.h
The file was modifiedflang/include/flang/Evaluate/intrinsics.h
The file was modifiedflang/lib/Evaluate/fold-implementation.h
The file was modifiedflang/lib/Evaluate/intrinsics.cpp
The file was addedflang/test/Semantics/reshape.f90
Commit b36c39260edcded47436f344e48f78cfbedac494 by aeubanks
[NewPM] Don't print 'Invalidating all non-preserved analyses'

If an analysis is actually invalidated, there's already a log statement
for that: 'Invalidating analysis: FooAnalysis'.
Otherwise the statement is not very useful.

Reviewed By: asbirlea, ychen

Differential Revision: https://reviews.llvm.org/D84981
The file was modifiedllvm/test/Transforms/LoopRotate/pr35210.ll
The file was modifiedllvm/test/Other/loop-pm-invalidation.ll
The file was modifiedllvm/test/Other/new-pass-manager.ll
The file was modifiedllvm/test/Transforms/LoopUnroll/unroll-loop-invalidation.ll
The file was modifiedllvm/test/Transforms/Inline/cgscc-incremental-invalidate.ll
The file was modifiedllvm/test/Transforms/SCCP/ipsccp-preserve-analysis.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/novect-lcssa-cfg-invalidation.ll
The file was modifiedllvm/include/llvm/IR/PassManagerImpl.h
The file was modifiedllvm/test/Transforms/SROA/dead-inst.ll
The file was modifiedllvm/test/Other/new-pm-thinlto-prelink-pgo-defaults.ll
Commit 47acbcf09aa60ff13845740b1c02c7ca017e46d0 by aeubanks
[tbaa] Rename type-based-aa -> tbaa

For consistency with legacy pass name.
Helps with 37 instances of "unknown pass name 'tbaa'" in check-llvm under NPM.

Reviewed By: ychen

Differential Revision: https://reviews.llvm.org/D84967
The file was modifiedllvm/test/Analysis/TypeBasedAliasAnalysis/placement-tbaa.ll
The file was modifiedllvm/test/Transforms/LoopUnrollAndJam/pragma-explicit.ll
The file was modifiedllvm/test/Analysis/DependenceAnalysis/AA.ll
The file was modifiedllvm/test/Transforms/LICM/promote-tls.ll
The file was modifiedllvm/test/Transforms/LICM/promote-order.ll
The file was modifiedllvm/test/Transforms/LICM/scalar-promote-memmodel.ll
The file was modifiedllvm/lib/Passes/PassRegistry.def
The file was modifiedllvm/test/Transforms/LoopUnrollAndJam/unroll-and-jam.ll
The file was modifiedllvm/test/Transforms/LICM/scalar-promote.ll
Commit 916d9e18774a10c837e50bb4f1b207e80f0db6e3 by craig.topper
[X86] Pass the OperandVector by reference to ParseIntelOperand and ParseRoundingMode. NFCI

Similar to what was recently done to ParseATTOperand. Make
ParseIntelOperand directly responsible for adding to the operand
vector instead of returning the operand. Return a bool for error.

Remove ErrorOperand since it is no longer used.
The file was modifiedllvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
Commit c03d3aca7d00db61eece554b7c4a9d921c1aff05 by aeubanks
[test] Fix thinlto-distributed-newpm.ll

Broken by https://reviews.llvm.org/D84981.
The file was modifiedclang/test/CodeGen/thinlto-distributed-newpm.ll
Commit 9f0225894254c4706519c85d6fc06c5382903fef by wolfgang_pieb
Make a test case more flexible on Windows wrt the number of backslashes.
The file was modifiedlld/test/ELF/dependency-file.s
Commit 89051ebacea72733ff7088cf09a760b1be707acf by Vitaly Buka
[NFC] GetUnderlyingObject -> getUnderlyingObject

I am going to touch them in the next patch anyway
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
The file was modifiedllvm/lib/CodeGen/MachinePipeliner.cpp
The file was modifiedllvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
The file was modifiedllvm/lib/Analysis/DependenceAnalysis.cpp
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
The file was modifiedllvm/lib/Transforms/Utils/VNCoercion.cpp
The file was modifiedllvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp
The file was modifiedllvm/lib/Transforms/IPO/AttributorAttributes.cpp
The file was modifiedllvm/lib/Analysis/ValueTracking.cpp
The file was modifiedllvm/lib/Transforms/Scalar/LICM.cpp
The file was modifiedllvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
The file was modifiedllvm/lib/Transforms/Utils/AssumeBundleBuilder.cpp
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUInline.cpp
The file was modifiedllvm/include/llvm/Analysis/ObjCARCAnalysisUtils.h
The file was modifiedllvm/include/llvm/Analysis/ValueTracking.h
The file was modifiedllvm/lib/Target/AMDGPU/SIInstrInfo.cpp
The file was modifiedllvm/lib/Target/AMDGPU/R600Instructions.td
The file was modifiedllvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
The file was modifiedllvm/lib/Analysis/AliasAnalysis.cpp
The file was modifiedllvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp
The file was modifiedllvm/lib/Analysis/LazyValueInfo.cpp
The file was modifiedllvm/lib/Analysis/Lint.cpp
The file was modifiedllvm/test/Analysis/LoopAccessAnalysis/nullptr.ll
The file was modifiedllvm/lib/Analysis/GlobalsModRef.cpp
The file was modifiedllvm/lib/Target/Mips/MipsDelaySlotFiller.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/promote-alloca-to-lds-phi.ll
The file was modifiedllvm/lib/Analysis/BasicAliasAnalysis.cpp
The file was modifiedllvm/lib/Analysis/ConstantFolding.cpp
The file was modifiedllvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp
The file was modifiedllvm/lib/Transforms/Utils/LoopUtils.cpp
The file was modifiedllvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
The file was modifiedllvm/lib/Transforms/Utils/InlineFunction.cpp
The file was modifiedllvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
The file was modifiedllvm/lib/Analysis/MemoryDependenceAnalysis.cpp
The file was modifiedllvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
The file was modifiedllvm/test/Transforms/SLPVectorizer/AMDGPU/address-space-ptr-sze-gep-index-assert.ll
The file was modifiedllvm/lib/Analysis/LoopAccessAnalysis.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
The file was modifiedllvm/lib/Analysis/CaptureTracking.cpp
The file was modifiedllvm/lib/Target/NVPTX/NVPTXLowerArgs.cpp
The file was modifiedllvm/lib/Analysis/InstructionSimplify.cpp
The file was modifiedllvm/lib/Transforms/Instrumentation/ThreadSanitizer.cpp
Commit abf546dd4f8326b821244b67eaa79ada7757d877 by Jason Molenda
debguserver's type sniffer to only treat .app things that end in .app

On an iOS device, if debugserver is left to figure out how to launch
the binary provided, it looks at the filename to see if it contains
".app" and asks FrontBoard to launch it.  However, if this is actually
a command line app with the characters ".app" in the name, it would
end up trying to launch that via the FrontBoard calls even though it
needed to be launched via posix_spawn.  For instance, a command line
program called com.application.tester.

Jim suggested this patch where we only send binaries that end in ".app"
to FrontBoard.

Often debugsever is invoked with a --launch command line argument to
specify the launch method, and none of this code is hit in that
instance.

<rdar://problem/65297100>
The file was modifiedlldb/tools/debugserver/source/debugserver.cpp
Commit 836991d3676fda06d0f07c816ba855c8a0c3e0aa by wmi
Fix a crash when the sample profile uses md5 and -sample-profile-merge-inlinee
is enabled.

When -sample-profile-merge-inlinee is enabled, new FunctionSamples may be
created during profile merge without GUIDToFuncNameMap being initialized.
That will occasionally cause compiler crash. The patch fixes it.

Differential Revision: https://reviews.llvm.org/D84994
The file was addedllvm/test/Transforms/SampleProfile/Inputs/inline-mergeprof.md5.prof
The file was modifiedllvm/lib/Transforms/IPO/SampleProfile.cpp
The file was modifiedllvm/test/Transforms/SampleProfile/inline-mergeprof.ll
The file was modifiedllvm/include/llvm/ProfileData/SampleProf.h
Commit d889e17eca8e8c43c6e4a2439fae5a1a40823623 by mkazantsev
[SimpleLoopUnswitch] Drop make.implicit metadata in case of non-trivial unswitching

Non-trivial unswitching simply moves terminator being unswitch from the loop
up to the switch block. It also preserves all metadata that was there. It might not
be a correct thing to do for `make.implicit` metadata. Consider case:
```
for (...) {
  cond = // computed in loop
  if (cond) return X;
  if (p == null) throw_npe(); !make implicit
}
```
Before the unswitching, if `p` is null and we reach this check, we are guaranteed
to go to `throw_npe()` block. Now we unswitch on `p == null` condition:
```
if (p == null) !make implicit {
  for (...) {
    if (cond) return X;
    throw_npe()
  }
} else {
  for (...) {
    if (cond) return X;
  }
}
```
Now, following `true` branch of `p == null` does not always lead us to
`throw_npe()` because the loop has side exit. Now, if we run ImplicitNullCheck
pass on this code, it may end up making the unswitch condition implicit. This may
lead us to turning normal path to `return X` into signal-throwing path, which is
not efficient.

Note that this does not happen during trivial unswitch: it guarantees that we do not
have side exits before condition being unswitched.

This patch fixes this situation by unconditional dropping of `make.implicit` metadata
when we perform non-trivial unswitch. We could preserve it if we could prove that the
condition always executes. This can be done as a follow-up.

Differential Revision: https://reviews.llvm.org/D84916
Reviewed By: asbirlea
The file was addedllvm/test/Transforms/SimpleLoopUnswitch/implicit-null-checks.ll
The file was modifiedllvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
Commit 8aaeee5fb6d7c513d065e55b4bc2ad39bd6e760a by mkazantsev
[SimpleLoopUnswitch] Preserve make.implicit in non-trivial unswitch if legal

We can preserve make.implicit metadata in the split block if it is
guaranteed that after following the branch we always reach the block
where processing of null case happens, which is equivalent to
"initial condition must execute if the loop is entered".

Differential Revision: https://reviews.llvm.org/D84925
Reviewed By: asbirlea
The file was modifiedllvm/test/Transforms/SimpleLoopUnswitch/implicit-null-checks.ll
The file was modifiedllvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
Commit 30a0dbb70d9e0c94a9bdc3d28e7c1c57d9891912 by craig.topper
[X86] Remove x86_sse42_crc32_64_64 from X86TTIImpl::simplifyDemandedUseBitsIntrinsic

It doesn't do any simplifying. It just computes known bits. We
can just let InstCombine call computeKnownBits which will handle
this just as well.
The file was modifiedllvm/lib/Target/X86/X86InstCombineIntrinsic.cpp
Commit c8fef0cc54faf51b769db3270c8fdbe6c65ef13d by Lang Hames
[JITLink] Use correct Addressable constructor.

Calling createAddressable(false) generates an absolute symbol. We want
createAddressable(0, false), which generates an external symbol.
The file was modifiedllvm/include/llvm/ExecutionEngine/JITLink/JITLink.h
Commit f561713d7513110b6e791959734cca9e0bf7fe33 by aqjune
[JumpThreading] Add a test for D84944 ; NFC
The file was addedllvm/test/Transforms/JumpThreading/pre-load.ll
Commit 1cc210383b281e9c78ff82c129d01efb598eee15 by maskray
[MC] Support infix operator !

Disabled for Darwin mode.

Also disabled for ARM which has compatible aliases (implied 'sp' operand
in 'srs*' instructions like 'srsda #31!').
The file was modifiedllvm/include/llvm/MC/MCExpr.h
The file was modifiedllvm/lib/MC/MCParser/AsmParser.cpp
The file was modifiedllvm/lib/MC/MCExpr.cpp
The file was modifiedllvm/lib/MC/MCParser/MasmParser.cpp
The file was addedllvm/test/MC/AsmParser/exprs-gnu.s
Commit ad48367722b23dd373e612c1c53b16290ae10194 by aqjune
[JumpThreading] Let SimplifyPartiallyRedundantLoad look into freeze

This patch allows SimplifyPartiallyRedundantLoad work when
the branch condition was frozen.

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D84944
The file was modifiedllvm/lib/Transforms/Scalar/JumpThreading.cpp
The file was modifiedllvm/test/Transforms/JumpThreading/pre-load.ll
Commit fcf8ada18f9cfb1261262e4b0399ae9ab40451f8 by maskray
[Driver] Render -e for Gnu.cpp
The file was modifiedclang/include/clang/Driver/Options.td
The file was modifiedclang/test/Driver/Xlinker-args.c
Commit c06e22fe07aa5eb8a9f8ce824cbab1bfe5a96581 by maskray
[Driver] Exclude options::LinkerInput for GCC linking

options::LinkerInput options may get duplicated after 6a75496836ea14bcfd2f4b59d35a1cad4ac58cee..
The file was modifiedclang/test/Driver/gcc_forward.c
The file was modifiedclang/lib/Driver/ToolChains/Gnu.cpp
Commit 9b04fec0021112d913058e81bf864e4f33c33dcc by qshanz
[PowerPC] Retrieve the offset from load/store if it stores to stack slots

Scheduler will try to retrieve the offset and base addr to determine if two
loads/stores are disjoint memory access. PowerPC failed to handle this for
frame index which will bring extra memory dependency for loads/stores.

Reviewed By: jji

Differential Revision: https://reviews.llvm.org/D84308
The file was modifiedllvm/lib/Target/PowerPC/PPCInstrInfo.cpp
The file was modifiedllvm/test/CodeGen/PowerPC/aix-cc-byval-split.ll
The file was modifiedllvm/test/CodeGen/PowerPC/aix-cc-byval.ll
The file was modifiedllvm/test/CodeGen/PowerPC/aix32-cc-abi-vaarg.ll
The file was modifiedllvm/test/CodeGen/PowerPC/aix64-cc-abi-vaarg.ll