- Aug 04, 2021
-
-
Roman Lebedev authored
Having `NewMask` outside of an if and rebinding `BaseMask` `ArrayRef` to it is confusing. Instead, just move the `Mask` vector higher up, and change the code that earlier had no access to it but now does to use `Mask` instead of `BaseMask`. This has no other intentional changes.
-
Roman Lebedev authored
I want to hoist `Mask` variable higher up, but then it would clash with this one. So let's rename this one first. There are no other intentional changes here other than said rename.
-
Tomas Matheson authored
This assert is intended to ensure that the high registers are not selected when it is passed to one of the thumb UXT instructions. However it was triggering even for 32 bit where no UXT instruction is emitted. Fixes PR51313. Differential Revision: https://reviews.llvm.org/D107363
-
Roman Lebedev authored
Given a shuffle mask, if it is picking from an input that is splat given the current granularity of the shuffle, then adjust the mask to pick from the same lane of the input as the mask element is in. This may result in a shuffle being simplified into a blend. I believe this is correct given that the splat detection matches the one just above the new code, My basic thought is that we might be able to get less regressions by handling multiple insertions of the same value into a vector if we form broadcasts+blend here, as opposed to D105390, but i have not really thought this through, and did not try implementing it yet. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D107009
-
Matthias Springer authored
Differential Revision: https://reviews.llvm.org/D107458
-
Matthias Springer authored
This file was previously included transitively via `mlir/Transforms/Passes.h`, but the include has been removed from that file. Differential Revision: https://reviews.llvm.org/D107455
-
David Green authored
This attempts to make more of RDA aware of potentially overlapping subregisters. Some of this was already in place, with it iterating through MCRegUnitIterators. This also replaces calls to LiveRegs.contains(..) with !LiveRegs.available(..), and updates the isValidRegUseOf and isValidRegDefOf to search subregs. Differential Revision: https://reviews.llvm.org/D107351
-
David Green authored
-
Matthias Springer authored
There are many downstream users of llvm::dbgs, which is defined in Debug.h. Before D106342, many users included that dependency transitively via the now deleted ViewRegionGraph.h. Adding it back to Transforms/Passes.h for convenience. Differential Revision: https://reviews.llvm.org/D107451
-
Simon Pilgrim authored
Match the naming style used by the other 'FeatureFast/FeatureSlow' tuning flags.
-
Simon Pilgrim authored
Noticed while looking at the feature flag renaming suggested in D107370
-
Muhammad Omair Javaid authored
Following LLDB tests fail randomly on LLDB Arm/AArch64 Linux buildbots. We still not have a reliable solution for these tests to pass consistently. I am marking them skipped for now. TestBreakpointCallbackCommandSource.py TestIOHandlerResize.py TestEditline.py TestGuiViewLarge.py TestGuiExpandThreadsTree.py TestGuiBreakpoints.py
-
Dmitry Vyukov authored
Currently we use passive spinning with internal_sched_yield to wait in __cxa_guard_acquire/pthread_once. Passive spinning tends to degrade ungracefully under high load. Use FutexWait/Wake instead. Depends on D107359. Reviewed By: vitalybuka, melver Differential Revision: https://reviews.llvm.org/D107360
-
Jan Svoboda authored
The lit tests for `clang-scan-deps` invoke the tool without going through the substitution system. While the test runner correctly picks up the `clang-scan-deps` binary from the build directory, it doesn't print its absolute path. When copying the invocations when reproducing test failures, this can result in `command not found: clang-scan-deps` errors or worse yet: pick up the system `clang-scan-deps`. This patch adds new local `%clang-scan-deps` substitution. Reviewed By: lxfind, dblaikie Differential Revision: https://reviews.llvm.org/D107155
-
Dmitry Vyukov authored
Introduce named consts for magic values we use. Differential Revision: https://reviews.llvm.org/D107445
-
Jan Svoboda authored
For some use-cases, it might be useful to be able to turn off modules for C++ in `-cc1`. (The feature is implied by `-std=C++20`.) This patch exposes the `-fno-cxx-modules` option in `-cc1`. Reviewed By: arphaman Differential Revision: https://reviews.llvm.org/D106864
-
Matthias Springer authored
* Add new pass option `print-data-flow-edges`, default value `true`. * Add new pass option `print-control-flow-edges`, default value `false`. * Remove `PrintCFGPass`. Same functionality now provided by `PrintOpPass`. Differential Revision: https://reviews.llvm.org/D106342
-
Dmitry Vyukov authored
Currently we effectively duplicate "once" logic for __cxa_guard_acquire and pthread_once. Unify the implementations. This is not a no-op change: - constants used for pthread_once are changed to match __cxa_guard_acquire (__cxa_guard_acquire constants are tied to ABI, but it does not seem to be the case for pthread_once) - pthread_once now also uses PotentiallyBlockingRegion annotations - __cxa_guard_acquire checks thr->in_ignored_lib to skip user synchronization It's unclear if these 2 differences are intentional or a mere sloppy inconsistency. Since all tests still pass, let's assume the latter. Reviewed By: vitalybuka, melver Differential Revision: https://reviews.llvm.org/D107359
-
Dmitry Vyukov authored
Atomic functions are semi-hot in profiles. The CHECKs verify values passed by compiler and they never fired, so replace them with DCHECKs. Reviewed By: vitalybuka, melver Differential Revision: https://reviews.llvm.org/D107373
-
Dmitry Vyukov authored
1. Add some comments. 2. Use kInvalidStackID instead of literal 0. 3. Add more LIKELY/UNLIKELY. Reviewed By: vitalybuka, melver Differential Revision: https://reviews.llvm.org/D107371
-
David Spickett authored
Like Windows on x86-64, Windows on arm64 uses structured exception handling, so we don't emit .debug_frame. See: https://docs.microsoft.com/en-us/cpp/build/arm64-exception-handling?view=msvc-160 Reviewed By: ostannard Differential Revision: https://reviews.llvm.org/D107440
-
Tim Northover authored
Forgot "git add" for a new file.
-
Jaroslav Sevcik authored
Summary: In the spirit of https://reviews.llvm.org/D70846, we only return functions with matching mangled name from Apple/DebugNamesDWARFIndex::GetFunction if eFunctionNameTypeFull is requested. This speeds up lookup in the presence of large amount of class methods of the same name (a typical examples would be constructors of templates with many instantiations or overloaded operators). Reviewers: labath, teemperor Reviewed By: labath, teemperor Subscribers: aprantl, arphaman, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D73191
-
Matthias Springer authored
Differential Revision: https://reviews.llvm.org/D107439
-
Serge Pavlov authored
This reverts commit 16ff91eb. Several errors were reported mainly test-suite execution time. Reverted for investigation.
-
Simon Pilgrim authored
Our list of slow/fast tuning feature flags has become pretty extensive and is randomly interleaved with ISA and Security (Retpoline etc.) flags, not even based on when the ISAs/flags were introduced, making it tricky to locate them. Plus we started treating tuning flags separately some time ago, so this patch tries to group the flags to match. I've left them mostly in the same order within each group - I'm happy to rearrange them further if there are specific ISA or Tuning flags that you think should be kept closer together. Differential Revision: https://reviews.llvm.org/D107370
-
Kim-Anh Tran authored
This patch fixes the lookup of locations in .debug_loclists, if they are split in a .dwp file. Mainly, we need to consider the cu index offsets. Reviewed By: jankratochvil Differential Revision: https://reviews.llvm.org/D107161
-
David Spickett authored
We use CMAKE_SYSTEM_PROCESSOR to set the host_arch lit feature. This is going to be the same value as CMAKE_HOST_SYSTEM_PROCESSOR, which on windows is set to the value of the PROCESSOR_ARCHITECTURE environment variable. https://cmake.org/cmake/help/latest/variable/CMAKE_HOST_SYSTEM_PROCESSOR.html#cmake-host-system-processor On Windows on Arm this is "ARM64", not "AArch64" as we currently look for. https://docs.microsoft.com/en-us/windows/win32/winprog64/wow64-implementation-details#environment-variables Add ARM64 to the unsupported list. Reviewed By: lhames Differential Revision: https://reviews.llvm.org/D107361
-
Raphael Isemann authored
As pointed out in D107434 by Walter, D103172 also changed two for loops that were actually not just iterating over some DIEs but also using the iteration variable later on for some other things. This patch reverts the respective faulty parts of D103172.
-
Tim Northover authored
If there's a region of the stack reserved for potential tail call arguments (only the case when we guarantee tail calls will be honoured), this is right next to the incoming stored return address, not necessarily next to the callee-saved area, so combining the two into a single figure leads to incorrect offsets in some edge cases.
-
Serge Pavlov authored
Clang has builtin function '__builtin_isnan', which implements C library function 'isnan'. This function now is implemented entirely in clang codegen, which expands the function into set of IR operations. There are three mechanisms by which the expansion can be made. * The most common mechanism is using an unordered comparison made by instruction 'fcmp uno'. This simple solution is target-independent and works well in most cases. It however is not suitable if floating point exceptions are tracked. Corresponding IEEE 754 operation and C function must never raise FP exception, even if the argument is a signaling NaN. Compare instructions usually does not have such property, they raise 'invalid' exception in such case. So this mechanism is unsuitable when exception behavior is strict. In particular it could result in unexpected trapping if argument is SNaN. * Another solution was implemented in https://reviews.llvm.org/D95948. It is used in the cases when raising FP exceptions by 'isnan' is not allowed. This solution implements 'isnan' using integer operations. It solves the problem of exceptions, but offers one solution for all targets, however some can do the check in more efficient way. * Solution implemented by https://reviews.llvm.org/D96568 introduced a hook 'clang::TargetCodeGenInfo::testFPKind', which injects target specific code into IR. Now only SystemZ implements this hook and it generates a call to target specific intrinsic function. Although these mechanisms allow to implement 'isnan' with enough efficiency, expanding 'isnan' in clang has drawbacks: * The operation 'isnan' is hidden behind generic integer operations or target-specific intrinsics. It complicates analysis and can prevent some optimizations. * IR can be created by tools other than clang, in this case treatment of 'isnan' has to be duplicated in that tool. Another issue with the current implementation of 'isnan' comes from the use of options '-ffast-math' or '-fno-honor-nans'. If such option is specified, 'fcmp uno' may be optimized to 'false'. It is valid optimization in general, but it results in 'isnan' always returning 'false'. For example, in some libc++ implementations the following code returns 'false': std::isnan(std::numeric_limits<float>::quiet_NaN()) The options '-ffast-math' and '-fno-honor-nans' imply that FP operation operands are never NaNs. This assumption however should not be applied to the functions that check FP number properties, including 'isnan'. If such function returns expected result instead of actually making checks, it becomes useless in many cases. The option '-ffast-math' is often used for performance critical code, as it can speed up execution by the expense of manual treatment of corner cases. If 'isnan' returns assumed result, a user cannot use it in the manual treatment of NaNs and has to invent replacements, like making the check using integer operations. There is a discussion in https://reviews.llvm.org/D18513#387418, which also expresses the opinion, that limitations imposed by '-ffast-math' should be applied only to 'math' functions but not to 'tests'. To overcome these drawbacks, this change introduces a new IR intrinsic function 'llvm.isnan', which realizes the check as specified by IEEE-754 and C standards in target-agnostic way. During IR transformations it does not undergo undesirable optimizations. It reaches instruction selection, where is lowered in target-dependent way. The lowering can vary depending on options like '-ffast-math' or '-ffp-model' so the resulting code satisfies requested semantics. Differential Revision: https://reviews.llvm.org/D104854
-
Andre Vieira authored
Differential Revision: https://reviews.llvm.org/D107376
-
Sjoerd Meijer authored
This adds support for specialising recursive functions. For example: int Global = 1; void recursiveFunc(int *arg) { if (*arg < 4) { print(*arg); recursiveFunc(*arg + 1); } } void main() { recursiveFunc(&Global); } After 3 iterations of function specialisation, followed by inlining of the specialised versions of recursiveFunc, the main function looks like this: void main() { print(1); print(2); print(3); } To support this, the following has been added: - Update the solver and state of the new specialised functions, - An optimisation to propagate constant stack values after each iteration of function specialisation, which is necessary for the next iteration to recognise the constant values and trigger. Specialising recursive functions is (at the moment) controlled by option -func-specialization-max-iters and is opt-in for compile-time reasons. I.e., the default is -func-specialization-max-iters=1, but for the example above we would need to use -func-specialization-max-iters=3. Future work is to see if we can increase the default, or improve the cost-model/heuristics to control compile-times. Differential Revision: https://reviews.llvm.org/D106426 -
Senran Zhang authored
This allows users accessing options in libSupport before invoking `cl::ParseCommandLineOptions`, and also matches the behavior before D105959. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D106334
-
Adrian Kuegel authored
The dependency is needed after 1b00b94f Differential Revision: https://reviews.llvm.org/D107426
-
Esme-Yi authored
-
Stephen Neuendorffer authored
The existing vector transforms reduce the dimension of transfer_read ops. However, beyond a certain point, the vector op actually has to be reduced to a scalar load, since we can't load a zero-dimension vector. This handles this case. Note that in the longer term, it may be preferaby to support zero-dimension vectors. see https://llvm.discourse.group/t/should-we-have-0-d-vectors/3097. Differential Revision: https://reviews.llvm.org/D103432
-
hsmahesha authored
While collecting reachable callees (from kernels), ignore call graph node which does not have associated function or associated function is not a definition. Reviewed By: rampitec Differential Revision: https://reviews.llvm.org/D107329
-
Senran Zhang authored
Constant::getSplatValue has O(N) time complexity in the worst case, where N is the # of elements in a vector. So we call Constant::getAggregateElement first and return earlier if possible to avoid unnecessary getSplatValue calls. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D107252
-
Matthias Springer authored
This test ensures that an error is generated from the Python side when running a module pass on a function. The test used to instantiate ViewOpGraph, however, this pass was changed into a general "any op" pass in D106253. Therefore, a different pass must be used in this test. Differential Revision: https://reviews.llvm.org/D107424
-