- Jun 17, 2022
-
-
Philip Reames authored
This change merges the logic for reasoning about demanded portions of the VTYPE register between the main dataflow algorithm and the backwards mutation post pass. In the process, we get to delete a bunch of now redundant code. This should be entirely NFC. I included a slight hack (see TODO) to avoid changing behavior in the post pass while being able to use the generalized logic in the prepass. I will fix the TODO in a separate change once this lands. Differential Revision: https://reviews.llvm.org/D127983
-
Philip Reames authored
The costing we use for fixed length vector gather and scatter is to simply count up the memory ops, and multiply by a fixed memory op cost. For scalable vectors, we don't actually know how many lanes are active. Instead, we have to end up making a worst case assumption on how many lanes could be active. In the generic +V case, this results in very high costs, but we can do better when we know an upper bound on the VLEN. There's some obvious ways to improve this - e.g. using information about VL and mask bits from the instruction to reduce the upper bound - but this seems like a reasonable starting point. The resulting costs do bias us pretty strongly away from generating scatter/gather for generic +V. Without this, we'd be returning an invalid cost and thus definitely not vectorizing, so no major change in practical behavior expected. Differential Revision: https://reviews.llvm.org/D127541
-
bixia1 authored
Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D127916
-
Mitch Phillips authored
This reverts commit 46fcdf23. Reason: Broke the buildbots: https://lab.llvm.org/buildbot/#/builders/77/builds/18671
-
Sterling Augustine authored
-
Mitch Phillips authored
This reverts commit 99796d06. Hint: Looking here because your manual invocation of something in 'check-asan' broke? You need a new symbolizer (after D123538). An upcoming patch will remove the internal metadata for global variables. With D123534 and D123538, clang now emits DWARF debug info for constant strings (the only global variable type it was missing), and llvm-symbolizer is now able to symbolize all global variable addresses (where previously it wouldn't give you the file:line information). Move ASan's runtime over from the internal metadata to DWARF. Differential Revision: https://reviews.llvm.org/D127552
-
Xiang Li authored
Add more feature to tableGen backend gen-dxil-operation. It will generate getOpCodeProperty, getOpCodeClassName and getOpCodeName when build DirectX target. Each of these functions has a table which generate based on DXIL operations. These generated functions will replace the manually written functions which used for query DXIL operation information. Reviewed By: bogner Differential Revision: https://reviews.llvm.org/D125520
-
Amanieu d'Antras authored
llvm.used and llvm.compiler.used are often used with inline assembly that refers to a specific symbol so that the symbol is kept through to the linker even though there are no references to it from LLVM IR. This fixes the MergeFunctions pass to preserve references to these symbols in llvm.used/llvm.compiler.used so they are not deleted from the IR. This doesn't prevent these functions from being merged, but guarantees that an alias or thunk with the expected symbol name is kept in the IR. Differential Revision: https://reviews.llvm.org/D127751
-
LLVM GN Syncbot authored
-
Jonas Devlieghere authored
This patch introduces the concept of a log handlers. Log handlers allow customizing the way log output is emitted. The StreamCallback class tried to do something conceptually similar. The benefit of the log handler interface is that you don't need to conform to llvm's raw_ostream interface. Differential revision: https://reviews.llvm.org/D127922
-
Congzhe Cao authored
This is a follow-up patch to D122857 where we added delinearization of fixed-size arrays to loop cache analysis, which resulted in some duplicate code, i.e., "tryDelinearizeFixedSize()", in LoopCacheCost.cpp and DependenceAnalysis.cpp. Refactoring is done in this patch. This patch refactors out the main logic of "tryDelinearizeFixedSize()" as "tryDelinearizeFixedSizeImpl()" and moves it to Delinearization.cpp, such that clients can reuse "llvm::tryDelinearizeFixedSizeImpl()" wherever they would like to delinearize fixed-size arrays. Currently it has two users, i.e., DependenceAnalysis.cpp and LoopCacheCost.cpp. Reviewed By: Meinersbur, #loopoptwg Differential Revision: https://reviews.llvm.org/D124745
-
Congzhe Cao authored
In some passes we need a valid number of cache line size to do analysis or transformation, e.g., loop cache analysis and loop date prefetch. However, for some backend targets, `TTIImpl->getCacheLineSize()` is not implemented and hence 'TTI.getCacheLineSize()' would just return 0 which eventually might produce invalid result. In this patch we add a user-specified opt/llc option for cache line size. If the option is specified by users we use the value supplied, otherwise we fall-back to the default value obtained from `TTIImpl->->getCacheLineSize()`. The powerpc target already has such an option, this patch generalizes this option to TargetTransformInfo.cpp. Reviewed By: bmahjour, #loopoptwg Differential Revision: https://reviews.llvm.org/D127342
-
Louis Dionne authored
-
Jim Ingham authored
When we hit a breakpoint site all of whose owners are internal, we don't broadcast that event to the public event queue. However, we were checking whether that was true in the ShouldNotify method, which gets run after the breakpoint callbacks get run. If the breakpoint callback deletes the site we just hit, we no longer have the information to make that determination. This patch just gathers the "was all internal" fact when the StopInfoBreakpoint gets made, which happens before anyone has a chance to delete the site, and then uses that cached value. This bug was causing a couple of tests (including TestStopAtEntry.py) to fail when using new the macOS Ventura dyld support. Differential Revision: https://reviews.llvm.org/D127997
-
Paul Robinson authored
Profiling stopped working for us after D98061, which was largely a Fuschia-specific patch but in one place used `isOSBinFormatELF` to make a decision. I'm adding a PS4/PS5 exception to that, so we can get profiling to work again. Differential Revision: https://reviews.llvm.org/D127506
-
Walter Erquinigo authored
This test broke, but the fix is simple.
-
Maksim Panchenko authored
Reviewed By: Amir Differential Revision: https://reviews.llvm.org/D127935
-
Joe Nash authored
Reviewed By: rampitec, #amdgpu Differential Revision: https://reviews.llvm.org/D127904
-
Jay Foad authored
Differential Revision: https://reviews.llvm.org/D127980
-
Walter Erquinigo authored
Having a member variable TraceIntelPT * makes it look as if it was optional. I'm using instead a weak_ptr to indicate that it's not optional and the object is under the ownership of TraceIntelPT. Besides that, I've simplified the Perf aux and data buffers copying by using vector.insert. I'm also renaming Lookup2 to Lookup. The 2 in the name is confusing. Differential Revision: https://reviews.llvm.org/D127881
-
Walter Erquinigo authored
llvm's JSON parser supports 64 bit integers, but other tools like the ones written in JS don't support numbers that big, so we need to represent these possibly big numbers as a string. This diff uses that to represent addresses and tsc zero. The former is printed in hex for and the latter in decimal string form. The schema was updated mentioning that. Besides that, I fixed some remaining issues and now all test pass. Before I wasn't running all tests because for some reason my computer reverted perf_paranoid to 1. Differential Revision: https://reviews.llvm.org/D127819
-
Walter Erquinigo authored
As discusses offline with @jj10305, we are updating some naming used throughout the code, specially in the json schema - traceBuffer -> iptTrace - core -> cpu Differential Revision: https://reviews.llvm.org/D127817
-
Walter Erquinigo authored
This addresses the issues in diffs [13], [14] and [16] - Add better documentation - Fix some castings by making them safer - Simplify CorrelateContextSwitchesAndIntelPtTraces - Rename some functions Differential Revision: https://reviews.llvm.org/D127804
-
Walter Erquinigo authored
This applies the changes requested for diff 12. - use DenseMap<ConstString, _> instead of std::unordered_map<ConstString, _>, which is more idiomatic and possibly performant. - deduplicate some code in Trace.cpp by using helper functions for fetching in maps - stop using size and offset when fetching binary data, because we in fact read the entire buffers all the time. If we ever need streaming, we can implement it then. Now, the size is used only to check that we are getting the correct amount of data. This is useful because in some cases determining the size doesn't involve fetching the actual data. - added back the x86_64 macro to the perf tests - added more documentation - simplified some file handling - fixed some comments Differential Revision: https://reviews.llvm.org/D127752
-
Paul Robinson authored
This reverts commit 39fb8434. Pushed without verifying the test still works.
-
Peter Klausler authored
ASSOCIATED() must be false for zero-sized arrays, and the strides on a dimension are irrelevant when the extent is unitary. Differential Revision: https://reviews.llvm.org/D127793
-
Dávid Bolvanský authored
-
Dávid Bolvanský authored
This reverts commit 814c9f4e.
-
Paul Robinson authored
Profiling stopped working for us after D98061, which was largely a Fuschia-specific patch but in one place used `isOSBinFormatELF` to make a decision. I'm adding a PS4/PS5 exception to that, so we can get profiling to work again. Differential Revision: https://reviews.llvm.org/D127506
-
Paul Robinson authored
-
Walter Erquinigo authored
This improves several things and addresses comments up to the diff [11] in this stack. - Simplify many functions to receive less parameters that they can identify easily - Create Storage classes for Trace and TraceIntelPT that can make it easier to reason about what can change with live process refreshes and what cannot. - Don't cache the perf zero conversion numbers in lldb-server to make sure we get the most up-to-date numbers. - Move the thread identifaction from context switches to the bundle parser, to leave TraceIntelPT simpler. This also makes sure that the constructor of TraceIntelPT is invoked when the entire data has been checked to be correct. - Normalize all bundle paths before the Processes, Threads and Modules are created, so that they can assume that all paths are correct and absolute - Fix some issues in the tests. Now they all pass. - return the specific instance when constructing PerThread and MultiCore processor tracers. - Properly implement IntelPTMultiCoreTrace::TraceStart. - Improve some comments. - Use the typedef ContextSwitchTrace more often for clarity. - Move CreateContextSwitchTracePerfEvent to Perf.h as a utility function. - Synchronize better the state of the context switch and the intel pt perf events. - Use a booblean instead of an enum for the PerfEvent state. Differential Revision: https://reviews.llvm.org/D127456
-
Walter Erquinigo authored
[trace][intelpt] Support system-wide tracing [16] - Create threads automatically from context switch data in the post-mortem case For some context, The context switch data contains information of which threads were executed by each traced process, therefore it's not necessary to specify them in the trace file. So this diffs adds support for that automatic feature. Eventually we could include it to live processes as well. Differential Revision: https://reviews.llvm.org/D127001
-
Walter Erquinigo authored
The process triple should only be needed when LLDB can't identify the correct triple on its own. Examples could be universal mach-o binaries. But in any case, at least for most of ELF files, LLDB should be able to do the job without having the user specify the triple manually. Differential Revision: https://reviews.llvm.org/D126990
-
Walter Erquinigo authored
This is the final functional patch to support intel pt decoding per cpu. It works by doing the following: - First, all context switches are split by tid and sorted in order. This produces a list of continuous executes per thread per core. - Then, all intel pt subtraces are split by PSB boundaries and assigned to individual thread continuous executions on the same core by doing simple TSC-based comparisons. - With this, we have, per thread, a sorted list of continuous executions each one with a list of intel pt subtraces. Up to this point, this is really fast because no instructions were actually decoded. - Then, each thread can be decoded by traversing their continuous executions and intel pt subtraces. An advantage of having these continuous executions is that we can identify if a continuous exexecution doesn't have intel pt data, and thus has a gap in it. We can later to more sofisticated comparisons to identify if within a continuous execution there are gaps. I'm adding a test as well. Differential Revision: https://reviews.llvm.org/D126394
-
Walter Erquinigo authored
- Add the logic that parses all cpu context switch traces and produces blocks of continuous executions, which will be later used to assign intel pt subtraces to threads and to identify gaps. This logic can also identify if the context switch trace is malformed. - The continuous executions blocks are able to indicate when there were some contention issues when producing the context switch trace. See the inline comments for more information. - Update the 'dump info' command to show information and stats related to the multicore decoding flow, including timing about context switch decoding. - Add the logic to conver nanoseconds to TSCs. - Fix a bug when returning the context switches. Now they data returned makes sense and even empty traces can be returned from lldb-server. - Finish the necessary bits for loading and saving a multi-core trace bundle from disk. - Change some size_t to uint64_t for compatibility with 32 bit systems. Tested by saving a trace session of a program that sleeps 100 times, it was able to produce the following 'dump info' text: ``` (lldb) trace load /tmp/trace3/trace.json (lldb) thread trace dump info Trace technology: intel-pt thread #1: tid = 4192415 Total number of instructions: 1 Memory usage: Total approximate memory usage (excluding raw trace): 2.51 KiB Average memory usage per instruction (excluding raw trace): 2573.00 bytes Timing for this thread: Timing for global tasks: Context switch trace decoding: 0.00s Events: Number of instructions with events: 0 Number of individual events: 0 Multi-core decoding: Total number of continuous executions found: 2499 Number of continuous executions for this thread: 102 Errors: Number of TSC decoding errors: 0 ``` Differential Revision: https://reviews.llvm.org/D126267 -
Paul Robinson authored
-
Dávid Bolvanský authored
-
Philip Reames authored
If we're writing to an undef vector (i.e. implicit_def), we can change the value of bits outside the requested write without consequence. This allows us to avoid a VSETVLI just for narrowing the value written. Differential Revision: https://reviews.llvm.org/D127880
-
Paul Robinson authored
-
Michael Jones authored
On windows size_t != unsigned long. Differential Revision: https://reviews.llvm.org/D127989
-