Changes

Summary

  1. Add flang-x86_64-windows builder. (details)
Commit c406b636839cf07367241c224da3c0207c1396a3 by llvm-zorg
Add flang-x86_64-windows builder.

Add a buildbot to compile flang using msvc. Due to msvc doing some things differently than other compilers, the msvc flang build breaks regularly. This builder will notify committers if their change causes the build to break.

However, the tests never completed successfully on Windows, partially because many tests require a UNIX shell (see D89368). To not constantly fail, tests failures only trigger a warning, until all tests are fixed as well.

Currently running here: http://meinersbur.de:8011/#/builders/146

Reviewed By: gkistanova

Differential Revision: https://reviews.llvm.org/D103199
The file was modifiedbuildbot/osuosl/master/config/workers.py (diff)
The file was modifiedbuildbot/osuosl/master/config/builders.py (diff)

Summary

  1. [gn build] Port f27e4548fc42 (details)
  2. [AIX] Remove --as-needed passing into aix linker (details)
  3. [NFC] LoopVectorizationCostModel::getMaximizedVFForTarget(): clarify debug msg (details)
  4. [X86] AMD Zen 3: don't confuse shift and shuffle, NFC (details)
  5. [llvm-symbolizer][docs] Update example for --verbose in the guide (details)
  6. [lld-macho] Rework mergeFlag to behave closer to what ld64 does. (details)
  7. [lld][WebAssembly] Add new `--import-undefined` option (details)
  8. [MCA] [RegisterFile] Allow for skipping Defs with RegID of 0 (rather than assert(RegID) like we do before this patch). (details)
  9. [LoopUnroll] Fold all exits based on known trip count/multiple (details)
  10. [lldb-vscode] only report long running progress events (details)
  11. Revert "[NFC] Remove checking pointee type for byval/preallocated type" (details)
  12. [AArch64][GISel] and+or+shl => bfi (details)
  13. [GISel] Eliminate redundant bitmasking (details)
  14. [libc++] Make sure std::allocator<void> is always trivial (details)
  15. RISCV: clean up target expression handling (details)
  16. [ScalarEvolution] Fix pointer/int type handling converting select/phi to min/max. (details)
  17. [DFSan] Cleanup code for platforms other than Linux x86_64. (details)
  18. [PartiallyInlineLibCalls] Disable sqrt expansion for strictfp. (details)
  19. [InstrProfiling] Make __profd_ unconditionally private for ELF (details)
  20. Revert "[DFSan] Cleanup code for platforms other than Linux x86_64." (details)
  21. [Attributor] Derive AACallEdges attribute (details)
  22. [NFC][SimpleLoopUnswitch] unswitchTrivialBranch(): add debug output explaining unswitching failure (details)
  23. [lldb-vscode] remove failed test (details)
  24. [trace][intel-pt] Create basic SB API (details)
Commit 00553a32330822fd936dcfd4830556468aaf918c by llvmgnsyncbot
[gn build] Port f27e4548fc42
The file was modifiedllvm/utils/gn/secondary/lld/MachO/BUILD.gn
Commit 4e2aee8d3bab6010420d9be96480f1d8ae0f35c1 by jasonliu
[AIX] Remove --as-needed passing into aix linker

Summary:
AIX does not support --as-needed linker options. Remove that option from
aix linker when -lunwind is needed.
For unwinder library, nothing special is needed because by default aix
linker has the as-needed effect for library that's an archive (which is
the case for libunwind on AIX).

Reviewed By: daltenty

Differential Revision: https://reviews.llvm.org/D104314
The file was modifiedclang/test/Driver/aix-ld.c
The file was modifiedclang/lib/Driver/ToolChains/CommonArgs.cpp
Commit 37dfc467ac807bde4f221edbf304d9a46c9789b2 by lebedev.ri
[NFC] LoopVectorizationCostModel::getMaximizedVFForTarget(): clarify debug msg

