summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Split clone value and instruction in the echo C API testAmaury Sechet2016-02-091-73/+77
| | | | | | | | | | Summary: This is a bit of refactoring required to be able to generate instruction in forward basic block. This, for instance, is a requirement for phi in loops. Reviewers: bogner, chandlerc, echristo, dblaikie, joker.eph, Wallbraker Differential Revision: http://reviews.llvm.org/D17050 llvm-svn: 260324
* Revert "Introduce a cmake module to figure out whether we need to link with ↵Vasileios Kalintiris2016-02-096-49/+0
| | | | | | | | | | | libatomic." This reverts commit r260235. It breaks LLVM's bootstrap when building with a -gcc-toolchain and the system's gcc installation does not provide the libatomic library and its headers. We should check whether LIBCXX_GCC_TOOLCHAIN is set and adjust the flags accordingly. llvm-svn: 260323
* Added code that was commented out during testing to stops template member ↵Greg Clayton2016-02-091-5/+5
| | | | | | | | | functions from being added to class definitions (see revision 260308 for details). <rdar://problem/24483905> <rdar://problem/24508374> llvm-svn: 260322
* Add icmp and conditional branches in the C API echo test.Amaury Sechet2016-02-092-4/+52
| | | | | | | | | | | | | | | Summary: Improving coverage. Depends on D16912 . Reviewers: bogner, chandlerc, echristo, dblaikie, joker.eph, Wallbraker Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D16937 llvm-svn: 260321
* Rangefy, and replace a switch with `if`s. NFC.Rui Ueyama2016-02-091-12/+11
| | | | llvm-svn: 260320
* Add convergent-removing bits to FunctionAttrs pass.Justin Lebar2016-02-093-0/+160
| | | | | | | | | | | | | | | | | Summary: Remove the convergent attribute on any functions which provably do not contain or invoke any convergent functions. After this change, we'll be able to modify clang to conservatively add 'convergent' to all functions when compiling CUDA. Reviewers: jingyue, joker.eph Subscribers: llvm-commits, tra, jhen, hfinkel, resistor, chandlerc, arsenm Differential Revision: http://reviews.llvm.org/D17013 llvm-svn: 260319
* Update documentation about convergent attribute.Justin Lebar2016-02-091-4/+11
| | | | | | | | | | | | | | | Summary: Be more explicit about what 'convergent' means, and indicate that the compiler may remove the attribute from a function if it can prove that the function doesn't in fact execute any convergent ops. Reviewers: resistor, jingyue, joker.eph Subscribers: hfinkel, chandlerc, arsenm, jhen, tra, llvm-commits Differential Revision: http://reviews.llvm.org/D17012 llvm-svn: 260318
* Fix GCC build.Peter Collingbourne2016-02-091-0/+4
| | | | llvm-svn: 260317
* [CodeGen] Prefer "if (SDValue R = ...)" to "if (R.getNode())". NFCI.Ahmed Bougacha2016-02-0914-167/+98
| | | | llvm-svn: 260316
* [X86] Don't reuse an unrelated variable, create a new one. NFC.Ahmed Bougacha2016-02-091-26/+28
| | | | | | | Using Op makes it look like we're doing something with it. We're really not. llvm-svn: 260315
* [X86] Remove unnecessary assignment. NFC.Ahmed Bougacha2016-02-091-1/+0
| | | | llvm-svn: 260314
* Add C binding for AllocaInst::getAllocatedTypeAmaury Sechet2016-02-093-1/+26
| | | | | | | | | | | | | | | Summary: Comes with an awesome test. Depends on D16912 Reviewers: bogner, chandlerc, echristo, dblaikie, joker.eph, Wallbraker Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D16942 llvm-svn: 260313
* WholeProgramDevirt: introduce.Peter Collingbourne2016-02-0927-1/+2030
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This pass implements whole program optimization of virtual calls in cases where we know (via bitset information) that the list of callees is fixed. This includes the following: - Single implementation devirtualization: if a virtual call has a single possible callee, replace all calls with a direct call to that callee. - Virtual constant propagation: if the virtual function's return type is an integer <=64 bits and all possible callees are readnone, for each class and each list of constant arguments: evaluate the function, store the return value alongside the virtual table, and rewrite each virtual call as a load from the virtual table. - Uniform return value optimization: if the conditions for virtual constant propagation hold and each function returns the same constant value, replace each virtual call with that constant. - Unique return value optimization for i1 return values: if the conditions for virtual constant propagation hold and a single vtable's function returns 0, or a single vtable's function returns 1, replace each virtual call with a comparison of the vptr against that vtable's address. Differential Revision: http://reviews.llvm.org/D16795 llvm-svn: 260312
* Update documentation to reflect that libc++abi provides __cxa_thread_atexit ↵Richard Smith2016-02-091-12/+20
| | | | | | (and has for quite a while). Also document that we have not yet implemented the new inheriting constructor rules. llvm-svn: 260311
* Fix inverted comparison.Rafael Espindola2016-02-092-1/+39
| | | | llvm-svn: 260310
* Improve the C API echo test tool to emit basic block is the right order.Amaury Sechet2016-02-094-214/+277
| | | | | | | | | | | | Summary: As per title. Also add a facility method to get the name of a basic block from the C API. Reviewers: bogner, chandlerc, echristo, dblaikie, joker.eph, Wallbraker Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D16912 llvm-svn: 260309
* Fixed many issues that were causing differing type definition issues to show ↵Greg Clayton2016-02-093-32/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | up when parsing expressions. 1) Turns out we weren't correctly uniquing types for C++. We would search our repository for "lldb_private::Process", but yet store just "Process" in the unique type map. Now we store things correctly and correctly unique types. 2) SymbolFileDWARF::CompleteType() can be called at any time in order to complete a C++ or Objective C class. All public inquiries into the SymbolFile go through SymbolVendor, and SymbolVendor correctly takes the module lock before it call the SymbolFile API call, but when we let CompilerType objects out in the wild, they can complete themselves at any time from the expression parser, so the ValueObjects or (SBValue objects in the public API), and many more places. So we now take the module lock when completing a type to avoid two threads being in the SymbolFileDWARF at the same time. 3) If a class has a template member function like: class A { <template T> void Foo(T t); }; The DWARF will _only_ contain a DW_TAG_subprogram for "Foo" if anyone specialized it. This would cause a class definition for A inside a.cpp that used a "int" and "float" overload to look like: class A { void Foo(int t); void Foo(double t); }; And a version from b.cpp that used a "float" overload to look like: class A { void Foo(float t); }; And a version from c.cpp that use no overloads to look like: class A { }; Then in an expression if you have two variables, one name "a" from a.cpp in liba.dylib, and one named "b" from b.cpp in libb.dylib, you will get conflicting definitions for "A" and your expression will fail. This all stems from the fact that DWARF _only_ emits template specializations, not generic definitions, and they are only emitted if they are used. There are two solutions to this: a) When ever you run into ANY class, you must say "just because this class doesn't have templatized member functions, it doesn't mean that any other instances might not have any, so when ever I run into ANY class, I must parse all compile units and parse all instances of class "A" just in case it has member functions that are templatized.". That is really bad because it means you always pull in ALL DWARF that contains most likely exact duplicate definitions of the class "A" and you bloat the memory that the SymbolFileDWARF plug-in uses in LLDB (since you pull in all DIEs from all compile units that contain a "A" definition) uses for little value most of the time. b) Modify DWARF to emit generic template member function definitions so that you know from looking at any instance of class "A" wether it has template member functions or not. In order to do this, we would have to have the ability to correctly parse a member function template, but there is a compiler bug: <rdar://problem/24515533> [PR 26553] C++ Debug info should reference DW_TAG_template_type_parameter This bugs means that not all of the info needed to correctly make a template member function is in the DWARF. The main source of the problem is if we have DWARF for a template instantiation for "int" like: "void A::Foo<int>(T)" the DWARF comes out as "void A::Foo<int>(int)" (it doesn't mention type "T", it resolves the type to the specialized type to "int"). But if you actually have your function defined as "<template T> void Foo(int t)" and you only use T for local variables inside the function call, we can't correctly make the function prototype up in the clang::ASTContext. So the best we can do for now we just omit all member functions that are templatized from the class definition so that "A" never has any template member functions. This means all defintions of "A" look like: class A { }; And our expressions will work. You won't be able to call template member fucntions in expressions (not a regression, we weren't able to do this before) and if you are stopped in a templatized member function, we won't know that are are in a method of class "A". All things we should fix, but we need <rdar://problem/24515533> fixed first, followed by: <rdar://problem/24515624> Classes should always include a template subprogram definition, even when no template member functions are used before we can do anything about it in LLDB. This bug mainly fixed the following Apple radar: <rdar://problem/24483905> llvm-svn: 260308
* PR26349: correctly check whether a digit sequence is empty in the presence ↵Richard Smith2016-02-093-6/+17
| | | | | | of digit separators. llvm-svn: 260307
* Proxy task fix: task_state stack push condition on forkJonathan Peyton2016-02-091-1/+2
| | | | | | | The problem is that the master's thread state was not saved before entering a parallel region so it does not remember tasks when it returns. llvm-svn: 260306
* [mips] Extend MipsAsmParser class to handle %got(sym + const) expressionsSimon Atanasyan2016-02-092-0/+21
| | | | | | | | | Now the parser supports `%got(sym)` expressions only but `%got(sym + const)` variant is also valid and accepted by GAS. Differential Revision: http://reviews.llvm.org/D16885 llvm-svn: 260305
* configure: Remove llvm 3.6 definesJan Vesely2016-02-091-3/+3
| | | | | | | | we require llvm 3.7 reviewer: tstellard Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 260304
* configure: Remove cl_khr_fp64 for device that don't support doublesJan Vesely2016-02-091-5/+5
| | | | | | | | | Also remove definitions if provided by clang (3.7+) This halves the size of builtin.opt.{cedar,barts}.bc reviewer: tstellard Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 260303
* configure: Introduce per device definesJan Vesely2016-02-091-11/+24
| | | | | | | | | | | Make cl_khr_fp64 define per-device. This patch does not change the generated Makefile (for llvm 3.6, 3.7) v2: Make the device defines per LLVM version, 'all' for all versions reviewer: tstellard Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 260302
* math: Fix log2 vectorization on non-fp64 hwJan Vesely2016-02-091-0/+2
| | | | | | reviewer: tstellard Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 260301
* Have Mac builds use @rpath when supported in CMakeJonathan Peyton2016-02-092-0/+10
| | | | | | | The -install_name linker flag will use "@rpath/" when supported in CMake which is the recommended usage for dynamic libraries on Mac OSX. llvm-svn: 260300
* Don't complete a class type just to test if it is a class. Code in ↵Greg Clayton2016-02-091-2/+2
| | | | | | CompilerType and in clang::QualType knows how to complete a type if it needs to. llvm-svn: 260299
* [MemoryBuiltins] Fix an issue with hasNoAliasAttrSanjoy Das2016-02-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Summary: `hasNoAliasAttr` is buggy: it checks to see if the called function has a `noalias` attribute, which is incorrect since functions are not even allowed to have the `noalias` attribute. The comment on its only caller, `llvm::isNoAliasFn`, makes it pretty clear that the intention to do the `noalias` check on the return value, and not the callee. Unfortunately I couldn't find a way to test this upstream -- fixing this does not change the observable behavior of any of the passes that use this. This is not very surprising, since `noalias` does not tell anything about the contents of the allocated memory (so, e.g., you still cannot fold loads). I'll be happy to be proven wrong though. Reviewers: chandlerc, reames Subscribers: mcrosier, llvm-commits Differential Revision: http://reviews.llvm.org/D17037 llvm-svn: 260298
* ELF: Add 'using namespace llvm::dwarf'.Rui Ueyama2016-02-091-22/+23
| | | | | | | Most constants defined in llvm::dwarf namespace start with "DW_". We don't have to worry about name conflicts. llvm-svn: 260297
* [Verifier] Add checks for masked.load and masked.store intrinsicsPhilip Reames2016-02-091-0/+38
| | | | | | While trying to track down what appears to be a LoopVectorizer bug, I noticed that we had no validation of the correctness of calls emitted to @llvm.masked.load and @llvm.masked.store. This meant malformed IR was showing up much much later than it should. Hopefully, having Verifier rules in place will make this easier to isolate. llvm-svn: 260296
* [SelectionDAG] make getMemBasePlusOffset() accessible; NFCISanjay Patel2016-02-093-51/+36
| | | | | | | | | I reinvented this functionality in http://reviews.llvm.org/D16828 because it was hidden away as a static function. The changes in x86 are not based on a complete audit. I suspect there are other possible uses there, and there are almost certainly more potential users in other targets. llvm-svn: 260295
* ELF: Add .eh_frame 'P', 'R' and 'L' augmentation characters.Rui Ueyama2016-02-091-7/+48
| | | | | | | | This basically reverts commit r260073 because it is found that augmentation strings don't always start with "zR". It is reported as https://llvm.org/bugs/show_bug.cgi?id=26541. llvm-svn: 260294
* This brings back commit r259578.Rafael Espindola2016-02-093-0/+50
| | | | | | | But now it follows the llvm style, uses an early return and doesn't include a file named 1.o. llvm-svn: 260293
* Fix incorrect usage of `str` in _match_decorator_property.Zachary Turner2016-02-091-1/+1
| | | | llvm-svn: 260292
* Remove skipIf<compiler> decorators.Zachary Turner2016-02-0915-25/+16
| | | | | | | These were supposed to have been removed in a previous patch, but I missed them. llvm-svn: 260291
* Remove decorators related to debug info types.Zachary Turner2016-02-096-31/+6
| | | | | | All existing usages were ported over to the common decorators. llvm-svn: 260290
* Delete all the xfail / skip decorators for specific compilers.Zachary Turner2016-02-0922-43/+26
| | | | | | Ported everything over to using expectedFailureAll. llvm-svn: 260289
* Remove expected failure and skip decorators for host os.Zachary Turner2016-02-098-44/+38
| | | | | | | All decorator invocations are updated to use the generic expectedFailureAll and skipIf decorators. llvm-svn: 260288
* Fix name style.Rafael Espindola2016-02-091-30/+30
| | | | | | Functions start with a lower case, variables with an upper case. llvm-svn: 260287
* Update comment style.Rafael Espindola2016-02-091-14/+14
| | | | llvm-svn: 260286
* Revert "Correct size calculations for ELF files"Rafael Espindola2016-02-093-46/+0
| | | | | | | | | This reverts commit r259578. There are enough issues with this small patch that it is better to revert and then commit a fixed version (will be committed shortly). llvm-svn: 260285
* If we set the DYLD_INSERT_LIBRARIES environment variable when launching ↵Greg Clayton2016-02-091-0/+4
| | | | | | debugserver, for use with /usr/lib/libgmalloc.dylib, then make sure we don't pass this environment variable on to any child processes. llvm-svn: 260284
* [AArch64] This check is specific to merging instructions. NFC.Chad Rosier2016-02-091-4/+4
| | | | llvm-svn: 260283
* Don't enable -flimit-debug-info by default for the LLDB Xcode builds. This ↵Greg Clayton2016-02-091-24/+0
| | | | | | was put in back in 2011 when -flimit-debug-info did a lot less than it does now. With llvm-dsymutil doing ODR type unique stuff we still have reasonably sized dSYM files. llvm-svn: 260282
* Remove system-libs.test for nowEhsan Akhgari2016-02-091-5/+0
| | | | | | | | This test fails in the ninja-x64-msvc-RA-centos6 builder, so the UNSUPPORTED: system-windows condition is insufficient. Removing it for now; I will investigate how this can be fixed later. llvm-svn: 260281
* Fix a test added in r260263Ehsan Akhgari2016-02-091-1/+1
| | | | llvm-svn: 260280
* [InstCombine][GC] Handle gc.relocations of vector typePhilip Reames2016-02-092-25/+40
| | | | | | | | We introduced gc.relocates of vector-of-pointer types a couple of weeks back. Somehow, I missed updating the InstCombine rule to account for this. If we hit this code path with a vector-of-pointers gc.relocate, we'd crash on a cast<PointerType>. I also took the chance to do a bit of code style cleanup. llvm-svn: 260279
* Add Tooling functionality to get a name for a QualType that can be used to nameRichard Smith2016-02-095-0/+676
| | | | | | | | | that type from the global scope. Patch by Sterling Augustine, derived (with permission) from code from Cling by Vassil Vassilev and Philippe Canal. llvm-svn: 260278
* Simplify and rename ASTMatchFinder's getCXXRecordDecl to make it more obviousRichard Smith2016-02-091-41/+23
| | | | | | what it's actually trying to do. llvm-svn: 260277
* Fix the test added in r260266Ehsan Akhgari2016-02-091-1/+1
| | | | llvm-svn: 260276
* [AArch64] AArch64LoadStoreOptimizer: fix bug in pre-inc check iteratorGeoff Berry2016-02-092-10/+11
| | | | | | | | | | | | | | | Summary: Fix case where a pre-inc/dec load/store would not be formed if the add/sub that forms the inc/dec part of the operation was the first instruction in the block being examined. Reviewers: mcrosier, jmolloy, t.p.northover, junbuml Subscribers: aemerson, rengolin, mcrosier, llvm-commits Differential Revision: http://reviews.llvm.org/D16785 llvm-svn: 260275
OpenPOWER on IntegriCloud