summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Don't overflow GCTableFilipe Cabecinhas2015-04-303-1/+6
| | | | | | | | | | | | Summary: Bug found with AFL fuzz. Reviewers: rafael, dexonsmith Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D9361 llvm-svn: 236200
* Semantically revert r236031, which is not a good idea for in-order targets.Owen Anderson2015-04-302-73/+0
| | | | | | | | | | | | At the least it should be guarded by some kind of target hook. It also introduced catastrophic compile time and code quality regressions on some out of tree targets (test case still being reduced/sanitized). Sanjay agreed with reverting this patch until these issues can be resolved. llvm-svn: 236199
* [OPENMP] Fixed codegen for 'copyprivate' clause.Alexey Bataev2015-04-303-9/+10
| | | | | | Fixed initialization of 'single' region completion + changed type of the third argument of __kmpc_copyprivate() runtime function to size_t. llvm-svn: 236198
* Remove dead code: a MacroDirective can't be imported or ambiguous any more.Richard Smith2015-04-307-140/+14
| | | | llvm-svn: 236197
* XFAIL test/CodeGen/Generic/MachineBranchProb.ll on Hexagon (PR23377)Hans Wennborg2015-04-301-1/+2
| | | | llvm-svn: 236196
* [UBSan] Make stacktrace-matching CHECK-lines in tests Linux-specific.Alexey Samsonov2015-04-302-16/+12
| | | | | | | Darwin doesn't yet allow to print stack trace, as it lacks the slow unwinder. This is one more attempt to fix vptr.cpp on Mac OS X. llvm-svn: 236195
* Remove XFAIL now that this test passes (fixed by r236184).Richard Smith2015-04-301-1/+0
| | | | llvm-svn: 236194
* Make sure Op->getType() is a PointerType before we cast<> it.Filipe Cabecinhas2015-04-303-0/+7
| | | | | | Bug found with AFL fuzz. llvm-svn: 236193
* Switch lowering: use profile info to build weight-balanced binary search treesHans Wennborg2015-04-303-8/+157
| | | | | | | | | | | | | | This will cause hot nodes to appear closer to the root. The literature says building the tree like this makes it a near-optimal (in terms of search time given key frequencies) binary search tree. In LLVM's case, we can do up to 3 comparisons in each leaf node, so it might be better to opt for lower tree height in some cases; that's something to look into in the future. Differential Revision: http://reviews.llvm.org/D9318 llvm-svn: 236192
* Fix use of uninitialized variable, found by ubsan selfhost.Richard Smith2015-04-301-1/+1
| | | | llvm-svn: 236191
* Make sure we don't resize(0) when we get a fwdref with Idx == UINT_MAXFilipe Cabecinhas2015-04-303-0/+9
| | | | | | | | Make it an error instead. Bug found with AFL fuzz. llvm-svn: 236190
* Store relocations in a map from MCSectionELF.Rafael Espindola2015-04-301-25/+21
| | | | | | Saves finding the MCSectionData just to do a map lookup. llvm-svn: 236189
* Use a more reliable method to determine whetherSean Callanan2015-04-301-2/+1
| | | | | | | | | a FileID corresponds to a real file or to a memory buffer. The old method didn't work when Clang was built Release, which meant it wasn't a very good method at all. llvm-svn: 236188
* Write relocations directly to the output stream. NFC.Rafael Espindola2015-04-301-46/+29
| | | | llvm-svn: 236187
* Flip r236172 testcase RUN option ordering for BSD sed(1). NFC.Ahmed Bougacha2015-04-301-1/+1
| | | | llvm-svn: 236186
* Add CMAKE_EXECUTABLE_SUFFIX to build with Android toolchain on Windows.Chaoren Lin2015-04-291-11/+16
| | | | | | | | | | Reviewers: vharron, zturner, flackr Subscribers: tberghammer, lldb-commits Differential Revision: http://reviews.llvm.org/D9177 llvm-svn: 236185
* Update clang/test/CodeGenCXX/copy-constructor-synthesis-2.cpp to pass for ↵NAKAMURA Takumi2015-04-291-3/+3
| | | | | | | | targeting i686. r236155 missed the suffix in "@llvm.memcpy.p0i8.p0i8.i32". llvm-svn: 236184
* Change x86 CMOVE_F to read it source, not write it.Pete Cooper2015-04-292-8/+23
| | | | | | | | | | This was breaking sqlite with the machine verifier because operand 0 was a def according to tablegen, but didn't have the 'isDef' flag set. Looking at the ISA, its clear that this operand is a source as writing to st(0) is implicit. So move the operand to the correct place in the td file. rdar://problem/20751584 llvm-svn: 236183
* Fix build after Clang API change in r236176.Richard Smith2015-04-291-11/+4
| | | | llvm-svn: 236182
* Add an assert to get information on buildbot failure.Richard Smith2015-04-291-0/+1
| | | | llvm-svn: 236181
* Fix doxygen comment typo. NFCJonathan Roelofs2015-04-291-2/+2
| | | | llvm-svn: 236180
* Propagate a terrible hack to the sparc target feature handling codeEric Christopher2015-04-292-3/+9
| | | | | | | | | by erasing the soft-float target feature if the rest of the front end added it because of defaults or the soft float option. Add some testing for some of the targets that implement this hack. llvm-svn: 236179
* Fix unused variable warning.Richard Smith2015-04-291-1/+1
| | | | llvm-svn: 236178
* Fix build broken by r236174.Zachary Turner2015-04-291-4/+4
| | | | | | Apparently va_list is literally a char* on Windows. llvm-svn: 236177
* [modules] Stop trying to fake up a linear MacroDirective history.Richard Smith2015-04-2931-493/+309
| | | | | | | | | | | | | | Modules builds fundamentally have a non-linear macro history. In the interest of better source fidelity, represent the macro definition information faithfully: we have a linear macro directive history within each module, and at any point we have a unique "latest" local macro directive and a collection of visible imported directives. This also removes the attendent complexity of attempting to create a correct MacroDirective history (which we got wrong in the general case). No functionality change intended. llvm-svn: 236176
* [opaque pointer type] Store the value type of an allocaDavid Blaikie2015-04-293-11/+17
| | | | llvm-svn: 236175
* Introduce a NullLog class, which ignores all messages.Zachary Turner2015-04-295-197/+279
| | | | | | | | | | | | | | | | The purpose of this class is so that GetLogIfAllCategoriesSet can always return an instance of some class, whether it be a real logging class or a "null" class, which ignores messages. Code that is littered with if statements that only log if the pointer is non-null can get very unwieldy very quickly, so this should help code readability in such circumstances. Since I'm in this code anyway, I'm also deleting the PrintfWithFlags methods, as well as all the flags, since they appear to be dead code that have been superceded by newer mechanisms and all the flags are simply ignored. llvm-svn: 236174
* XFAIL Hexagon until more codegen in place.Rick Foos2015-04-292-0/+2
| | | | | | | | | | | | | | | | | | Summary: Hexagon is being updated, but there is not enough to pass these tests. These sections are now on top of Colin's list. Test Plan: Ran changes on hexagon-build-03. Reviewers: colinl, rfoos Reviewed By: rfoos Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D9356 llvm-svn: 236173
* [WinEH] Start EH preparation for 32-bit x86, it uses no argumentsReid Kleckner2015-04-295-55/+108
| | | | | | | | | | | | | | | | | | 32-bit x86 MSVC-style exceptions are functionaly similar to 64-bit, but they take no arguments. Instead, they implicitly use the value of EBP passed in by the caller as a pointer to the parent's frame. In LLVM, we can represent this as llvm.frameaddress(1), and feed that into all of our calls to llvm.framerecover. The next steps are: - Add an alloca to the fs:00 linked list of handlers - Add something like llvm.sjlj.lsda or generalize it to store in the alloca - Move state number calculation to WinEHPrepare, arrange for FunctionLoweringInfo to call it - Use the state numbers to insert explicit loads and stores in the IR llvm-svn: 236172
* generalize binop reassociation; NFCSanjay Patel2015-04-291-17/+30
| | | | | | | | | | | | | Move the fold introduced in r236031: http://reviews.llvm.org/rL236031 to its own helper function, so we can use it for other binops. This is a preliminary step before partially solving: https://llvm.org/bugs/show_bug.cgi?id=21768 https://llvm.org/bugs/show_bug.cgi?id=23116 llvm-svn: 236171
* Don't force a vendor check in ProcessMachCore::CanDebug() -- if thisJason Molenda2015-04-291-7/+3
| | | | | | | | is a Mach-O file and it is a Mach-O core file, activate the ProcessMachCore plugin. <rdar://problem/20739989> llvm-svn: 236170
* Update to build sysv-arm/sysv-arm64/sblanguageinfo/registercontextlinux_arm64.Jason Molenda2015-04-291-0/+44
| | | | llvm-svn: 236169
* profile: Use unique directory for tests that write default profile fileJustin Bogner2015-04-292-0/+37
| | | | | | | | | | | Fix a couple of new tests that were reverted because they were causing intermittent test failures since they were writing the same default "default.profraw" file. Fixed by creating a unique directory and running tests in that directory. Patch by Teresa Johnson. Thanks! llvm-svn: 236168
* Revert r236128, LLVM isn't falling back in the right wayReid Kleckner2015-04-298-278/+153
| | | | llvm-svn: 236167
* Run StatepointLowering.{cpp,h} through clang-format.Pat Gavlin2015-04-292-39/+28
| | | | llvm-svn: 236166
* [UBSan] Disable vptr.cpp on Darwin again.Alexey Samsonov2015-04-291-0/+3
| | | | llvm-svn: 236165
* [NFC] Updating FileCheck to reduce the std::vector interface used via cl::list.Chris Bieneman2015-04-291-6/+8
| | | | llvm-svn: 236164
* [NFC] Converting to range-based for.Chris Bieneman2015-04-291-2/+1
| | | | llvm-svn: 236163
* [opaque pointer type] update for LLVM API changeDavid Blaikie2015-04-295-11/+10
| | | | llvm-svn: 236161
* [opaque pointer type] Pass GlobalAlias the actual pointer type rather than ↵David Blaikie2015-04-2912-59/+41
| | | | | | | | | | | | | decomposing it into pointee type + address space Many of the callers already have the pointer type anyway, and for the couple of callers that don't it's pretty easy to call PointerType::get on the pointee type and address space. This avoids LLParser from using PointerType::getElementType when parsing GlobalAliases from IR. llvm-svn: 236160
* Revert r236060, it caused PR23375.Nico Weber2015-04-291-1/+23
| | | | llvm-svn: 236159
* Inline FragmentWriter into the only user.Rafael Espindola2015-04-291-18/+4
| | | | llvm-svn: 236158
* Write the symbol table directly to the output file.Rafael Espindola2015-04-291-79/+85
| | | | | | There is no need to first accumulate it in fragments. llvm-svn: 236157
* tidy up; NFCSanjay Patel2015-04-291-41/+28
| | | | llvm-svn: 236156
* Stop assuming a 64-bit target here.Richard Smith2015-04-291-3/+3
| | | | llvm-svn: 236155
* Make the .eh_frame_hdr code work on FreeBSD as well.Ed Schouten2015-04-291-1/+8
| | | | | | | | | | | | | | | We currently only include <link.h> on CloudABI and Linux. We can enable it on FreeBSD as well, as it also supports the dl_iterate_phdr() function that's provided by <link.h>. FreeBSD, however, does not provide the ElfW() macro. Instead, the host-specific ELF datastructures are named just Elf_XXX in addition to the host-independent Elf32_XXX and Elf64_XXX types. Differential Revision: http://reviews.llvm.org/D8169 Approved by: emaste llvm-svn: 236154
* Use pwrite to write the number of sections.Rafael Espindola2015-04-291-10/+15
| | | | | | | This avoids having to compute the number upfront, which will be used in the next patch. llvm-svn: 236153
* [UBSan] Various improvements to vptr.cpp test caseAlexey Samsonov2015-04-291-29/+26
| | | | | | | | | * Remove __ubsan_default_options, so that test would work on Darwin * Fix unintentional undefined behavior in the code (missing return) * Build the test with -fno-sanitize-recover to distinguish expected failures and expected passes by return code. llvm-svn: 236152
* [UBSan] Add a testcase for __ubsan_default_options() function.Alexey Samsonov2015-04-291-0/+18
| | | | llvm-svn: 236151
* too much space again; NFCSanjay Patel2015-04-291-4/+0
| | | | llvm-svn: 236150
OpenPOWER on IntegriCloud