This really isn't talking about vectors in general,
but only about either fixed or scalable vectors,
and it's pretty confusing to see it state
that there aren't any vectors :)
The file was modifiedllvm/lib/Transforms/Vectorize/LoopVectorize.cpp
Commit 69caacc626f7dbbb9223b370952fcf5660e242dc by lebedev.ri
[X86] AMD Zen 3: don't confuse shift and shuffle, NFC

These proc res groups occupy the exact same pipes,
so this doesn't affect the modelling,
but it's confusing nontheless.
The file was modifiedllvm/lib/Target/X86/X86ScheduleZnver3.td
Commit d02bf362dcf8d1488dfcf970c12c6047885a5f06 by andrew.ng
[llvm-symbolizer][docs] Update example for --verbose in the guide

Differential Revision: https://reviews.llvm.org/D104128
The file was modifiedllvm/docs/CommandGuide/llvm-symbolizer.rst
Commit 366df11a35392c946678f1af94038945c23f06c8 by vyng
[lld-macho] Rework mergeFlag to behave closer to what ld64 does.

Details:
I've been getting a few weird errors similar to the following from our internal tests:

```
ld64.lld.darwinnew: error: Cannot merge section __eh_frame (type=0x0) into __eh_frame (type=0xB): inconsistent types
ld64.lld.darwinnew: error: Cannot merge section __eh_frame (flags=0x0) into __eh_frame (flags=0x6800000B): strict flags differ
ld64.lld.darwinnew: error: Cannot merge section __eh_frame (type=0x0) into __eh_frame (type=0xB): inconsistent types
ld64.lld.darwinnew: error: Cannot merge section __eh_frame (flags=0x0) into __eh_frame (flags=0x6800000B): strict flags differ
```

Differential Revision: https://reviews.llvm.org/D103971
The file was modifiedlld/MachO/ConcatOutputSection.cpp
The file was modifiedlld/test/MachO/builtin-rename.s
The file was modifiedlld/MachO/ConcatOutputSection.h
Commit 758633f92226ad25c9007a8a05f01cb848b97ab8 by sbc
[lld][WebAssembly] Add new `--import-undefined` option

This change revisits https://reviews.llvm.org/D79248 which originally
added support for the --unresolved-symbols flag.

At the time I thought it would make sense to add a third option to this
flag called `import-functions` but it turns out (as was suspects by on
the reviewers IIRC) that this option can be authoganal.

Instead I've added a new option called `--import-undefined` that only
operates on symbols that can be imported (for example, function symbols
can always be imported as opposed to data symbols we can only be
imported when compiling with PIC).

This option gives us the full expresivitiy that emscripten needs to be
able allow reporting of undefined data symbols as well as the option to
disable that.

This change does remove the `--unresolved-symbols=import-functions`
option, which is been in the codebase now for about a year but I would
be extremely surprised if anyone was using it.

Differential Revision: https://reviews.llvm.org/D103290
The file was modifiedlld/test/wasm/unresolved-symbols.s
The file was modifiedlld/wasm/Writer.cpp
The file was modifiedlld/docs/WebAssembly.rst
The file was modifiedlld/wasm/Options.td
The file was modifiedlld/wasm/Config.h
The file was modifiedlld/wasm/Driver.cpp
The file was modifiedlld/wasm/Relocations.cpp
Commit dc11d4e6be2455e666319e01bc1c79a3ba750fbf by pholland2
[MCA] [RegisterFile] Allow for skipping Defs with RegID of 0 (rather than assert(RegID) like we do before this patch).

This patch will allow developers to remove unwanted instruction Defs (most likely from within a target specific InstrPostProcess) by setting that Def's RegisterID to 0.
Differential Revision: https://reviews.llvm.org/D104433
The file was modifiedllvm/lib/MCA/HardwareUnits/RegisterFile.cpp
Commit f7c54c4603a2df8c0833f5ddc04a5e109bca1c14 by nikita.ppv
[LoopUnroll] Fold all exits based on known trip count/multiple

