- Mar 20, 2017
-
-
Alex Shlyapnikov authored
Summary: sysconf(_SC_PAGESIZE) is called very early, during sanitizer init and any instrumented code (a wrapper/interceptor will likely be instrumented) calling back to sanitizer before init is done will most surely crash. Reviewers: eugenis Subscribers: llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D31092 llvm-svn: 298305
-
Simon Atanasyan authored
llvm-svn: 298304
-
Kostya Serebryany authored
Summary: Proposal: Backward-edge CFI for return statements (RCFI) Reviewers: pcc, eugenis, krasin Reviewed By: eugenis Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D31112 llvm-svn: 298303
-
Evgeniy Stepanov authored
Make x86_64-fuchsia targets under -mcmodel=kernel use %gs rather than %fs to access ABI slots for stack-protector and safe-stack Patch by Roland McGrath. Differential Revision: https://reviews.llvm.org/D30870 llvm-svn: 298302
-
Eli Friedman authored
If loop bound containing calculations like min(a,b), the Scalar Evolution API getSmallConstantTripMultiple returns 4294967295 "-1" as the trip multiple. The problem is that, SCEV use -1 * umax to represent umin. The multiple constant -1 was returned, and the logic of guarding against huge trip counts was skipped. Because -1 has 32 active bits. The fix attempt to factor more general cases. First try to get the greatest power of two divisor of trip count expression. In case overflow happens, the trip count expression is still divisible by the greatest power of two divisor returned. Returns 1 if not divisible by 2. Patch by Huihui Zhang <huihuiz@codeaurora.org> Differential Revision: https://reviews.llvm.org/D30840 llvm-svn: 298301
-
Richard Smith authored
llvm-svn: 298300
-
Richard Smith authored
llvm-svn: 298299
-
David L. Jones authored
Summary: - Migrated from grep to FileCheck. - Re-indented, removed boilerplate comments. - Added 'entry' label at beginning of basic block. Patch by Jorge Gorbe! Reviewed By: RKSimon Subscribers: RKSimon, jgorbe, llvm-commits Differential Revision: https://reviews.llvm.org/D30317 llvm-svn: 298298
-
Zachary Turner authored
These are needed due to some obscure rules in the standard about how std::vector selects between copy and move constructors, which can cause a conforming implementation to attempt to select the copy constructor of RuleMatcher, which will fail since std::unique_ptr<> isn't copyable. llvm-svn: 298294
-
Nirav Dave authored
llvm-svn: 298293
-
Kevin Enderby authored
and test cases for each of the error checks. To do this more plumbing was needed so that the segment indexes and segment offsets can be checked. Basically what was done was the SegInfo from llvm-objdump’s MachODump.cpp was moved into libObject for Mach-O objects as BindRebaseSegInfo and it is only created when an iterator for bind or rebase entries are created. This commit really only adds the error checking and test cases for the bind table entires and the checking for the lazy bind and weak bind entries are still to be fully done as well as the rebase entires. Though some of the plumbing for those are added with this commit. Those other error checks and test cases will be added in follow on commits. Note, the two llvm_unreachable() calls should now actually be unreachable with the error checks in place and would take a logic bug in the error checking code to be reached if the segment indexes and segment offsets are used from a checked bind entry. Comments have been added to the methods that require the arguments to have been checked prior to calling. llvm-svn: 298292
-
Jim Ingham authored
Only do this when we are debugging an executable, since we don't have a good way to trace from an ObjectFile back to its containing executable. Detecting pre-run libs before running is "best effort" in lldb, but this one is pretty easy. llvm-svn: 298290
-
Jim Ingham authored
If you have code before the first line table entry when debugging with .o files on macOS, the LineTable entry search code was assigning all that code to the first line table entry. Don't do that. <rdar://problem/31095765> llvm-svn: 298289
-
Evgeniy Stepanov authored
Revert "[asan] Fix dead stripping of globals on Linux." OOM in gold linker. llvm-svn: 298288
-
Evgeniy Stepanov authored
Revert "Fix sanitizer tests with LLVM_TOOL_LLD_BUILD=OFF." Revert "[asan] Remove gc-sections test with bfd." Revert "[asan] Disable globals-gc test with ld.bfd." Revert "[asan] Fix dead stripping of globals on Linux (compiler-rt)" OOM in gold linker. llvm-svn: 298287
-
Simon Pilgrim authored
llvm-svn: 298286
-
Peter Collingbourne authored
llvm-svn: 298285
-
Marshall Clow authored
llvm-svn: 298284
-
Krzysztof Parzyszek authored
Regain the ability to recognize loops calculating polynomial modulo operation. This ability has been lost due to some changes in the preceding optimizations. Add code to preprocess the IR to a form that the pattern matching code can recognize. llvm-svn: 298282
-
Konstantin Zhuravlyov authored
Differential Revision: https://reviews.llvm.org/D31141 llvm-svn: 298281
-
Daniel Berlin authored
llvm-svn: 298280
-
David Blaikie authored
llvm-svn: 298279
-
Duncan P. N. Exon Smith authored
This reverts commit r298185, effectively reapplying r298165, after fixing the new unit tests (PR32338). The memory buffer generator doesn't null-terminate the MemoryBuffer it creates; this version of the commit informs getMemBuffer about that to avoid the assert. Original commit message follows: ---- Clang's internal build system for implicit modules uses lock files to ensure that after a process writes a PCM it will read the same one back in (without contention from other -cc1 commands). Since PCMs are read from disk repeatedly while invalidating, building, and importing, the lock is not released quickly. Furthermore, the LockFileManager is not robust in every environment. Other -cc1 commands can stall until timeout (after about eight minutes). This commit changes the lock file from being necessary for correctness to a (possibly dubious) performance hack. The remaining benefit is to reduce duplicate work in competing -cc1 commands which depend on the same module. Follow-up commits will change the internal build system to continue after a timeout, and reduce the timeout. Perhaps we should reconsider blocking at all. This also fixes a use-after-free, when one part of a compilation validates a PCM and starts using it, and another tries to swap out the PCM for something new. The PCMCache is a new type called MemoryBufferCache, which saves memory buffers based on their filename. Its ownership is shared by the CompilerInstance and ModuleManager. - The ModuleManager stores PCMs there that it loads from disk, never touching the disk if the cache is hot. - When modules fail to validate, they're removed from the cache. - When a CompilerInstance is spawned to build a new module, each already-loaded PCM is assumed to be valid, and is frozen to avoid the use-after-free. - Any newly-built module is written directly to the cache to avoid the round-trip to the filesystem, making lock files unnecessary for correctness. Original patch by Manman Ren; most testcases by Adrian Prantl! llvm-svn: 298278
-
Jon Roelofs authored
`misc.highlighting_failure` support was added to `suppress_warnings` in that version, and the warnings-as-errors docs build relies on it. llvm-svn: 298277
-
Reid Kleckner authored
Move the check for "MF->hasWinCFI()" up into the calculation of the shouldEmitMoves boolean, rather than putting it in the early returning if. This ensures that endFunction doesn't try to emit .seh_* directives for leaf functions. llvm-svn: 298276
-
Jon Roelofs authored
... mostly having to do with code blocks which the syntax highlighter chokes on llvm-svn: 298275
-
Francis Ricci authored
Summary: This patch allows us to move away from using __thread on darwin, which is requiring for building lsan for darwin on ios version 7 and on iossim i386. Reviewers: kubamracek, kcc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D29994 llvm-svn: 298274
-
Tim Northover authored
Otherwise the fallback path fails with an assertion on AAPCS AArch64 targets, when "long double" is encountered. llvm-svn: 298273
-
George Rimar authored
This continues detemplation process. Detemplating MipsGotSection<ELFT> is helpfull because can help to detemplate getRelocTargetVA. (one more change is required) It opens road to detemplation of GotSection<ELFT> and probably something else after that. Differential revision: https://reviews.llvm.org/D31090 llvm-svn: 298272
-
Peter Collingbourne authored
This is a safeguard against data loss if the user specifies a directory that is not a cache directory. Teach the existing cache pruning clients to create files with appropriate names. Differential Revision: https://reviews.llvm.org/D31109 llvm-svn: 298271
-
Dehao Chen authored
Summary: Inliner should update the branch_weights annotation to scale it to proper value. Reviewers: davidxl, eraman Reviewed By: eraman Subscribers: zzheng, llvm-commits Differential Revision: https://reviews.llvm.org/D30767 llvm-svn: 298270
-
George Rimar authored
Does not introduce anything new, just performs detemplate, using methods we already have. Differential revision: https://reviews.llvm.org/D30935 llvm-svn: 298269
-
Adrian Prantl authored
llvm-svn: 298268
-
Kuba Mracek authored
Disable stack-use-after-return.cc on AArch64. The test was not testing the right thing before (the call to pthread_attr_setstacksize wasn't doing anything) anyway, and now it's running out of stack due to an unrelated change. llvm-svn: 298267
-
David Blaikie authored
Avoid potential ADL ambiguity between llvm::make_unique and std::make_unique (when building as C++14+) Patch by Moritz Kiefer! llvm-svn: 298266
-
Dmitry Preobrazhensky authored
This fix enables sp3 abs modifier with constants Reviewers: artem.tamazov Differential Revision: https://reviews.llvm.org/D30825 llvm-svn: 298265
-
Craig Topper authored
InstCombine tries to constant fold instruction operands during worklist building, but we don't print that we're doing this. We also set a change flag here that causes us to rebuild and rerun the worklist one more time even if processing the worklist itself created no additional changes. So in the log I saw two inst combine runs that visited all instructions without printing that anything was changed. I may be submitting another patch to remove the change flag unless I can find some reason why we should be doing that. Differential Revision: https://reviews.llvm.org/D31091 llvm-svn: 298264
-
Jessica Paquette authored
I don't know how to type. This fixes the last commit which would have made all of the overflows legal, and kept the screaming. llvm-svn: 298263
-
Daniel Berlin authored
Templatize parts of VNCoercion, and add constant-only versions of the functions to be used in NewGVN. NFCI. Summary: This is ground work for the changes to enable coercion in NewGVN. GVN doesn't care if they end up constant because it eliminates as it goes. NewGVN cares. IRBuilder and ConstantFolder deliberately present the same interface, so we use this to our advantage to templatize our functions to make them either constant only or not. Reviewers: davide Subscribers: llvm-commits, Prazek Differential Revision: https://reviews.llvm.org/D30928 llvm-svn: 298262
-
Pavel Labath authored
r298203 make SBPlatform::MakeDirectory less recursive, which breaks the test suite creation of test directory hierarchy creation on the remote target. Since the function was never fully recursive, and the name does not imply recursiveness, I fix the problem by modifying the test runner to do the recursion manually. I also make the runner complain more loudly when it fails to create the directory -- previously it just printed the error to stdout and caused most of the tests to hang, which is not very helpful in diagnosing the problem. llvm-svn: 298261
-