Amir Ayupov [Sun, 11 Dec 2022 20:43:26 +0000 (12:43 -0800)]
[BOLT][NFC] Use std::optional in ShrinkWrapping
Amir Ayupov [Sun, 11 Dec 2022 20:41:57 +0000 (12:41 -0800)]
[BOLT][NFC] Use std::optional for readDWARFExpressionTargetReg
Amir Ayupov [Sun, 11 Dec 2022 20:40:06 +0000 (12:40 -0800)]
[BOLT][NFC] Use std::optional in DWARFRewriter
Amir Ayupov [Sun, 11 Dec 2022 20:33:47 +0000 (12:33 -0800)]
[BOLT][NFC] Use std::optional in has*NameRegex
Amir Ayupov [Sun, 11 Dec 2022 20:28:08 +0000 (12:28 -0800)]
[BOLT][NFC] Use std::optional in RI
Amir Ayupov [Sun, 11 Dec 2022 20:14:15 +0000 (12:14 -0800)]
[BOLT][NFC] Use std::optional for getLTOCommonName
Amir Ayupov [Sun, 11 Dec 2022 20:02:21 +0000 (12:02 -0800)]
[BOLT][NFC] Use std::optional in BC
Amir Ayupov [Sun, 11 Dec 2022 19:57:30 +0000 (11:57 -0800)]
[BOLT][NFC] Use std::optional in DataAggregator
Amir Ayupov [Sun, 11 Dec 2022 19:51:08 +0000 (11:51 -0800)]
[BOLT][NFC] Use std::optional in BAT
Craig Topper [Mon, 12 Dec 2022 04:44:24 +0000 (20:44 -0800)]
[RISCV] Enable the Machine Late Cleanup pass.
Believe the bug has been fixed with D139169
Reviewed By: asb
Differential Revision: https://reviews.llvm.org/D139753
Shilei Tian [Mon, 12 Dec 2022 03:46:56 +0000 (22:46 -0500)]
Revert "[OpenMP] Add `abort` to `FATAL_MESSAGE`"
This reverts commit
ac65b3c7a2ad67ce17d31dc14867dc83650f751e.
Shilei Tian [Mon, 12 Dec 2022 03:41:22 +0000 (22:41 -0500)]
[OpenMP] Add `abort` to `FATAL_MESSAGE`
Zi Xuan Wu (Zeson) [Mon, 12 Dec 2022 03:23:17 +0000 (11:23 +0800)]
[CSKY][NFC] Fix check-all error due to change of expected output
- Remove unnecessary symbol offset check in MC cases.
- Change other expected output in CodeGen cases.
Xiang1 Zhang [Mon, 12 Dec 2022 03:24:41 +0000 (11:24 +0800)]
[NFC] Update comment for TRUNC followed by a masked store
Zakk Chen [Tue, 17 May 2022 03:09:22 +0000 (20:09 -0700)]
[NFC][Clang] Add missing test cases for segment load
This patch fixed the missing test cases from:
010f329803c84e43ec15ffaff7b6e26b032cbcc6
Reviewed By: kito-cheng, craig.topper
Differential Revision: https://reviews.llvm.org/D139387
Yeting Kuo [Fri, 9 Dec 2022 08:20:04 +0000 (16:20 +0800)]
[VP][RISCV] Add vp.bitreverse and RISC-V support.
The patch also added function expandVPBITREVERSE to expand ISD::VP_BITREVERSE nodes.
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D139697
wangpc [Mon, 12 Dec 2022 02:44:45 +0000 (10:44 +0800)]
[RISCV][NFC] Define variables for vector VT list of different LMUL
This reduces several lines of code and these variables can be used
by followed patches.
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D139690
Xiang1 Zhang [Thu, 8 Dec 2022 09:24:20 +0000 (17:24 +0800)]
[DAG] Stop combine for masked compressstore
Reviewed By: WangPengfei
Differential Revision: https://reviews.llvm.org/D139682
Roman Lebedev [Mon, 12 Dec 2022 01:46:57 +0000 (04:46 +0300)]
[StackProtector] Rewrite dominator tree update handling
KAWASHIMA Takahiro [Thu, 8 Dec 2022 05:15:21 +0000 (14:15 +0900)]
[AArch64][NFC] Change order of instructions in isAssociativeAndCommutative
Before this change, the order of instructions in `case` labels was
inconsistent. It is alphabetical order for FP instructions but another
order for integer instructions. This commit changes the order to
1) instruction set (base/FP/SIMD), 2) mnemonic, 3) element type.
I believe this change makes it consistent, improves understandability,
and makes it easy to add/remove a group of instructions.
Differential Revision: https://reviews.llvm.org/D139607
KAWASHIMA Takahiro [Thu, 8 Dec 2022 05:15:20 +0000 (14:15 +0900)]
[AArch64][NFC] Add tests for D134260
Differential Revision: https://reviews.llvm.org/D139606
Xiang1 Zhang [Fri, 9 Dec 2022 11:16:00 +0000 (19:16 +0800)]
Enhance stack protector
Reviewed By: LuoYuanke
Differential Revision: https://reviews.llvm.org/D139254
LLVM GN Syncbot [Sun, 11 Dec 2022 23:58:49 +0000 (23:58 +0000)]
[gn build] Port
443b46e6d313
einvbri [Sat, 10 Dec 2022 01:18:03 +0000 (19:18 -0600)]
[analyzer] Fix assertion in getAPSIntType
getAPSIntType crashes when analzying a simple case that uses a fixed
point type. getAPSIntType needs to handle fixed point types differently
to get sign information. LIT and Unittests were added since there were
none previously added.
clang: <root>/clang/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h:155:
clang::ento::APSIntType clang::ento::BasicValueFactory::getAPSIntType(clang::QualType) const:
Assertion `T->isIntegralOrEnumerationType() || Loc::isLocType(T)' failed.
Program received signal SIGABRT, Aborted.
0x00007ffff66e2387 in raise () from /lib64/libc.so.6
(gdb) bt
at <root>/clang/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h:155
at <root>/clang/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h:172
LHS=0x108965a0, op=clang::BO_Shr, RHS=..., resultTy=...) at
<root>/clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp:213
(this=0x1088e460, state=..., op=clang::BO_Shr, lhs=..., rhs=..., resultTy=...)
at <root>/clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp:681
Reviewed By: steakhal
Differential Revision: https://reviews.llvm.org/D139759
Dmitri Gribenko [Sun, 11 Dec 2022 23:14:01 +0000 (00:14 +0100)]
[openmp] Fix a doc comment issue found by -Wdocumentation
Dmitri Gribenko [Sun, 11 Dec 2022 20:39:21 +0000 (21:39 +0100)]
[openmp] Fix a doc comment issue found by -Wdocumentation
Joseph Huber [Mon, 5 Dec 2022 18:44:54 +0000 (12:44 -0600)]
[libc] Fix wrappergen_test.cpp on runtimes build
The `tools` directory depends on `llvm_gtest` which is not immediately
availible with a runtimes build. This patch builds the `llvm_gtest`
target if it isn't present. Additionally, we use the CMake binary
directory to find the tool binary, which is different when using a
runtimes build. Using the LLVM binary directory should match both build
conditions.
Reviewed By: lntue
Differential Revision: https://reviews.llvm.org/D139348
Kevin Sala [Sun, 11 Dec 2022 15:51:05 +0000 (16:51 +0100)]
[OpenMP][libomptarget] Add utility class for reference counting
The AMDGPU NextGen plugin will use this class for counting the references of some device resources.
Differential Revision: https://reviews.llvm.org/D139787
Uday Bondhugula [Sun, 11 Dec 2022 19:12:48 +0000 (00:42 +0530)]
NFC. Refactor/update some affine fusion pass code for readability
NFC. Refactor some affine fusion pass code for readability. Some of its
methods are too long. This is the first among some NFC changes before new
features/related updates are posted. Add missing code comments at a couple of
places.
Differential Revision: https://reviews.llvm.org/D139255
Mark de Wever [Wed, 9 Nov 2022 17:08:54 +0000 (18:08 +0100)]
[CMake] Warn when the version is older than 3.20.0.
This is a preparation to require CMake 3.20.0 after LLVM 16 has been
released.
This change has been discussed on discourse
https://discourse.llvm.org/t/rfc-upgrading-llvms-minimum-required-cmake-version/66193
Reviewed By: #libc_vendors, MaskRay, ChuanqiXu, to268, thieta, stellaraccident, ldionne, #libc, #libc_abi, phosek
Differential Revision: https://reviews.llvm.org/D137724
Simon Pilgrim [Sun, 11 Dec 2022 18:19:13 +0000 (18:19 +0000)]
Revert rG6a0bbb84cef28ed642a730e55c52447b8c870647 "[X86] RDRAND is a Goldmont feature, not Silvermont"
RDRAND is a Silvermont feature - confirmed with CPUID
Roman Lebedev [Sun, 11 Dec 2022 17:56:01 +0000 (20:56 +0300)]
[X86] AMD Zen 3 sched model: FMA ops have inverse throughput of 0.5
Now that exegesis produces meaningful snippets to measure throughtput
for instructions with tied operands:
https://github.com/llvm/llvm-project/commit/
2ffe225d113031cc211d20d8d2cb82eeaa1a34a2
the measurements clearly show these instructions to have
more optimistic throughtput.
There's still some noise in the reports, especially around instructions
with memory operands. I'm not sure if we measure those correctly.
Fixes https://github.com/llvm/llvm-project/issues/59325
Manuel Brito [Sun, 11 Dec 2022 17:17:34 +0000 (17:17 +0000)]
Use poison instead of undef where its used as a placeholder [NFC]
Differential Revision: https://reviews.llvm.org/D139789
Florian Hahn [Sun, 11 Dec 2022 16:28:42 +0000 (16:28 +0000)]
[VPlan] Summarize recipes used to model inductions (NFC).
Document recipes used to model inductions after introducing
VPDerivedIVRecipe in
0c5df7cd2f81c.
Reviewed By: Ayal
Differential Revision: https://reviews.llvm.org/D138748
Manuel Brito [Sun, 11 Dec 2022 16:16:31 +0000 (16:16 +0000)]
[Clang] Use poison instead of undef where its used as placeholder [NFC]
Differential Revision: https://reviews.llvm.org/D139745
Simon Pilgrim [Sun, 11 Dec 2022 15:57:47 +0000 (15:57 +0000)]
[MCA][X86] Add test coverage for PFI instructions
Simon Pilgrim [Sun, 11 Dec 2022 15:52:38 +0000 (15:52 +0000)]
[MCA][X86] Add test coverage for ERI instructions
Simon Pilgrim [Sun, 11 Dec 2022 15:35:58 +0000 (15:35 +0000)]
[MCA][X86] Add missing knotw test
Simon Pilgrim [Sun, 11 Dec 2022 15:34:34 +0000 (15:34 +0000)]
[MCA][X86] Add missing test coverage for DQ instructions
Sanjay Patel [Sun, 11 Dec 2022 13:50:42 +0000 (08:50 -0500)]
[InstCombine] try to forward-propagate some FMF to select
This is intended to mitigate potential regressions that
would result from restricting this fold for NANs as
discussed in issue #59279.
Ideally, we could do this more generally because we have
known problems seeing/generating FMF on a select, but there
are likely many corner cases that need to verified.
For example, I thought this propagation would be valid
without looking at the condition value and for 'nsz' too,
but according to Alive2, it is not:
https://alive2.llvm.org/ce/z/AnG6As
WANG Xuerui [Sun, 11 Dec 2022 13:31:11 +0000 (16:31 +0300)]
[test][NFC] Guard one test case against LLVM checkouts at interesting paths
Previously only the "store" string was being checked for not appearing
twice, but unfortunately the check also looked at the ModuleID and
source_filename lines, so the test case would fail if the LLVM
checkout's absolute path contained the substring "store".
Fix this spurious test failure by tweaking the invocation so the full
path no longer shows up in the output.
Differential Revision: https://reviews.llvm.org/D131540
Simon Pilgrim [Sun, 11 Dec 2022 12:28:22 +0000 (12:28 +0000)]
[X86] RDRAND is a Goldmont feature, not Silvermont
Simon Pilgrim [Sun, 11 Dec 2022 11:06:10 +0000 (11:06 +0000)]
[X86] Fix missing HasPRFCHW predicate
This was declared in FeaturePRFCHW but never defined.
Noticed while preparing to add Unsupported features handling to X86 scheduler models.
Simon Pilgrim [Sun, 11 Dec 2022 10:27:03 +0000 (10:27 +0000)]
[X86] Fix missing HasX86_64 predicate
This was declared in FeatureX86_64 but never defined (we use the *64BitMode predicates for instruction defs - but now we need it for scheduler model defs).
Noticed while preparing to add Unsupported features handling to X86 scheduler models.
Simon Pilgrim [Sat, 10 Dec 2022 21:28:15 +0000 (21:28 +0000)]
[X86] Fix missing HasLAHFSAHF64 predicate
This was declared in FeatureLAHFSAHF64 but never defined.
Noticed while preparing to add Unsupported features handling to X86 scheduler models.
Simon Pilgrim [Sat, 10 Dec 2022 20:31:29 +0000 (20:31 +0000)]
[X86] Fix missing HasPKU predicate
This was declared in FeaturePKU but defined just as PKU.
Noticed while preparing to add Unsupported features handling to X86 scheduler models.
Simon Pilgrim [Sat, 10 Dec 2022 20:25:26 +0000 (20:25 +0000)]
[X86] Add missing HasNOPL predicate
This was declared in FeatureNOPL but never defined.
Noticed while preparing to add Unsupported features handling to X86 scheduler models.
Kazu Hirata [Sun, 11 Dec 2022 09:32:26 +0000 (01:32 -0800)]
[Analysis] Use std::optional in MemoryBuiltins.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
Kazu Hirata [Sun, 11 Dec 2022 09:18:36 +0000 (01:18 -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
Nikita Popov [Sun, 11 Dec 2022 08:47:01 +0000 (09:47 +0100)]
[Docs] Update opaque pointers docs (NFC)
LLVM GN Syncbot [Sun, 11 Dec 2022 08:37:29 +0000 (08:37 +0000)]
[gn build] Port
ee4c8119a6d3
Craig Topper [Sun, 11 Dec 2022 08:07:54 +0000 (00:07 -0800)]
[RISCV] Use a helper function to reduce duplicated code in RISCVSExtWRemoval. NFC
We were checking for virtual register and calling getVReg in
multiple places before adding to the worklist.
Kazu Hirata [Sun, 11 Dec 2022 08:31:46 +0000 (00:31 -0800)]
[ADT] Move MoveOnly to a header file (NFC)
This patch moves MoveOnly to a header file so that I can use it from
another .cpp file.
Differential Revision: https://reviews.llvm.org/D139781
Kazu Hirata [Sun, 11 Dec 2022 05:15:44 +0000 (21:15 -0800)]
[StaticAnalyzer] Use std::optional in RetainCountDiagnostics.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
Kazu Hirata [Sun, 11 Dec 2022 05:15:42 +0000 (21:15 -0800)]
[StaticAnalyzer] Use std::optional in MallocChecker.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
Kazu Hirata [Sun, 11 Dec 2022 05:11:31 +0000 (21:11 -0800)]
[StaticAnalyzer] Use std::optional in BugReporterVisitors.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
Kazu Hirata [Sun, 11 Dec 2022 05:11:29 +0000 (21:11 -0800)]
[StaticAnalyzer] Use std::optional in BugReporter.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
Kazu Hirata [Sun, 11 Dec 2022 04:54:38 +0000 (20:54 -0800)]
[StaticAnalyzer] Use std::optional in BugReporter.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
Fangrui Song [Sun, 11 Dec 2022 02:47:18 +0000 (02:47 +0000)]
Remove using llvm::None
Fangrui Song [Sun, 11 Dec 2022 02:27:29 +0000 (02:27 +0000)]
[LoongArch] Fix -Wmacro-redefined after D139612
Roman Lebedev [Sun, 11 Dec 2022 01:49:18 +0000 (04:49 +0300)]
[llvm-exegesis] `ExegesisX86Target::setRegTo()`: support mask (K) regs
This only supports the obvious case, where the requested width
is supported by the available ISA sed, and there is
an appropriate, or wider, `KMOV?` instruction.
This doesn't deal with the 32/64 bit mask without BW instruction set.
This was the missing functionality that was
causing crashes in
fd52305fdc7572534867247c8fb66093faf52e5c.
Kazu Hirata [Sun, 11 Dec 2022 01:37:55 +0000 (17:37 -0800)]
[cross-project-tests] Use std::nullopt instead of llvm::None (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
Kazu Hirata [Sun, 11 Dec 2022 01:11:23 +0000 (17:11 -0800)]
[mlir] Use std::optional instead of None in comments (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
Kazu Hirata [Sun, 11 Dec 2022 01:09:01 +0000 (17:09 -0800)]
[llvm] Use std::optional instead of None in comments (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
Kazu Hirata [Sun, 11 Dec 2022 01:06:43 +0000 (17:06 -0800)]
[lldb] Use std::optional instead of None in comments (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
Kazu Hirata [Sun, 11 Dec 2022 01:04:56 +0000 (17:04 -0800)]
[lld] Use std::optional instead of None in comments (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
Kazu Hirata [Sun, 11 Dec 2022 01:01:55 +0000 (17:01 -0800)]
[libc] Use std::optional instead of None in comments (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
Kazu Hirata [Sun, 11 Dec 2022 01:00:21 +0000 (17:00 -0800)]
[flang] Use std::optional instead of None in comments (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
Kazu Hirata [Sun, 11 Dec 2022 00:59:22 +0000 (16:59 -0800)]
[clang-tools-extra] Use std::optional instead of None in comments (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
Kazu Hirata [Sun, 11 Dec 2022 00:57:33 +0000 (16:57 -0800)]
[BOLT] Use std::optional instead of None in comments (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
Siva Chandra Reddy [Sun, 11 Dec 2022 00:20:33 +0000 (00:20 +0000)]
[libc][Obvious] Fix memory function benchmarks after removal of None.
Siva Chandra Reddy [Wed, 7 Dec 2022 21:35:38 +0000 (21:35 +0000)]
[libc] Add custom operator new to handle allocation failures gracefully.
This patch adds the implementation of the custom operator new functions.
The implementation of the internal strdup has been updated to use
operator new for allocation.
We will make it a policy and document that all allocations have to go
through the libc's own operator new. A future change will also add
operator delete replacements and make it a policy that deallocations in
libc internal code have to go through those replacements.
Reviewed By: lntue
Differential Revision: https://reviews.llvm.org/D139584
Kazu Hirata [Sat, 10 Dec 2022 23:49:58 +0000 (15:49 -0800)]
[ADT] Deperecate llvm::None
I've converted all known uses of None to std::nullopt.
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
Differential Revision: https://reviews.llvm.org/D139763
Jeff Niu [Tue, 6 Dec 2022 19:28:47 +0000 (11:28 -0800)]
[mlir] FunctionOpInterface: turn required attributes into interface methods (Reland)
Reland D139447, D139471 With flang actually working
- FunctionOpInterface: make get/setFunctionType interface methods
This patch removes the concept of a `function_type`-named type attribute
as a requirement for implementors of FunctionOpInterface. Instead, this
type should be provided through two interface methods, `getFunctionType`
and `setFunctionTypeAttr` (*Attr because functions may use different
concrete function types), which should be automatically implemented by
ODS for ops that define a `$function_type` attribute.
This also allows FunctionOpInterface to materialize function types if
they don't carry them in an attribute, for example.
Importantly, all the function "helper" still accept an attribute name to
use in parsing and printing functions, for example.
- FunctionOpInterface: arg and result attrs dispatch to interface
This patch removes the `arg_attrs` and `res_attrs` named attributes as a
requirement for FunctionOpInterface and replaces them with interface
methods for the getters, setters, and removers of the relevent
attributes. This allows operations to use their own storage for the
argument and result attributes.
Reviewed By: jpienaar
Differential Revision: https://reviews.llvm.org/D139736
Kazu Hirata [Sat, 10 Dec 2022 22:49:03 +0000 (14:49 -0800)]
[LoongArch] Use std::nullopt instead of None (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
Roman Lebedev [Sat, 10 Dec 2022 21:51:03 +0000 (00:51 +0300)]
[InstCombine] Fold nested selects
https://alive2.llvm.org/ce/z/GjCXkB
https://alive2.llvm.org/ce/z/Guz2tt
Fixes https://github.com/llvm/llvm-project/issues/59393
Roman Lebedev [Sat, 10 Dec 2022 21:49:43 +0000 (00:49 +0300)]
[NFC][InstCombine] Add tests for nested select folding
https://github.com/llvm/llvm-project/issues/59393
Kazu Hirata [Sat, 10 Dec 2022 20:35:02 +0000 (12:35 -0800)]
[StaticAnalyzer] Don't use Optional<T>::create (NFC)
std::optional<T> does not have an equivalent method.
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
Krzysztof Parzyszek [Sat, 10 Dec 2022 16:34:54 +0000 (10:34 -0600)]
[APInt] Convert GetMostSignificantDifferentBit to std::optional
Fangrui Song [Sat, 10 Dec 2022 19:49:44 +0000 (19:49 +0000)]
[gold] Fix build
Fangrui Song [Sat, 10 Dec 2022 19:46:02 +0000 (19:46 +0000)]
[ObjCopy] llvm::Optional => std::optional
Felipe de Azevedo Piovezan [Thu, 8 Dec 2022 18:52:56 +0000 (13:52 -0500)]
[CodeExtractor] Only rewrite scope of non-inlined variables
When a dbg.value instruction for a variable V is extracted into a new
function, the scope of the underlying variable should be set to the new
function iff V was in the scope of the old function (i.e. it hadn't been
inlined). Prior to this patch, the code extractor would always update
the scope of V.
Differential Revision: https://reviews.llvm.org/D139669
Kazu Hirata [Sat, 10 Dec 2022 19:24:26 +0000 (11:24 -0800)]
Don't include None.h (NFC)
I've converted all known uses of None to std::nullopt, so we no longer
need to include None.h.
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
Kazu Hirata [Sat, 10 Dec 2022 18:55:02 +0000 (10:55 -0800)]
[Transforms] Use std::optional in AsyncToAsyncRuntime.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
Kazu Hirata [Sat, 10 Dec 2022 18:49:53 +0000 (10:49 -0800)]
[Transforms] Use std::optional in LoopFusion.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
Kazu Hirata [Sat, 10 Dec 2022 18:46:08 +0000 (10:46 -0800)]
[Analysis] Use std::optional in LoopAnalysis.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
Kazu Hirata [Sat, 10 Dec 2022 18:44:51 +0000 (10:44 -0800)]
[Analysis] Use std::optional in AffineStructures.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
Kazu Hirata [Sat, 10 Dec 2022 18:43:39 +0000 (10:43 -0800)]
[VectorToLLVM] Use std::optional in ConvertVectorToLLVM.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
Kazu Hirata [Sat, 10 Dec 2022 18:41:43 +0000 (10:41 -0800)]
[MemRefToLLVM] Use std::optional in MemRefToLLVM.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
Kazu Hirata [Sat, 10 Dec 2022 18:40:35 +0000 (10:40 -0800)]
[ComplexToLibm] Use std::optional in ComplexToLibm.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
Kazu Hirata [Sat, 10 Dec 2022 18:31:26 +0000 (10:31 -0800)]
[Reader] Use std::optional in BytecodeReader.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
Kazu Hirata [Sat, 10 Dec 2022 18:28:55 +0000 (10:28 -0800)]
[AsmParser] Use std::optional in Parser.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
Kazu Hirata [Sat, 10 Dec 2022 18:27:45 +0000 (10:27 -0800)]
[AsmParser] Use std::optional in AttributeParser.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
Kazu Hirata [Sat, 10 Dec 2022 18:24:52 +0000 (10:24 -0800)]
[Presburger] Use std::optional in Simplex.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
Kazu Hirata [Sat, 10 Dec 2022 18:22:11 +0000 (10:22 -0800)]
[Presburger] Use std::optional in PresburgerRelation.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
Kazu Hirata [Sat, 10 Dec 2022 18:20:47 +0000 (10:20 -0800)]
[AliasAnalysis] Use std::optional in LocalAliasAnalysis.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
Roman Lebedev [Sat, 10 Dec 2022 17:01:44 +0000 (20:01 +0300)]
[SROA] Rewrite store-into-selected-address into predicated stores
Same basic idea as with unfolding loads into predicated loads,
but we obviously can't have speculative stores.
Roman Lebedev [Sat, 10 Dec 2022 17:23:00 +0000 (20:23 +0300)]
[NFC][SROA] Add tests with store-into-select-of-addrs
Kazu Hirata [Sat, 10 Dec 2022 17:28:07 +0000 (09:28 -0800)]
Revert "[FileCheck] Use std::optional in FileCheck.cpp (NFC)"
This reverts commit
f555ec57cc01181ce09c802194b6f572f7a3f78a.
One build failure has been reported:
https://lab.llvm.org/buildbot/#/builders/67/builds/9785/steps/6/logs/stdio
Kazu Hirata [Sat, 10 Dec 2022 16:31:15 +0000 (08:31 -0800)]
[llvm-gsymutil] Use std::optional in llvm-gsymutil.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