Fold all exits based on known trip count/multiple information from
SCEV. Previously only the latch exit or the single exit were folded.

This doesn't yet eliminate ULO.TripCount and ULO.TripMultiple
entirely: They're still used to a) decide whether runtime unrolling
should be performed and b) for ORE remarks. However, the core
unrolling logic is independent of them now.

Differential Revision: https://reviews.llvm.org/D104203
The file was modifiedllvm/test/Transforms/LoopUnroll/nonlatchcondbr.ll
The file was modifiedllvm/test/Transforms/LoopUnroll/multiple-exits.ll
The file was modifiedllvm/lib/Transforms/Utils/LoopUnroll.cpp
Commit aa4685c0fb3aab5acb90be5fd3eb5ba8bf1e3211 by walter erquinigo
[lldb-vscode] only report long running progress events

When the number of shared libs is massive, there could be hundreds of
thousands of short lived progress events sent to the IDE, which makes it
irresponsive while it's processing all this data. As these small jobs
take less than a second to process, the user doesn't even see them,
because the IDE only display the progress of long operations. So it's
better not to send these events.

I'm fixing that by sending only the events that are taking longer than 5
seconds to process.
In a specific run, I got the number of events from ~500k to 100, because
there was only 1 big lib to parse.

I've tried this on several small and massive targets, and it seems to
work fine.

Differential Revision: https://reviews.llvm.org/D101128
The file was modifiedlldb/tools/lldb-vscode/ProgressEvent.h
The file was modifiedlldb/tools/lldb-vscode/VSCode.h
The file was modifiedlldb/tools/lldb-vscode/VSCode.cpp
The file was modifiedlldb/tools/lldb-vscode/ProgressEvent.cpp
The file was modifiedlldb/tools/lldb-vscode/lldb-vscode.cpp
Commit 9ac7388e3dd578e9a27b6fe8ab4802da39d2999e by jgorbe
Revert "[NFC] Remove checking pointee type for byval/preallocated type"

This reverts commit 738abfdbea21acd2597d83ad3390daf5696b6d07.
The file was modifiedllvm/include/llvm/IR/InstrTypes.h
Commit 7b0612088289e4f57e089a792c5e6d1123a2b6e3 by Jon Roelofs
[AArch64][GISel] and+or+shl => bfi

This fixes a GISEL vs SDAG regression that showed up at -Os in 256.bzip2

In `_getAndMoveToFrontDecode`:

gisel:
```
and w9, w0, #0xff
orr w9, w9, w8, lsl #8
```

sdag:
```
bfi w0, w8, #8, #24
```

Differential revision: https://reviews.llvm.org/D103291
The file was addedllvm/test/CodeGen/AArch64/GlobalISel/select-bitfield-insert.ll
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
Commit a2ab765029dd76756e98851847e6675795a973b6 by Jon Roelofs
[GISel] Eliminate redundant bitmasking

This was a GISel vs SDAG regression that showed up at -Os on arm64 in:
SingleSource/Benchmarks/Adobe-C++/simple_types_constant_folding.test

https://llvm.godbolt.org/z/aecjodsjG

Differential revision: https://reviews.llvm.org/D103334
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/shl-ext-reduce.ll
The file was modifiedllvm/include/llvm/Target/GlobalISel/Combine.td
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/cvt_f32_ubyte.ll
The file was addedllvm/test/CodeGen/AArch64/GlobalISel/opt-overlapping-and.mir
The file was modifiedllvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
Commit 71e4d434dc83b02a853712a5cb026ee2fa9ba67f by Louis Dionne
[libc++] Make sure std::allocator<void> is always trivial

When we removed the allocator<void> specialization, the triviality of
std::allocator<void> changed because the primary template had a
non-trivial default constructor and the specialization didn't
(so std::allocator<void> went from trivial to non-trivial).

