platform/upstream/llvm.git
20 months agoPartialInlining: Convert tests to opaque pointers
Matt Arsenault [Sun, 27 Nov 2022 01:15:46 +0000 (20:15 -0500)]
PartialInlining: Convert tests to opaque pointers

Once again the script decided to delete an llvm.assume declaration
which I manually restored.

20 months ago[libc++][NFC] Rename include guards under /support/
Louis Dionne [Mon, 28 Nov 2022 14:03:31 +0000 (09:03 -0500)]
[libc++][NFC] Rename include guards under /support/

For consistency with the rest of the code base.

20 months agoAtomicExpand: Convert tests to opaque pointers
Matt Arsenault [Sat, 26 Nov 2022 15:52:10 +0000 (10:52 -0500)]
AtomicExpand: Convert tests to opaque pointers

20 months agoSink: Convert tests to opaque pointers
Matt Arsenault [Sat, 26 Nov 2022 21:16:47 +0000 (16:16 -0500)]
Sink: Convert tests to opaque pointers

20 months agoDivergenceAnalysis: Convert tests to opaque pointers
Matt Arsenault [Sat, 26 Nov 2022 19:32:12 +0000 (14:32 -0500)]
DivergenceAnalysis: Convert tests to opaque pointers

20 months agoDCE: Update tests to use opaque pointers
Matt Arsenault [Sat, 26 Nov 2022 22:29:50 +0000 (17:29 -0500)]
DCE: Update tests to use opaque pointers

basic.ll:test_lifetime_bitcast is a strange case. The comment says
it's trying to keep the lifetime intrinsics for bitcasts. Leave a
dummy bitcast for now to keep it happy.

20 months agoAMDGPU/GlobalISel: Fix hardcoded virtual register numbers in test
Matt Arsenault [Mon, 28 Nov 2022 13:22:36 +0000 (08:22 -0500)]
AMDGPU/GlobalISel: Fix hardcoded virtual register numbers in test

20 months agoPreISelIntrinsicLowering: Convert tests to opaque pointers
Matt Arsenault [Sat, 26 Nov 2022 15:53:16 +0000 (10:53 -0500)]
PreISelIntrinsicLowering: Convert tests to opaque pointers

20 months agoSpeculativeExecution: Convert tests to opaque pointers
Matt Arsenault [Sat, 26 Nov 2022 15:54:38 +0000 (10:54 -0500)]
SpeculativeExecution: Convert tests to opaque pointers

20 months agoReg2Mem: Convert tests to opaque pointers
Matt Arsenault [Sat, 26 Nov 2022 15:54:01 +0000 (10:54 -0500)]
Reg2Mem: Convert tests to opaque pointers

20 months agoMem2Reg: Convert tests to opaque pointers
Matt Arsenault [Sat, 26 Nov 2022 15:49:30 +0000 (10:49 -0500)]
Mem2Reg: Convert tests to opaque pointers

This was a painless conversion.

20 months ago[clangd] Fix broken call missed in D138780
Sam McCall [Mon, 28 Nov 2022 13:36:48 +0000 (14:36 +0100)]
[clangd] Fix broken call missed in D138780

20 months ago[clangd] Add script to maintain list of fast clang-tidy checks
Sam McCall [Tue, 22 Nov 2022 13:49:23 +0000 (14:49 +0100)]
[clangd] Add script to maintain list of fast clang-tidy checks

The plan is to intersect this list with the checks selected per config.
This is not yet done, but the initial list is checked in as a baseline.

https://github.com/clangd/clangd/issues/1337

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

20 months ago[SVE] Tidy up the bfloat matmul instruction classes
David Sherwood [Mon, 28 Nov 2022 11:39:40 +0000 (11:39 +0000)]
[SVE] Tidy up the bfloat matmul instruction classes

It doesn't really make sense for the bfloat matmul to derive
from sve_bfloat_dot_base, especially since it's not used
anywhere else.

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

20 months ago[libc++][NFC] Remove stray whitespace in string_view
Louis Dionne [Sun, 27 Nov 2022 22:30:35 +0000 (17:30 -0500)]
[libc++][NFC] Remove stray whitespace in string_view

