platform/upstream/llvm.git
21 months ago[TableGen] Use std::size (NFC)
Kazu Hirata [Sat, 26 Nov 2022 18:47:22 +0000 (10:47 -0800)]
[TableGen] Use std::size (NFC)

std::size, introduced in C++17, allows us to directly obtain the
number of elements of an array.

21 months ago[NFC] Remove peekNextToken(int).
Manuel Klimek [Sat, 26 Nov 2022 18:20:22 +0000 (18:20 +0000)]
[NFC] Remove peekNextToken(int).

Arbitrary lookahead restricts the implementation of our TokenSource,
specifically getting in the way of changes to handle macros better.

Instead, use getNextToken to parse lookahead linearly, and
getPosition/setPosition to unwind our lookahead.

21 months ago[mlir][tensor][bufferize] Fix tensor.insert_slice regression
Matthias Springer [Sat, 26 Nov 2022 14:34:03 +0000 (15:34 +0100)]
[mlir][tensor][bufferize] Fix tensor.insert_slice regression

This reverts D132662 (apart from overall cleanups), which introduced a too aggressive optimization for tensor.insert_slice bufferization. Instead, bufferizesToMemoryRead is improved to handle some of these cases. The remaining cases can still bufferize efficiently when running the canonicalizer before the bufferization.

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

21 months ago[ObjectYAML] Use std::size (NFC)
Kazu Hirata [Sat, 26 Nov 2022 17:53:22 +0000 (09:53 -0800)]
[ObjectYAML] Use std::size (NFC)

std::size, introduced in C++17, allows us to directly obtain the
number of elements of an array.

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[AArch64] `LowerBUILD_VECTOR()`: `NormalizeBuildVector()` might return non-BUILD_VECTOR
Roman Lebedev [Sat, 26 Nov 2022 15:43:23 +0000 (18:43 +0300)]
[AArch64] `LowerBUILD_VECTOR()`: `NormalizeBuildVector()` might return non-BUILD_VECTOR

As apparent in the newly-added test, provided in:
https://github.com/llvm/llvm-project/commit/cf624b23bc5d5a6161706d1663def49380ff816a#commitcomment-90836329,
we should be more careful with handling wider vectors,
or we will assert later on.

21 months ago[CodeGen] Add missing copy assignment operator
Alexandre Ganea [Sat, 26 Nov 2022 15:38:47 +0000 (10:38 -0500)]
[CodeGen] Add missing copy assignment operator

When building on Windows with clang-cl ToT, before this patch I was seeing:
```
[2690/5505] Building CXX object lib/Target/ARM/CMakeFiles/LLVMARMCodeGen.dir/ARMISelLowering.cpp.obj
In file included from D:/git/llvm-project/llvm/lib/Target/ARM/ARMISelLowering.cpp:14:
In file included from D:/git/llvm-project/llvm/lib/Target/ARM/ARMISelLowering.h:23:
D:/git/llvm-project/llvm/include\llvm/CodeGen/SelectionDAGNodes.h(760,5): warning: definition of implicit copy assignment operator for 'use_iterator' is deprecated because it has a user-declared copy constructor [-Wdeprecated-copy]
    use_iterator(const use_iterator &I) = default;
    ^
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\include\xutility(1015,13): note: in implicit copy assignment operator for 'llvm::SDNode::use_iterator' first required here
        _It = _STD forward<_UIter>(_UIt);
            ^
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\include\xutility(5604,5): note: in instantiation of function template specialization 'std::_Seek_wrapped<llvm::SDNode::use_iterator, llvm::SDNode::use_iterator &>' requested here
    _Seek_wrapped(_First, _UFirst);
    ^
D:/git/llvm-project/llvm/include\llvm/ADT/STLExtras.h(1737,15): note: in instantiation of function template specialization 'std::find_if<llvm::SDNode::use_iterator, (lambda at D:/git/llvm-project/llvm/lib/Target/ARM/ARMISelLowering.cpp:15310:39)>' requested here
  return std::find_if(adl_begin(Range), adl_end(Range), P);
              ^
1 warning generated.
```

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

21 months ago[LLDB] Change getValue to value in NativeRegisterContextFreeBSD_x86_64.cpp
Krzysztof Parzyszek [Sat, 26 Nov 2022 14:26:58 +0000 (08:26 -0600)]
[LLDB] Change getValue to value in NativeRegisterContextFreeBSD_x86_64.cpp

