summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* JIT support has been added awhile ago.Brad Smith2014-08-301-2/+0
| | | | llvm-svn: 216819
* Fix AddAliasScopeMetadata to not add scopes when deriving from unknown pointersHal Finkel2014-08-302-30/+56
| | | | | | | | | | | | | | | | | | | | | | | The previous implementation of AddAliasScopeMetadata, which adds noalias metadata to preserve noalias parameter attribute information when inlining had a flaw: it would add alias.scope metadata to accesses which might have been derived from pointers other than noalias function parameters. This was incorrect because even some access known not to alias with all noalias function parameters could easily alias with an access derived from some other pointer. Instead, when deriving from some unknown pointer, we cannot add alias.scope metadata at all. This fixes a miscompile of the test-suite's tramp3d-v4. Furthermore, we cannot add alias.scope to functions unless we know they access only argument-derived pointers (currently, we know this only for memory intrinsics). Also, we fix a theoretical problem with using the NoCapture attribute to skip the capture check. This is incorrect (as explained in the comment added), but would not matter in any code generated by Clang because we get only inferred nocapture attributes in Clang-generated IR. This functionality is not yet enabled by default. llvm-svn: 216818
* InstCombine: Respect recursion depth in visitUDivOperandDavid Majnemer2014-08-301-4/+4
| | | | llvm-svn: 216817
* Always pipe in test filesTobias Grosser2014-08-3055-55/+55
| | | | | | | | | In Polly we used to have a mix of test cases, some that used 'opt %s' and others that used 'opt < %s'. We now change all to use 'opt < %s'. Piping in test files is preferable as it does prevent temporary files to be written to disk. This brings us in line with what is usus in LLVM. llvm-svn: 216816
* Replace %defaultOpts with explicit pass namesTobias Grosser2014-08-30105-121/+120
| | | | | | | | | | | | | | | | | | | | This replaces the use of %defaultOpts = '-basicaa -polly-prepare' with the minimal set of passes necessary for a test to succeed. Of the test cases that previously used %defaultOpts 76 test cases require none of these passes, 42 need -basicaa and only 2 need -polly-prepare. Our change makes this requirement explicit. In Polly many test cases have been using a macro '%defaultOpts' which run a couple of preparing passes before the actual Polly test case. This macro was introduced very early in the development of Polly and originally contained a large set of canonicalization passes. However, as the need for additional canonicalization passes makes test cases harder to understand and also more fragile in terms of changes in such passes, we aim since a longer time to only include the minimal set of passes necessary. This patch removes the last leftovers from of %defaultOpts and brings our tests cases more in line to what is usus in LLVM itself. llvm-svn: 216815
* InstCombine: Try harder to combine icmp instructionsDavid Majnemer2014-08-302-4/+38
| | | | | | | | | | | | | consider: (and (icmp X, Y), (and Z, (icmp A, B))) It may be possible to combine (icmp X, Y) with (icmp A, B). If we successfully combine, create an 'and' instruction with Z. This fixes PR20814. N.B. There is room for improvement after this change but I'm not convinced it's worth chasing yet. llvm-svn: 216814
* Revert r216805 "[MachineCombiner][AArch64] Use the correct register class ↵Juergen Ributzka2014-08-302-139/+73
| | | | | | | | for MADD, SUB, and OR." I think this broke the build bot. Reverting it for now until I have time to take a closer look. llvm-svn: 216813
* Fixed a build problem when there were headersSean Callanan2014-08-301-2/+2
| | | | | | | for a different LLVM present in the system header lookup path. llvm-svn: 216812
* Add missing const to StringRef.copy()Nick Kledzik2014-08-301-1/+1
| | | | llvm-svn: 216811
* Fixed a build problem dueo to changes in theSean Callanan2014-08-301-1/+1
| | | | | | | way ownership of memory buffers is handled in clang's SourceManager. llvm-svn: 216810
* Fix typo and formattingNick Kledzik2014-08-301-3/+3
| | | | llvm-svn: 216809
* Object/llvm-objdump: allow dumping of mach-o exports trieNick Kledzik2014-08-308-7/+397
| | | | | | | | | | | | | | | | | | MachOObjectFile in lib/Object currently has no support for parsing the rebase, binding, and export information from the LC_DYLD_INFO load command in final linked mach-o images. This patch adds support for parsing the exports trie data structure. It also adds an option to llvm-objdump to dump that export info. I did the exports parsing first because it is the hardest. The information is encoded in a trie structure, but the standard ObjectFile way to inspect content is through iterators. So I needed to make an iterator that would do a non-recursive walk through the trie and maintain the concatenation of edges needed for the current string prefix. I plan to add similar support in MachOObjectFile and llvm-objdump to parse/display the rebasing and binding info too. llvm-svn: 216808
* Cleanup test.Rafael Espindola2014-08-301-21/+31
| | | | | | This should make it easier to add more tests to this file. llvm-svn: 216807
* [modules] Fix deserialization cycle when loading a tag declaration with a ↵Richard Smith2014-08-305-59/+96
| | | | | | typedef name for linkage purposes. When loading the type, delay loading its typedef until we've finished loading and merging the type. In its place, save out the name of the typedef, which we need for merging purposes. llvm-svn: 216806
* [MachineCombiner][AArch64] Use the correct register class for MADD, SUB, and OR.Juergen Ributzka2014-08-292-73/+139
| | | | | | | | | | Select the correct register class for the various instructions that are generated when combining instructions and constrain the registers to the appropriate register class. This fixes rdar://problem/18183707. llvm-svn: 216805
* [FastISel][AArch64] Use the correct register class for branches.Juergen Ributzka2014-08-292-7/+24
| | | | | | | | Also constrain the register class for branches. This fixes rdar://problem/18181496. llvm-svn: 216804
* [MachineSinking] Clear kill flag of all operands at all their uses.Juergen Ributzka2014-08-292-3/+40
| | | | | | | | | | | | | | | | | | | | | | | When sinking an instruction it might be moved past the original last use of one of its operands. This last use has the kill flag set and the verifier will obviously complain about this. Before Machine Sinking (AArch64): %vreg3<def> = ASRVXr %vreg1, %vreg2<kill> %XZR<def> = SUBSXrs %vreg4, %vreg1<kill>, 160, %NZCV<imp-def> ... After Machine Sinking: %XZR<def> = SUBSXrs %vreg4, %vreg1<kill>, 160, %NZCV<imp-def> ... %vreg3<def> = ASRVXr %vreg1, %vreg2<kill> This fix clears all the kill flags in all instruction that use the same operands as the instruction that is being sunk. This fixes rdar://problem/18180996. llvm-svn: 216803
* Cleanup the test a bit. It was too dependent on the output order.Rafael Espindola2014-08-291-180/+176
| | | | llvm-svn: 216802
* [MCJIT] Move endian-aware read/writes from RuntimeDyldMachO intoLang Hames2014-08-298-57/+46
| | | | | | | | | RuntimeDyldImpl. These are platform independent, and moving them to the base class allows RuntimeDyldChecker to use them too. llvm-svn: 216801
* Debug info: Only emit C++ accessibility specifiers when they are divergingAdrian Prantl2014-08-2911-61/+113
| | | | | | | | from the default for the containing type. rdar://problem/18154959 llvm-svn: 216800
* Debug info: Add a new explicit DIDescriptor flag for the "public" accessAdrian Prantl2014-08-298-20/+194
| | | | | | | | | | specifier and change the default behavior to only emit the DW_AT_accessibility(public) attribute when the isPublic() is explicitly set. rdar://problem/18154959 llvm-svn: 216799
* Comment only: Annotate loop as per mailing list discussionJean-Luc Duprat2014-08-291-0/+3
| | | | llvm-svn: 216798
* Make isValidMCLOHType take unsigned instead of enum to avoid loading invalid ↵Alexey Samsonov2014-08-292-4/+3
| | | | | | enum values llvm-svn: 216797
* Add some missing test coverage for merging 'extern "C"' functions with modules.Richard Smith2014-08-295-0/+15
| | | | llvm-svn: 216796
* Next bit of support for llvm-objdump’s -private-headers for Mach-O files.Kevin Enderby2014-08-292-3/+587
| | | | | | | This adds the printing of the LC_SEGMENT load command and sections, LC_SYMTAB and LC_DYSYMTAB load commands. llvm-svn: 216795
* AArch64: Silence -Wabsolute-value warning with std::absReid Kleckner2014-08-291-1/+2
| | | | llvm-svn: 216794
* Speculative build fix for const, gcc, and ArrayRef overloadsReid Kleckner2014-08-291-3/+3
| | | | llvm-svn: 216793
* Revert accidentally committed patches r216787-r216789David Blaikie2014-08-292-29/+9
| | | | | | | | | | Rushed when I realized I hadn't committed the FreeDeleter for a clang change I'd committed, and didn't check that I had things lying around in my client. Apologies for the noise. llvm-svn: 216792
* Fix my broken test cases.Reid Kleckner2014-08-292-25/+5
| | | | llvm-svn: 216791
* Add a trivial functor for use with unique_ptrs managing memory that needs to ↵David Blaikie2014-08-291-0/+6
| | | | | | be freed rather than deleted. llvm-svn: 216790
* Omit DW_AT_artificial, DW_AT_external, and similar attributes under -gmltDavid Blaikie2014-08-291-0/+3
| | | | llvm-svn: 216789
* Omit dwarf::DW_AT_frame_base under -gmltDavid Blaikie2014-08-291-3/+6
| | | | llvm-svn: 216788
* StuffDavid Blaikie2014-08-291-6/+20
| | | | llvm-svn: 216787
* unique_ptrify PTHManager's PerIDCache using the newly added llvm::FreeDeleterDavid Blaikie2014-08-292-16/+15
| | | | llvm-svn: 216786
* unique_ptrify some parameters to PTHManager::PTHManagerDavid Blaikie2014-08-292-42/+45
| | | | | | | | | A couple of these arguments were passed by void* as a rather extreme example of pimpling. Adjusting this to a more classic form of the idiom (involving forward declarations) makes this more legible and allows explicit passing of ownership via std::unique_ptr. llvm-svn: 216785
* Fix typos in comments, NFCRobin Morisset2014-08-2925-28/+26
| | | | | | | | | | | | | | Summary: Just fixing comments, no functional change. Test Plan: N/A Reviewers: jfb Subscribers: mcrosier, llvm-commits Differential Revision: http://reviews.llvm.org/D5130 llvm-svn: 216784
* Fixup for r216763. Add a driver test.Anna Zaks2014-08-291-0/+1
| | | | llvm-svn: 216783
* Make all virtual member pointers use variadic musttail callsReid Kleckner2014-08-297-84/+224
| | | | | | | | | This avoids encoding information about the function prototype into the thunk at the cost of some function prototype bitcast gymnastics. Fixes PR20653. llvm-svn: 216782
* Add a const and munge some commentsReid Kleckner2014-08-292-4/+6
| | | | llvm-svn: 216781
* musttail: Forward regparms of variadic functions on x86_64Reid Kleckner2014-08-295-71/+288
| | | | | | | | | | | | | | | | | | | | | | Summary: If a variadic function body contains a musttail call, then we copy all of the remaining register parameters into virtual registers in the function prologue. We track the virtual registers through the function body, and add them as additional registers to pass to the call. Because this is all done in virtual registers, the register allocator usually gives us good code. If the function does a call, however, it will have to spill and reload all argument registers (ew). Forwarding regparms on x86_32 is not implemented because most compilers don't support varargs in 32-bit with regparms. Reviewers: majnemer Subscribers: aemerson, llvm-commits Differential Revision: http://reviews.llvm.org/D5060 llvm-svn: 216780
* Verifier: Don't reject varargs callee cleanup functionsReid Kleckner2014-08-294-12/+83
| | | | | | | | | | | | | | | | | | We've rejected these kinds of functions since r28405 in 2006 because it's impossible to lower the return of a callee cleanup varargs function. However there are lots of legal ways to leave such a function without returning, such as aborting. Today we can leave a function with a musttail call to another function with the correct prototype, and everything works out. I'm removing the verifier check declaring that a normal return from such a function is UB. Reviewed By: nlewycky Differential Revision: http://reviews.llvm.org/D5059 llvm-svn: 216779
* Fix for PR20660, where unexpanded parameter pack in function parameter ↵Larisse Voufo2014-08-293-7/+64
| | | | | | clause causes clang to crash. llvm-svn: 216778
* Add a comment, no functional change.Nico Weber2014-08-291-1/+1
| | | | llvm-svn: 216777
* Remove spurious mask operations from AArch64 add->compares on 16 and 8 bit ↵Louis Gerbarg2014-08-292-0/+532
| | | | | | | | | | | | | | | | | | | | | | | | | | values This patch checks for DAG patterns that are an add or a sub followed by a compare on 16 and 8 bit inputs. Since AArch64 does not support those types natively they are legalized into 32 bit values, which means that mask operations are inserted into the DAG to emulate overflow behaviour. In many cases those masks do not change the result of the processing and just introduce a dependent operation, often in the middle of a hot loop. This patch detects the relevent DAG patterns and then tests to see if the transforms are equivalent with and without the mask, removing the mask if possible. The exact mechanism of this patch was discusses in http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-July/074444.html There is a reasonably good chance there are missed oppurtunities due to similiar (but not identical) DAG patterns that could be funneled into this test, adding them should be simple if we see test cases. Tests included. rdar://13754426 llvm-svn: 216776
* X86: Fix conflict over ESI between base register and rep;movslReid Kleckner2014-08-293-6/+136
| | | | | | | | | | | | | | The new solution is to not use this lowering if there are any dynamic allocas in the current function. We know up front if there are dynamic allocas, but we don't know if we'll need to create stack temporaries with large alignment during lowering. Conservatively assume that we will need such temporaries. Reviewed By: hans Differential Revision: http://reviews.llvm.org/D5128 llvm-svn: 216775
* another typoSanjay Patel2014-08-291-1/+1
| | | | llvm-svn: 216774
* typoSanjay Patel2014-08-291-1/+1
| | | | llvm-svn: 216773
* [PECOFF] Fix AMD64_REL_[1-5] and AMD64_SECTION relocationsRui Ueyama2014-08-295-177/+84
| | | | | | | | | | | | | | | | | | | | | | | | I hope this is the last fix for x64 relocations as I've wasted a few days on this. This caused a mysterious issue that some C++ programs crash on startup. It was because a null pointer is passed as argv to main. __tmainCRTStartup calls main, but before that it calls all initialization routines between .text$xc_a and .text$xc_z. pre_cpp_init is one of such routines, and it is the one who initializes a heap pointer for argv for later use. That routine was not called for some reason. It turned out that __tmainCRTStartup was skipping a block of code because of the relocation bug. A condition in the function depends on a memory load, and that memory load was referring a wrong location. As a result a jump instruction took the wrong branch, skipping pre_cpp_init and so on. This patch fixes the issue. Also added more tests to fix them once and for all. llvm-svn: 216772
* Relax the constraint more in MemoryDependencyAnalysis.cppRobin Morisset2014-08-293-64/+147
| | | | | | | | Even loads/stores that have a stronger ordering than monotonic can be safe. The rule is no release-acquire pair on the path from the QueryInst, assuming that the QueryInst is not atomic itself. llvm-svn: 216771
* Fix a test broken by r216564.Todd Fiala2014-08-291-4/+6
| | | | | | | | | | | | | | llgs Linux is no longer doing the translation to some gdb fixed signal numbers. This change modifies the test method to take in the signo expected for a segfault. The debugserver test uses the fixed gdb number, and everything else uses signal.SIGSEGV for the platform. Sidenote: I somehow did not see this reported in multicore tests. I will need to verify that we aren't missing test failures in that script. I need to verify why this wasn't more obvious with test/dosep.py. llvm-svn: 216770
OpenPOWER on IntegriCloud