20 months ago[libc++][NFC] Use using declaration instead of typedef in string_view
Louis Dionne [Sun, 27 Nov 2022 22:27:36 +0000 (17:27 -0500)]
[libc++][NFC] Use using declaration instead of typedef in string_view

20 months ago[mlir] Export `collapseGenericOpIterationDims` (NFC)
Guray Ozen [Fri, 25 Nov 2022 09:52:51 +0000 (10:52 +0100)]
[mlir] Export `collapseGenericOpIterationDims` (NFC)

This revision exports `collapseGenericOpIterationDims` to a header so it can be used outside of the pattern.  We have use-case where we want to call this function directly.

Reviewed By: springerm

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

20 months ago[include-cleaner] Merge 2 parseIWYUPragma impls in libToolingInclusions
Sam McCall [Mon, 28 Nov 2022 09:36:13 +0000 (10:36 +0100)]
[include-cleaner] Merge 2 parseIWYUPragma impls in libToolingInclusions

Based on include-cleaner's version, but:

- remove assert that can fail for input `/\<newline>* */`
- assert was also checking the wrong condition: that the prefix *differed* from
  either `//` or from `/*`. Avoid use of strncmp where we can.
- add a comment that the brittleness of the text matching is intentional

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

20 months ago[Assignment Tracking][SROA] Follow-up for failing test
OCHyams [Mon, 28 Nov 2022 11:59:14 +0000 (11:59 +0000)]
[Assignment Tracking][SROA] Follow-up for failing test

Follow-up for D133296 / e16d59973ffec77eeef73409570bdf04a69c2405

Buildbot example: https://lab.llvm.org/buildbot/#/builders/6/builds/16989

20 months ago[analyzer] Remove the unused LocalCheckers.h header
Balazs Benics [Mon, 28 Nov 2022 12:08:38 +0000 (13:08 +0100)]
[analyzer] Remove the unused LocalCheckers.h header

20 months ago[LoongArch] Add atomic ordering information for binary atomic operations
gonglingqin [Mon, 28 Nov 2022 11:50:33 +0000 (19:50 +0800)]
[LoongArch] Add atomic ordering information for binary atomic operations

This patch also implements not emit fence in atomic binary operation
when AtomicOrdering is monotonic and fixes the issue of loading from
non ptr parameters.

The processing of other levels of AtomicOrdering will be added later.

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

20 months ago[AArch64][AsmParser] SME: Allow h/v suffix to be upper-case.
Sander de Smalen [Thu, 24 Nov 2022 17:16:28 +0000 (17:16 +0000)]
[AArch64][AsmParser] SME: Allow h/v suffix to be upper-case.