This commit fixes that oversight by giving a trivial constructor to
the primary template when instantiated on cv-void.

This was reported in https://llvm.org/PR50299.

Differential Revision: https://reviews.llvm.org/D104398
The file was modifiedlibcxx/include/__memory/allocator.h
The file was addedlibcxx/test/libcxx/memory/allocator_void.trivial.compile.pass.cpp
Commit 116841c623747972d0ae80239d3ea7b8409b868b by Saleem Abdulrasool
RISCV: clean up target expression handling

The target specific expression handling was slightly regressed by
bbea64250f65480d787e1c5ff45c4de3ec2dcda8.  This restores the proper
sub-expression evaluation to allow for constant folding within the
expression.  We explicitly discard the layout and assembler when
evaluating the expression to avoid any symbolic computation and instead
using the `evaluateAsRelocatable` to canonicalise and constant fold
only.

We can also simplify the expression handling - none of the target
variants support symbolic difference.  This simplifies the logic for
that and adds additional tests to ensure that we do not accidentally
regress here in the future.

Reviewed By: maskray

Differential Revision: https://reviews.llvm.org/D104473
The file was modifiedllvm/lib/Target/RISCV/MCTargetDesc/RISCVMCExpr.cpp
The file was addedllvm/test/MC/RISCV/expressions.s
Commit 8a567e5f22a6d76ce076cf4305fe5c7cbff50fe0 by efriedma
[ScalarEvolution] Fix pointer/int type handling converting select/phi to min/max.

The old version of this code would blindly perform arithmetic without
paying attention to whether the types involved were pointers or
integers.  This could lead to weird expressions like negating a pointer.

Explicitly handle simple cases involving pointers, like "x < y ? x : y".
In all other cases, coerce the operands of the comparison to integer
types.  This avoids the weird cases, while handling most of the
interesting cases.

Differential Revision: https://reviews.llvm.org/D103660
The file was modifiedllvm/test/Analysis/ScalarEvolution/pr46786.ll
The file was modifiedllvm/unittests/Transforms/Utils/ScalarEvolutionExpanderTest.cpp
The file was modifiedllvm/test/Transforms/IndVarSimplify/pr45835.ll
The file was modifiedllvm/lib/Analysis/ScalarEvolution.cpp
Commit 8441b993bdba29437b296bad6a37464669eef35e by browneee
[DFSan] Cleanup code for platforms other than Linux x86_64.

These other platforms are unsupported and untested.
They could be re-added later based on MSan code.

Reviewed By: gbalats, stephan.yichao.zhao

Differential Revision: https://reviews.llvm.org/D104481
The file was modifiedllvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
The file was removedllvm/test/Instrumentation/DataFlowSanitizer/external_mask.ll
The file was modifiedcompiler-rt/lib/dfsan/dfsan_platform.h
The file was modifiedcompiler-rt/lib/dfsan/dfsan.cpp
Commit 99e95856fb785cb22d898e963a54e8d9a8459fc7 by craig.topper
[PartiallyInlineLibCalls] Disable sqrt expansion for strictfp.

This pass emits a floating point compare and a conditional branch,
but if strictfp is enabled we don't emit a constrained compare
intrinsic.

The backend also won't expand the readonly sqrt call this pass inserts
to a sqrt instruction under strictfp. So we end up with 2 libcalls as
seen here. https://godbolt.org/z/oax5zMEWd

Fix these things by disabling the pass.

Differential Revision: https://reviews.llvm.org/D104479
The file was addedllvm/test/Transforms/PartiallyInlineLibCalls/strictfp.ll
The file was modifiedllvm/lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp
Commit 76d0747e0807307780ba84cbd7e5c80b20c26bd7 by i
[InstrProfiling] Make __profd_ unconditionally private for ELF