Optional::getValue has been removed.

21 months ago[Support] Apply clang-format on .inc files. NFC.
Alexandre Ganea [Sat, 26 Nov 2022 14:36:43 +0000 (09:36 -0500)]
[Support] Apply clang-format on .inc files. NFC.

Apply clang-format on llvm/lib/Support/Windows/ and llvm/lib/Support/Unix/ since .inc files in these folders aren't picked up by default. Eventually we need to add this extension in the monorepo .clang-format file.

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

21 months ago[InstSimplify] Use dominate condtion to simplify instructions
chenglin.bi [Sat, 26 Nov 2022 13:28:34 +0000 (21:28 +0800)]
[InstSimplify] Use dominate condtion to simplify instructions

Fix #56795

Reviewed By: spatel

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

21 months ago[JITLink] Fix typo in comment. NFC
wanglei [Sat, 26 Nov 2022 12:55:49 +0000 (20:55 +0800)]
[JITLink] Fix typo in comment. NFC

21 months ago[Scalar] Use std::optional in LoopFlatten.cpp (NFC)
Kazu Hirata [Sat, 26 Nov 2022 08:02:40 +0000 (00:02 -0800)]
[Scalar] Use std::optional in LoopFlatten.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[Scalar] Use std::optional in InductiveRangeCheckElimination.cpp (NFC)
Kazu Hirata [Sat, 26 Nov 2022 07:59:45 +0000 (23:59 -0800)]
[Scalar] Use std::optional in InductiveRangeCheckElimination.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[Scalar] Use std::optional in GVN.cpp (NFC)
Kazu Hirata [Sat, 26 Nov 2022 07:55:43 +0000 (23:55 -0800)]
[Scalar] Use std::optional in GVN.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[Scalar] Use std::optional in CorrelatedValuePropagation.cpp (NFC)
Kazu Hirata [Sat, 26 Nov 2022 07:52:49 +0000 (23:52 -0800)]
[Scalar] Use std::optional in CorrelatedValuePropagation.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[InstCombine] Use std::optional in InstructionCombining.cpp (NFC)
Kazu Hirata [Sat, 26 Nov 2022 07:49:50 +0000 (23:49 -0800)]
[InstCombine] Use std::optional in InstructionCombining.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[InstCombine] Use std::optional in InstCombinePHI.cpp (NFC)
Kazu Hirata [Sat, 26 Nov 2022 07:46:38 +0000 (23:46 -0800)]
[InstCombine] Use std::optional in InstCombinePHI.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[IPO] Use std::optional in IROutliner.cpp (NFC)
Kazu Hirata [Sat, 26 Nov 2022 07:44:08 +0000 (23:44 -0800)]
[IPO] Use std::optional in IROutliner.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[IPO] Use std::optional in GlobalOpt.cpp (NFC)
Kazu Hirata [Sat, 26 Nov 2022 07:38:32 +0000 (23:38 -0800)]
[IPO] Use std::optional in GlobalOpt.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[IPO] Use std::optional in Attributor.cpp (NFC)
Kazu Hirata [Sat, 26 Nov 2022 07:35:05 +0000 (23:35 -0800)]
[IPO] Use std::optional in Attributor.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[IPO] Use std::optional in AttributorAttributes.cpp (NFC)
Kazu Hirata [Sat, 26 Nov 2022 07:23:40 +0000 (23:23 -0800)]
[IPO] Use std::optional in AttributorAttributes.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[Coroutines] Use std::optional in CoroFrame.cpp (NFC)
Kazu Hirata [Sat, 26 Nov 2022 07:18:17 +0000 (23:18 -0800)]
[Coroutines] Use std::optional in CoroFrame.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[Coroutines] Use std::optional in CoroElide.cpp (NFC)
Kazu Hirata [Sat, 26 Nov 2022 07:15:51 +0000 (23:15 -0800)]
[Coroutines] Use std::optional in CoroElide.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[X86] Use std::optional in X86SpeculativeLoadHardening.cpp (NFC)
Kazu Hirata [Sat, 26 Nov 2022 07:13:23 +0000 (23:13 -0800)]
[X86] Use std::optional in X86SpeculativeLoadHardening.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[RISCV] Use std::optional in RISCVMergeBaseOffset.cpp (NFC)
Kazu Hirata [Sat, 26 Nov 2022 07:08:26 +0000 (23:08 -0800)]
[RISCV] Use std::optional in RISCVMergeBaseOffset.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[RISCV] Use std::optional in RISCVISelLowering.cpp (NFC)
Kazu Hirata [Sat, 26 Nov 2022 07:04:58 +0000 (23:04 -0800)]
[RISCV] Use std::optional in RISCVISelLowering.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[RISCV] Use std::optional in RISCVISelDAGToDAG.cpp (NFC)
Kazu Hirata [Sat, 26 Nov 2022 07:02:26 +0000 (23:02 -0800)]
[RISCV] Use std::optional in RISCVISelDAGToDAG.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[RISCV] Use std::optional in RISCVGatherScatterLowering.cpp (NFC)
Kazu Hirata [Sat, 26 Nov 2022 06:59:57 +0000 (22:59 -0800)]
[RISCV] Use std::optional in RISCVGatherScatterLowering.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[PowerPC] Use std::optional in PPCMacroFusion.cpp (NFC)
Kazu Hirata [Sat, 26 Nov 2022 06:57:25 +0000 (22:57 -0800)]
[PowerPC] Use std::optional in PPCMacroFusion.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[NVPTX] Use std::optional in NVPTXTargetTransformInfo.cpp (NFC)
Kazu Hirata [Sat, 26 Nov 2022 06:54:42 +0000 (22:54 -0800)]
[NVPTX] Use std::optional in NVPTXTargetTransformInfo.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[AsmParser] Use std::optional in LanaiAsmParser.cpp (NFC)
Kazu Hirata [Sat, 26 Nov 2022 06:52:18 +0000 (22:52 -0800)]
[AsmParser] Use std::optional in LanaiAsmParser.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[Hexagon] Use std::optional in HexagonFrameLowering.cpp (NFC)
Kazu Hirata [Sat, 26 Nov 2022 06:49:13 +0000 (22:49 -0800)]
[Hexagon] Use std::optional in HexagonFrameLowering.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[ARM] Use std::optional in ARMISelDAGToDAG.cpp (NFC)
Kazu Hirata [Sat, 26 Nov 2022 06:45:26 +0000 (22:45 -0800)]
[ARM] Use std::optional in ARMISelDAGToDAG.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[Utils] Use std::optional in AMDGPUBaseInfo.cpp (NFC)
Kazu Hirata [Sat, 26 Nov 2022 06:43:00 +0000 (22:43 -0800)]
[Utils] Use std::optional in AMDGPUBaseInfo.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[AMDGPU] Use std::optional in SIPeepholeSDWA.cpp (NFC)
Kazu Hirata [Sat, 26 Nov 2022 06:40:00 +0000 (22:40 -0800)]
[AMDGPU] Use std::optional in SIPeepholeSDWA.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[AsmParser] Use std::optional in AMDGPUAsmParser.cpp (NFC)
Kazu Hirata [Sat, 26 Nov 2022 06:36:37 +0000 (22:36 -0800)]
[AsmParser] Use std::optional in AMDGPUAsmParser.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[AMDGPU] Use std::optional in AMDGPUReleaseVGPRs.cpp (NFC)
Kazu Hirata [Sat, 26 Nov 2022 06:30:26 +0000 (22:30 -0800)]
[AMDGPU] Use std::optional in AMDGPUReleaseVGPRs.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[AMDGPU] Use std::optional in AMDGPUInstructionSelector.cpp (NFC)
Kazu Hirata [Sat, 26 Nov 2022 06:23:09 +0000 (22:23 -0800)]
[AMDGPU] Use std::optional in AMDGPUInstructionSelector.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[GISel] Use std::optional in AArch64PostLegalizerLowering.cpp (NFC)
Kazu Hirata [Sat, 26 Nov 2022 06:20:07 +0000 (22:20 -0800)]
[GISel] Use std::optional in AArch64PostLegalizerLowering.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[GISel] Use std::optional in AArch64InstructionSelector.cpp (NFC)
Kazu Hirata [Sat, 26 Nov 2022 06:17:26 +0000 (22:17 -0800)]
[GISel] Use std::optional in AArch64InstructionSelector.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[AsmParser] Use std::optional in AArch64AsmParser.cpp (NFC)
Kazu Hirata [Sat, 26 Nov 2022 06:14:44 +0000 (22:14 -0800)]
[AsmParser] Use std::optional in AArch64AsmParser.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[AArch64] Use std::optional in AArch64LowerHomogeneousPrologEpilog.cpp (NFC)
Kazu Hirata [Sat, 26 Nov 2022 06:11:32 +0000 (22:11 -0800)]
[AArch64] Use std::optional in AArch64LowerHomogeneousPrologEpilog.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[AArch64] Use std::optional in AArch64LoadStoreOptimizer.cpp (NFC)
Kazu Hirata [Sat, 26 Nov 2022 06:08:30 +0000 (22:08 -0800)]
[AArch64] Use std::optional in AArch64LoadStoreOptimizer.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[AArch64] Use std::optional in AArch64ISelLowering.cpp (NFC)
Kazu Hirata [Sat, 26 Nov 2022 06:06:01 +0000 (22:06 -0800)]
[AArch64] Use std::optional in AArch64ISelLowering.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[AArch64] Use std::optional in AArch64FrameLowering.cpp (NFC)
Kazu Hirata [Sat, 26 Nov 2022 05:57:21 +0000 (21:57 -0800)]
[AArch64] Use std::optional in AArch64FrameLowering.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[Support] Use std::optional in VirtualFileSystem.cpp (NFC)
Kazu Hirata [Sat, 26 Nov 2022 05:53:00 +0000 (21:53 -0800)]
[Support] Use std::optional in VirtualFileSystem.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[Support] Use std::optional in RISCVISAInfo.cpp (NFC)
Kazu Hirata [Sat, 26 Nov 2022 05:48:18 +0000 (21:48 -0800)]
[Support] Use std::optional in RISCVISAInfo.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[Support] Use std::optional in JSON.cpp (NFC)
Kazu Hirata [Sat, 26 Nov 2022 05:45:47 +0000 (21:45 -0800)]
[Support] Use std::optional in JSON.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[Support] Use std::optional in FormatVariadic.cpp (NFC)
Kazu Hirata [Sat, 26 Nov 2022 05:25:27 +0000 (21:25 -0800)]
[Support] Use std::optional in FormatVariadic.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[Support] Use std::optional in ARMAttributeParser.cpp (NFC)
Kazu Hirata [Sat, 26 Nov 2022 05:22:19 +0000 (21:22 -0800)]
[Support] Use std::optional in ARMAttributeParser.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[Remarks] Use std::optional in YAMLRemarkSerializer.cpp (NFC)
Kazu Hirata [Sat, 26 Nov 2022 05:18:04 +0000 (21:18 -0800)]
[Remarks] Use std::optional in YAMLRemarkSerializer.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[Remarks] Use std::optional in YAMLRemarkParser.cpp (NFC)
Kazu Hirata [Sat, 26 Nov 2022 05:15:34 +0000 (21:15 -0800)]
[Remarks] Use std::optional in YAMLRemarkParser.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[Remarks] Use std::optional in RemarkParser.cpp (NFC)
Kazu Hirata [Sat, 26 Nov 2022 05:13:15 +0000 (21:13 -0800)]
[Remarks] Use std::optional in RemarkParser.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[ProfileData] Use std::optional in GCOV.cpp (NFC)
Kazu Hirata [Sat, 26 Nov 2022 04:35:43 +0000 (20:35 -0800)]
[ProfileData] Use std::optional in GCOV.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[Coverage] Use std::optional in CoverageMapping.cpp (NFC)
Kazu Hirata [Sat, 26 Nov 2022 04:33:10 +0000 (20:33 -0800)]
[Coverage] Use std::optional in CoverageMapping.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[mlir][vector] Add fold pattern for InsertOp(Constant into Constant)
Jakub Kuderski [Sat, 26 Nov 2022 04:00:48 +0000 (23:00 -0500)]
[mlir][vector] Add fold pattern for InsertOp(Constant into Constant)

