- Apr 03, 2020
-
-
Sourabh Singh Tomar authored
Summary: This patch adds parsing and dumping DWARFv5 .debug_macro section in llvm-dwarfdump, it does not introduce any new switch. Existing switch "--debug-macro" should be used to dump macinfo or macro section. Reviewed By: dblaikie, ikudrin, jhenderson Differential Revision: https://reviews.llvm.org/D73086
-
Serguei Katkov authored
isGCValue should detect whether the deopt value is a GC pointer. Currently it checks by finding the value in SI.Bases and SI.Ptrs. However these data structures contain only those values which have corresponding gc.relocate call. So we can miss GC value if it does not have gc.relocate call (dead after the call). Check GC strategy whether pointer is GC one or consider any pointer to be GC one conservatively. Reviewers: reames, dantrushin Reviewed By: reames Subscribers: hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D77130
-
Xiang1 Zhang authored
Author: Xiang1 Zhang <xiang1.zhang@intel.com> Date: Fri Apr 3 11:25:38 2020 +0800 Enable IBT(Indirect Branch Tracking) in JIT with CET(Control-flow Enforcement Technology) -
Scott Constable authored
Introduce a ThunkInserter CRTP base class from which new thunk types can inherit, e.g., thunks to mitigate https://software.intel.com/security-software-guidance/software-guidance/load-value-injection. Differential Revision: https://reviews.llvm.org/D76811
-
LLVM GN Syncbot authored
-
Scott Constable authored
There are applications for indirect call/branch thunks other than retpoline for Spectre v2, e.g., https://software.intel.com/security-software-guidance/software-guidance/load-value-injection Therefore it makes sense to refactor X86RetpolineThunks as a more general capability. Differential Revision: https://reviews.llvm.org/D76810
-
Siddhartha Bagaria authored
D49116 was using clang-format-diff because at the time of its writing, it needed to handle the subversion repo as well. Differential Revision: https://reviews.llvm.org/D77363
-
laith sakka authored
Summary: Add mapping from exp2 math functions to corresponding SVML calls. This is a follow up and extension for llvm diff https://reviews.llvm.org/D19544 Test Plan: - update test case and run ninja check. - run tests locally Reviewers: wenlei, hoyFB, mmasten, mzolotukhin, spatel Reviewed By: spatel Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D77114
-
Hongtao Yu authored
Summary: A recent change in the instruction simplifier enables a call to a function that just returns one of its parameter to be simplified as simply loading the parameter. This exposes a bug in the inliner where double inlining may be involved which in turn may cause compiler ICE when an already-inlined callsite is reused for further inlining. To put it simply, in the following-like C program, when the function call second(t) is inlined, its code t = third(t) will be reduced to just loading the return value of the callsite first(). This causes the inliner internal data structure to register the first() callsite for the call edge representing the third() call, therefore incurs a double inlining when both call edges are considered an inline candidate. I'm making a fix to break the inliner from reusing a callsite for new call edges. ``` void top() { int t = first(); second(t); } void second(int t) { t = third(t); fourth(t); } void third(int t) { return t; } ``` The actual failing case is much trickier than the example here and is only reproducible with the legacy inliner. The way the legacy inliner works is to process each SCC in a bottom-up order. That means in reality function first may be already inlined into top, or function third is either inlined to second or is folded into nothing. To repro the failure seen from building a large application, we need to figure out a way to confuse the inliner so that the bottom-up inlining is not fulfilled. I'm doing this by making the second call indirect so that the alias analyzer fails to figure out the right call graph edge from top to second and top can be processed before second during the bottom-up. We also need to tweak the test code so that when the inlining of top happens, the function body of second is not that optimized, by delaying the pass of function attribute deducer (i.e, which tells function third has no side effect and just returns its parameter). Since the CGSCC pass is iterative, additional calls are added to top to postpone the inlining of second to the second round right after the first function attribute deducing pass is done. I haven't been able to repro the failure with the new pass manager since the processing order of ininlined callsites is a bit different, but in theory the issue could happen there too. Note that this fix could introduce a side effect that blocks the simplification of inlined code, specifically for a call site that can be folded to another call site. I hope this can probably be complemented by subsequent inlining or folding, as shown in the attached unit test. The ideal fix should be to separate the use of VMap. However, in reality this failing pattern shouldn't happen often. And even if it happens, there should be a good chance that the non-folded call site will be refolded by iterative inlining or subsequent simplification. Reviewers: wenlei, davidxl, tejohnson Reviewed By: wenlei, davidxl Subscribers: eraman, nikic, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D76248 -
Xiang1 Zhang authored
Summary: This patch comes from H.J.'s https://github.com/hjl-tools/llvm-project/commit/2bd54ce7fa9e94fcd1118b948e14d1b6fc54dfd2 **This patch fix the failed llvm unit tests which running on CET machine. **(e.g. ExecutionEngine/MCJIT/MCJITTests) The reason we enable IBT at "JIT compiled with CET" is mainly that: the JIT don't know the its caller program is CET enable or not. If JIT's caller program is non-CET, it is no problem JIT generate CET code or not. But if JIT's caller program is CET enabled, JIT must generate CET code or it will cause Control protection exceptions. I have test the patch at llvm-unit-test and llvm-test-suite at CET machine. It passed. and H.J. also test it at building and running VNCserver(Virtual Network Console), it works too. (if not apply this patch, VNCserver will crash at CET machine.) Reviewers: hjl.tools, craig.topper, LuoYuanke, annita.zhang, pengfei Subscribers: tstellar, efriedma, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D76900
-
Craig Topper authored
Thankfully no issues found.
-
Jessica Paquette authored
This was causing a machine verifier failure on the test suite. Make sure that we don't end up with a weird register class here. Failure for reference: *** Bad machine code: Illegal virtual register for instruction *** - function: check_constrain - basic block: %bb.1 (0x7f8b70839f80) - instruction: early-clobber %6:gpr64, early-clobber %7:gpr64sp = JumpTableDest32 %5:gpr64, %1:gpr64sp, %jump-table.0 - operand 3: %1:gpr64sp Expected a GPR64 register, but got a GPR64sp register Differential Revision: https://reviews.llvm.org/D77349
-
Wenju He authored
Summary: Align with AVX512 builtins implementations, some of which don't preserve rdi. Reviewers: yubing, tianqing, craig.topper Reviewed By: craig.topper Subscribers: yaxunl, Anastasia, hiraditya Differential Revision: https://reviews.llvm.org/D77032
-
Qiu Chaofan authored
MI peephole will remove unnecessary FRSP instructions. This patch removes such unnecessary XSRSP. Reviewed By: steven.zhang Differential Revision: https://reviews.llvm.org/D77208
-
Nico Weber authored
-
Brian Gesiak authored
Summary: In the case of a coroutine that takes no arguments, `Sema::buildCoroutinePromise` constructs a list-initialization (`clang::InitializationKind::InitKind::IK_DirectList`) of the promise variable, using a list of empty arguments. So, if one were to dump the promise `VarDecl` immediately after `Sema::ActOnCoroutineBodyStart` calls `checkCoroutineContext`, for a coroutine function that takes no arguments, they'd see the following: ``` VarDecl 0xb514490 <test.cpp:26:3> col:3 __promise '<dependent type>' callinit `-ParenListExpr 0xb514510 <col:3> 'NULL TYPE' ``` But after this patch, the `ParenListExpr` is no longer constructed, and the promise variable uses default initialization (`clang::InitializationKind::InitKind::IK_Default`): ``` VarDecl 0x63100012dae0 <test.cpp:26:3> col:3 __promise '<dependent type>' ``` As far as I know, there's no case in which list-initialization with no arguments differs from default initialization, but if I'm wrong please let me know (and I'll add a test case that demonstrates the change -- but as-is I can't think of a functional test case for this). I think both comply with the wording of C++20 `[dcl.fct.def.coroutine]p5`: > _promise-constructor-arguments_ is determined as follows: overload resolution is performed on a promise constructor call created by assembling an argument list with lvalues `p1 ... pn`. If a viable constructor is found (12.4.2), then _promise-constructor-arguments_ is `(p1, ... , pn)`, otherwise _promise-constructor-arguments_ is empty. Still, I think this patch is an improvement regardless, because it reduces the size of the AST. Reviewers: GorNishanov, rsmith, lewissbaker Subscribers: EricWF, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D70555
-
Alex Grosul authored
Two back-to-back transpose operations are combined into a single transpose, which uses a combination of their permutation vectors. Differential Revision: https://reviews.llvm.org/D77331
-
Greg Clayton authored
Summary: The IDE has no packets that are sent to lldb-vscode that say which thread and frame are selected. The only way we know is we get a request for variables for a stack frame via a "scopes" request. When we receive this packet we make that thread and frame the selected thread and frame in lldb. This way when people execute lldb commands in the debug console by prefixing the expression with the backtick character, we will have the right thread and frame selected. Previously this was not updated as new stack frames were selected. Reviewers: labath, aadsm, wallace, JDevlieghere Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D77347
-
Nico Weber authored
-
Jun Ma authored
Differential Revision: https://reviews.llvm.org/D77035
-
Nicolas Vasilache authored
A certain number of EDSCs have a named form (e.g. `linalg.matmul`) and a generic form (e.g. `linalg.generic` with matmul traits). Despite living in different namespaces, using the same name is confusiong in clients. Rename them as `linalg_matmul` and `linalg_generic_matmul` respectively.
-
Austin Kerbow authored
Summary: This fixes a few issues related to SMRD offsets. On gfx9 and gfx10 we have a signed byte offset immediate, however we can overflow into a negative since we treat it as unsigned. Also, the SMRD SOFFSET sgpr is an unsigned offset on all subtargets. We sometimes tried to use negative values here. Third, S_BUFFER instructions should never use a signed offset immediate. Differential Revision: https://reviews.llvm.org/D77082
-
Adrian Prantl authored
Debug info for labels is not generated at -gline-tables-only, so this pass should remove them. Differential Revision: https://reviews.llvm.org/D77345
-
Adrian Prantl authored
This patch also strips llvm.dbg.addr intrinsics when downgrading debug info to linetables-only. Differential Revision: https://reviews.llvm.org/D77343
-
Nico Weber authored
-
Nico Weber authored
Things pass locally, but some tests on some bots are still unhappy. I'm not sure why. See if using forward slashes as before helps.
-
Lang Hames authored
Forgot to include part of the testcase. Thank to Nico for spotting that and reverting!
-
Matt Arsenault authored
-
Hubert Tong authored
Summary: This patch addresses, for the interfaces implemented by `COFFDump.cpp`, multiple issues identified with the current structure of `llvm-objdump.h` in the review of D72973. This patch moves implementation details of the tool into an `llvm::objdump` namespace for external linkage names, splits the implementation details into separate headers for each implementation file, and uses qualified names when declaring members of the `llvm::objdump` namespace in place of leaving the namespace definition open. Reviewers: jhenderson, DiggerLin, jasonliu, daltenty, MaskRay Reviewed By: jhenderson, MaskRay Subscribers: MaskRay, rupprecht, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D77285
-
Julian Lettner authored
rdar://59643443
-
Julian Lettner authored
Picking a default filter `.*` that matches everything lets us streamline some error handling code.
-
Julian Lettner authored
On shutdown, the result complete handler is not racing with the main thread anymore because we are now always waiting for process pool termination via ``` finally: pool.join() ``` -
Matt Arsenault authored
-
Matt Arsenault authored
-
Matt Arsenault authored
Switch to using the denormal-fp-math/denormal-fp-math-f32 attributes.
-
Matt Arsenault authored
-
Matt Arsenault authored
This will likely introduce catastrophic performance regressions on older subtargets, but should be correct. A follow up change will remove the old fp32-denormals subtarget features, and switch to using the new denormal-fp-math/denormal-fp-math-f32 attributes. Frontends should be making sure to add the denormal-fp-math-f32 attribute when appropriate to avoid performance regressions.
-
Duncan P. N. Exon Smith authored
Diagnostics from modules do not have a `main-file` listed. Tweak `clang-parse-diagnostics-file` to patch this up. Previously, the call to `os.path.basename` would crash. Radar-Id: rdar://problem/59000292
-
Louis Dionne authored
-
Louis Dionne authored
Instead of hardcoding absolute paths on the build-host in the executables, use relative paths from the current working directory. Also, use FILE_DEPENDENCIES to mark the static test env as being required by the relevant tests. Given a SSH executor that copies the files to the remote host properly, the tests can be run on that remote host.
-