summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Remove __config module to avoid #include cycle when libc headers include ↵Richard Smith2015-10-131-1/+5
| | | | | | libc++'s <foo.h> headers. llvm-svn: 250236
* [libcxx] Capture configuration information when installing the libc++ headersEric Fiselier2015-10-136-7/+173
| | | | | | | | | | | | | | | | | Summary: Hi all, This patch is a successor to D11963. However it has changed dramatically and I felt it would be best to start a new review thread. Please read the design documentation added in this patch for a description of how it works. Reviewers: mclow.lists, danalbert, jroelofs, EricWF Subscribers: vkalintiris, rnk, ed, espositofulvio, asl, eugenis, cfe-commits Differential Revision: http://reviews.llvm.org/D13407 llvm-svn: 250235
* [InlineFunction] Correctly inline TerminatePadInstDavid Majnemer2015-10-132-5/+64
| | | | | | | | | | | We forgot to append the terminatepad's arguments which resulted in us treating the old terminatepad as an argument to the new terminatepad causing us to crash immediately. Instead, add the old terminatepad's arguments to the new terminatepad. This fixes PR25155. llvm-svn: 250234
* [WebAssembly] Remove a TODO comment which is no longer needed. NFC.Dan Gohman2015-10-131-7/+0
| | | | llvm-svn: 250233
* [uselistorder] Insert blank line, NFCVedant Kumar2015-10-131-0/+1
| | | | llvm-svn: 250231
* [ELF2/PPC64] Fix the TOC save in the .plt stubHal Finkel2015-10-132-2/+9
| | | | | | | The comment was right, but the encoding was wrong (and, it seems, I forgot a test case for the .plt stub). llvm-svn: 250230
* [ELF2] Don't allocate entry for DT_SYMBOLIC.Davide Italiano2015-10-131-3/+0
| | | | | | | This fixes an oversight from my previous commit. Reported by Rafael Espindola! llvm-svn: 250229
* Fix layering violation: Analysis should not include headers from TransformsRichard Smith2015-10-131-2/+2
| | | | | | (and in this case isn't even using anything from those headers). llvm-svn: 250228
* ELF2: Add a note about performance.Rui Ueyama2015-10-131-0/+7
| | | | llvm-svn: 250227
* [ELF2] Add support for -Bsymbolic.Davide Italiano2015-10-135-8/+20
| | | | llvm-svn: 250225
* Typo.Chad Rosier2015-10-131-1/+1
| | | | llvm-svn: 250224
* [ELF2/Linkerscript] Skip semicolon in linker directives parsing.Davide Italiano2015-10-132-0/+10
| | | | | | | | | The documentation says: "You may separate commands using semicolons", so they seem to be optional. Differential Revision: http://reviews.llvm.org/D13703 llvm-svn: 250223
* Tweak to r250117 and change to use ErrorOr and drop isSizeValid forKevin Enderby2015-10-133-26/+13
| | | | | | | | | | ArchiveMemberHeader, suggestion by Rafael Espíndola. Also The clang-x86-win2008-selfhost bot still does not like the malformed-machos 00000031.a test, so removing it for now. All the other bots are fine with it however. llvm-svn: 250222
* Exposing an existing checker under the name cert-err61-cpp, as it ↵Aaron Ballman2015-10-131-0/+3
| | | | | | corresponds to the CERT C++ secure coding rule: https://www.securecoding.cert.org/confluence/display/cplusplus/ERR61-CPP.+Catch+exceptions+by+lvalue+reference llvm-svn: 250221
* [ELF2/PPC64] Fix the end-of-buffer check for TOC restorationHal Finkel2015-10-132-1/+11
| | | | | | | We'd miss the nop if it really did come right at the end of the buffer (nice off-by-one error). llvm-svn: 250220
* [WinEH] Add CoreCLR EH table emissionJoseph Tremoulet2015-10-133-3/+521
| | | | | | | | | | | | | | | | | | Summary: Emit the handler and clause locations immediately after the standard xdata. Clauses are emitted in the same order and format used to communiate them to the CLR Execution Engine. Add a lit test to verify correct table generation on a small but interesting example function. Reviewers: majnemer, andrew.w.kaylor, rnk Subscribers: pgavlin, AndyAyers, llvm-commits Differential Revision: http://reviews.llvm.org/D13451 llvm-svn: 250219
* AMDGPU: Remove implicit ilist iterator conversions, NFCDuncan P. N. Exon Smith2015-10-139-18/+17
| | | | | | | | | | | | | | | | | | One of the changes in lib/Target/AMDGPU/AMDGPUMCInstLower.cpp was a new one. Previously, bundle iterators and single-instruction iterators could be compared to each other (comparing on underlying pointers). I changed a comparison from using `MBB->end()` to using `MBB->instr_end()`, since both end iterators should point at the some place anyway. I don't think the implicit conversion between the two iterator types is a good idea since it's fairly easy to accidentally compare to the wrong thing (they aren't always end iterators). Otherwise I would have just added the conversion. Even with that, no there should be functionality change here. llvm-svn: 250218
* [tests] More testing for PHI-nodes in non-affine regionsTobias Grosser2015-10-132-0/+60
| | | | | | | | | | | | | We harden one test case by ensuring no additional stores may possibly be introduced between the stores we check for and the basic block terminator statements. We also add a test case for the situation where a value that is passed from a non-affine region to a PHI node does not dominate the exit of the non-affine region. This case has come up in patch reviews, so we make sure it is properly handled today and in the future. llvm-svn: 250217
* AArch64: Remove implicit ilist iterator conversions, NFCDuncan P. N. Exon Smith2015-10-136-15/+12
| | | | llvm-svn: 250216
* ELF2: Add comments.Rui Ueyama2015-10-135-4/+32
| | | | llvm-svn: 250215
* SelectionDAG: Remove implicit ilist iterator conversions, NFCDuncan P. N. Exon Smith2015-10-138-50/+50
| | | | llvm-svn: 250214
* Change PyFile_FromFile to use PyFile_FromFd when using Py3.Zachary Turner2015-10-131-5/+17
| | | | llvm-svn: 250213
* [ELF2] Simplify the NOBITS sorting logicHal Finkel2015-10-131-3/+4
| | | | | | | As Rafael suggested in his review of r250190, we can simplify this by writing it like the earlier checks. llvm-svn: 250212
* Scalar: Remove remaining ilist iterator implicit conversionsDuncan P. N. Exon Smith2015-10-1327-240/+240
| | | | | | | | | | | | | | | | | | | Remove remaining `ilist_iterator` implicit conversions from LLVMScalarOpts. This change exposed some scary behaviour in lib/Transforms/Scalar/SCCP.cpp around line 1770. This patch changes a call from `Function::begin()` to `&Function::front()`, since the return was immediately being passed into another function that takes a `Function*`. `Function::front()` started to assert, since the function was empty. Note that `Function::end()` does not point at a legal `Function*` -- it points at an `ilist_half_node` -- so the other function was getting garbage before. (I added the missing check for `Function::isDeclaration()`.) Otherwise, no functionality change intended. llvm-svn: 250211
* [ELF2] Drop unnecessary lld flags from test/elf2/ppc64-toc-restore.sHal Finkel2015-10-131-1/+1
| | | | | | | As Rafael pointed out in his review of r250110, -dynamic-linker, -rpath and --export-dynamic are unnecessary. llvm-svn: 250210
* [ELF2] Only call getPPC64SectionRank for EM_PPC64 filesHal Finkel2015-10-131-1/+7
| | | | | | | | Suggested by Rafael in his review of r250100. As Rafael points out, this may grow into a switch in the future, but regardless, calling this on files for other architectures is unnecessary. llvm-svn: 250209
* Update README.Rui Ueyama2015-10-131-1/+2
| | | | llvm-svn: 250208
* [AArch64] Check the size of the vector before accessing its elements.Akira Hatanaka2015-10-132-1/+10
| | | | | | | | This fixes an assert in AArch64AsmParser::MatchAndEmitInstruction. rdar://problem/23081753 llvm-svn: 250207
* [ELF2] Fixup comment about section sorting requirementsHal Finkel2015-10-131-1/+1
| | | | | | | As Rafael pointed out in his review of r250100, the NOBITS check is no longer the last requirement. llvm-svn: 250206
* Revert: "Re: [lld] r249752 - Revert: r249728 - Roll back r249726 and r249723 ↵Hal Finkel2015-10-1313-104/+97
| | | | | | | | | because they broke buildbots." This has turned out to be unnecessary, and while some ability to set VAStart will be needed at some point, this is not clearly the right direction. llvm-svn: 250205
* Update the branch weight metadata in JumpThreading pass.Cong Hou2015-10-136-5/+184
| | | | | | | | Currently in JumpThreading pass, the branch weight metadata is not updated after CFG modification. Consider the jump threading on PredBB, BB, and SuccBB. After jump threading, the weight on BB->SuccBB should be adjusted as some of it is contributed by the edge PredBB->BB, which doesn't exist anymore. This patch tries to update the edge weight in metadata on BB->SuccBB by scaling it by 1 - Freq(PredBB->BB) / Freq(BB->SuccBB). Differential revision: http://reviews.llvm.org/D10979 llvm-svn: 250204
* Move the adc-builtins test to the pattern of the other builtinsEric Christopher2015-10-131-1/+3
| | | | | | tests by predefining _MM_MALLOC_H rather than use -ffreestanding. llvm-svn: 250203
* Add subtarget feature support for 3dnowa to the 3dnowa intrinsics.Eric Christopher2015-10-131-0/+4
| | | | llvm-svn: 250202
* [PGO]: Eliminate calls to __llvm_profile_register_function for Linux.Xinliang David Li2015-10-133-1/+50
| | | | | | | | | On Linux, the profile runtime can use __start_SECTNAME and __stop_SECTNAME symbols defined by the linker to locate the start and end location of a named section (with C name). This eliminates the need for instrumented binary to call __llvm_profile_register_function during start-up time. llvm-svn: 250200
* [PGO]: Eliminate calls to __llvm_profile_register_function for Linux.Xinliang David Li2015-10-132-4/+10
| | | | | | | | | On Linux, the profile runtime can use __start_SECTNAME and __stop_SECTNAME symbols defined by the linker to locate the start and end location of a named section (with C name). This eliminates the need for instrumented binary to call __llvm_profile_register_function during start-up time. llvm-svn: 250199
* Detect final task in GOMP interface.Jonathan Peyton2015-10-131-0/+4
| | | | llvm-svn: 250198
* Scalar: Remove some implicit ilist iterator conversions, NFCDuncan P. N. Exon Smith2015-10-1310-61/+62
| | | | | | | Remove some of the implicit ilist iterator conversions in LLVMScalarOpts. More to go. llvm-svn: 250197
* [CMake] When building clang as an external project we should pass through ↵Chris Bieneman2015-10-131-0/+11
| | | | | | all variables that start with COMPILER_RT llvm-svn: 250196
* Fix ref counting of Python objects.Zachary Turner2015-10-135-813/+753
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PythonObjects were being incorrectly ref-counted. This problem was pervasive throughout the codebase, leading to an unknown number of memory leaks and potentially use-after-free. The issue stems from the fact that Python native methods can either return "borrowed" references or "owned" references. For the former category, you *must* incref it prior to decrefing it. And for the latter category, you should not incref it before decrefing it. This is mostly an issue when a Python C API method returns a `PyObject` to you, but it can also happen with a method accepts a `PyObject`. Notably, this happens in `PyList_SetItem`, which is documented to "steal" the reference that you give it. So if you pass something to `PyList_SetItem`, you cannot hold onto it unless you incref it first. But since this is one of only two exceptions in the entire API, it's confusing and difficult to remember. Our `PythonObject` class was indiscriminantely increfing every object it received, which means that if you passed it an owned reference, you now have a dangling reference since owned references should not be increfed. We were doing this in quite a few places. There was also a fair amount of manual increfing and decrefing prevalent throughout the codebase, which is easy to get wrong. This patch solves the problem by making any construction of a `PythonObject` from a `PyObject` take a flag which indicates whether it is an owned reference or a borrowed reference. There is no way to construct a `PythonObject` without this flag, and it does not offer a default value, forcing the user to make an explicit decision every time. All manual uses of `PyObject` have been cleaned up throughout the codebase and replaced with `PythonObject` in order to make RAII the predominant pattern when dealing with native Python objects. Differential Revision: http://reviews.llvm.org/D13617 Reviewed By: Greg Clayton llvm-svn: 250195
* Updating the documentation for the ↵Aaron Ballman2015-10-131-2/+13
| | | | | | | | readability-inconsistent-declaration-parameter-name checker. Patch by Piotr Dziwinski. llvm-svn: 250194
* ExecutionEngine: Remove implicit ilist iterator conversions, NFCDuncan P. N. Exon Smith2015-10-131-5/+4
| | | | llvm-svn: 250193
* OrcJIT: Remove implicit ilist iterator conversions, NFCDuncan P. N. Exon Smith2015-10-131-1/+1
| | | | llvm-svn: 250192
* ELF2: Avoid using "finalize" as a function name.Rui Ueyama2015-10-133-9/+10
| | | | | | | | | "finalize" does not give a hint about what that function is actually going to do. This patch make it more specific by renaming scanShlibUndefined. Also add a comment that we basically ignore undefined symbols in DSOs except this function. llvm-svn: 250191
* [ELF2] Ensure strict weak ordering in section sorting (v2)Hal Finkel2015-10-131-2/+3
| | | | | | | | | | | | The fix in r250109 to ensure a strict weak ordering in the section sorting was a bit overzealous. We only use the NOBITS comparison if either A or B is a NOBITS section. Otherwise, we fall through to the target-specific ranking function. Failure to do this causes the sorting to fail in cases where, for example, a .dynamic section happens to end up in between .got and .toc, etc. in the initial ordering (.dynamic has a type SHT_DYNAMIC, compared to SHT_PROGBITS or SHT_NOBITS). llvm-svn: 250190
* Xfail a watchpoint test on Windows, until Windows implements watchpoints.Adrian McCarthy2015-10-131-0/+1
| | | | llvm-svn: 250189
* Fix TestTargetAPI.py test for users who use Swig 3.0.5 or greater.Adrian McCarthy2015-10-132-0/+5
| | | | | DifferentialRevision: http://reviews.llvm.org/D13679 llvm-svn: 250188
* IPO: Remove implicit ilist iterator conversions, NFCDuncan P. N. Exon Smith2015-10-1313-99/+97
| | | | llvm-svn: 250187
* Instrumentation: Remove ilist iterator implicit conversions, NFCDuncan P. N. Exon Smith2015-10-139-57/+59
| | | | llvm-svn: 250186
* Interpreter: Remove implicit ilist iterator conversions, NFCDuncan P. N. Exon Smith2015-10-131-2/+2
| | | | llvm-svn: 250185
* The issue with the malformed-machos 00000031.a test is that it needed ↵Kevin Enderby2015-10-131-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ‘-arch x86_64’ flag as it was a Mach-O universal file. The default as to which architecture slice that is dumped without an -arch flag depends on the host architecture and the contents of the universal file. The malformed archive 00000031.a file has both an x86_64 and i386 slice. So for for x86_64 hosts only that slice is dumped, for non-x86_64 hosts, which is many of the bots both slices are dumped. The test is intended to only check that the malformation of the x86_64 which has a non-decimal characters in the size field of the archive header so it no longer crashes. The problem turned out that the i388 slice of the malformed archive had a different malformation which was causing the non-x86_64 bots to get this error: llvm-objdump -macho -disassemble -arch i386 00000031.a Archive : .00000031.a 00000031.a(c_start.o): LLVM ERROR: Symbol name entry points before beginning or past end of file. and causing the test as it was written to fail. So by adding ‘-arch x86_64’ it should correct the test and the malformation on the i388 slice will not be dumped. Also the removal of the malformed-machos mem-crup-0261.macho was not causing the issue so that is put back in. Sorry for the churn on these tests, Kev llvm-svn: 250184
OpenPOWER on IntegriCloud