This pattern comes with vector size threshold to make sure we do not
introduce too many large constants.

This help clean up code created by the Wide Integer Emulation pass.

Reviewed By: dcaballe

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

21 months ago[StaticAnalyzer] Don't use Optional::create (NFC)
Kazu Hirata [Fri, 25 Nov 2022 23:38:53 +0000 (15:38 -0800)]
[StaticAnalyzer] Don't use Optional::create (NFC)

Note that std::optional does not offer create().

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months agoAdd version to all LLVM cmake package
Thomas Preud'homme [Thu, 17 Nov 2022 23:35:18 +0000 (23:35 +0000)]
Add version to all LLVM cmake package

Add a version to non-LLVM cmake package so that users needing an exact
version match can use the version parameter to find_package. Also adjust
the find_package(LLVM) to use an exact version match as well.

Reviewed By: arsenm, stellaraccident, mceier

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

21 months ago[mlir][spirv] Enable WebGPU to use UnifyAliasedResourcePass
Lei Zhang [Fri, 25 Nov 2022 21:53:37 +0000 (21:53 +0000)]
[mlir][spirv] Enable WebGPU to use UnifyAliasedResourcePass

When targeting WebGPU, we also need to transcompile SPIR-V, into
WGSL this time. We have similar limitations there like when
targeting Metal or MoltenVK.

