summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [CallSiteSplitting] Silence GCC's -Wparentheses. NFCI.Davide Italiano2017-11-031-2/+2
| | | | llvm-svn: 317385
* [COFF] Avoid "Body" as a local variable name.Rui Ueyama2017-11-032-19/+17
| | | | | | | Since SymbolBody is gone, "Body" is not a good variable name. This patch renames or eliminates them. llvm-svn: 317384
* Rename replaceBody -> replaceSymbol.Rui Ueyama2017-11-039-36/+37
| | | | llvm-svn: 317383
* [X86] Give unary PERMI priority over SHUF128 in lowerV8I64VectorShuffle to ↵Craig Topper2017-11-032-6/+23
| | | | | | make it possible to fold a load. llvm-svn: 317382
* [Basic] Fix some Clang-tidy modernize and Include What You Use warnings; ↵Eugene Zelenko2017-11-037-170/+217
| | | | | | other minor fixes (NFC). llvm-svn: 317381
* Fix variable name.Zachary Turner2017-11-032-17/+16
| | | | | | | A mechanical rename caused an illegal name conflict between a variable and a type, which was picked up by GCC. llvm-svn: 317380
* Move TargetFrameLowering.h to CodeGen where it's implementedDavid Blaikie2017-11-0373-75/+75
| | | | | | | | | | | This header already includes a CodeGen header and is implemented in lib/CodeGen, so move the header there to match. This fixes a link error with modular codegeneration builds - where a header and its implementation are circularly dependent and so need to be in the same library, not split between two like this. llvm-svn: 317379
* Revert "[ELF] - Teach LLD to use information from .debug_str for error ↵Bob Haarman2017-11-033-164/+1
| | | | | | | | | | reporting." This reverts commit 00b7acb8f6c8a4663bb7c8396d217c210209b562. It was causing some links to execute llvm_unreachable. llvm-svn: 317378
* Remove ProcessGdbRemote::m_flagsPavel Labath2017-11-032-7/+1
| | | | | | The member is completely unused. Discussed on lldb-dev. llvm-svn: 317377
* [MinGW] Output debug info by default, unless the -s parameter is passedMartin Storsjo2017-11-035-2/+15
| | | | | | Differential Revision: https://reviews.llvm.org/D39541 llvm-svn: 317376
* Invoke salvageDebugInfo from CodeGenPrepare's SinkCast()Adrian Prantl2017-11-033-1/+120
| | | | | | | | | | This preserves the debug info for the cast operation in the original location. rdar://problem/33460652 Reapplied r317340 with the test moved into an ARM-specific directory. llvm-svn: 317375
* [LTO][ThinLTO] Use the linker resolutions to mark global values as dso_local.Sean Fertile2017-11-0319-37/+115
| | | | | | | | | | Now that we have a way to mark GlobalValues as local we can use the symbol resolutions that the linker plugin provides as part of lto/thinlto link step to refine the compilers view on what symbols will end up being local. Differential Revision: https://reviews.llvm.org/D35702 llvm-svn: 317374
* Fix a crash in llvm-objdump when printing a bad x86_64 relocation in a Mach-OKevin Enderby2017-11-033-2/+16
| | | | | | | | file with a bad section number. rdar://35207539 llvm-svn: 317373
* Add -fcxx-exceptions for ExtractionSemicolonPolicy.cpp to appease PS4 botsAlex Lorenz2017-11-031-1/+1
| | | | llvm-svn: 317372
* Revert r317046, "Object: Move some code from ELF.h into ELF.cpp."Peter Collingbourne2017-11-032-263/+263
| | | | | | | This change resulted in a measured 1.5-2% perf regression linking chrome. llvm-svn: 317371
* Rename SymbolBody -> SymbolRui Ueyama2017-11-0355-567/+536
| | | | | | | | | | | | | Now that we have only SymbolBody as the symbol class. So, "SymbolBody" is a bit strange name now. This is a mechanical change generated by perl -i -pe s/SymbolBody/Symbol/g $(git grep -l SymbolBody lld/ELF lld/COFF) nd clang-format-diff. Differential Revision: https://reviews.llvm.org/D39459 llvm-svn: 317370
* Late fixup in _lwp_exit on TSan/NetBSDKamil Rytarowski2017-11-031-1/+1
| | | | | | | | | | Call DestroyThreadState() before REAL(_lwp_exit)(); This variation is less racy. Sponsored by <The NetBSD Foundation> llvm-svn: 317369
* [SimplifyCFG] When merging conditional stores, don't count the store we're ↵Craig Topper2017-11-032-2/+4
| | | | | | | | | | | | merging against the PHINodeFoldingThreshold Merging conditional stores tries to check to see if the code is if convertible after the store is moved. But the store hasn't been moved yet so its being counted against the threshold. The patch adds 1 to the threshold comparison to make sure we don't count the store. I've adjusted a test to use a lower threshold to ensure we still do that conversion with the lower threshold. Differential Revision: https://reviews.llvm.org/D39570 llvm-svn: 317368
* [COFF] Autoexport symbols as data if they don't point to an executable sectionMartin Storsjo2017-11-032-0/+14
| | | | | | | | This was already taken care of for the output def file. Differential Revision: https://reviews.llvm.org/D39573 llvm-svn: 317367
* GCOV: Move GCOV from IR & Support into ProfileData to fix layeringDavid Blaikie2017-11-036-6/+6
| | | | | | | | This class was split between libIR and libSupport, which breaks under modular code generation. Move it into the one library that uses it, ProfileData, to resolve this issue. llvm-svn: 317366
* llvm-objdump: Fix unused-lambda-capture warning by removing unused lambda ↵David Blaikie2017-11-031-1/+1
| | | | | | capture llvm-svn: 317365
* [cfi-verify] Add blacklist parsing for result filtering.Mitch Phillips2017-11-0321-506/+1037
| | | | | | | | | | | | | | | | | | | | | Adds blacklist parsing behaviour for filtering results into four categories: - Expected Protected: Things that are not in the blacklist and are protected. - Unexpected Protected: Things that are in the blacklist and are protected. - Expected Unprotected: Things that are in the blacklist and are unprotected. - Unexpected Unprotected: Things that are not in the blacklist and are unprotected. now can optionally be invoked with a second command line argument, which specifies the blacklist file that the binary was built with. Current statistics for chromium: Reviewers: vlad.tsyrklevich Subscribers: mgorny, llvm-commits, pcc, kcc Differential Revision: https://reviews.llvm.org/D39525 llvm-svn: 317364
* Correct detection of a thread terminationKamil Rytarowski2017-11-031-4/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Stop using the Linux solution with pthread_key_create(3). This approach does not work on NetBSD, because calling the thread destructor is not the latest operation on a POSIX thread entity. NetBSD's libpthread still calls at least pthread_mutex_lock and pthread_mutex_unlock. Detect _lwp_exit(2) call as it is really the latest operation called from a detaching POSIX thread. This resolves one set of crashes observed in the Thread Sanitizer execution. Sponsored by <The NetBSD Foundation> Reviewers: joerg, kcc, vitalybuka, dvyukov, eugenis Reviewed By: vitalybuka Subscribers: llvm-commits, kubamracek, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D39618 llvm-svn: 317363
* Recommit r317351 : Add CallSiteSplitting passJun Bum Lim2017-11-0314-3/+1015
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This recommit r317351 after fixing a buildbot failure. Original commit message: Summary: This change add a pass which tries to split a call-site to pass more constrained arguments if its argument is predicated in the control flow so that we can expose better context to the later passes (e.g, inliner, jump threading, or IPA-CP based function cloning, etc.). As of now we support two cases : 1) If a call site is dominated by an OR condition and if any of its arguments are predicated on this OR condition, try to split the condition with more constrained arguments. For example, in the code below, we try to split the call site since we can predicate the argument (ptr) based on the OR condition. Split from : if (!ptr || c) callee(ptr); to : if (!ptr) callee(null ptr) // set the known constant value else if (c) callee(nonnull ptr) // set non-null attribute in the argument 2) We can also split a call-site based on constant incoming values of a PHI For example, from : BB0: %c = icmp eq i32 %i1, %i2 br i1 %c, label %BB2, label %BB1 BB1: br label %BB2 BB2: %p = phi i32 [ 0, %BB0 ], [ 1, %BB1 ] call void @bar(i32 %p) to BB0: %c = icmp eq i32 %i1, %i2 br i1 %c, label %BB2-split0, label %BB1 BB1: br label %BB2-split1 BB2-split0: call void @bar(i32 0) br label %BB2 BB2-split1: call void @bar(i32 1) br label %BB2 BB2: %p = phi i32 [ 0, %BB2-split0 ], [ 1, %BB2-split1 ] llvm-svn: 317362
* Disable detection of on_exit()/TSan on NetBSDKamil Rytarowski2017-11-031-2/+5
| | | | | | | | | | | | | | | | | | | | | | Summary: NetBSD does not ship with on_exit() function. Introduce TSAN_MAYBE_INTERCEPT_ON_EXIT. It looks like this addition fixes build for Darwin. Sponsored by <The NetBSD Foundation> Reviewers: vitalybuka, joerg, eugenis, dvyukov, kcc Reviewed By: vitalybuka Subscribers: llvm-commits, kubamracek, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D39617 llvm-svn: 317361
* Modularize: Include some required headersDavid Blaikie2017-11-033-2/+4
| | | | | | | | DenseMaps require the definition of a type to be available when using a pointer to that type as a key to know how many bits are available for tombstone/etc. llvm-svn: 317360
* Replace a use of std::for_each() with llvm::for_each(); NFC.Aaron Ballman2017-11-031-2/+1
| | | | llvm-svn: 317359
* [llvm-ar] Support an options string that start with a dashMartin Storsjo2017-11-032-1/+22
| | | | | | | | Some projects call $AR like "$AR -crs output input1 input2". Differential Revision: https://reviews.llvm.org/D39538 llvm-svn: 317358
* Correcting some CRLFs that snuck in with my previous commit; NFC.Aaron Ballman2017-11-031-6/+6
| | | | llvm-svn: 317357
* Add llvm::for_each as a range-based extensions to <algorithm> and make use ↵Aaron Ballman2017-11-0312-89/+92
| | | | | | of it in some cases where it is a more clear alternative to std::for_each. llvm-svn: 317356
* [cfi-verify] Add an interesting unit test where undef search length changes ↵Mitch Phillips2017-11-031-0/+53
| | | | | | | | | | | | | | result. Add an interesting unit test, found by changing --search-length-undef from the default. Program handles it correctly but good for ensuring correctness on further changes :) Reviewers: pcc Subscribers: mgorny, llvm-commits, kcc, vlad.tsyrklevich Differential Revision: https://reviews.llvm.org/D38658 llvm-svn: 317355
* [X86] Promote athlon, athlon-xp, k8, and k8-sse3 to types instead of ↵Craig Topper2017-11-031-24/+16
| | | | | | | | | | subtypes in getHostCPUName. NFCI This removes the athlon type and simplifies the string decoding. We only really need these type/subtype breaks where we need to match libgcc/compiler-rt and these CPUs aren't part of that. I'm looking into moving some of this information to a .def file to share with clang's __builtin_cpu_is handling. And while these CPUs aren't part of that the less lines I have to deal with in the .def file the better. llvm-svn: 317354
* Revert "Add CallSiteSplitting pass"Jun Bum Lim2017-11-0314-1014/+3
| | | | | | | | Revert due to Buildbot failure. This reverts commit r317351. llvm-svn: 317353
* Reland "Add support for writing 64-bit symbol tables for archives when ↵Jake Ehrlich2017-11-032-9/+90
| | | | | | | | | | | | | | | | | | offsets become too large for 32-bit" Tests were failing because some bots were running out of address space and memory. Additionally the test was very slow. These issues were solved by changing the test to take advantage of sparse filse and restricting the test to run only on 64-bit systems. This should fix https://bugs.llvm.org//show_bug.cgi?id=34189 This change makes it so that if writing a K_GNU style archive, you need to output a > 32-bit offset it should output in K_GNU64 style instead. Differential Revision: https://reviews.llvm.org/D36812 llvm-svn: 317352
* Add CallSiteSplitting passJun Bum Lim2017-11-0314-3/+1014
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This change add a pass which tries to split a call-site to pass more constrained arguments if its argument is predicated in the control flow so that we can expose better context to the later passes (e.g, inliner, jump threading, or IPA-CP based function cloning, etc.). As of now we support two cases : 1) If a call site is dominated by an OR condition and if any of its arguments are predicated on this OR condition, try to split the condition with more constrained arguments. For example, in the code below, we try to split the call site since we can predicate the argument (ptr) based on the OR condition. Split from : if (!ptr || c) callee(ptr); to : if (!ptr) callee(null ptr) // set the known constant value else if (c) callee(nonnull ptr) // set non-null attribute in the argument 2) We can also split a call-site based on constant incoming values of a PHI For example, from : BB0: %c = icmp eq i32 %i1, %i2 br i1 %c, label %BB2, label %BB1 BB1: br label %BB2 BB2: %p = phi i32 [ 0, %BB0 ], [ 1, %BB1 ] call void @bar(i32 %p) to BB0: %c = icmp eq i32 %i1, %i2 br i1 %c, label %BB2-split0, label %BB1 BB1: br label %BB2-split1 BB2-split0: call void @bar(i32 0) br label %BB2 BB2-split1: call void @bar(i32 1) br label %BB2 BB2: %p = phi i32 [ 0, %BB2-split0 ], [ 1, %BB2-split1 ] Reviewers: davidxl, huntergr, chandlerc, mcrosier, eraman, davide Reviewed By: davidxl Subscribers: sdesmalen, ashutosh.nema, fhahn, mssimpso, aemerson, mgorny, mehdi_amini, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D39137 llvm-svn: 317351
* [llvm-objcopy] Add support for dwarf fissionJake Ehrlich2017-11-034-15/+110
| | | | | | | | This change adds support for dwarf fission. Differential Revision: https://reviews.llvm.org/D39207 llvm-svn: 317350
* [AArch64] Fix the number of iterations for the Newton seriesEvandro Menezes2017-11-033-25/+94
| | | | | | | | | The number of iterations was incorrectly determined for DP FP vector types and the tests were insufficient to flag this issue. Differential revision: https://reviews.llvm.org/D39507 llvm-svn: 317349
* The patch fixes PR35131Evgeny Stupachenko2017-11-031-3/+3
| | | | | | | | | | | | | Summary: Fix a misprint which led to false CTLZ recognition. Reviewers: craig.topper Differential Revision: https://reviews.llvm.org/D39585 From: Evgeny Stupachenko <evstupac@gmail.com> llvm-svn: 317348
* Revert "Rename fields of ompt_frame_t"Jonas Hahnfeld2017-11-0310-101/+106
| | | | | | This reverts commit r317338 which discarded some recent commits. llvm-svn: 317347
* Revert "Updating implementation of OMPT as specified in OpenMP 5.0 Preview 2 ↵Jonas Hahnfeld2017-11-0325-251/+396
| | | | | | | | (TR6)" This reverts commit r317339 which discarded some recent commits. llvm-svn: 317346
* Revert "Invoke salvageDebugInfo from CodeGenPrepare's SinkCast()"Adrian Prantl2017-11-033-120/+1
| | | | | | This reverts commit 317342 while investigating bot breakage. llvm-svn: 317345
* Move Extract.cpp that wasn't moved in r317343Alex Lorenz2017-11-031-0/+0
| | | | llvm-svn: 317344
* [refactor][extract] insert semicolons into extracted/inserted codeAlex Lorenz2017-11-039-22/+450
| | | | | | | | | | | | | | | | | | when needed This commit implements the semicolon insertion logic into the extract refactoring. The following rules are used: - extracting expression: add terminating ';' to the extracted function. - extracting statements that don't require terminating ';' (e.g. switch): add terminating ';' to the callee. - extracting statements with ';': move (if possible) the original ';' from the callee and add terminating ';'. - otherwise, add ';' to both places. Differential Revision: https://reviews.llvm.org/D39441 llvm-svn: 317343
* [CodeGen] Remove unnecessary semicolons to fix a warning. NFCCraig Topper2017-11-031-2/+2
| | | | llvm-svn: 317342
* [X86] Initialize Type and Subtype in getHostCPUName to 0.Craig Topper2017-11-031-2/+2
| | | | llvm-svn: 317341
* Invoke salvageDebugInfo from CodeGenPrepare's SinkCast()Adrian Prantl2017-11-033-1/+120
| | | | | | | | This preserves the debug info for the cast operation in the original location. rdar://problem/33460652 llvm-svn: 317340
* Updating implementation of OMPT as specified in OpenMP 5.0 Preview 2 (TR6)Joachim Protze2017-11-0325-396/+251
| | | | | | | | | | | The TR6 document is expected to be publically released around November 15. This patch does not implement OMPT for libomptarget. Patch by Simon Convent and Joachim Protze Differential Revision: https://reviews.llvm.org/D39182 llvm-svn: 317339
* Rename fields of ompt_frame_tJoachim Protze2017-11-0310-106/+101
| | | | | | | | | | This is part of the renaming of data types from OpenMP TR4 to TR6 Patch by Simon Convent Differential Revision: https://reviews.llvm.org/D39326 llvm-svn: 317338
* [Driver] Add Scudo as a possible -fsanitize= optionKostya Kortchinsky2017-11-038-16/+101
| | | | | | | | | | | | | | | | | | | | | | Summary: This change adds Scudo as a possible Sanitizer option via -fsanitize=. This allows for easier static & shared linking of the Scudo library, it allows us to enforce PIE (otherwise the security of the allocator is moot), and check for incompatible Sanitizers combo. In its current form, Scudo is not compatible with any other Sanitizer, but the plan is to make it work in conjunction with UBsan (-fsanitize=scudo,undefined), which will require additional work outside of the scope of this change. Reviewers: eugenis, kcc, alekseyshl Reviewed By: eugenis, alekseyshl Subscribers: llvm-commits, srhines Differential Revision: https://reviews.llvm.org/D39334 llvm-svn: 317337
* [CodeGen] add libcall attr tests to show errno-related diffs; NFCSanjay Patel2017-11-031-0/+732
| | | | | | See rL317220 for the builtin siblings. llvm-svn: 317336
OpenPOWER on IntegriCloud