- Jul 31, 2020
-
-
Vitaly Buka authored
Differential Revision: https://reviews.llvm.org/D84616
-
Shilei Tian authored
Refactored the function `target` to make preparation for fixing the issue of ahead-of-time device memory deallocation. Reviewed By: ye-luo Differential Revision: https://reviews.llvm.org/D84816
-
dfukalov authored
Reviewed By: rampitec Differential Revision: https://reviews.llvm.org/D84903
-
Scott Constable authored
Fix for the issue raised in https://github.com/rust-lang/rust/issues/74632. The current heuristic for inserting LFENCEs uses a quadratic-time algorithm. This can apparently cause substantial compilation slowdowns for building Rust projects, where functions > 5000 LoC are apparently common. The updated heuristic in this patch implements a linear-time algorithm. On a set of benchmarks, the slowdown factor for the generated code was comparable (2.55x geo mean for the quadratic-time heuristic, vs. 2.58x for the linear-time heuristic). Both heuristics offer the same security properties, namely, mitigating LVI. This patch also includes some formatting fixes. Differential Revision: https://reviews.llvm.org/D84471
-
Craig Topper authored
After the recent change to the tuning settings for pentium4 to improve our default 32-bit behavior, I've decided to see about implementing -mtune support. This way we could have a default architecture CPU of "pentium4" or "x86-64" and a default tuning cpu of "generic". And we could change our "pentium4" tuning settings back to what they were before. As a step to supporting this, this patch separates all of the features lists for the CPUs into 2 lists. I'm using the Proc class and a new ProcModel class to concat the 2 lists before passing to the target independent ProcessorModel. Future work to truly support mtune would change ProcessorModel to take 2 lists separately. I've diffed the X86GenSubtargetInfo.inc file before and after this patch to ensure that the final feature list for the CPUs isn't changed. Differential Revision: https://reviews.llvm.org/D84879
-
kuterd authored
This patch addes time trace functionality to have a better understanding of the analysis times. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D84980
-
Craig Topper authored
This includes basic support for computeKnownBits on abs. I've left FIXMEs for more complicated things we could do. Differential Revision: https://reviews.llvm.org/D84963
-
Vedant Kumar authored
InstrProfilingBuffer.c.o is generic code that must support compilation into freestanding projects. This gets rid of its dependence on the _getpagesize symbol from libc, shifting it to InstrProfilingFile.c.o. This fixes a build failure seen in a firmware project. rdar://66249701
-
Davide Italiano authored
When we detect a process that the native debugserver cannot handle, handoff the connection fd to the translated debugserver.
-
Eli Friedman authored
Just the obvious implementation that rewrites the result type. Also fix warning from EXTRACT_SUBVECTOR legalization that triggers on the test. Differential Revision: https://reviews.llvm.org/D84706
-
Amara Emerson authored
Differential Revision: https://reviews.llvm.org/D84552
-
Mircea Trofin authored
clang-tidy's llvm-header-guard rule references the LLVM style - where it's missing. Differential Revision: https://reviews.llvm.org/D84989
-
Siva Chandra Reddy authored
This tool will be used to generate C wrappers for the C++ LLVM libc implementations. This change does not hook this tool up to anything yet. However, it can be useful for cases where one does not want to run the objcopy step (to insert the C symbol in the object file) but can make use of LTO to eliminate the cost of the additional wrapper call. This can be relevant for certain downstream platforms. If this tool can benefit other libc platforms in general, then it can be integrated into the build system with options to use or not use the wrappers. An example of such a platform is CUDA. Reviewed By: abrachet Differential Revision: https://reviews.llvm.org/D84848
-
Eli Friedman authored
fptosi/fptoui have similar, but not identical, semantics. In particular, the behavior on overflow is different. Fixes https://bugs.llvm.org/show_bug.cgi?id=46844 for 64-bit. (The corresponding patch for 32-bit is more involved because the equivalent intrinsics don't exist, as far as I can tell.) Differential Revision: https://reviews.llvm.org/D84703
-
LLVM GN Syncbot authored
-
Lang Hames authored
The -harness option enables new testing use-cases for llvm-jitlink. It takes a list of objects to treat as a test harness for any regular objects passed to llvm-jitlink. If any files are passed using the -harness option then the following transformations are applied to all other files: (1) Symbols definitions that are referenced by the harness files are promoted to default scope. (This enables access to statics from test harness). (2) Symbols definitions that clash with definitions in the harness files are deleted. (This enables interposition by test harness). (3) All other definitions in regular files are demoted to local scope. (This causes untested code to be dead stripped, reducing memory cost and eliminating spurious unresolved symbol errors from untested code). These transformations allow the harness files to reference and interpose symbols in the regular object files, which can be used to support execution tests (including fuzz tests) of functions in relocatable objects produced by a build. -
Lang Hames authored
This allows clients to detect invalid transformations applied by JITLink passes (e.g. inserting or removing symbols in unexpected ways) and terminate linking with an error. This change is used to simplify the error propagation logic in ObjectLinkingLayer.
-
Zequan Wu authored
-
Rahul Joshi authored
Differential Revision: https://reviews.llvm.org/D84984
-
Matt Arsenault authored
Avoid recursively calling copyPhysReg for AGPR handling. This was dropping the necessary super register implicit defs to avoid liveness verifier errors.
-
Thomas Raoux authored
This allow declaring buffers and alloc of vectors so that we can support vector load/store. Differential Revision: https://reviews.llvm.org/D84982
-
Nathan James authored
Reviewed By: gribozavr2 Differential Revision: https://reviews.llvm.org/D84926
-
Richard Smith authored
We previously used a non-aggregate RValue to represent the passed value, which violated the assumptions of call arg lowering in some cases, in particular on 32-bit Windows, where we'd end up producing an FCA store with TBAA metadata, that the IR verifier would reject.
-
Jez Ng authored
-
Changpeng Fang authored
Summary: This is in response to the review of https://reviews.llvm.org/D84873: The expensive check should be reordered last Reviewers: arsenm Differential Revision: https://reviews.llvm.org/D84890
-
Jez Ng authored
codesign (or more specifically libstuff) checks that each section in __LINKEDIT ends where the next one starts -- no gaps are permitted. This diff achieves it by aligning every section's start and end points to WordSize. Remarks: ld64 appears to satisfy the constraint by adding padding bytes when generating the __LINKEDIT data, e.g. by emitting BIND_OPCODE_DONE (which is a 0x0 byte) repeatedly. I think the approach this diff takes is a bit more elegant, but I'm not sure if it's too restrictive. In particular, it assumes padding always uses the zero byte. But we can revisit this later. Reviewed By: #lld-macho, compnerd Differential Revision: https://reviews.llvm.org/D84718
-
Jez Ng authored
Tools like `install_name_tool` and `codesign` may modify the Mach-O header and increase its size. The linker has to provide padding to make this possible. This diff does that, plus sets its default value to 32 bytes (which is what ld64 does). Unlike ld64, however, we lay out our sections *exactly* `-headerpad` bytes from the header, whereas ld64 just treats the padding requirement as a lower bound. ld64 actually starts laying out the non-header sections in the __TEXT segment from the end of the (page-aligned) segment rather than the front, so its binaries typically have more than `-headerpad` bytes of actual padding. We should consider implementing the same alignment behavior. Reviewed By: #lld-macho, compnerd Differential Revision: https://reviews.llvm.org/D84714
-
Jez Ng authored
The C++ ABI requires dylibs to pass a pointer to __cxa_atexit which does e.g. cleanup of static global variables. The C++ spec says that the pointer can point to any address in one of the dylib's segments, but in practice ld64 seems to set it to point to the header, so that's what's implemented here. Reviewed By: #lld-macho, smeenai Differential Revision: https://reviews.llvm.org/D83603
-
Nikita Popov authored
Pass the abs poison flag to the underlying ConstantRange implementation, allowing CVP to simplify based on it. Importantly, this recognizes that abs with poison flag is actually non-negative...
-
Jon Roelofs authored
This fixes an assertion failure that was being triggered in SelectionDAG::getZeroExtendInReg(), where it was trying to extend the <2xi32> to i64 (which should have been <2xi64>). Fixes: rdar://66016901 Differential Revision: https://reviews.llvm.org/D84884
-
Jonas Devlieghere authored
- Remove the link to the Python 3 job which no longer exists. - Add a link to the reproducer job.
-
Nikita Popov authored
This just adds the ConstantRange support, including exhaustive testing. It's not wired up to the IR intrinsic flag yet.
-
Jonas Devlieghere authored
-
Peiyuan Song authored
Differential Revision: https://reviews.llvm.org/D84757
-
Peiyuan Song authored
Differential Revision: https://reviews.llvm.org/D84756
-
Nikita Popov authored
Wire up ConstantRange::intrinsic() to the existing primitives for min, max and abs. The poison flag on abs is not yet taken into account.
-
Nikita Popov authored
-
Petr Hosek authored
These are needed on Windows. Differential Revision: https://reviews.llvm.org/D83999
-
Peter Steinfeld authored
When declaring the same variable twice with an initialization, we were failing an internal check. I fixed this by checking to see if the associated symbol already had an error. I added tests for pointer and non-pointer initialization of duplicate names. Differential Revision: https://reviews.llvm.org/D84969
-
Petr Hosek authored
Clang and GCC have a feature (-MD flag) to create a dependency file in a format that build systems such as Make or Ninja can read, which specifies all the additional inputs such .h files. This change introduces the same functionality to lld bringing it to feature parity with ld and gold which gained this feature recently. See https://sourceware.org/bugzilla/show_bug.cgi?id=22843 for more details and discussion. The implementation corresponds to -MD -MP compiler flag where the generated dependency file also includes phony targets which works around the errors where the dependency is removed. This matches the format used by ld and gold. Fixes PR42806 Differential Revision: https://reviews.llvm.org/D82437
-