Reviewed By: kuhar

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

21 months ago[mlir][spirv] Add a field for client API in target environment
Lei Zhang [Fri, 25 Nov 2022 21:31:12 +0000 (21:31 +0000)]
[mlir][spirv] Add a field for client API in target environment

SPIR-V can be directly consumed by APIs like Vulkan and OpenCL,
where we can use the capability list to diffferentiate. It can
also be used as a compilation target to transcompile to shading
languages like WGSL to target WebGPU. We have no way to tell
that with just the capability list, so we cannot perform certain
transformations only applicable to those targets thus far. So
this commit add a field in the target environment to indicate
the client API for such purposes.

Reviewed By: kuhar

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

21 months ago[Passes] Use std::optional in PassBuilder.cpp (NFC)
Kazu Hirata [Fri, 25 Nov 2022 20:47:46 +0000 (12:47 -0800)]
[Passes] Use std::optional in PassBuilder.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[Object] Use std::optional in ELFObjectFile.cpp (NFC)
Kazu Hirata [Fri, 25 Nov 2022 20:44:51 +0000 (12:44 -0800)]
[Object] Use std::optional in ELFObjectFile.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[AIX][LTO] Teaching lto-aix-system-assembler Relative Path and Tilde Resolution
Qiongsi Wu [Fri, 25 Nov 2022 20:33:33 +0000 (15:33 -0500)]
[AIX][LTO] Teaching lto-aix-system-assembler Relative Path and Tilde Resolution

