Commit Graph

424686 Commits

Author SHA1 Message Date
usama hameed 602682225a bugfix in InfiniteLoopCheck to not print warnings for unevaluated loops
Differential Revision: https://reviews.llvm.org/D126034
2022-05-23 20:18:48 -07:00
Wolfgang Pieb ae9489025f [NFC][Metadata] Define move constructor and move assignment operator for MDOperand.
This is a preparatory patch for the MDNode resize functionality.

Reviewed By: dexonsmith

Differential Revision: https://reviews.llvm.org/D125994
2022-05-23 20:04:45 -07:00
Sotiris Apostolakis d7ebb74611 [SelectOpti][4/5] Loop Heuristics
This patch adds the loop-level heuristics for determining whether branches are more profitable than conditional moves.
These heuristics apply to only inner-most loops.

Depends on D120231

Reviewed By: davidxl

Differential Revision: https://reviews.llvm.org/D120232
2022-05-23 22:05:41 -04:00
Sotiris Apostolakis 8b42bc5662 [SelectOpti][3/5] Base Heuristics
This patch adds the base heuristics for determining whether branches are more profitable than conditional moves.
Base heuristics apply to all code apart from inner-most loops.

Depends on D122259

Reviewed By: davidxl

Differential Revision: https://reviews.llvm.org/D120231
2022-05-23 22:01:12 -04:00
Vy Nguyen c0ec1036d6 [lld-macho][nfc] Run clang-format on lld/MachO/*.{h,cpp}
- fixed inconsistent indents and spaces
- prevent extraneous formatting changes in other patches

Differential Revision: https://reviews.llvm.org/D126262
2022-05-24 08:36:20 +07:00
Peter Klausler 0377322897 [flang] Ignore BIND(C) binding name conflicts of inner procedures
The binding names of inner procedures with BIND(C) are not exposed
to the loader and should be ignored for potential conflict errors.

Differential Revision: https://reviews.llvm.org/D126141
2022-05-23 18:22:56 -07:00
Peter Klausler 9f33dd733f [flang] Allow global scope names that clash with intrinsic modules
Intrinsic module names are not in the user's namespace, so they
are free to declare global names that conflict with intrinsic
modules.

Differential Revision: https://reviews.llvm.org/D126140
2022-05-23 18:21:42 -07:00
Xeonacid b8feeba0b4 [RISCV] Make old JIT ExecutionEngine tests unsupported
Make old JIT ExecutionEngine tests unsupported for RISCV, like many other architectures included.

Reviewed By: reames

Differential Revision: https://reviews.llvm.org/D126188
2022-05-24 03:01:00 +02:00
Peter Klausler e141e719e1 [flang] Fix character length calculation for Unicode component
The character length value in the derived type component information table
entry is already in units of characters, not bytes, so don't divide by the
per-character byte size.

Differential Revision: https://reviews.llvm.org/D126139
2022-05-23 17:48:12 -07:00
Sam Clegg 74f9841977 [lld][WebAssembly] Allow use of statically allocated TLS region.
It turns out we were already allocating static address space for TLS
data along with the non-TLS static data, but this space was going
unused/ignored.

With this change, we include the TLS segment in `__wasm_init_memory`
(which does the work of loading the passive segments into memory when a
module is first loaded).  We also set the `__tls_base` global to point
to the start of this segment.

This means that the runtime can use this static copy of the TLS data for
the first/primary thread if it chooses, rather than doing a runtime
allocation prior to calling `__wasm_init_tls`.

Practically speaking, this will allow emscripten to avoid dynamic
allocation of TLS region on the main thread.

Differential Revision: https://reviews.llvm.org/D126107
2022-05-23 17:27:17 -07:00
Hendrik Greving 4f93d5cc1d [BasicBlockUtils] Do not move loop metadata if outer loop header.
Fixes a bug preventing moving the loop's metadata to an outer loop's header,
which happens if the loop's exit is also the header of an outer loop.

Adjusts test for above.

Fixes #55416.

Differential Revision: https://reviews.llvm.org/D125574
2022-05-23 16:39:54 -07:00
Hendrik Greving e5d8fb690e [BasicBlockUtils] Add corner case test for loop metadata.
Adds a test to expose #55416.

Differential Revision: https://reviews.llvm.org/D125696
2022-05-23 16:39:33 -07:00
Mehdi Amini 994a1841eb Apply clang-tidy fixes for modernize-use-bool-literals in Parser.cpp (NFC) 2022-05-23 23:13:33 +00:00
Mehdi Amini f38765a813 Apply clang-tidy fixes for modernize-use-override in SparseTensorUtils.cpp (NFC) 2022-05-23 23:12:58 +00:00
Mehdi Amini 63d69a21b7 Apply clang-tidy fixes for performance-unnecessary-value-param in Utils.cpp (NFC) 2022-05-23 23:12:58 +00:00
Vitaly Buka 4f89ff3fc7 [test][clang] Move -O3 in command line 2022-05-23 15:57:14 -07:00
Jamie Schmeiser 24239e246c Add new hidden option -print-on-crash that prints out IR that caused opt pipeline to crash
A new hidden option -print-on-crash that prints the IR as it was upon entering
the last pass when there is a crash.

The IR is saved in its print form before each pass is started and a
signal handler is registered.  If the compilation crashes, the signal
handler will print the saved IR to dbgs().  This option
can be modified using -print-module-scope to get the IR for the complete
module.  Note that this option only works with the new pass manager.

Reviewed By: yrouban

Differential Revision: https://reviews.llvm.org/D86657
2022-05-23 15:38:38 -07:00
Tom Stellard 21c060c497 github: Switch release PR repository to llvm/llvm-project-release-prs
As discussed in https://discourse.llvm.org/t/creating-a-new-repository-for-release-branch-pull-requests/61339

Reviewed By: asl

Differential Revision: https://reviews.llvm.org/D125851
2022-05-23 15:10:27 -07:00
Alex Brachet 8725dc5e2f [libc][docs] Use same formatting for headers in source_layout
utils looks different from the other directory names
in the docs, see
https://libc.llvm.org/source_layout.html#the-utils-directory

Differential revision: https://reviews.llvm.org/D126211
2022-05-23 21:47:22 +00:00
NAKAMURA Takumi c8e0870829 [TableGen] emitStringLiteralDef: Pad trailing '\0' at the end of char array.
Fixup for https://reviews.llvm.org/D73044
String literal has an implicit terminator '\0'. This commit adjusts char array
to long literal.

This causes difference of artifacts between -long-string-literals=true
and false.

Differential Revision: https://reviews.llvm.org/D126136
2022-05-24 06:25:10 +09:00
Jeffrey Tan a1d490319a Fix lldb-vscode frame test failure
Previous patch (https://reviews.llvm.org/D126013) added a new "optimized"
attribute to DAP stack frame this caused some tests, like
lldb-vscode/coreFile/TestVSCode_coreFile.py
to fail because the tests explicitly check for all attributes.

To fix the test failure I decided to remove this attribute.

Differential Revision: https://reviews.llvm.org/D126225
2022-05-23 14:04:37 -07:00
NAKAMURA Takumi 40b9a2616e emitStringLiteralDef: Return earlier here. NFC.
Differential Revision: https://reviews.llvm.org/D126135
2022-05-24 06:02:16 +09:00
Mitch Phillips cead4eceb0 [symbolizer] Parse DW_TAG_variable DIs to show line info for globals
Currently, llvm-symbolizer doesn't like to parse .debug_info in order to
show the line info for global variables. addr2line does this. In the
future, I'm looking to migrate AddressSanitizer off of internal metadata
over to using debuginfo, and this is predicated on being able to get the
line info for global variables.

This patch adds the requisite support for getting the line info from the
.debug_info section for symbolizing global variables. This only happens
when you ask for a global variable to be symbolized as data.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D123538
2022-05-23 13:30:22 -07:00
Sotiris Apostolakis 97c3ef5c8a [SelectOpti][2/5] Select-to-branch base transformation
This patch implements the actual transformation of selects to branches.
It includes only the base transformation without any sinking.

Depends on D120230

Reviewed By: davidxl

Differential Revision: https://reviews.llvm.org/D122259
2022-05-23 16:11:40 -04:00
Qunyan Mangus 12bae5f3e2 Remove duplicate fields in RAGreedy
RAGreedy has two fields of RegisterClassInfo, one called RCI and another RegClassInfo from its base class.
RCI is initialized without freezeReservedRegs first, while RegClassInfo does. Therefore, if reserved registers
information is changed between last time freezeReservedRegs is called and RAGreedy, it's not picked up by RCI.
Instead of having both fields in RAGreedy, remove RCI and use RegClassInfo instead. Also removed is the TRI field
which is present in its base class.

Reviewed By: MatzeB

Differential Revision: https://reviews.llvm.org/D125926
2022-05-23 13:08:25 -07:00
Paul Robinson 217531f12b [PS5] Make driver's PIC behavior match PS4
The new test is a copy of the corresponding PS4 test, with the triple
etc updated, because there's currently no good way to make one lit test
"iterate" with multiple targets.
2022-05-23 12:50:22 -07:00
Louis Dionne 6cb3fdc278 [libc++] Remove duplicate tests for callable concepts
This is essentially a revert of c7ad02009. Indeed, it seems that both
96dbdd75 and c7ad02009 were committed, but c7ad02009 seems to be only
an older version of 96dbdd75's tests.
2022-05-23 15:38:49 -04:00
Stella Stamenova e7afa23366 [mlir] Use 'native' instead of 'llvm_has_native_target' in the mlir tests
The tests actually require the target triple to match the host, rather than just having the host in the list of available targets. This change removes `llvm_has_native_target` and instead uses the `native` feature from the lit configuration.

Reviewed By: stellaraccident

Differential Revision: https://reviews.llvm.org/D126011
2022-05-23 12:38:24 -07:00
Florian Hahn 8661725686
[AArch64] Add tests with free shuffles for indexed fma variants.
The new tests contain examples where shuffles are free, because indexed
fma instructions can be used.
2022-05-23 20:27:42 +01:00
Paul Walker 84acdd32ca [SVEInstrFormats] Ensure scatter instructions are named consistently. 2022-05-23 20:22:14 +01:00
Alexey Bataev 319a722f6f [SLP][NFC]Improve compile time, NFC.
Builds UserIgnore list only once as a SmallDenseSet without rebuilding
it between the runs, iterate over gathers instead list of reduction ops,
do some checks in the buildTree_rec only if the corresponding containers
  are not empty.
2022-05-23 12:15:27 -07:00
Julian Lettner 1962389979 [Sanitizer][Darwin] Add explanation for Apple platform macros
Differential Revision: https://reviews.llvm.org/D126229
2022-05-23 11:59:44 -07:00
LLVM GN Syncbot 7ffc99bedc [gn build] Port eebc1fb772 2022-05-23 18:52:16 +00:00
Nikolas Klauser 40f7fca3d9 [libc++] Add ranges::max_element to the synopsis and ADL-proof the __min_element_impl calls
Reviewed By: ldionne, #libc

Spies: sstefan1, libcxx-commits

Differential Revision: https://reviews.llvm.org/D126167
2022-05-23 20:50:04 +02:00
Nikolas Klauser 19e21d91bc [libc++] Add auto to the list of required extensions in C++03
We use `auto` in C++03, so we shouldn't say that we aren't.

Reviewed By: ldionne, #libc

Spies: libcxx-commits

Differential Revision: https://reviews.llvm.org/D126165
2022-05-23 20:48:53 +02:00
Nikolas Klauser 5703905805 [libc++] Assume that push_macro and pop_macro are available
All compilers that libc++ supports support `push_macro` and `pop_macro`. So let's remove it.

Reviewed By: ldionne, #libc

Spies: libcxx-commits, mgorny

Differential Revision: https://reviews.llvm.org/D126073
2022-05-23 20:47:44 +02:00
Nikolas Klauser b177a90ce7 [libc++] Always enable the ranges concepts
The ranges concepts were already available in libc++13, so we shouldn't guard them with `_LIBCPP_HAS_NO_INCOMPLETE_RANGES`.
Fixes https://github.com/llvm/llvm-project/issues/54765

Reviewed By: #libc, ldionne

Spies: ldionne, libcxx-commits

Differential Revision: https://reviews.llvm.org/D124011
2022-05-23 20:44:34 +02:00
Nikolas Klauser eebc1fb772 [libc++] Granularize parts of <type_traits>
`<type_traits>` is quite a large header, so I'll granularize it in a few steps.

Reviewed By: ldionne, #libc

Spies: libcxx-commits, mgorny

Differential Revision: https://reviews.llvm.org/D124755
2022-05-23 20:43:27 +02:00
Jorge Gorbe Moya f0a61c2ce2 Remove `friend` classes from TypeCategoryMap
As far as I can tell, the only thing those friend classes access is the
`ValueSP` typedef.

Given that this is a map-ish class, with "Map" in its name, it doesn't
seem like a stretch to make `KeyType`, `ValueType` and `ValueSP` public.
More so when the public methods of the class have `KeyType` and
`ValueSP` arguments and clearly `ValueSP` needs to be accessed from the
outside.

`friend` complicates local reasoning about who can access private
members, which is valuable in a class like this that has every method
locking a mutex to prevent concurrent access.

Differential Revision: https://reviews.llvm.org/D126103
2022-05-23 11:31:53 -07:00
natashaknk bedd3ee881 [mlir][tosa] Change tosa.depthwise_conv2d's ending reshape to a collapse.
TOSAs depthwise_conv2d operation includes a reshape to include the implicit x1 dimension.

Reviewed By: rsuderman

Differential Revision: https://reviews.llvm.org/D126212
2022-05-23 11:27:01 -07:00
Julian Lettner 806e8a1c8e [Sanitizer][Darwin] Add SANITIZER_DRIVERKIT platform macro 2022-05-23 11:21:45 -07:00
Sanjay Patel e8c20d995b [IR] add and use pattern match specialization for sqrt intrinsic; NFC
This was included in D126190 originally, but it's
independent and a useful change for readability.
2022-05-23 14:16:30 -04:00
Craig Topper 569d8945f3 [DAGCombiner][AArch64] Don't fold (smulo x, 2) -> (saddo x, x) if VT is i2.
If the VT is i2, then 2 is really -2.

Test has not been commited yet, but diff shows the change.

Fixes PR55644.

Differential Revision: https://reviews.llvm.org/D126213
2022-05-23 11:13:57 -07:00
Craig Topper 75eb0576de [AArch64] Add test case for pr55644. NFC 2022-05-23 11:13:57 -07:00
Dave Lee 760298adc2 [lldb] Specify aguments of `image list`
Register positional argument details in `CommandObjectTargetModulesList`.

I recently learned that `image list` takes a module name, but the help info
does not indicate this. With this change, `help image list` will show that it
accepts zero or more module names.

This makes it easier to get info about specific modules, without having to
find/grep through the full image list.

Reviewed By: DavidSpickett

Differential Revision: https://reviews.llvm.org/D125154
2022-05-23 11:00:48 -07:00
Stephen Long 4f1e64b54f [MSVC, ARM64] Add __readx18 intrinsics
https://docs.microsoft.com/en-us/cpp/intrinsics/arm64-intrinsics?view=msvc-170

  unsigned char __readx18byte(unsigned long)
  unsigned short __readx18word(unsigned long)
  unsigned long __readx18dword(unsigned long)
  unsigned __int64 __readx18qword(unsigned long)

Given the lack of documentation of the intrinsics, we chose to align the offset with just
`CharUnits::One()` when calling `IRBuilderBase::CreateAlignedLoad()`

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D126024
2022-05-23 10:59:12 -07:00
Dave Lee 0da230ff44 [lldb] Improve formatting of dlopen error messages (NFC)
Ensure there's a space between "utility" and "function", and also makes
it easier to grep/search for "utility function".

While making this change, I also re-formatted the other dlopen error messages
(with clang-format). This fix other instances of spaces missing between words,
and makes each of these strings fit a single line, making them greppable.

Differential Revision: https://reviews.llvm.org/D126078
2022-05-23 10:57:40 -07:00
Benjamin Kramer 2f2ca30d0a Fix an unused variable warning in no-asserts build mode 2022-05-23 19:53:40 +02:00
Paul Robinson dbd1ba28a3 [PS5] Disable a test, same as PS4 2022-05-23 10:43:26 -07:00
Philip Reames bc2fe4a0d6 [RISCV] Add basic fault-first load coverage for VSETVLI insertion
Simplified version of a test taken from D123581.
2022-05-23 10:11:07 -07:00