20 months ago[Assignment Tracking][13/*] Account for assignment tracking in SROA
OCHyams [Mon, 28 Nov 2022 11:21:46 +0000 (11:21 +0000)]
[Assignment Tracking][13/*] Account for assignment tracking in SROA

The Assignment Tracking debug-info feature is outlined in this RFC:

https://discourse.llvm.org/t/
rfc-assignment-tracking-a-better-way-of-specifying-variable-locations-in-ir

Split dbg.assign intrinsics into fragments similarly to what SROA already does
for dbg.declares, except that there's many more intrinsics to split. The
function migrateDebugInfo generates new dbg.assigns intrinsic for each part of
a split store.

Reviewed By: jmorse

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

20 months ago[AMDGPU] Intrinsic to expose s_wait_event for export ready
David Stuttard [Thu, 17 Nov 2022 15:44:39 +0000 (15:44 +0000)]
[AMDGPU] Intrinsic to expose s_wait_event for export ready

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

20 months ago[AArch64][SME]: Generate streaming-compatible code for fp-compares.
Hassnaa Hamdi [Thu, 24 Nov 2022 13:47:06 +0000 (13:47 +0000)]
[AArch64][SME]: Generate streaming-compatible code for fp-compares.

To generate code compatible to streaming mode:
 - enable expanding ISD::SETUEQ to avoid custom-lowering setcc to setcc_merge_zero
   which cause a crash while instruction selection because there is no pattern match for it.

- Testing files:
 - fp-compares.ll

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

20 months ago[Mem2Reg] Switch tests to use opt -passes
Bjorn Pettersson [Mon, 28 Nov 2022 11:10:09 +0000 (12:10 +0100)]
[Mem2Reg] Switch tests to use opt -passes

Also added FileCheck verification to three old tests that only
verified that we did not crash.

20 months ago[clang][CodeGen] Switch tests to use opt -passes
Bjorn Pettersson [Mon, 28 Nov 2022 10:48:30 +0000 (11:48 +0100)]
[clang][CodeGen] Switch tests to use opt -passes

20 months ago[AMDGPU][AsmParser] Remove the now-unused OptionalOperand structure.
Ivan Kosarev [Mon, 28 Nov 2022 10:58:18 +0000 (10:58 +0000)]
[AMDGPU][AsmParser] Remove the now-unused OptionalOperand structure.

Became unused in https://reviews.llvm.org/D138492 .

20 months ago[SCEV] Introduce field for storing SymbolicMaxNotTaken. NFCI
Max Kazantsev [Fri, 25 Nov 2022 06:10:24 +0000 (13:10 +0700)]
[SCEV] Introduce field for storing SymbolicMaxNotTaken. NFCI

ritht is initialized with either exact (if available) or
with constant max exit count. In the future, this can be improved.

Hypothetically this is not an NFC (it is possible that exact is not
known and max is known for a particular exit), but for how we use
it now it seems be an NFC (or at least I could not find an example
where it differs). constant max exit count. In the future, this can
be improved.

Differential Revision: https://reviews.llvm.org/D138699
Reviewed By: lebedev.ri

20 months ago[MLIR] Simplify logic in `parseDynamicIndexList` (NFC)
Lorenzo Chelini [Fri, 25 Nov 2022 09:16:26 +0000 (10:16 +0100)]
[MLIR] Simplify logic in `parseDynamicIndexList` (NFC)

We can use `parseCommaSeparatedList` to simplify the logic of
`parseDynamicIndexList`. We don't need to explicitly check delimiters
and comma anymore, this is done for us by `parseCommaSeparatedList`.

Reviewed By: mehdi_amini

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

20 months ago[NFC] Add helper method to ensure min alignment on MCSection
Guillaume Chatelet [Thu, 24 Nov 2022 20:54:12 +0000 (20:54 +0000)]
[NFC] Add helper method to ensure min alignment on MCSection

Follow up on D138653.

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

20 months agoRemove TargetMachine::adjustPassManager
Bjorn Pettersson [Thu, 10 Nov 2022 19:11:06 +0000 (20:11 +0100)]
Remove TargetMachine::adjustPassManager

Since opt no longer supports to run default (O0/O1/O2/O3/Os/Oz)
pipelines using the legacy PM, there are no in-tree uses of
TargetMachine::adjustPassManager remaining. This patch removes the
no longer used adjustPassManager functions.

Reviewed By: aeubanks

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

20 months ago[include-cleaner] Fix walkUsed only report a single macro ref.
Haojian Wu [Mon, 28 Nov 2022 09:11:08 +0000 (10:11 +0100)]
[include-cleaner] Fix walkUsed only report a single macro ref.

20 months agoReland "[Lex] Fix suggested spelling of /usr/bin/../include/foo"
Sam McCall [Fri, 25 Nov 2022 13:19:04 +0000 (14:19 +0100)]
Reland "[Lex] Fix suggested spelling of /usr/bin/../include/foo"

This reverts commit 1dc0a1e5d220b83c1074204bd3afd54f3bac4270.

Failures were caused by unintentional conversion to native slashes by
remove_dots, so undo that: we always suggest posix slashes for includes.

This could potentially be a change in behavior on windows if people were
spelling headers with backslashes and headermaps contained backslashes,
but that's all underspecified and I don't think anyone uses headermaps
on windows.

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

20 months ago[include-cleaner] Capture private headers in PragmaIncludes.
Viktoriia Bakalova [Mon, 28 Nov 2022 09:00:46 +0000 (10:00 +0100)]
[include-cleaner] Capture private headers in PragmaIncludes.

Save file IDs of IWYU private headers and report them as private.

Reviewed By: hokein

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

20 months ago[mlir][Test] Add a test pass to act as a sink towards LLVM conversion
Nicolas Vasilache [Fri, 25 Nov 2022 18:22:32 +0000 (10:22 -0800)]
[mlir][Test] Add a test pass to act as a sink towards LLVM conversion

This allows writing simple e2e tests where we can check for the proper materialization
of specific LLVM IR (e.g. `llvm.intr.fmuladd`).

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

20 months ago[AArch64] Fix cost model for `udiv` instruction when one of the operands is a uniform...
Zain Jaffal [Mon, 28 Nov 2022 08:37:31 +0000 (10:37 +0200)]
[AArch64] Fix cost model for `udiv` instruction when one of the operands is a uniform constant

Currently the model over estimates the cost of a udiv instruction with one constant. The correct cost for a udiv instruction is
insert_cost * extract_cost * num_elements

Reviewed By: dmgreen

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

20 months agoRemove support for 10.4 Tiger from AsmPrinter
Guillaume Chatelet [Fri, 25 Nov 2022 13:43:17 +0000 (13:43 +0000)]
Remove support for 10.4 Tiger from AsmPrinter

I stumbled on this while trying to tighten Alignment in MCStreamer (D138705).
From the [wikipedia page](https://en.wikipedia.org/wiki/Mac_OS_X_Tiger), last release of MacOSX Tiger was released 15 years ago and is not supported anymore by Apple.

Relevant commit : https://github.com/llvm/llvm-project/commit/9f06f911d197577b80d208a167980833b4fb9ad5#diff-17b326b45ef392288420bed274616afa7df81b27576c96723b3c25f5198dc398

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

20 months ago[test][asan] Speedup the test
Vitaly Buka [Mon, 28 Nov 2022 07:14:06 +0000 (23:14 -0800)]
[test][asan] Speedup the test

20 months ago[NFC][asan] Fix typo in names
Vitaly Buka [Mon, 28 Nov 2022 07:11:56 +0000 (23:11 -0800)]
[NFC][asan] Fix typo in names

20 months ago[NFC][asan] Reimplement with FindBadAddress
Vitaly Buka [Mon, 28 Nov 2022 00:14:35 +0000 (16:14 -0800)]
[NFC][asan] Reimplement with FindBadAddress

20 months ago[NFC][asan] Move a few precondition checks
Vitaly Buka [Sun, 27 Nov 2022 23:30:15 +0000 (15:30 -0800)]
[NFC][asan] Move a few precondition checks

20 months ago[CSKY][NFC] Fix the compiling error of CSKYAsmPrinter.cpp
Zi Xuan Wu (Zeson) [Mon, 28 Nov 2022 05:47:26 +0000 (13:47 +0800)]
[CSKY][NFC] Fix the compiling error of CSKYAsmPrinter.cpp

emitValueToAlignment API changes the interface to use Align object to
wrap integer.

20 months agollvm/tools: Convert tests to opaque pointers
Fangrui Song [Mon, 28 Nov 2022 04:20:04 +0000 (20:20 -0800)]
llvm/tools: Convert tests to opaque pointers

20 months agoMC: Convert tests to opaque pointers
Fangrui Song [Mon, 28 Nov 2022 04:10:28 +0000 (20:10 -0800)]
MC: Convert tests to opaque pointers

20 months agolld: Convert tests to opaque pointers
Fangrui Song [Mon, 28 Nov 2022 04:06:48 +0000 (20:06 -0800)]
lld: Convert tests to opaque pointers

20 months agoLTO: Convert tests to opaque pointers
Fangrui Song [Mon, 28 Nov 2022 03:51:46 +0000 (19:51 -0800)]
LTO: Convert tests to opaque pointers

20 months agoThinLTO: Convert tests to opaque pointers
Fangrui Song [Mon, 28 Nov 2022 03:49:43 +0000 (19:49 -0800)]
ThinLTO: Convert tests to opaque pointers

20 months agoSanitizerCoverage: Convert tests to opaque pointers
Fangrui Song [Mon, 28 Nov 2022 03:36:00 +0000 (19:36 -0800)]
SanitizerCoverage: Convert tests to opaque pointers

20 months agoLowerMatrixIntrinsics: Convert tests to opaque pointers
Matt Arsenault [Sun, 27 Nov 2022 01:20:51 +0000 (20:20 -0500)]
LowerMatrixIntrinsics: Convert tests to opaque pointers

store-align-volatile.ll needed manually updated check lines for a
-NEXT check after a deleted bitcast.

Also avoided breaking the example C++ comment in remarks-inlining.ll

20 months agoHotColdSplit: Convert tests to opaque pointers
Matt Arsenault [Sat, 26 Nov 2022 22:38:48 +0000 (17:38 -0500)]
HotColdSplit: Convert tests to opaque pointers

For some reason the script was deleting the assume declaration in
assumption-cache-invalidation.ll, so fixed that manually.

20 months agoNaryReassociate: Convert tests to opaque pointers
Matt Arsenault [Sun, 27 Nov 2022 01:14:01 +0000 (20:14 -0500)]
NaryReassociate: Convert tests to opaque pointers

NVPTX/nary-gep.ll had one test that checked for a deleted bitcast
which needed to be updated manually.

20 months agoStraightLineStrengthReduce: Convert tests to opaque pointers
Matt Arsenault [Sat, 26 Nov 2022 15:56:02 +0000 (10:56 -0500)]
StraightLineStrengthReduce: Convert tests to opaque pointers

Required some manual updates in AMDGPU/pr23975.ll and
slsr-gep.ll. pr23975.ll had another offset 0 GEP that probably should
not have been deleted.

20 months agoSampleProfile: Convert tests to opaque pointers
Matt Arsenault [Sat, 26 Nov 2022 21:28:23 +0000 (16:28 -0500)]
SampleProfile: Convert tests to opaque pointers

syntax.ll required removing some diffs that apparently looked like
pointers in message checking.

20 months agoPhaseOrdering: Convert tests to opaque pointers
Matt Arsenault [Sat, 26 Nov 2022 21:56:00 +0000 (16:56 -0500)]
PhaseOrdering: Convert tests to opaque pointers

Required manually running update_test_checks:
  AArch64/hoisting-sinking-required-for-vectorization.ll
  AArch64/peel-multiple-unreachable-exits-for-vectorization.ll
  ARM/arm_mult_q15.ll
  X86/hoist-load-of-baseptr.ll
  X86/spurious-peeling.ll

20 months agoScalarizer: Convert tests to opaque pointers
Matt Arsenault [Sat, 26 Nov 2022 16:32:18 +0000 (11:32 -0500)]
Scalarizer: Convert tests to opaque pointers

20 months ago[Scalar] Use std::optional in GVN.h (NFC)
Kazu Hirata [Mon, 28 Nov 2022 02:24:43 +0000 (18:24 -0800)]
[Scalar] Use std::optional in GVN.h (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

20 months ago[IR] Use std::optional in Attributor.h (NFC)
Kazu Hirata [Mon, 28 Nov 2022 02:24:42 +0000 (18:24 -0800)]
[IR] Use std::optional in Attributor.h (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

20 months ago[Target] Use std::optional in CGPassBuilderOption.h (NFC)
Kazu Hirata [Mon, 28 Nov 2022 02:24:40 +0000 (18:24 -0800)]
[Target] Use std::optional in CGPassBuilderOption.h (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

20 months ago[ProfileData] Use std::optional in MemProf.h (NFC)
Kazu Hirata [Mon, 28 Nov 2022 02:24:39 +0000 (18:24 -0800)]
[ProfileData] Use std::optional in MemProf.h (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

20 months agoMemorySanitizer: Convert tests to opaque pointers
Matt Arsenault [Sun, 27 Nov 2022 21:04:35 +0000 (16:04 -0500)]
MemorySanitizer: Convert tests to opaque pointers

Required fixups:
  alloca.ll
  avx2-intrinsics-x86.ll
  csr.ll
  instrumentation-with-call-threshold.ll
  msan_asm_conservative.ll
  msan_basic.ll
  msan_debug_info.ll
  msan_kernel_basic.ll
  msan_x86intrinsics.ll
  mul_by_constant.ll

20 months agoHWAsan: Convert tests to opaque pointers
Matt Arsenault [Sun, 27 Nov 2022 21:49:10 +0000 (16:49 -0500)]
HWAsan: Convert tests to opaque pointers

Fixups needed in:
  X86/alloca-with-calls.ll
  X86/alloca.ll
  alloca-with-calls.ll
  atomic.ll
  basic.ll
  dbg-value-tag-offset.ll
  kernel-alloca.ll
  prologue.ll
  use-after-scope.ll

20 months agoHWAsan: Fix creating unnecessary bitcast with opaque pointers
Matt Arsenault [Sun, 27 Nov 2022 21:57:25 +0000 (16:57 -0500)]
HWAsan: Fix creating unnecessary bitcast with opaque pointers

This was creating a ptr to ptr bitcast. Convert a relevant test to
opaque pointers.

20 months agoPGOProfile: Convert tests to opaque pointers
Fangrui Song [Mon, 28 Nov 2022 02:13:09 +0000 (18:13 -0800)]
PGOProfile: Convert tests to opaque pointers

20 months agoGlobalDCE: Convert tests to opaque pointers
Matt Arsenault [Sun, 27 Nov 2022 00:12:18 +0000 (19:12 -0500)]
GlobalDCE: Convert tests to opaque pointers

The script mangled both virtual-functions-base-pointer-call.ll and
virtual-functions-derived-pointer-call.ll pretty badly, deleting the
run line and most of the block comment.

Replaced the bitcast with and addrspacecast in 2002-07-17-CastRef.ll,
based on the apparent intent of the test.

For 2003-07-01-SelfReference.ll, the script produced "call ptr ()
@getfunc" which surprisingly parses as valid.

20 months agoThreadSanitizer: Convert tests to opaque pointers
Matt Arsenault [Sun, 27 Nov 2022 20:56:40 +0000 (15:56 -0500)]
ThreadSanitizer: Convert tests to opaque pointers

Required manual fixes in atomic.ll, missing_dbg.ll

20 months agoLowerAtomic: Convert tests to opaque pointers
Matt Arsenault [Sat, 26 Nov 2022 20:33:50 +0000 (15:33 -0500)]
LowerAtomic: Convert tests to opaque pointers

20 months agoSeparateConstOffsetFromGEP: Update tests to use opaque pointers
Matt Arsenault [Sat, 26 Nov 2022 19:37:41 +0000 (14:37 -0500)]
SeparateConstOffsetFromGEP: Update tests to use opaque pointers

NVPTX/split-gep.ll needed a check for a bitcast replaced.

20 months agoSeparateConstOffsetFromGEP: Fix creating pointless bitcasts
Matt Arsenault [Sat, 26 Nov 2022 19:53:36 +0000 (14:53 -0500)]
SeparateConstOffsetFromGEP: Fix creating pointless bitcasts

This was directly creating new BitCastInsts, so under opaque pointers,
would end up producing bitcast from ptr to ptr.

20 months agoSeparateConstOffsetFromGEP: Add baseline test for opaque pointers
Matt Arsenault [Sat, 26 Nov 2022 20:04:38 +0000 (15:04 -0500)]
SeparateConstOffsetFromGEP: Add baseline test for opaque pointers

This currently emits a pointless bitcast.

20 months agoUtils: Update tests for opaque pointers
Matt Arsenault [Sat, 26 Nov 2022 20:45:58 +0000 (15:45 -0500)]
Utils: Update tests for opaque pointers

Also use -disable-output

20 months agoSafeStack: Convert tests to opaque pointers
Matt Arsenault [Sat, 26 Nov 2022 21:45:33 +0000 (16:45 -0500)]
SafeStack: Convert tests to opaque pointers

X86/struct.ll, X86/array.ll and X86/array-aligned required manual
updates to reorder instructions.

20 months agoStructurizeCFG: Convert tests to opaque pointers
Matt Arsenault [Sat, 26 Nov 2022 15:07:04 +0000 (10:07 -0500)]
StructurizeCFG: Convert tests to opaque pointers

20 months agoInferAddressSpaces: Switch tests to use opt -passes
Matt Arsenault [Mon, 28 Nov 2022 01:24:34 +0000 (20:24 -0500)]
InferAddressSpaces: Switch tests to use opt -passes

20 months agoInferAddressSpaces: Convert tests to opaque pointers
Matt Arsenault [Mon, 28 Nov 2022 01:11:40 +0000 (20:11 -0500)]
InferAddressSpaces: Convert tests to opaque pointers

Had constantexprs be mangled by the opaquify script; had to update
those lines manually:
  NVPTX/bug31948.ll
  AMDGPU/old-pass-regressions.ll
  AMDGPU/old-pass-regressions-inseltpoison.ll
  AMDGPU/infer-address-space.ll

Required re-reunning update_test_checks:
  AMDGPU/redundant-addrspacecast.ll

In AMDGPU/insert-pos-assert.ll, bitcast_insert_pos_assert_2 deleted a
getelementptr of 0 which I'm guessing was relevant. Replaced with an
offset 1 GEP to ensure another addrspacecast is inserted.

AMDGPU/infer-getelementptr.ll had one case improve by introducing an
inbounds.

20 months ago[lld] Change Optional to std::optional
Fangrui Song [Mon, 28 Nov 2022 01:25:33 +0000 (17:25 -0800)]
[lld] Change Optional to std::optional

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

20 months agoDataFlowSanitizer: Convert most tests to opaque pointers
Matt Arsenault [Sun, 27 Nov 2022 22:50:47 +0000 (17:50 -0500)]
DataFlowSanitizer: Convert most tests to opaque pointers

This was pain every step of the way; there's still one to go.

20 months agoDataFlowSanitizer: Don't use anonymous values in test
Matt Arsenault [Sun, 27 Nov 2022 23:55:29 +0000 (18:55 -0500)]
DataFlowSanitizer: Don't use anonymous values in test

This interferes with test updates.

20 months agoAddressSanitizer: Convert tests to opaque pointers
Matt Arsenault [Sun, 27 Nov 2022 18:55:03 +0000 (13:55 -0500)]
AddressSanitizer: Convert tests to opaque pointers

Needed some manual fixes:
  AMDGPU/asan_instrument_generic_address_space.ll
  dynamic-shadow-darwin.ll
  lifetime.ll
  stack-poisoning-byval-args.ll
  global_metadata_windows.ll
  asan-masked-load-store.ll
  stack-poisoning-and-lifetime.ll
  stack-poisoning-and-lifetime-be.ll

This included some of the worst opaquify breakages I've seen. The
tests were dependent on 0 indexed GEPs, and had check lines directly
checking pointee types.

20 months ago[lld-macho] Change most Optional to std::optional
Fangrui Song [Mon, 28 Nov 2022 00:54:07 +0000 (16:54 -0800)]
[lld-macho] Change most Optional to std::optional

20 months ago[COFF] Change most Optional to std::optional
Fangrui Song [Mon, 28 Nov 2022 00:39:40 +0000 (16:39 -0800)]
[COFF] Change most Optional to std::optional

20 months ago[IPO] Remove an unused function declaration
Kazu Hirata [Mon, 28 Nov 2022 00:22:07 +0000 (16:22 -0800)]
[IPO] Remove an unused function declaration

The corresponding definition doesn't seem to have existed every since
the declaration was introduced on Jul 8, 2019 in commit
accd3e87478eb75d455e016500ef3d2ddbeca82d.

FWIW, we do have AAReturnedValuesImpl::getAssumedUniqueReturnValue
declared and defined in Attributor.cpp.

20 months ago[test][asan] Double ended version of TestContainer
Vitaly Buka [Sun, 27 Nov 2022 22:29:30 +0000 (14:29 -0800)]
[test][asan] Double ended version of TestContainer

20 months ago[NFC][asan] Extract FixUnalignedStorage
Vitaly Buka [Sun, 27 Nov 2022 21:32:17 +0000 (13:32 -0800)]
[NFC][asan] Extract FixUnalignedStorage

And simplify slightly: adjust for unaligned container
only if aligned case poisons different bytes.

20 months ago[NFC][asan] Extract kMaxRangeToCheck into a function
Vitaly Buka [Sun, 27 Nov 2022 20:15:06 +0000 (12:15 -0800)]
[NFC][asan] Extract kMaxRangeToCheck into a function

20 months ago[test][asan] Simplify a few expressions
Vitaly Buka [Sun, 27 Nov 2022 20:09:56 +0000 (12:09 -0800)]
[test][asan] Simplify a few expressions

20 months ago[test][asan] Check find_bad_address test
Vitaly Buka [Sun, 27 Nov 2022 19:50:50 +0000 (11:50 -0800)]
[test][asan] Check find_bad_address test

For consistency with future TestDoubleEndedContainer, where calculation
of the expected bad address is complicated.

20 months ago[test][asan] Deduplicate code
Vitaly Buka [Sun, 27 Nov 2022 08:50:07 +0000 (00:50 -0800)]
[test][asan] Deduplicate code

20 months ago[NFC][asan] Rename variables in __sanitizer_annotate_contiguous_container
Vitaly Buka [Sun, 27 Nov 2022 08:29:38 +0000 (00:29 -0800)]
[NFC][asan] Rename variables in __sanitizer_annotate_contiguous_container

20 months ago[IR] Use std::optional in Statepoint.h (NFC)
Kazu Hirata [Sun, 27 Nov 2022 22:40:10 +0000 (14:40 -0800)]
[IR] Use std::optional in Statepoint.h (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

20 months ago[IR] Use std::optional in ModuleSummaryIndex.h (NFC)
Kazu Hirata [Sun, 27 Nov 2022 22:40:08 +0000 (14:40 -0800)]
[IR] Use std::optional in ModuleSummaryIndex.h (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

20 months ago[IR] Use std::optional in Instructions.h (NFC)
Kazu Hirata [Sun, 27 Nov 2022 22:40:07 +0000 (14:40 -0800)]
[IR] Use std::optional in Instructions.h (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

20 months ago[IR] Use std::optional in InstrTypes.h (NFC)
Kazu Hirata [Sun, 27 Nov 2022 22:40:05 +0000 (14:40 -0800)]
[IR] Use std::optional in InstrTypes.h (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

20 months ago[Support] Use std::optional in raw_ostream.h (NFC)
Kazu Hirata [Sun, 27 Nov 2022 22:16:12 +0000 (14:16 -0800)]
[Support] Use std::optional in raw_ostream.h (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

20 months ago[Support] Use std::optional in ToolOutputFile.h (NFC)
Kazu Hirata [Sun, 27 Nov 2022 22:16:11 +0000 (14:16 -0800)]
[Support] Use std::optional in ToolOutputFile.h (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

20 months ago[Support] Use std::optional in InstructionCost.h (NFC)
Kazu Hirata [Sun, 27 Nov 2022 22:16:09 +0000 (14:16 -0800)]
[Support] Use std::optional in InstructionCost.h (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

20 months ago[Support] Use std::optional in InitLLVM.h (NFC)
Kazu Hirata [Sun, 27 Nov 2022 22:16:08 +0000 (14:16 -0800)]
[Support] Use std::optional in InitLLVM.h (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

20 months ago[Support] Use std::optional in HashBuilder.h (NFC)
Kazu Hirata [Sun, 27 Nov 2022 22:16:06 +0000 (14:16 -0800)]
[Support] Use std::optional in HashBuilder.h (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

20 months ago[Support] Use std::optional in GlobPattern.h (NFC)
Kazu Hirata [Sun, 27 Nov 2022 22:16:05 +0000 (14:16 -0800)]
[Support] Use std::optional in GlobPattern.h (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

20 months ago[Support] Use std::optional in GenericDomTreeConstruction.h (NFC)
Kazu Hirata [Sun, 27 Nov 2022 22:16:03 +0000 (14:16 -0800)]
[Support] Use std::optional in GenericDomTreeConstruction.h (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