The `lto-aix-system-assembler` currently only understands absolute path. This patch teaches the option so that it can resolve relative paths and tilde.

Reviewed By: w2yehia

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

21 months ago[ObjectYAML] Use std::optional in MinidumpEmitter.cpp (NFC)
Kazu Hirata [Fri, 25 Nov 2022 20:34:10 +0000 (12:34 -0800)]
[ObjectYAML] Use std::optional in MinidumpEmitter.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months agoRevert "[LLDB] Recognize `std::noop_coroutine()` in `std::coroutine_handle` pretty...
Jason Molenda [Fri, 25 Nov 2022 20:28:28 +0000 (12:28 -0800)]
Revert "[LLDB] Recognize `std::noop_coroutine()` in `std::coroutine_handle` pretty printer"

This reverts commit 4346318f5c700f4e85f866610fb8328fc429319b.

This test case is failing on macOS, reverting until it can be
looked at more closely to unblock the macOS CI bots.

```
  File "/Volumes/work/llvm/llvm-project/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/coroutine_handle/TestCoroutineHandle.py", line 121, in test_libcpp
    self.do_test(USE_LIBCPP)
  File "/Volumes/work/llvm/llvm-project/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/coroutine_handle/TestCoroutineHandle.py", line 45, in do_test
    self.expect_expr("noop_hdl",
  File "/Volumes/work/llvm/llvm-project/lldb/packages/Python/lldbsuite/test/lldbtest.py", line 2441, in expect_expr
    value_check.check_value(self, eval_result, str(eval_result))
  File "/Volumes/work/llvm/llvm-project/lldb/packages/Python/lldbsuite/test/lldbtest.py", line 306, in check_value
    test_base.assertEqual(self.expect_summary, val.GetSummary(),
AssertionError: 'noop_coroutine' != 'coro frame = 0x100004058'
- noop_coroutine+ coro frame = 0x100004058 : (std::coroutine_handle<void>) $1 = coro frame = 0x100004058 {
  resume = 0x0000000100003344 (a.out`___lldb_unnamed_symbol223)
  destroy = 0x0000000100003344 (a.out`___lldb_unnamed_symbol223)
}
Checking SBValue: (std::coroutine_handle<void>) $1 = coro frame = 0x100004058 {
  resume = 0x0000000100003344 (a.out`___lldb_unnamed_symbol223)
  destroy = 0x0000000100003344 (a.out`___lldb_unnamed_symbol223)
}
```

Those lldb_unnamed_symbols are synthetic names that ObjectFileMachO
adds to the symbol table, most often seen with stripped binaries,
based off of the function start addresses for all the functions -
if a function has no symbol name, lldb adds one of these names.
This change was originally landed via https://reviews.llvm.org/D132624

21 months ago[ObjectYAML] Use std::optional in CodeViewYAMLSymbols.cpp (NFC)
Kazu Hirata [Fri, 25 Nov 2022 20:31:45 +0000 (12:31 -0800)]
[ObjectYAML] Use std::optional in CodeViewYAMLSymbols.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[MC] Use std::optional in MCSchedule.cpp (NFC)
Kazu Hirata [Fri, 25 Nov 2022 20:28:42 +0000 (12:28 -0800)]
[MC] Use std::optional in MCSchedule.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[MCParser] Use std::optional in WasmAsmParser.cpp (NFC)
Kazu Hirata [Fri, 25 Nov 2022 20:26:10 +0000 (12:26 -0800)]
[MCParser] Use std::optional in WasmAsmParser.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[flang] Update fir.dispatch op lowering for tbp with character result
Valentin Clement [Fri, 25 Nov 2022 20:23:50 +0000 (21:23 +0100)]
[flang] Update fir.dispatch op lowering for tbp with character result

Take into account the result passed as arguments when computing
the pass object index.

Reviewed By: jeanPerier

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

21 months agoRevert "[LLDB] Do not dereference promise pointer in `coroutine_handle` pretty printer"
Jason Molenda [Fri, 25 Nov 2022 20:15:47 +0000 (12:15 -0800)]
Revert "[LLDB] Do not dereference promise pointer in `coroutine_handle` pretty printer"

This reverts commit cd3091a88f7c55c90d9b5fff372ce1cdfc71948d.

This change crashes on macOS systems in
formatters::StdlibCoroutineHandleSyntheticFrontEnd when
it fails to create the `ValueObjectSP promise` and calls
a method on it.  The failure causes a segfault while running
TestCoroutineHandle.py on the "LLDB Incremental" CI bot,
https://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/

This change originally landed via https://reviews.llvm.org/D132815

21 months ago[MCParser] Use std::optional in MasmParser.cpp (NFC)
Kazu Hirata [Fri, 25 Nov 2022 20:20:51 +0000 (12:20 -0800)]
[MCParser] Use std::optional in MasmParser.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[Linker] Use std::optional in IRMover.cpp (NFC)
Kazu Hirata [Fri, 25 Nov 2022 20:18:23 +0000 (12:18 -0800)]
[Linker] Use std::optional in IRMover.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[InterfaceStub] Use std::optional in ELFObjHandler.cpp (NFC)
Kazu Hirata [Fri, 25 Nov 2022 20:14:22 +0000 (12:14 -0800)]
[InterfaceStub] Use std::optional in ELFObjHandler.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months agoRevert "[lldb][NFC] Change FindDefinitionTypeForDWARFDeclContext() to take DWARFDIE"
Jason Molenda [Fri, 25 Nov 2022 20:11:37 +0000 (12:11 -0800)]
Revert "[lldb][NFC] Change FindDefinitionTypeForDWARFDeclContext() to take DWARFDIE"

The changes in https://reviews.llvm.org/D138612 cause a testsuite
failure on Darwin systems in TestCPPAccelerator.py, first flagged
by the "LLDB Incremental" CI bot.
https://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/
with the specific failure text appended to the phabracator.

This reverts commit c3c423b6cb2e1c00483e951ce8cc4d935e31cd14.

21 months ago[IR] Use std::optional in Verifier.cpp (NFC)
Kazu Hirata [Fri, 25 Nov 2022 20:11:44 +0000 (12:11 -0800)]
[IR] Use std::optional in Verifier.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[IR] Use std::optional in PassManager.cpp (NFC)
Kazu Hirata [Fri, 25 Nov 2022 20:08:56 +0000 (12:08 -0800)]
[IR] Use std::optional in PassManager.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[IR] Use std::optional in Module.cpp (NFC)
Kazu Hirata [Fri, 25 Nov 2022 20:06:20 +0000 (12:06 -0800)]
[IR] Use std::optional in Module.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[IR] Use std::optional in IntrinsicInst.cpp (NFC)
Kazu Hirata [Fri, 25 Nov 2022 20:03:40 +0000 (12:03 -0800)]
[IR] Use std::optional in IntrinsicInst.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[IR] Use std::optional in AsmWriter.cpp (NFC)
Kazu Hirata [Fri, 25 Nov 2022 20:01:12 +0000 (12:01 -0800)]
[IR] Use std::optional in AsmWriter.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[Symbolize] Use std::optional in MarkupFilter.cpp (NFC)
Kazu Hirata [Fri, 25 Nov 2022 19:58:33 +0000 (11:58 -0800)]
[Symbolize] Use std::optional in MarkupFilter.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[Native] Use std::optional in NativeTypeEnum.cpp (NFC)
Kazu Hirata [Fri, 25 Nov 2022 19:55:58 +0000 (11:55 -0800)]
[Native] Use std::optional in NativeTypeEnum.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[GSYM] Use std::optional in FunctionInfo.cpp (NFC)
Kazu Hirata [Fri, 25 Nov 2022 19:52:53 +0000 (11:52 -0800)]
[GSYM] Use std::optional in FunctionInfo.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[GSYM] Use std::optional in DwarfTransformer.cpp (NFC)
Kazu Hirata [Fri, 25 Nov 2022 19:49:32 +0000 (11:49 -0800)]
[GSYM] Use std::optional in DwarfTransformer.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[mlir][vector] Update stale comment. NFC.
Jakub Kuderski [Fri, 25 Nov 2022 19:48:23 +0000 (14:48 -0500)]
[mlir][vector] Update stale comment. NFC.

21 months ago[openmp] Support building for armv7 Windows with mingw tools
Martin Storsjö [Thu, 10 Nov 2022 13:02:05 +0000 (15:02 +0200)]
[openmp] Support building for armv7 Windows with mingw tools

This does things in the same way as
D137168 / a356782426f5bf54a00570e1f925345e5fda7b2e and
D101173 / 4fb0aaf03381473ec8af727edb4b5d59b64b0d60 did for aarch64.

This adds a C implementation of __kmp_invoke_microtask in the same
way as the fallback C implementation in z_Linux_util.cpp.

Both the existing C fallback used on arm linux, and this one added here,
fail test/misc_bugs/many-microtask-args.c similarly (which could be
considered as an XFAIL).

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

21 months ago[openmp] Fix build break for less common architectures
Martin Storsjö [Fri, 25 Nov 2022 12:17:24 +0000 (14:17 +0200)]
[openmp] Fix build break for less common architectures

fb947c358661b3bd3d5e1fa776ec74cc0f308854 introduced the gas
macro COMMON, but it was only defined within ifdefs of the form:

    #if (KMP_OS_LINUX || KMP_OS_DARWIN || KMP_OS_WINDOWS) && KMP_ARCH_AARCH64

It was used, however, within other conditions:

    #if KMP_ARCH_ARM || KMP_ARCH_MIPS

and:

    #if KMP_ARCH_PPC64 || KMP_ARCH_AARCH64 || KMP_ARCH_MIPS64 || KMP_ARCH_RISCV64 || KMP_ARCH_LOONGARCH64

Move the definition of the COMMON macro out from the current ifdef,
so that it always gets defined (as it's only dependent on the target
platform).

This fixes building on ARM (and presumably all the other mentioned
architectures except aarch64).

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

21 months ago[DWARF] Use std::optional in DWARFFormValue.cpp (NFC)
Kazu Hirata [Fri, 25 Nov 2022 19:45:47 +0000 (11:45 -0800)]
[DWARF] Use std::optional in DWARFFormValue.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[mlir][vector] Update fold pattern name. NFC.
Jakub Kuderski [Fri, 25 Nov 2022 19:43:13 +0000 (14:43 -0500)]
[mlir][vector] Update fold pattern name. NFC.

21 months ago[DWARF] Use std::optional in DWARFDebugFrame.cpp (NFC)
Kazu Hirata [Fri, 25 Nov 2022 19:41:44 +0000 (11:41 -0800)]
[DWARF] Use std::optional in DWARFDebugFrame.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[CodeView] Use std::optional in TypeStreamMerger.cpp (NFC)
Kazu Hirata [Fri, 25 Nov 2022 19:37:32 +0000 (11:37 -0800)]
[CodeView] Use std::optional in TypeStreamMerger.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[Reader] Use std::optional in BitcodeReader.cpp (NFC)
Kazu Hirata [Fri, 25 Nov 2022 19:33:19 +0000 (11:33 -0800)]
[Reader] Use std::optional in BitcodeReader.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[Analysis] Use std::optional in ValueTracking.cpp (NFC)
Kazu Hirata [Fri, 25 Nov 2022 19:30:34 +0000 (11:30 -0800)]
[Analysis] Use std::optional in ValueTracking.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[Analysis] Use std::optional in ScalarEvolution.cpp (NFC)
Kazu Hirata [Fri, 25 Nov 2022 19:25:45 +0000 (11:25 -0800)]
[Analysis] Use std::optional in ScalarEvolution.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[AArch64] Assembly support for FEAT_LRCPC3
Tomas Matheson [Tue, 8 Mar 2022 16:46:50 +0000 (16:46 +0000)]
[AArch64] Assembly support for FEAT_LRCPC3

This patch implements assembly support for the 2022 A-Profile Architecture
extension FEAT_LRCPC3. FEAT_LRCPC3 is AArch64 only and introduces new
variants of load/store instructions with release consistency ordering.

Specs for individual instructions can be found here:
https://developer.arm.com/documentation/ddi0602/2022-09/Base-Instructions/

This feature is optionally available from v8.2a and therefore not enabled by
default.

Contributors:
  Lucas Prates
  Sam Elliot
  Son Tuan Vu
  Tomas Matheson

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

21 months ago[mlir][vector] Add fold for ExtractStridedSlice(non-splat ConstantOp)
Jakub Kuderski [Fri, 25 Nov 2022 18:41:24 +0000 (13:41 -0500)]
[mlir][vector] Add fold for ExtractStridedSlice(non-splat ConstantOp)

This allows us to better canonicalize/clean-up code created by the Wide
Integer Emulation pass.

Reviewed By: antiagainst

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

21 months ago[mlir][vector] Constant fold sub-vector extraction
Jakub Kuderski [Fri, 25 Nov 2022 18:39:35 +0000 (13:39 -0500)]
[mlir][vector] Constant fold sub-vector extraction

This generalizes the existing fold for `ExtractOp(non-splat constant)`
to work with vector results. The vector case is handled by extracting
the subrange of attribute array.

My main use it to clean up code generated by the Wide Integer Emulation
pass.

Reviewed By: antiagainst

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

21 months ago[Analysis] Use std::optional in MemoryLocation.cpp (NFC)
Kazu Hirata [Fri, 25 Nov 2022 18:32:21 +0000 (10:32 -0800)]
[Analysis] Use std::optional in MemoryLocation.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[Analysis] Use std::optional in LoopAnalysisManager.cpp (NFC)
Kazu Hirata [Fri, 25 Nov 2022 18:28:54 +0000 (10:28 -0800)]
[Analysis] Use std::optional in LoopAnalysisManager.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[Analysis] Use std::optional in LazyValueInfo.cpp (NFC)
Kazu Hirata [Fri, 25 Nov 2022 18:25:36 +0000 (10:25 -0800)]
[Analysis] Use std::optional in LazyValueInfo.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[Analysis] Use std::optional in InlineCost.cpp (NFC)
Kazu Hirata [Fri, 25 Nov 2022 18:22:33 +0000 (10:22 -0800)]
[Analysis] Use std::optional in InlineCost.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

21 months ago[Analysis] Use std::optional in CGSCCPassManager.cpp (NFC)
Kazu Hirata [Fri, 25 Nov 2022 18:18:53 +0000 (10:18 -0800)]
[Analysis] Use std::optional in CGSCCPassManager.cpp (NFC)

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716