summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Followup to 258750; update all MC tests to use .p2align .Dan Gohman2016-01-2610-75/+75
| | | | llvm-svn: 258754
* ELF: Move code for GNU_IFUNC to one place. NFC.Rui Ueyama2016-01-261-3/+15
| | | | | | | | | This does not solve the problem that we call isGnuIFunc function both from RelocationSection and from the Writer::scanRelocs, but this at least should improve readability. I'm taking an incremental approach to reduce complexity. llvm-svn: 258753
* Followup to 258750; update this test to use .p2align .Dan Gohman2016-01-261-2/+2
| | | | llvm-svn: 258752
* Fix TestSyntheticCapping for Python 3.Zachary Turner2016-01-261-19/+19
| | | | | | | | | | In Python 3, whitespace inconsistences are errors. This synthetic provider had mixed tabs and spaces, as well as inconsistent indentation widths. This led to the file not being imported, and naturally the test failing. No functional change here, just whitespace. llvm-svn: 258751
* [MC] Use .p2align instead of .alignDan Gohman2016-01-2673-238/+235
| | | | | | | | | | | | | | | For historic reasons, the behavior of .align differs between targets. Fortunately, there are alternatives, .p2align and .balign, which make the interpretation of the parameter explicit, and which behave consistently across targets. This patch teaches MC to use .p2align instead of .align, so that people reading code for multiple architectures don't have to remember which way each platform does its .align directive. Differential Revision: http://reviews.llvm.org/D16549 llvm-svn: 258750
* Fix use of constexpr std::pair that's not in C++11.Evgeniy Stepanov2016-01-251-1/+1
| | | | llvm-svn: 258749
* Define a helper function to make it visually shorter. NFC.Rui Ueyama2016-01-251-46/+41
| | | | llvm-svn: 258748
* [GVN] Rearrange code to make local vs non-local cases more obvious [NFCI]Philip Reames2016-01-251-13/+18
| | | | llvm-svn: 258747
* [cfi] Cross-DSO CFI diagnostic mode (LLVM part).Evgeniy Stepanov2016-01-252-25/+29
| | | | | | | | * __cfi_check gets a 3rd argument: ubsan handler data * Instead of trapping on failure, call __cfi_check_fail which must be present in the module (generated in the frontend). llvm-svn: 258746
* [cfi] Cross-DSO CFI diagnostic mode (clang part)Evgeniy Stepanov2016-01-259-56/+270
| | | | | | | | | | | | | | * Runtime diagnostic data for cfi-icall changed to match the rest of cfi checks * Layout of all CFI diagnostic data changed to put Kind at the beginning. There is no ABI stability promise yet. * Call cfi_slowpath_diag instead of cfi_slowpath when needed. * Emit __cfi_check_fail function, which dispatches a CFI check faliure according to trap/recover settings of the current module. * A tiny driver change to match the way the new handlers are done in compiler-rt. llvm-svn: 258745
* [cfi] Cross-DSO CFI diagnostic mode (compiler-rt part)Evgeniy Stepanov2016-01-2510-56/+266
| | | | | | | | | | | | | | | * add __cfi_slowpath_diag with a 3rd parameter which is a pointer to the diagnostic info for the ubsan handlers. *__cfi_check gets a 3rd parameter as well. * unify vcall/cast/etc and icall diagnostic info format, and merge the handlers to have a single entry point (actually two points due to abort/noabort variants). * tests Note that this comes with a tiny overhead in the non-diag mode: cfi_slowpath must pass 0 as the 3rd argument to cfi_check. llvm-svn: 258744
* Fix some issues with bytes and strings in Python 3.Zachary Turner2016-01-254-14/+15
| | | | | | | | | | | | | | | | | | SBProcess::ReadMemory and other related functions such as WriteMemory are returning Python string() objects. This means that in Python 3 that are returning Unicode objects. In reality they should be returning bytes objects which is the same as a string in Python 2, but different in Python 3. This patch updates the generated SWIG code to return Python bytes objects for all memory related functions. One quirk of this patch is that the C++ signature of ReadCStringFromMemory has it writing c-string data into a void*. This confuses our swig typemaps which expect that a void* means byte data. So I hacked up a custom typemap which maps this specific function to treat the void* as string data instead of byte data. llvm-svn: 258743
* Fix more occurrences of string/bytes/bytearray in swig typemaps.Zachary Turner2016-01-251-20/+44
| | | | llvm-svn: 258742
* Fix swig typemap for SBEvent.Zachary Turner2016-01-254-6/+147
| | | | | | | | | | | This needs to be able to handle bytes, strings, and bytearray objects. In Python 2 this was easy because bytes and strings are the same thing, but in Python 3 the 2 cases need to be handled separately. So as not to mix raw Python C API code with PythonDataObjects code, I've also introduced a PythonByteArray class to PythonDataObjects to make the paradigm used here consistent. llvm-svn: 258741
* [GVN] Factor out common code [NFCI]Philip Reames2016-01-251-40/+21
| | | | | | We had the same code duplicated for each type of Def. We also have the entire block duplicated between the local and non-local case, but let's start with local cleanup. llvm-svn: 258740
* [powerpc] make test case as xfailBill Seurer2016-01-251-2/+2
| | | | | | | This test case which worked for a while is now failing again. I was unable to trace the change in status to any particular revision. llvm-svn: 258739
* [CUDA] Add -target to cuda-constructor-alias.cu test so it doesn't fail on Mac.Justin Lebar2016-01-251-1/+1
| | | | | | | The test was checking that we passed -mconstructor-alias to host compilation, but that explicitly shouldn't happen on Mac. llvm-svn: 258737
* [docs] Document how to merge patches into release branchesVedant Kumar2016-01-251-0/+17
| | | | llvm-svn: 258736
* Update comments to match the implementation.Manman Ren2016-01-251-0/+1
| | | | llvm-svn: 258735
* [CUDA] Don't generate aliases for static extern "C" functions.Justin Lebar2016-01-252-0/+21
| | | | | | | | | | | | | | Summary: These aliases are done to support inline asm, but there's nothing we can do: NVPTX doesn't support aliases. Reviewers: tra Subscribers: cfe-commits, jhen, echristo Differential Revision: http://reviews.llvm.org/D16501 llvm-svn: 258734
* [CUDA] Disable ctor/dtor aliases in device code.Justin Lebar2016-01-252-3/+18
| | | | | | | | | | | | Summary: NVPTX doesn't support aliases, so don't generate them. Reviewers: tra Subscribers: cfe-commits, jhen, echristo Differential Revision: http://reviews.llvm.org/D16499 llvm-svn: 258733
* [PGO] Add a test case covering IR based VP instrumentationXinliang David Li2016-01-251-0/+7
| | | | llvm-svn: 258732
* [PGO] Add test case covering clang FE based VP instrumentationXinliang David Li2016-01-252-0/+561
| | | | llvm-svn: 258730
* X86ISelLowering: Fix cmov(cmov) special lowering bugMatthias Braun2016-01-252-1/+51
| | | | | | | | | | | | | | | | There's a special case in EmitLoweredSelect() that produces an improved lowering for cmov(cmov) patterns. However this special lowering is currently broken if the inner cmov has multiple users so this patch stops using it in this case. If you wonder why this wasn't fixed by continuing to use the special lowering and inserting a 2nd PHI for the inner cmov: I believe this would incur additional copies/register pressure so the special lowering does not improve upon the normal one anymore in this case. This fixes http://llvm.org/PR26256 (= rdar://24329747) llvm-svn: 258729
* [ThinLTO] Find all needed metadata when linking metadata as postpassTeresa Johnson2016-01-252-9/+40
| | | | | | | | | For metadata postpass linking, after importing all functions, we need to recursively walk through any nodes reached via imported functions to locate needed subprogram metadata. Some might only be reached indirectly via the variable list for an inlined function. llvm-svn: 258728
* Move ObjCPropertyDecl to before ObjCContainerDecl.Manman Ren2016-01-251-191/+191
| | | | | | | | | | | | | After we add ObjCPropertyDecl::isClassProperty, we can use it in ObjCContainerDecl to define filter to iterate over instance properties and class properties. This is the first patch in a series of patches to support class properties in addition to instance properties in objective-c. rdar://23891898 llvm-svn: 258727
* [X86][AVX] Add commutation support for VPERM2X128 instructions Simon Pilgrim2016-01-253-0/+187
| | | | | | | | Its main use is to allow memory folding of the 1st operand Differential Revision: http://reviews.llvm.org/D16521 llvm-svn: 258726
* Use an ilist instead of std::list. NFC.Pete Cooper2016-01-251-78/+115
| | | | | | | | | | | | The TrieNode/TrieEdge data structures here are allocated in a bumpptrallocator. Unfortunately, TrieNode contained a std::list<TrieEdge> and as the allocator doesn't call the TrieNode destructor, we ended up leaking the memory allocated by the std::list itself. Instead we can use an intrusive list as then we save the extra allocations anyway. llvm-svn: 258725
* Use Symtab.find() instead of Symtab.getSymbols().lookup().Rui Ueyama2016-01-251-4/+4
| | | | | | | This was the only place we directly called lookup on the internal table of the symbol table. llvm-svn: 258724
* Avoid almost duplication in .dynamic finalize and write.Rafael Espindola2016-01-253-162/+109
| | | | | | | | | | | | | There are a few cases where we have almost duplicated code. This patches fixes the simplest: the finalize and write of dynamic section. Right now they have to have exactly the same structure to decide if a DT_* entry is needed and then to actually write it. We cannot just write it to a std::vector in the first pass since addresses have not been computed yet. llvm-svn: 258723
* [ThinLTO] Handle DISubprogram reached indirectly from DIImportedEntityTeresa Johnson2016-01-252-4/+28
| | | | | | | Extend fix for PR26037 to identify DISubprogram reached from a DIImportedEntity via a DILexicalBlock. llvm-svn: 258722
* [MSVC Compat] Only warn for unknown clang-cl argumentsEhsan Akhgari2016-01-258-7/+40
| | | | | | | | | | | | | | | | | Summary: MSVC's driver accepts all unknown arguments but warns about them. clang by default rejects all unknown arguments. This causes issues specifically with build systems such as autoconf which liberally pass things such as $LDFLAGS to the compiler and expect everything to work. This patch teaches clang-cl to ignore unknown driver arguments. Reviewers: rnk Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D16511 llvm-svn: 258720
* Initialize member variable.Pete Cooper2016-01-251-1/+1
| | | | | | Found by Rafael using valgrind in https://llvm.org/bugs/show_bug.cgi?id=21466. llvm-svn: 258718
* sync up InstrProfData.h -- typo fixXinliang David Li2016-01-251-1/+1
| | | | llvm-svn: 258717
* Fix a typoXinliang David Li2016-01-251-1/+1
| | | | llvm-svn: 258716
* Add support to the misc-assert-side-effect check for MSVC-style assert ↵Aaron Ballman2016-01-252-5/+21
| | | | | | macros, which use !! instead of an if statement or a conditional operator. llvm-svn: 258714
* Revert "[sanitizers] extracted process management functions"Mike Aizatsky2016-01-258-150/+30
| | | | | | This reverts commit e5b34d5a2bf4c882bc647dd26a8cea2adc76f63c. llvm-svn: 258713
* LTO via the gold plugin needs to be told about debugger tuning.Paul Robinson2016-01-252-0/+20
| | | | | | Differential Revision: http://reviews.llvm.org/D16094 llvm-svn: 258712
* fixed clang-tidy configMike Aizatsky2016-01-251-1/+1
| | | | llvm-svn: 258711
* [sanitizers] extracted process management functionsMike Aizatsky2016-01-258-30/+150
| | | | | | Differential Revision: http://reviews.llvm.org/D16542 llvm-svn: 258710
* Enable loopreroll to rerool loop with pointer induction variable.Lawrence Hu2016-01-252-50/+204
| | | | | | | | | | | | | | Example: while (buf !=end ) { S += buf[0]; S += buf[1]; buf +=2; }; Differential Revision: http://reviews.llvm.org/D13151 llvm-svn: 258709
* Undo commit 258700 due to missing commit messageLawrence Hu2016-01-252-204/+50
| | | | llvm-svn: 258708
* Fix: added assert condition to EhFrameHeader<ELFT>::assignEhFrame().George Rimar2016-01-251-2/+2
| | | | | | Thanks to David Blaikie who found that issue. llvm-svn: 258707
* [asan] Don't use sysconf(_SC_PAGESIZE) on Android.Evgeniy Stepanov2016-01-251-1/+3
| | | | | | | | | | This is broken in the current (post-MNC) master branch. Use EXEC_PAGESIZE instead, the same as on x86 Linux. This change fixes startup crashes in the existing tests on AOSP master. llvm-svn: 258706
* Reapply commit r25804 with fixMatthew Simpson2016-01-252-24/+244
| | | | | | | | | | | We were hitting an assertion because we were computing smaller type sizes for instructions that cannot be demoted. The fix first determines the instructions that will be demoted, and then applies the smaller type size to only those instructions. This should fix PR26239. llvm-svn: 258705
* Fix TestSourceManager.py on Windows.Adrian McCarthy2016-01-251-7/+6
| | | | | | | | Python 3.5 is picky about writing strings to binary files, so we now open the file in text mode, and we explicitly set the newline mode to avoid re-writing it with CR+LF on Windows (which causes git to think the file had changed). llvm-svn: 258704
* Speculatively revert r258620 as it is the likely culprid of PR26293.Quentin Colombet2016-01-257-775/+124
| | | | llvm-svn: 258703
* Temporary disable broken fuzzer/timeout tests.Ivan Krasin2016-01-251-1/+1
| | | | | | | | Reviewers: kcc Differential Revision: http://reviews.llvm.org/D16543 llvm-svn: 258702
* Add a test showing we can write a vector of floats.Rafael Espindola2016-01-251-0/+21
| | | | llvm-svn: 258701
* Differential Revision: http://reviews.llvm.org/D13151Lawrence Hu2016-01-252-50/+204
| | | | llvm-svn: 258700
OpenPOWER on IntegriCloud