For ELF, since all counters/data are in a section group (either `comdat any` or
`comdat noduplicates`), and the signature for `comdat any` is `__profc_`, the
D1003372 optimization prerequisite (linker GC cannot discard data variables
while the text section is retained) is always satisified, we can make __profd_
unconditionally private.

Reviewed By: davidxl, rnk

Differential Revision: https://reviews.llvm.org/D103717
The file was modifiedllvm/test/Transforms/PGOProfile/indirect_call_profile.ll
The file was modifiedllvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
Commit 39295e92f7f991a745743dd2c888f0a774047f2a by browneee
Revert "[DFSan] Cleanup code for platforms other than Linux x86_64."

This reverts commit 8441b993bdba29437b296bad6a37464669eef35e.

Buildbot failures.
The file was modifiedcompiler-rt/lib/dfsan/dfsan_platform.h
The file was modifiedllvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
The file was addedllvm/test/Instrumentation/DataFlowSanitizer/external_mask.ll
The file was modifiedcompiler-rt/lib/dfsan/dfsan.cpp
Commit eaf1b6810ce0f40008b2b1d902750eafa3e198d3 by kuterdinel
[Attributor] Derive AACallEdges attribute

This attribute computes the optimistic live call edges using the attributor
liveness information. This attribute will be used for deriving a
inter-procedural function reachability attribute.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D104059
The file was addedllvm/test/Transforms/Attributor/callgraph.ll
The file was modifiedllvm/lib/Transforms/IPO/Attributor.cpp
The file was modifiedllvm/lib/Transforms/IPO/AttributorAttributes.cpp
The file was modifiedllvm/include/llvm/Transforms/IPO/Attributor.h
Commit 84eeb82888a033bd02b53023f9408760fc86bd81 by lebedev.ri
[NFC][SimpleLoopUnswitch] unswitchTrivialBranch(): add debug output explaining unswitching failure

It's not prohibitively verbose, and allows easier understanding
why certain unswitching ultimately wasn't performed.
The file was modifiedllvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
Commit c1360fd5fced42ea45ce1eacbf1c5e1ed54fcac5 by walter erquinigo
[lldb-vscode] remove failed test

Found in http://green.lab.llvm.org/green/job/lldb-cmake/32891/testReport/lldb-api/tools_lldb-vscode_launch/TestVSCode_launch_py/

the lldb-vscode changed and that test makes no sense anymore
The file was modifiedlldb/test/API/tools/lldb-vscode/launch/TestVSCode_launch.py
Commit bf9f21a28be171dc500cc68b4cb1fcd3fc33f229 by walter erquinigo
[trace][intel-pt] Create basic SB API

This adds a basic SB API for creating and stopping traces.
Note: This doesn't add any APIs for inspecting individual instructions. That'd be a more complicated change and it might be better to enhande the dump functionality to output the data in binary format. I'll leave that for a later diff.

This also enhances the existing tests so that they test the same flow using both the command interface and the SB API.

I also did some cleanup of legacy code.

