summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* This patch enables the use of KMP_AFFINITY=balanced on non-MIC ↵Andrey Churbanov2015-01-135-39/+19
| | | | | | Architectures. The restriction for using balanced affinity on non-MIC architectures is it only works for one-package machines. llvm-svn: 225794
* small fixes to the hierarchical barrierAndrey Churbanov2015-01-131-1/+4
| | | | llvm-svn: 225793
* aarch64 port sent by C. BergstromAndrey Churbanov2015-01-1318-88/+139
| | | | llvm-svn: 225792
* Revert "SLPVectorizer: Cache results from memory alias checking."Erik Eckstein2015-01-131-49/+19
| | | | | | The alias cache has a problem of incorrect collisions in case a new instruction is allocated at the same address as a previously deleted instruction. llvm-svn: 225790
* Return the architecture by probing predefined compiler macrosAndrey Churbanov2015-01-132-13/+77
| | | | llvm-svn: 225789
* Silence warnings about unknown pragmas for compilers that are not Clang. NFC.Aaron Ballman2015-01-131-1/+4
| | | | llvm-svn: 225788
* [OCaml] Allow out-of-tree builds of LLVM bindings.Peter Zotov2015-01-131-2/+9
| | | | | | | | | | | | In order to use this feature, configure LLVM as usual, but then build and install it as: make all install SYSTEM_LLVM_CONFIG=llvm-config where llvm-config is the llvm-config binary installed on your system (possibly llvm-config-VERSION on e.g. Debian). llvm-svn: 225787
* SLPVectorizer: Cache results from memory alias checking.Erik Eckstein2015-01-131-19/+49
| | | | | | | This speeds up the dependency calculations for blocks with many load/store/call instructions. Beside the improved runtime, there is no functional change. llvm-svn: 225786
* [PM] In the PassManager template, remove a pointless indirection throughChandler Carruth2015-01-131-9/+4
| | | | | | | | | | a nested class template for the PassModel, and use the T-suffix for the two typedefs to match the code in the AnalysisManager. This is the last of the fairly fundamental code cleanups here. Will be focusing on the printing of analyses next to finish that aspect off. llvm-svn: 225785
* [PM] Remove the 'AnalysisManagerT' type parameter from numerous layersChandler Carruth2015-01-132-45/+37
| | | | | | | | | | | | | | of templates in the new pass manager. The analysis manager is now itself just a template predicated on the IR unit. This makes lots of the templates really trivial and more clear: they are all parameterized on a single type, the IR unit's type. Everything else is a function of that. To me, this is a really nice cleanup of the APIs and removes a layer of 'magic' and 'indirection' that really wasn't there and just got in the way of understanding what is going on here. llvm-svn: 225784
* [PM] Refactor the new pass manager to use a single template to implementChandler Carruth2015-01-136-390/+243
| | | | | | | | | | | | | | | | | | | | | | | the generic functionality of the pass managers themselves. In the new infrastructure, the pass "manager" isn't actually interesting at all. It just pipelines a single chunk of IR through N passes. We don't need to know anything about the IR or the passes to do this really and we can replace the 3 implementations of the exact same functionality with a single generic PassManager template, complementing the single generic AnalysisManager template. I've left typedefs in place to give convenient names to the various obvious instantiations of the template. With this, I think I've nuked almost all of the redundant logic in the managers, and I think the overall design is actually simpler for having single templates that clearly indicate there is no special logic here. The logging is made somewhat more annoying by this change, but I don't think the difference is worth having heavy-weight traits to help log things. llvm-svn: 225783
* [mips] Fix va_arg() for pointer types on big-endian N32.Daniel Sanders2015-01-133-6/+61
| | | | | | | | | | | | | | | | | | | | | Summary: The Mips ABI's treat pointers in the same way as integers. They are sign-extended to 32-bit for O32, and 64-bit for N32/N64. This doesn't matter for O32 and N64 where pointers are already the correct width but it does matter for big-endian N32, where pointers are 32-bit and need promoting. The caller side is already passing pointers correctly. This patch corrects the callee. Reviewers: vmedic, atanasyan Reviewed By: atanasyan Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D6812 llvm-svn: 225782
* Revert "Sema: An extern declaration can't be a redeclaration of a parameter"David Majnemer2015-01-132-6/+4
| | | | | | | This reverts commit r225780, we can't compile line 181 in sanitizer_platform_limits_posix.cc with this commit. llvm-svn: 225781
* Sema: An extern declaration can't be a redeclaration of a parameterDavid Majnemer2015-01-132-4/+6
| | | | | | | | | | In the following: void f(int x) { extern int x; } The second declaration of 'x' shouldn't be considered a redeclaration of the parameter. llvm-svn: 225780
* Update release notes wrt OCaml bindings.Peter Zotov2015-01-131-0/+26
| | | | llvm-svn: 225779
* [OCaml] Use $CAMLORIGIN, an rpath-$ORIGIN-like mechanism in OCaml.Peter Zotov2015-01-132-4/+12
| | | | | | | | | | | | | | | As a result, installations of LLVM in non-standard locations will not require passing custom -ccopt -L flags when building the binary, nor absolute paths would be embedded in the cma/cmxa files. Additionally, the executables will not require changes to LD_LIBRARY_PATH, although CAML_LD_LIBRARY_PATH still has to be set for ocamlc without -custom. See http://caml.inria.fr/mantis/view.php?id=6642. Note that the patch is approved, but not merged yet. It will be released in 4.03 and likely 4.02. llvm-svn: 225778
* Update clang-format.el to use xml output and patch in the returned chunks.Manuel Klimek2015-01-131-46/+86
| | | | | | | | | This leads to better undo behavior and avoids window content jumping around. Patch by Johann Klähn. llvm-svn: 225777
* Parse: Switch to using EOF tokens for late parsed attributesDavid Majnemer2015-01-131-12/+15
| | | | | | | | | The EOF token injection technique is preferable to using isBeforeInTranslationUnit to determine whether or not additional cleanup is needed. I don't have an example off-hand that requires it but it is nicer nonetheless. llvm-svn: 225776
* IR/MetadataTest.cpp: Appease msc17 to avoid initializer list.NAKAMURA Takumi2015-01-131-1/+1
| | | | llvm-svn: 225775
* Parse: Don't crash when default argument in typedef consists of sole '='David Majnemer2015-01-132-2/+8
| | | | | | | | We'd crash trying to make the SourceRange for the tokens we'd like to highlight. Don't assume there is more than one token makes up the default argument. llvm-svn: 225774
* Enhance the eh_frame unwind instruction augmenter so thatJason Molenda2015-01-131-6/+46
| | | | | | | | | it will do the right thing on x86 routines with a mid-function epilogue sequence (where the unwind rules need to be reinstalled after the epilogue has completed). <rdar://problem/19417410> llvm-svn: 225773
* Peephole opt needs optimizeSelect() to keep track of newly created MIsMehdi Amini2015-01-134-7/+27
| | | | | | | | | | | | | | | Peephole optimizer is scanning a basic block forward. At some point it needs to answer the question "given a pointer to an MI in the current BB, is it located before or after the current instruction". To perform this, it keeps a set of the MIs already seen during the scan, if a MI is not in the set, it is assumed to be after. It means that newly created MIs have to be inserted in the set as well. This commit passes the set as an argument to the target-dependent optimizeSelect() so that it can properly update the set with the (potentially) newly created MIs. llvm-svn: 225772
* Add an additional check to UnwindAssembly_x86::AugmentUnwindPlanFromCallSite Jason Molenda2015-01-133-17/+45
| | | | | | | | | | | | | | | | which will verify if the eh_frame instructions include details about the prologue or not. Both clang and gcc include prologue instructions but there's no requirement for them to do so -- and I'm sure we'll have to interoperate with a compiler that doesn't generate prologue info at some point. I don't have any compilers that omit the prologue instructions so the testing was of the "makre sure augmented unwind info is still created". With an eh_frame without prologue, this code should reject the augmentation scheme altogether and we should fall back to using assembly instruction profiling. llvm-svn: 225771
* Change the x86 assembly instruction unwind parser toJason Molenda2015-01-135-201/+216
| | | | | | | | | | | | | | | step through the complete function looking for any epilogue instructions. If we find an epilogue sequence, re-instate the correct unwind instructions if there is more code past that epilogue -- this will correctly handle an x86 function with multiple epilogues in it. NB there is still a bug with the "eh_frame augmented" UnwindPlans and mid-function epilogues. Looking at that next. <rdar://problem/18863406> llvm-svn: 225770
* Remove dead code.Rui Ueyama2015-01-134-53/+1
| | | | | | | Now every InputElement has exactly one File in it, so "expand" method is now no-op. llvm-svn: 225769
* Parse: Don't crash if missing an initializer expressionDavid Majnemer2015-01-132-1/+6
| | | | llvm-svn: 225768
* Remove InputGraph::registerObserver.Rui Ueyama2015-01-137-81/+62
| | | | | | | | | | | | PECOFF was the only user of the API, and the reason why we created the API is because, although the driver creates a list of input files, it has no knowledge on what files are being created. It was because everything was hidden behind the InputGraph abstraction. Now the driver knows what that's doing. We no longer need this indirection to get the file list being processed. llvm-svn: 225767
* Remove InputGraph::dump().Rui Ueyama2015-01-133-13/+0
| | | | | | This is dead code. llvm-svn: 225766
* Parse: use the EOF token method to lex inline method bodiesDavid Majnemer2015-01-132-22/+25
| | | | | | | | Mark the end of the method body with an EOF token, collect it once we expect to be done with method body parsing. No functionality change intended. llvm-svn: 225765
* Convert other drivers to use WrapperNode.Rui Ueyama2015-01-1336-602/+294
| | | | llvm-svn: 225764
* Parse: Further simplify ParseLexedMethodDeclarationDavid Majnemer2015-01-133-46/+33
| | | | | | | No functionality change intended, just moving code around to make it simpler. llvm-svn: 225763
* fix {typo, build failure} in r225760Ramkumar Ramachandra2015-01-131-1/+1
| | | | llvm-svn: 225762
* Mark vtable used on explicit destructor definitions.Nico Weber2015-01-132-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two things in a C++ program that need to read the vtable pointer: Constructors and destructors. (A few other operations -- virtual calls, dynamic cast, rtti -- read the vtable pointer off a this pointer, but for this they don't need the vtable symbol.) Implicit constructors and destructors and explicit constructors already marked the vtable as used, but explicit destructors didn't. Note that the only thing sema's "mark a class's vtable used" does is to mark all final overriders of the class as referenced, it does _not_ cause emission of the vtable itself. This is done on demand by codegen, independent of sema, since sema might emit functions that are not referenced. (The exception are vtables that are forced via key functions -- these are forced onto codegen by sema.) This bug went unnoticed for years because it doesn't have observable effects (yet -- I want to change this in PR20337, which is why I noticed this). r213109 made it so that _calls_ to constructors don't mark the vtable used. Currently, _calls_ to destructors still mark the vtable used. If that wasn't the case, this program would tickle the problem: test.h: template <typename T> struct B { int* p; virtual ~B() { delete p; } virtual void f() {} }; struct __attribute__((visibility("default"))) C { C(); B<int> m; }; test2.cc: #include "test.h" int main() { C* c = new C; delete c; } test3.cc: #include "test.h" C::C() {} # This bin/clang++ binary doesn't MarkVTableUsed() for virtual dtor calls: $ bin/clang++ -shared test3.cc -std=c++11 -O2 -fvisibility=hidden \ -fvisibility-inlines-hidden -o libtest3.dylib $ bin/clang++ test2.cc -std=c++11 -O2 -fvisibility=hidden \ -fvisibility-inlines-hidden libtest3.dylib Undefined symbols for architecture x86_64: "B<int>::f()", referenced from: vtable for B<int> in test2-af8f4f.o ld: symbol(s) not found for architecture x86_64 What's happening here is that there's a copy of B's vtable hidden in libtest3.dylib, because C's constructor caused an implicit instantiation of that (and implicit constructors generate vtables). test2.cc calls C's destructDr, which destroys the B<int> member, which wants to overwrite the vtable back to B (think of B as the base of a class hierarchy, and of hierarchical destruction -- maybe we shouldn't do the vtable writing in destructors of final classes), but there's nothing in test2.cc that marks B's vtable used. So codegen writes out the vtable, but since it wasn't marked used, sema didn't mark all the virtual functions (in particular f()) as used. Note that this change makes us reject programs we didn't reject before (see the included Sema test case), but both gcc and cl also reject this code, and clang used to reject it before r213109. llvm-svn: 225761
* Standardize {pred,succ,use,user}_empty()Ramkumar Ramachandra2015-01-138-10/+18
| | | | | | | | | The functions {pred,succ,use,user}_{begin,end} exist, but many users have to check *_begin() with *_end() by hand to determine if the BasicBlock or User is empty. Fix this with a standard *_empty(), demonstrating a few usecases. llvm-svn: 225760
* [OPENMP] Consider global named register variables as threadprivate by default.Alexey Bataev2015-01-133-4/+10
| | | | | | Register are thread-local by default, so we have to consider them as threadprivate. llvm-svn: 225759
* ARM: prepare prefix parsing for improved AAELF supportSaleem Abdulrasool2015-01-131-5/+43
| | | | | | | | AAELF specifies a number of ELF specific relocation types which have custom prefixes for the symbol reference. Switch the parser to be more table driven with an idea of file formats for which they apply. NFC. llvm-svn: 225758
* [PM] Fold all three analysis managers into a single AnalysisManagerChandler Carruth2015-01-138-515/+219
| | | | | | | | | | | | | | | | | | | | | | | | | template. This consolidates three copies of nearly the same core logic. It adds "complexity" to the ModuleAnalysisManager in that it makes it possible to share a ModuleAnalysisManager across multiple modules... But it does so by deleting *all of the code*, so I'm OK with that. This will naturally make fixing bugs in this code much simpler, etc. The only down side here is that we have to use 'typename' and 'this->' in various places, and the implementation is lifted into the header. I'll take that for the code size reduction. The convenient names are still typedef-ed and used throughout so that users can largely ignore this aspect of the implementation. The follow-up change to this will do the exact same refactoring for the PassManagers. =D It turns out that the interesting different code is almost entirely in the adaptors. At the end, that should be essentially all that is left. llvm-svn: 225757
* Extend the self move warning to record types.Richard Trieu2015-01-135-86/+116
| | | | | | | Move the logic for checking self moves into SemaChecking and add that function to Sema since it is now used in multiple places. llvm-svn: 225756
* If we don't find a matching ) for a ( in an exception specification, keep ↵Richard Smith2015-01-132-9/+12
| | | | | | the tokens around so we can diagnose an error rather than silently discarding them. llvm-svn: 225755
* Disable a warning for self move since the test is checking for this behavior.Richard Trieu2015-01-131-0/+4
| | | | llvm-svn: 225754
* fix typo; NFCSanjay Patel2015-01-131-1/+1
| | | | llvm-svn: 225753
* Rename llvm.recoverframeallocation to llvm.framerecoverReid Kleckner2015-01-138-24/+24
| | | | | | | | This name is less descriptive, but it sort of puts things in the 'llvm.frame...' namespace, relating it to frameallocate and frameaddress. It also avoids using "allocate" and "allocation" together. llvm-svn: 225752
* PR22208: On FreeBSD systems, __STDC_MB_MIGHT_NEQ_WC__ is expected to be definedRichard Smith2015-01-132-0/+8
| | | | | | | | | | | even though every basic source character literal has the same numerical value as a narrow or wide character literal. It appears that the FreeBSD folks are trying to use this macro to mean something other than what the relevant standards say it means, but their usage is conforming, so put up with it. llvm-svn: 225751
* [PM] Fix another place where I was using an overly generic T&& for theChandler Carruth2015-01-131-1/+1
| | | | | | IR unit to directly use IRUnitT& for now. llvm-svn: 225750
* IR: Use unique_ptr, NFCDuncan P. N. Exon Smith2015-01-131-4/+3
| | | | | | Use `std::unique_ptr<>`, as suggested by David Blaikie. llvm-svn: 225749
* Don't run functionalities/tty under sudo / as root.Jason Molenda2015-01-131-0/+10
| | | | | | | | | | | | | | The terminal window will be opened under the ownership of the real userid and it won't be able to open the socket talking back to lldb -- the testsuite will hang here. The same thing probably should be done for lldb when run on a remote system over ssh. I added a line for that but commented it out for now because I haven't tested it. llvm-svn: 225748
* Phabricator calls it "subscriber" not "cc"Paul Robinson2015-01-131-1/+2
| | | | llvm-svn: 225747
* Add the llvm.frameallocate and llvm.recoverframeallocation intrinsicsReid Kleckner2015-01-1321-4/+303
| | | | | | | | | | | | | | | | | | | | | These intrinsics allow multiple functions to share a single stack allocation from one function's call frame. The function with the allocation may only perform one allocation, and it must be in the entry block. Functions accessing the allocation call llvm.recoverframeallocation with the function whose frame they are accessing and a frame pointer from an active call frame of that function. These intrinsics are very difficult to inline correctly, so the intention is that they be introduced rarely, or at least very late during EH preparation. Reviewers: echristo, andrew.w.kaylor Differential Revision: http://reviews.llvm.org/D6493 llvm-svn: 225746
* IR: Remove an invalid assertion when replacing resolved operandsDuncan P. N. Exon Smith2015-01-132-3/+32
| | | | | | | | | This adds back the testcase from r225738, and adds to it. Looks like we need both sides for now (the assertion was incorrect both ways, and although it seemed reasonable (when written correctly) it wasn't particularly important). llvm-svn: 225745
* Combine fcmp + select to fminnum / fmaxnum if no nans and legalMatt Arsenault2015-01-133-11/+86
| | | | | | | Also require unsafe FP math for no since there isn't a way to test for signed zeros. llvm-svn: 225744
OpenPOWER on IntegriCloud