- Mar 26, 2024
-
-
Fangrui Song authored
Created using spr 1.3.5-bogner
-
dong jianqiang authored
When the compiler enables ALSR by default, binary inconsistency occurs when the extractCodeRegion function is called. The reason is that the sequence of traversing ExitBlocks containers of the SmallPtrSet type is changed due to randomization of BasicBlock pointers. This fixes https://github.com/llvm/llvm-project/issues/86427
-
Longsheng Mou authored
tweak the position of the ++neededSSE when Lo is NoClass and Hi is SSE. Fix #86371.
-
YAMAMOTO Takashi authored
Instead of maintaining per-function-invocation malloc()'ed tables to track which functions each label belongs to, store the equivalent info in jump buffers (jmp_buf) themselves. Also, use a less emscripten-looking ABI symbols: ``` saveSetjmp -> __wasm_setjmp testSetjmp -> __wasm_setjmp_test getTempRet0 -> (removed) __wasm_longjmp -> (no change) ``` While I want to use this for WASI, it should work for emscripten as well. An example runtime and a few tests: https://github.com/yamt/garbage/tree/wasm-sjlj-alt2/wasm/longjmp wasi-libc version of the runtime: https://github.com/WebAssembly/wasi-libc/pull/483 emscripten version of the runtime: https://github.com/emscripten-core/emscripten/pull/21502 Discussion: https://docs.google.com/document/d/1ZvTPT36K5jjiedF8MCXbEmYjULJjI723aOAks1IdLLg/edit -
Akira Hatanaka authored
[CodeGen][arm64e] Add methods and data members to Address, which are needed to authenticate signed pointers (#67454) To authenticate pointers, CodeGen needs access to the key and discriminators that were used to sign the pointer. That information is sometimes known from the context, but not always, which is why `Address` needs to hold that information. This patch adds methods and data members to `Address`, which will be needed in subsequent patches to authenticate signed pointers, and uses the newly added methods throughout CodeGen. Although this patch isn't strictly NFC as it causes CodeGen to use different code paths in some cases (e.g., `mergeAddressesInConditionalExpr`), it doesn't cause any changes in functionality as it doesn't add any information needed for authentication. In addition to the changes mentioned above, this patch introduces class `RawAddress`, which contains a pointer that we know is unsigned, and adds several new functions for creating `Address` and `LValue` objects.
-
Takuto Ikuta authored
This fixes incorrect trace for https://github.com/llvm/llvm-project/issues/56554. This shows trace like https://ui.perfetto.dev/#!/?s=aa809778dc50f2b155b062317fa18bbe2bb2fb9175e6282add8121c7c178214e for the case shown in https://github.com/llvm/llvm-project/issues/83236. https://github.com/llvm/llvm-project/pull/83778 is preparing PR. Fix #56554
-
Thomas Köppe authored
Found with `-Wundefined-func-template`.
-
Farzon Lotfi authored
fixes #86551 closes #86552 Thanks to #86440 and #86407 it makes more sense for us to do type checks early via Sema to prevent the generation of invalid intrinsics.
-
Changpeng Fang authored
Rename the intrinsics to close to the instruction mnemonic names: Use global_load_tr_b64 and global_load_tr_b128 instead of global_load_tr. This patch also removes f16/bf16 versions of builtins/intrinsics. To simplify the design, we should avoid enumerating all possible types in implementing builtins. We can always use bitcast.
-
NAKAMURA Takumi authored
They began complaining since #84520.
-
Amir Ayupov authored
Attach call counters to YAML profile, covering inter-function control flow. Depends on: https://github.com/llvm/llvm-project/pull/86218 Test Plan: Updated bolt/test/X86/bolt-address-translation-yaml.test
-
Ed Maste authored
libc++ will drop support for Clang 16 before long.
-
Parth Arora authored
Previously, linker was unnecessarily including a PROVIDE symbol which was referenced by another unused PROVIDE symbol. For example, if a linker script contained the below code and 'not_used_sym' provide symbol is not included, then linker was still unnecessarily including 'foo' PROVIDE symbol because it was referenced by 'not_used_sym'. This commit fixes this behavior. PROVIDE(not_used_sym = foo) PROVIDE(foo = 0x1000) This commit fixes this behavior by using dfs-like algorithm to find all the symbols referenced in provide expressions of included provide symbols. This commit also fixes the issue of unused section not being garbage-collected if a symbol of the section is referenced by an unused PROVIDE symbol. Closes #74771 Closes #84730 Co-authored-by:Fangrui Song <i@maskray.me>
-
jimingham authored
Make the correct (5 argument) form of the command definition be the primary one suggested in the docs (#86593) This has been available for years now, so it should be safe to always use it.
-
Fangrui Song authored
Fixes: 36146d2b When `doParseFile template defintion` in InputFiles.cpp is optimized out, we will get a link failure. Actually, we can move the file parsing loop from Driver.too to InputFiles.cpp and merge it with parseArmCMSEImportLib.
-
Slava Zakharin authored
This commit adds required files into the offload build closure, which means adding RT_API_ATTRS and other markers. The implementation does not work for CUDA yet, because of std::variant,swap,reverse usage. These issues will be resolved separately (e.g. by using libcudacxx header files).
-
Iman Hosseini authored
The link to DLTI dialect was broken.
-
Craig Topper authored
-
Fangrui Song authored
-
Craig Topper authored
These instructions use the destination operand as a source, not only as a passthru for mask/tail.
-
Jonas Devlieghere authored
This reverts commit 930f6468 as it's failing on the Linux bots.
-
Craig Topper authored
-
jimingham authored
The idea behind the address-expression is that it handles all the common expressions that produce addresses. It handles actual valid expressions that return a scalar, and it handles useful cases that the various source languages don't support. At present, the fallback handles: <symbol_name>{+-}<offset> which isn't valid C but is very handy. This patch adds handling of: $<reg_name> and $<reg_name>{+-}<offset> That's kind of pointless in C because the C expression parser handles that expression already. But some languages don't have a straightforward way to represent register values like this (swift) so having this fallback is quite a quality of life improvement. I added a test which tests that I didn't mess up either of these fallbacks, though it doesn't test the actually handling of registers that I added, since the expression parser for C succeeds in that case and returns before this code gets run. I will add a test on the swift fork for that checks that this works the same way for a swift frame after this check. -
Eric authored
This reverts commit 0bbada93. The update of Clang in the CI broke due to the new LLVM version naming. It needs to look for the clang 18.1 package instead of 18. Since it couldn't find 18 it used 17 as fallback. This gives ODR violations which caused the output for the module test to be wrong. (It didn't crash which would be a lot more obvious to debug.) The clang-tidy selection was fixed by https://github.com/llvm/llvm-project/pull/81362. That patch also makes clang-19 work with clang-tidy-19 out of the box. The time-out have not been addressed; that is a CI issue and not an issue with this test. They run in 200-ish s so they are slow but far below the 1500s threshold. (Due to a dependency in this test it can't be split in multiple tests.)
-
Amir Ayupov authored
Provide secondary entry points for `EntryDiscriminator` call info field in YAML profile. Increases BAT section size to: - large binary: 39655300 bytes (1.03x the original), - medium binary: 3834328 bytes (0.65x), - small binary: 924 bytes (0.64x). Depends on: https://github.com/llvm/llvm-project/pull/76911 Test Plan: - Updated bolt-address-translation{,-yaml}.test - Added openssl test: https://github.com/rafaelauler/bolt-tests/pull/30 Reviewers: dcci, rafaelauler, maksfb, ayermolo Reviewed By: rafaelauler Pull Request: https://github.com/llvm/llvm-project/pull/86218
-
Nathan Lanza authored
This chunk of code currently runs only if the optimization mode is O3 AND the EnableGEPOpt flag is set. Given that this is the only use case for the EnableGEPOpt flag, the guarding against O3 is kinda pointless. IF the user wants to enable it then the flag should be sufficient. Reviewers: TNorthover, aeubanks Reviewed By: aeubanks Pull Request: https://github.com/llvm/llvm-project/pull/86588
-
Tom Stellard authored
This was inadvertently changed in 2120f574.
-
Farzon Lotfi authored
completes #86187 - fix hlsl_intrinsic to cover the correct cases - move to using `__builtin_elementwise_sqrt` - add lowering of `Intrinsic::sqrt` to dxilop 24.
-
Farzon Lotfi authored
Completes #83626 - `CGBuiltin.cpp` - modify `getDotProductIntrinsic` to be able to emit `dot2`, `dot3`, and `dot4` intrinsics based on element count - `IntrinsicsDirectX.td` - for floating point add `dot2`, `dot3`, and `dot4` inntrinsics -`DXIL.td` add dxilop intrinsic lowering for `dot2`, `dot3`, & `dot4`. - `DXILOpLowering.cpp` - add vector arg flattening for dot product. - `DXILOpBuilder.h` - modify `createDXILOpCall` to take a smallVector instead of an iterator - `DXILOpBuilder.cpp` - modify `createDXILOpCall` by moving the small vector up to the calling function in `DXILOpLowering.cpp`. - Moving one function up gives us access to the `CallInst` and `Function` which were needed to distinguish the dot product intrinsics and get the operands without using the iterator.
-
Jason Molenda authored
It is possible to gather code coverage in a firmware environment, where the __LLVM_COV segment will not be mapped in memory but does exist in the binary, see https://llvm.org/devmtg/2020-09/slides/PhippsAlan_EmbeddedCodeCoverage_LLVM_Conf_Talk_final.pdf The __LLVM_COV segment in the binary happens to be at the same address as the __DATA segment, so if lldb treats this segment as loaded, it shadows the __DATA segment and address->symbol resolution can fail. For these non-userland code cases, we need to mark __LLVM_COV as not a loadable segment. rdar://124475661
-
Krzysztof Parzyszek authored
/usr/bin/ld: CMakeFiles/ClangReplInterpreterTests.dir/InterpreterExtensi onsTest.cpp.o: undefined reference to symbol '_ZN4llvm14TargetRegistry12 lookupTargetENS_9StringRefERNSt7__cxx1112basic_stringIcSt11char_traitsIc ESaIcEEE' /usr/bin/ld: /work/kparzysz/git/llvm.org/b/x86/lib/libLLVMMC.so.19.0git: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status The missing symbol is `llvm::TargetRegistry::lookupTarget`, which interestingly enough is in MC. Add `MC` to the list of LLVM dependencies.
-
Jonas Devlieghere authored
This implements coalescing of progress events using a timeout, as discussed in the RFC on Discourse [1]. This PR consists of two commits which, depending on the feedback, I may split up into two PRs. For now, I think it's easier to review this as a whole. 1. The first commit introduces a new generic `Alarm` class. The class lets you to schedule a function (callback) to be executed after a given timeout expires. You can cancel and reset a callback before its corresponding timeout expires. It achieves this with the help of a worker thread that sleeps until the next timeout expires. The only guarantee it provides is that your function is called no sooner than the requested timeout. Because the callback is called directly from the worker thread, a long running callback could potentially block the worker thread. I intentionally kept the implementation as simple as possible while addressing the needs for the `ProgressManager` use case. If we want to rely on this somewhere else, we can reassess whether we need to address those limitations. 2. The second commit uses the Alarm class to coalesce progress events. To recap the Discourse discussion, when multiple progress events with the same title execute in close succession, they get broadcast as one to `eBroadcastBitProgressCategory`. The `ProgressManager` keeps track of the in-flight progress events and when the refcount hits zero, the Alarm class is used to schedule broadcasting the event. If a new progress event comes in before the alarm fires, the alarm is reset (and the process repeats when the new progress event ends). If no new event comes in before the timeout expires, the progress event is broadcast. [1] https://discourse.llvm.org/t/rfc-improve-lldb-progress-reporting/75717/
-
Andrei Golubev authored
Using range.size() "as is" means we accumulate 'size_t' values into 'int32_t' variable. This may produce narrowing conversion warnings (particularly, on MSVC). The surrounding code seems to cast <x>.size() to 'int32_t' so following this practice seems safe enough. Co-authored-by:Ovidiu Pintican <ovidiu.pintican@intel.com>
-
Kazu Hirata authored
This patch replaces: #if EXPENSIVE_CHECKS with: #ifdef EXPENSIVE_CHECKS to follow the existing conventions.
-
Eric authored
The OSS fuzz build has been broken for a while because of changes to the cmake configuration. This patch fixes the issues by defaulting to libunwind as the default runtime
-
Craig Topper authored
-
Cyndy Ishida authored
-
Chris B authored
PR #86242 introduced a copy-paste error that caused some tests to fail by mapping the wrong pass name to a pass. This resolves the issue and fixes the failing tests.
-
Kazu Hirata authored
There are two ways to create in-memory instances of IndexedAllocationInfo -- deserialization of the raw MemProf data and that of the indexed MemProf data. With: commit 74799f42 Author: Kazu Hirata <kazu@google.com> Date: Sat Mar 23 19:50:15 2024 -0700 we compute CallStackId for each call stack in IndexedAllocationInfo while deserializing the raw MemProf data. This patch does the same while deserilizing the indexed MemProf data. As with the patch above, this patch does not add any use of CallStackId yet.
-
Cyndy Ishida authored
-