Differential Revision: https://reviews.llvm.org/D103500
The file was modifiedlldb/include/lldb/API/SBTarget.h
The file was modifiedlldb/source/API/SBReproducer.cpp
The file was modifiedlldb/source/Commands/CommandObjectThread.cpp
The file was modifiedlldb/source/Plugins/Trace/intel-pt/TraceIntelPTSessionFileParser.cpp
The file was modifiedlldb/source/Target/Trace.cpp
The file was modifiedlldb/test/API/commands/trace/multiple-threads/TestTraceStartStopMultipleThreads.py
The file was modifiedlldb/source/Plugins/Trace/intel-pt/CommandObjectTraceStartIntelPT.h
The file was modifiedlldb/source/API/SBTrace.cpp
The file was removedlldb/include/lldb/Utility/TraceOptions.h
The file was modifiedlldb/bindings/interface/SBTrace.i
The file was addedlldb/source/Plugins/Trace/intel-pt/TraceIntelPTConstants.h
The file was modifiedlldb/bindings/interface/SBProcess.i
The file was modifiedlldb/source/API/SBTarget.cpp
The file was modifiedlldb/bindings/interface/SBTarget.i
The file was modifiedlldb/source/API/CMakeLists.txt
The file was modifiedlldb/test/API/commands/trace/TestTraceLoad.py
The file was removedlldb/bindings/interface/SBTraceOptions.i
The file was modifiedlldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp
The file was modifiedlldb/bindings/headers.swig
The file was modifiedlldb/bindings/interface/SBStructuredData.i
The file was modifiedlldb/source/Commands/CommandObjectThreadUtil.h
The file was modifiedlldb/include/lldb/API/SBThread.h
The file was modifiedlldb/test/API/commands/trace/TestTraceSchema.py
The file was modifiedlldb/include/lldb/Target/Target.h
The file was modifiedlldb/source/API/SBStructuredData.cpp
The file was modifiedlldb/source/Plugins/Trace/intel-pt/TraceIntelPT.h
The file was modifiedlldb/source/Plugins/Trace/intel-pt/TraceIntelPT.cpp
The file was modifiedlldb/docs/.htaccess
The file was modifiedlldb/include/lldb/API/SBTrace.h
The file was modifiedlldb/source/Plugins/Trace/intel-pt/TraceIntelPTOptions.td
The file was modifiedlldb/source/Plugins/Trace/intel-pt/CommandObjectTraceStartIntelPT.cpp
The file was modifiedlldb/test/API/commands/trace/TestTraceDumpInstructions.py
The file was modifiedlldb/packages/Python/lldbsuite/test/dotest.py
The file was modifiedlldb/bindings/interfaces.swig
The file was modifiedlldb/source/Plugins/Process/Linux/IntelPTManager.cpp
The file was modifiedlldb/include/lldb/API/SBDefines.h
The file was removedlldb/include/lldb/API/SBTraceOptions.h
The file was modifiedlldb/docs/lldb-gdb-remote.txt
The file was modifiedlldb/include/lldb/Target/Trace.h
The file was addedlldb/packages/Python/lldbsuite/test/tools/intelpt/intelpt_testcase.py
The file was modifiedlldb/source/API/SBProcess.cpp
The file was modifiedlldb/test/API/commands/trace/TestTraceStartStop.py
The file was modifiedlldb/include/lldb/API/SBStructuredData.h
The file was modifiedlldb/include/lldb/API/SBProcess.h
The file was modifiedlldb/source/Commands/CommandObjectTrace.cpp
The file was modifiedlldb/include/lldb/Target/Process.h
The file was modifiedlldb/source/Target/Target.cpp
The file was modifiedlldb/include/lldb/API/LLDB.h
The file was modifiedlldb/include/lldb/Utility/TraceGDBRemotePackets.h
The file was removedlldb/source/API/SBTraceOptions.cpp
The file was modifiedlldb/source/Commands/CommandObjectProcess.cpp
The file was modifiedlldb/include/lldb/lldb-forward.h
The file was modifiedlldb/docs/design/overview.rst

Summary

  1. Add flang-x86_64-windows builder. (details)
Commit c406b636839cf07367241c224da3c0207c1396a3 by llvm-zorg
Add flang-x86_64-windows builder.

Add a buildbot to compile flang using msvc. Due to msvc doing some things differently than other compilers, the msvc flang build breaks regularly. This builder will notify committers if their change causes the build to break.

However, the tests never completed successfully on Windows, partially because many tests require a UNIX shell (see D89368). To not constantly fail, tests failures only trigger a warning, until all tests are fixed as well.

Currently running here: http://meinersbur.de:8011/#/builders/146

Reviewed By: gkistanova

Differential Revision: https://reviews.llvm.org/D103199
The file was modifiedbuildbot/osuosl/master/config/workers.py
The file was modifiedbuildbot/osuosl/master/config/builders.py