- Nov 06, 2020
-
-
Yevgeny Rouban authored
BranchProbabilityInfo::eraseBlock() is a public method and can be called without deleting the block itself. This method is made remove the correspondent tracking handle from BranchProbabilityInfo::Handles along with the probabilities of the block. Handles.erase() call is moved to eraseBlock(). In setEdgeProbability() we need to add the block handle only once. Reviewed By: kazu Differential Revision: https://reviews.llvm.org/D90838
-
Stella Laurenzo authored
* Asked to submit separately from https://reviews.llvm.org/D90824
-
Yevgeny Rouban authored
This refactoring allows to eliminate the MaxSuccIdx map proposed in the commit a7b662d0. The idea is to remove probabilities for a block BB for all its successors one by one from first, second, ... till N-th until they are defined in Probs. This works because probabilities for the block are set at once for all its successors from number 0 to N-1 and the rest are removed if there were stale probs. The protected method setEdgeProbability(), which set probabilities for individual successor, is removed. This makes it clear that the probabilities are set in bulk by the public method with the same name. Reviewed By: kazu, MaskRay Differential Revision: https://reviews.llvm.org/D90837
-
Mehdi Amini authored
This is defensive with respect to invocations of this API with an IR that isn't ready to be converted to LLVM IR.
-
Fangrui Song authored
Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D90874
-
Valentin Clement authored
This patch add some parsing and clause validity tests for the set directive. It makes use of the possibility introduces in patch D90770 to check the restriction were one of the default_async, device_num and device_type clauses is required but also not more than once on the set directive. Reviewed By: sameeranjoshi Differential Revision: https://reviews.llvm.org/D90771
-
Walter Erquinigo authored
Depends on D89408. This diff finally implements trace decoding! The current interface is $ trace load /path/to/trace/session/file.json $ thread trace dump instructions thread #1: tid = 3842849, total instructions = 22 [ 0] 0x40052d [ 1] 0x40052d ... [19] 0x400521 $ # simply enter, which is a repeat command [20] 0x40052d [21] 0x400529 ... This doesn't do any disassembly, which will be done in the next diff. Changes: - Added an IntelPTDecoder class, that is a wrapper for libipt, which is the actual library that performs the decoding. - Added TraceThreadDecoder class that decodes traces and memoizes the result to avoid repeating the decoding step. - Added a DecodedThread class, which represents the output from decoding and that for the time being only stores the list of reconstructed instructions. Later it'll contain the function call hierarchy, which will enable reconstructing backtraces. - Added basic APIs for accessing the trace in Trace.h: - GetInstructionCount, which counts the number of instructions traced for a given thread - IsTraceFailed, which returns an Error if decoding a thread failed - ForEachInstruction, which iterates on the instructions traced for a given thread, concealing the internal storage of threads, as plug-ins can decide to generate the instructions on the fly or to store them all in a vector, like I do. - DumpTraceInstructions was updated to print the instructions or show an error message if decoding was impossible. - Tests included Differential Revision: https://reviews.llvm.org/D89283 -
Kazushi (Jam) Marukawa authored
`Replace ISD::SREM handling with KnownBits::srem to reduce code duplication` (bf04e343) changed the result of rem.ll regression test. So, updating it.
-
Luo, Yuanke authored
Reviewed By: pengfei Differential Revision: https://reviews.llvm.org/D90810
-
Stella Stamenova authored
This reverts commit 71e108cd. This change caused a build failure on Windows: http://lab.llvm.org:8011/#/builders/83/builds/570
-
Jonas Devlieghere authored
This test requires running under the Python we built against (which is easy) and setting up the PYTHONPATH (which is not worth it for this simple test).
-
Giorgis Georgakoudis authored
CodeExtractor handles bitcasts in the extracted region that have lifetime markers users in the outer region as outputs. That creates unnecessary alloca/reload instructions and extra lifetime markers. The patch identifies those cases, and replaces uses in out-of-region lifetime markers with new bitcasts in the outer region. **Example** ``` define void @foo() { entry: %0 = alloca i32 br label %extract extract: %1 = bitcast i32* %0 to i8* call void @llvm.lifetime.start.p0i8(i64 4, i8* %1) call void @use(i32* %0) br label %exit exit: call void @use(i32* %0) call void @llvm.lifetime.end.p0i8(i64 4, i8* %1) ret void } ``` **Current extraction** ``` define void @foo() { entry: %.loc = alloca i8*, align 8 %0 = alloca i32, align 4 br label %codeRepl codeRepl: ; preds = %entry %lt.cast = bitcast i8** %.loc to i8* call void @llvm.lifetime.start.p0i8(i64 -1, i8* %lt.cast) %lt.cast1 = bitcast i32* %0 to i8* call void @llvm.lifetime.start.p0i8(i64 -1, i8* %lt.cast1) call void @foo.extract(i32* %0, i8** %.loc) %.reload = load i8*, i8** %.loc, align 8 call void @llvm.lifetime.end.p0i8(i64 -1, i8* %lt.cast) br label %exit exit: ; preds = %codeRepl call void @use(i32* %0) call void @llvm.lifetime.end.p0i8(i64 4, i8* %.reload) ret void } define internal void @foo.extract(i32* %0, i8** %.out) { newFuncRoot: br label %extract exit.exitStub: ; preds = %extract ret void extract: ; preds = %newFuncRoot %1 = bitcast i32* %0 to i8* store i8* %1, i8** %.out, align 8 call void @use(i32* %0) br label %exit.exitStub } ``` **Extraction with patch** ``` define void @foo() { entry: %0 = alloca i32, align 4 br label %codeRepl codeRepl: ; preds = %entry %lt.cast1 = bitcast i32* %0 to i8* call void @llvm.lifetime.start.p0i8(i64 -1, i8* %lt.cast1) call void @foo.extract(i32* %0) br label %exit exit: ; preds = %codeRepl call void @use(i32* %0) %lt.cast = bitcast i32* %0 to i8* call void @llvm.lifetime.end.p0i8(i64 4, i8* %lt.cast) ret void } define internal void @foo.extract(i32* %0) { newFuncRoot: br label %extract exit.exitStub: ; preds = %extract ret void extract: ; preds = %newFuncRoot %1 = bitcast i32* %0 to i8* call void @use(i32* %0) br label %exit.exitStub } ``` Reviewed By: vsk Differential Revision: https://reviews.llvm.org/D90689 -
Vedant Kumar authored
AFAICT, ~TargetList simply implements the default destructor, plus some locking. The history is murky, so I'm not sure why we do this locking. Perhaps, at some point, it was possible to delete the same TargetList instance from two different threads, setting up a race. If that were true, then the locking would protect against the race. Since TargetList is uniquely owned by Debugger (m_target_list), no such race is possible today. Testing: check-lldb Differential Revision: https://reviews.llvm.org/D90895
-
Stanislav Mekhanoshin authored
Differential Revision: https://reviews.llvm.org/D90886
-
Siva Chandra Reddy authored
Depends on D90805. Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D90806
-
Sean Silva authored
This is convenient in a lot of cases, such as when the thing you want to append is `someReallyLongFunctionName()` that you'd rather not write twice or assign to a variable for the paired begin/end calls. Differential Revision: https://reviews.llvm.org/D90894
-
Craig Topper authored
Bitconvert requires the bitwidth to match on both sides. On RV64 the GPR size is i64 so bitconvert between f32 isn't possible. The node should never be generated so the pattern won't ever match, but moving the patterns under IsRV32 makes it more obviously impossible. It also moves it to a similar location to the patterns for the custom nodes we use for RV64.
-
Siva Chandra Reddy authored
This is acheived by making the RunContext a state variable of the test classes. Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D90805
-
Konstantin Pyzhov authored
Removed "implicit def VCC" from declarations of AMDGPU VOPC instructions since they do not implicitly write to VCC in SDWA mode. Differential Revision: https://reviews.llvm.org/D89168
-
Louis Dionne authored
-
Michael Liao authored
- `llvm.amdgcn.endpgm` is added to enable "abort" support. Differential Revision: https://reviews.llvm.org/D90809
-
Vedant Kumar authored
Factor out dummy target creation from CreateTargetInternal. This makes it impossible for dummy target creation to accidentally fail due to too-strict checking in one of the CreateTargetInternal overloads. Testing: check-lldb rdar://70630655 Differential Revision: https://reviews.llvm.org/D90872
-
Louis Dionne authored
This allows reusing run-buildbot for downstream testing as well.
-
Louis Dionne authored
The current way we test this is pretty cheap, i.e. we download previously released macOS dylibs and run against that. Ideally, we would require a full host running the appropriate version of macOS, and we'd execute the tests using SSH on that host. But since we don't have such hosts available easily for now, this is better than nothing. At the same time, also fix some tests that were failing when back deploying. Differential Revision: https://reviews.llvm.org/D90869
-
Yuriy Chernyshov authored
While I am trying to forbid such usages systematically in https://reviews.llvm.org/D79427 / P2166R0 to C++ standard, this PR fixes this (definitelly incorrect) usage in llvm. This code is unreachable, so it could not cause any harm Reviewed By: nikic, dblaikie Differential Revision: https://reviews.llvm.org/D87697
-
Craig Topper authored
[RISCV] Add isel patterns for fnmadd/fnmsub with an fneg on the second operand instead of the first. The multiply part of FMA is commutable, but TargetSelectionDAG.td doesn't have it marked as commutable so tablegen won't automatically create the additional patterns. So manually add commuted patterns.
-
Craig Topper authored
[RISCV] Add test cases to show missed opportunities to use fnmadd/fnmsub if the second operand to the fma is negated rather than the first. NFC We need to add more isel patterns to handle this.
-
Pedro Tammela authored
This patch changes the implementation of Lua's `print()` function to respect `io.stdout`. The original implementation uses `lua_writestring()` internally, which is hardcoded to `stdout`. Reviewed By: JDevlieghere Differential Revision: https://reviews.llvm.org/D90787
-
Saleem Abdulrasool authored
Disable the test on Windows, which should've been obvious as being needed. The differences in diff implementations and line-endings make this test difficult to execute on Windows.
-
Valentin Clement authored
Validity check introduce in D90241 are a bit too restrict and this patch propose to losen them a bit. The duplicate clauses is now check only between the three allowed lists and between the requiredClauses and allowedClauses lists. This allows to enable some check where a clause can be required but also appear only once on the directive. We found these kind of restriction useful on the set directive in OpenACC for example. Reviewed By: kiranchandramohan Differential Revision: https://reviews.llvm.org/D90770
-
Paul C. Anagnostopoulos authored
Differential Revision: https://reviews.llvm.org/D90804
-
Mehdi Amini authored
The CMake macro refactoring had a hardcoded value left instead of using the function argument. Didn't catch it locally before because it required a clean build to trigger.
-
Alexandre Rames authored
The behavior is controlled by the `-fprebuilt-implicit-modules` option, and allows searching for implicit modules in the prebuilt module cache paths. The current command-line options for prebuilt modules do not allow to easily maintain and use multiple versions of modules. Both the producer and users of prebuilt modules are required to know the relationships between compilation options and module file paths. Using a particular version of a prebuilt module requires passing a particular option on the command line (e.g. `-fmodule-file=[<name>=]<file>` or `-fprebuilt-module-path=<directory>`). However the compiler already knows how to distinguish and automatically locate implicit modules. Hence this proposal to introduce the `-fprebuilt-implicit-modules` option. When set, it enables searching for implicit modules in the prebuilt module paths (specified via `-fprebuilt-module-path`). To not modify existing behavior, this search takes place after the standard search for prebuilt modules. If not Here is a workflow illustrating how both the producer and consumer of prebuilt modules would need to know what versions of prebuilt modules are available and where they are located. clang -cc1 -x c modulemap -fmodules -emit-module -fmodule-name=foo -fmodules-cache-path=prebuilt_modules_v1 <config 1 options> clang -cc1 -x c modulemap -fmodules -emit-module -fmodule-name=foo -fmodules-cache-path=prebuilt_modules_v2 <config 2 options> clang -cc1 -x c modulemap -fmodules -emit-module -fmodule-name=foo -fmodules-cache-path=prebuilt_modules_v3 <config 3 options> clang -cc1 -x c use.c -fmodules fmodule-map-file=modulemap -fprebuilt-module-path=prebuilt_modules_v1 <config 1 options> clang -cc1 -x c use.c -fmodules fmodule-map-file=modulemap <non-prebuilt config options> With prebuilt implicit modules, the producer can generate prebuilt modules as usual, all in the same output directory. The same mechanisms as for implicit modules take care of incorporating hashes in the path to distinguish between module versions. Note that we do not specify the output module filename, so `-o` implicit modules are generated in the cache path `prebuilt_modules`. clang -cc1 -x c modulemap -fmodules -emit-module -fmodule-name=foo -fmodules-cache-path=prebuilt_modules <config 1 options> clang -cc1 -x c modulemap -fmodules -emit-module -fmodule-name=foo -fmodules-cache-path=prebuilt_modules <config 2 options> clang -cc1 -x c modulemap -fmodules -emit-module -fmodule-name=foo -fmodules-cache-path=prebuilt_modules <config 3 options> The user can now simply enable prebuilt implicit modules and point to the prebuilt modules cache. No need to "parse" command-line options to decide what prebuilt modules (paths) to use. clang -cc1 -x c use.c -fmodules fmodule-map-file=modulemap -fprebuilt-module-path=prebuilt_modules -fprebuilt-implicit-modules <config 1 options> clang -cc1 -x c use.c -fmodules fmodule-map-file=modulemap -fprebuilt-module-path=prebuilt_modules -fprebuilt-implicit-modules <non-prebuilt config options> This is for example particularly useful in a use-case where compilation is expensive, and the configurations expected to be used are predictable, but not controlled by the producer of prebuilt modules. Modules for the set of predictable configurations can be prebuilt, and using them does not require "parsing" the configuration (command-line options). Reviewed By: Bigcheese Differential Revision: https://reviews.llvm.org/D68997
-
Kazushi (Jam) Marukawa authored
Add isReMaterializable and isCheapAsAMove flags to integer instructions which cost cheap. Reviewed By: simoll Differential Revision: https://reviews.llvm.org/D90833
-
Reid Kleckner authored
Add unit tests for this behavior, since the integration test for clang-cl did not catch these bugs. Fixes PR47604 Differential Revision: https://reviews.llvm.org/D90866
-
Jan Ole Hüser authored
For the language C++ the keyword __unaligned (a Microsoft extension) had no effect on pointers. The reason, why there was a difference between C and C++ for the keyword __unaligned: For C, the Method getAsCXXREcordDecl() returns nullptr. That guarantees that hasUnaligned() is called. If the language is C++, it is not guaranteed, that hasUnaligend() is called and evaluated. Here are some links: The Bug: https://bugs.llvm.org/show_bug.cgi?id=47499 Thread on the cfe-dev mailing list: http://lists.llvm.org/pipermail/cfe-dev/2020-September/066783.html Diff, that introduced the check hasUnaligned() in getNaturalTypeAlignment(): https://reviews.llvm.org/D30166 Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D90630
-
Albion Fung authored
This patch fixes the reversed behaviour exhibited by cpsgn on PPC. It now matches the ABI. Differential Revision: https://reviews.llvm.org/D84962
-
Louis Dionne authored
At the same time, fix an issue that broke the documentation since 2eadbc86.
-
Louis Dionne authored
Remove Phabricator, which isn't needed anymore since we don't report the job results ourselves. Also, install python3-sphinx instead of sphinx-doc, since the latter doesn't provide the sphinx-build binary.
-
Mehdi Amini authored
This target will depend on each individual extension and represent "all" Python bindings in the repo. User projects can get a finer grain control by depending directly on some individual targets as needed.
-