summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [InstCombine] simplify code; NFCISanjay Patel2016-09-151-14/+7
| | | | llvm-svn: 281644
* Use SuperBlock struct defined in MSFCommon.h.Rui Ueyama2016-09-151-24/+17
| | | | llvm-svn: 281643
* Convert ArchSpec::ParseMachOCPUDashSubtypeTriple to use StringRef.Zachary Turner2016-09-153-48/+37
| | | | | | | | | | | | | This makes the code easier to grok, and since this is a very low level function it also is very helpful to have this take a StringRef since it means anyone higher up the chain who has a StringRef would have to first convert it to a null-terminated string. This way it can work equally well with StringRefs or const char*'s, which will enable the conversion of higher up functions to StringRef. Tested on Windows, Linux, and OSX and saw no regressions. llvm-svn: 281642
* [libc++] Avoid <memory> include in locale_win32.hShoaib Meenai2016-09-152-5/+6
| | | | | | | | | | | | | | | | | | | | | | | When `_LIBCPP_NO_EXCEPTIONS` is defined, we end up with compile errors when targeting MSVCRT: * Code includes `<new>` * `<new>` includes `<cstdlib>` in order to get `abort` * `<cstdlib>` includes `<stdlib.h>`, _before_ the `using ::abort` * `<stdlib.h>` includes `locale_win32.h` * `locale_win32.h` includes `<memory>` * `<memory>` includes `<stdexcept>` * `<stdexcept>` includes `<cstdlib` for `abort`, but that inclusion gets (correctly) ignored because of header guards * `<stdexcept>` references `_VSTD::abort`, which isn't declared The easiest solution is to make `locale_win32.h` not include `<memory>`, by removing the use of `unique_ptr` and manually restoring the locale instead. Differential Revision: https://reviews.llvm.org/D24374 llvm-svn: 281641
* [PM] Port CFGViewer and CFGPrinter to the new Pass ManagerSriraman Tallam2016-09-157-56/+110
| | | | | | Differential Revision: https://reviews.llvm.org/D24592 llvm-svn: 281640
* added LLDB_PYTHON_TESTSUITE_ARCH Xcode variableTodd Fiala2016-09-151-2/+6
| | | | | | | | | | | This Xcode build variable defaults to x86_64. It can be set to i386 to cause the lldb-python-test-suite target run the tests in the specified architecture. This flag is being added for the zorg build script so that Green Dragon can run the test suite against both x86_64 and i386 macOS targets. llvm-svn: 281639
* [pdb] Write the IPI stream.Zachary Turner2016-09-1510-8/+72
| | | | | | | | The IPI stream is structurally identical to the TPI stream, but it contains different record types. So we just re-use the TPI writing code. llvm-svn: 281638
* fix function names; NFCSanjay Patel2016-09-151-34/+34
| | | | llvm-svn: 281637
* [pdb] Fix the TPI stream size computation.Zachary Turner2016-09-151-2/+1
| | | | | | | | We were inadvertently adding the size of the hash value stream to the size of the TPI stream, even though the hash value stream is an entirely separate stream. llvm-svn: 281636
* [SE] Support CUDA dynamic shared memoryJason Henline2016-09-153-7/+254
| | | | | | | | | | | | | | Summary: Add proper handling for shared memory arguments in the CUDA platform. Also add in unit tests for CUDA. Reviewers: jlebar Subscribers: beanz, mgorny, jprice, jlebar, parallel_libs-commits Differential Revision: https://reviews.llvm.org/D24596 llvm-svn: 281635
* [libFuzzer] fix the build for AFLDriverTestKostya Serebryany2016-09-151-1/+1
| | | | llvm-svn: 281633
* Reapply: Silence false positive diagnostics regarding passing an object of ↵Aaron Ballman2016-09-152-3/+30
| | | | | | | | | | enumeration type to va_start(). The underlying type for an enumeration in C is either char, signed int, or unsigned int. In the case the underlying type is chosen to be char (such as when passing -fshort-enums or using __attribute__((packed)) on the enum declaration), the enumeration can result in undefined behavior. However, when the underlying type is signed int or unsigned int (or long long as an extension), there is no undefined behavior because the types are compatible. This patch silences diagnostics for the latter while retaining the diagnostics for the former. This patch addresses PR29140. llvm-svn: 281632
* [InstCombine] allow icmp (sub nsw) folds for vectorsSanjay Patel2016-09-152-48/+39
| | | | | | Also, clean up the code and comments for the existing folds in foldICmpSubConstant(). llvm-svn: 281631
* [InstCombine] add vector tests for icmp (sub nsw)Sanjay Patel2016-09-151-0/+44
| | | | llvm-svn: 281630
* [IRObjectFile] Handle undefined weak symbols in RecordStreamer.Davide Italiano2016-09-155-7/+28
| | | | | | Differential Revision: https://reviews.llvm.org/D24594 llvm-svn: 281629
* Take ownership of libLTO as discussed on llvm-dev.Peter Collingbourne2016-09-151-2/+2
| | | | llvm-svn: 281628
* [InstCombine] remove duplicated fold ; NFCISanjay Patel2016-09-151-7/+2
| | | | | | | | | | | This pattern is matched in foldICmpBinOpEqualityWithConstant() and already works with vectors too. I changed some comments over there to point out the current location. The tests for this transform are currently in 'sub.ll'. Note that the remaining folds in this block all require a sub too, so they should get grouped with the other icmp(sub) patterns. llvm-svn: 281627
* [SE] Let users specify CUDA pathJason Henline2016-09-154-51/+63
| | | | | | | | | | | | Summary: Add logic to allow users to specify the CUDA path at configuration time. Reviewers: jlebar Subscribers: beanz, mgorny, jlebar, jprice, parallel_libs-commits Differential Revision: https://reviews.llvm.org/D24580 llvm-svn: 281626
* [analyzer] Fix HTMLRewriter style sheets to support non-webkit browsers.Artem Dergachev2016-09-151-0/+4
| | | | | | | | | This fixes rounded corners and shadows of analyzer diagnostic pieces in browsers such as Firefox. Differential Revision: https://reviews.llvm.org/D23272 llvm-svn: 281625
* [InstCombine] allow (icmp sgt smin(PosA, B), 0) fold for vectorsSanjay Patel2016-09-152-25/+21
| | | | llvm-svn: 281624
* [InstCombine] add vector tests for icmp sgt sminSanjay Patel2016-09-151-6/+59
| | | | llvm-svn: 281623
* [sanitizer] Test the allocator with the ASan win64 memory constantsReid Kleckner2016-09-151-2/+2
| | | | | | | | These got out of sync and the tests were failing for me locally. We assume a 47 bit address space in ASan, so we should do the same in the tests. llvm-svn: 281622
* [InstCombine] auto-generate checksSanjay Patel2016-09-151-6/+16
| | | | llvm-svn: 281621
* [compiler-rt] Changing function prototype returning unused valueEtienne Bergeron2016-09-151-5/+10
| | | | | | | | | | | | Summary: The return value of `maybeInsertAsanInitAtFunctionEntry` is ignored. Reviewers: rnk Subscribers: llvm-commits, chrisha, dberris Differential Revision: https://reviews.llvm.org/D24568 llvm-svn: 281620
* Really fix the Windows sanitizer buildReid Kleckner2016-09-153-4/+12
| | | | | | | | | | Don't list __sanitizer_print_memory profile as an INTERFACE_FUNCTION. It is not exported by ASan; it is exported by user code. Move the weak definition from asan_win.cc to sanitizer_win.cc to fix the ubsan tests. llvm-svn: 281619
* Fix silly mistake introduced here : https://reviews.llvm.org/D24566Etienne Bergeron2016-09-151-1/+1
| | | | | | Asan bots are currently broken without this patch. llvm-svn: 281618
* address comments from: https://reviews.llvm.org/D24566Etienne Bergeron2016-09-152-2/+2
| | | | | | using startswith instead of find. llvm-svn: 281617
* Document our extension to the COFF .section directive flagsReid Kleckner2016-09-151-0/+16
| | | | llvm-svn: 281616
* [InstCombine] clean up foldICmpWithConstant(); NFCSanjay Patel2016-09-151-114/+117
| | | | | | | | 1. Early exit to reduce indent 2. Rename variables 3. Add local 'Pred' variable llvm-svn: 281615
* [InstCombine] add helper function for foldICmpWithConstant; NFCSanjay Patel2016-09-152-210/+223
| | | | | | | This is a big glob of transforms that probably should work for vectors, but currently they are disallowed because of ConstantInt guards. llvm-svn: 281614
* [InstCombine] use m_APInt to allow icmp folds using known bits for splat ↵Sanjay Patel2016-09-152-31/+10
| | | | | | constant vectors llvm-svn: 281613
* Reverting r281609; it caused some build bots to break.Aaron Ballman2016-09-152-30/+3
| | | | | | http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/20061/steps/test/logs/stdio llvm-svn: 281612
* GPGPU: Do not assume arrays start at 0Tobias Grosser2016-09-153-6/+216
| | | | | | | | | | | | | | | | | | Our alias checks precisely check that the minimal and maximal accessed elements do not overlap in a kernel. Hence, we must ensure that our host <-> device transfers do not touch additional memory locations that are not covered in the alias check. To ensure this, we make sure that the data we copy for a given array is only the data from the smallest element accessed to the largest element accessed. We also adjust the size of the array according to the offset at which the array is actually accessed. An interesting result of this is: In case array are accessed with negative subscripts ,e.g., A[-100], we automatically allocate and transfer _more_ data to cover the full array. This is important as such code indeed exists in the wild. llvm-svn: 281611
* [mips][ias] Enable IAS by default for N64 on Debian mips64el.Simon Dardis2016-09-151-0/+7
| | | | | | | | | | | | | | | | | | | Unfortunately we can't enable it for all N64 because it is not yet possible to distinguish N32 from N64 from the triple on other environments. N64 has been confirmed to produce identical (within reason) objects to GAS during stage 2 of compiler recursion on N64-abi Fedora. Unfortunately, Fedora's triples do not distinguish N32 from N64 so I can't enable it by default there. I'm currently repeating this testing for Debian mips64el but it's very unlikely to produce a different result. Patch by: Daniel Sanders Reviewers: sdardis Differential Review: https://reviews.llvm.org/D22679 llvm-svn: 281610
* Silence false positive diagnostics regarding passing an object of ↵Aaron Ballman2016-09-152-3/+30
| | | | | | | | enumeration type to va_start(). The underlying type for an enumeration in C is either char, signed int, or unsigned int. In the case the underlying type is chosen to be char (such as when passing -fshort-enums or using __attribute__((packed)) on the enum declaration), the enumeration can result in undefined behavior. However, when the underlying type is signed int or unsigned int (or long long as an extension), there is no undefined behavior because the types are compatible. This patch silences diagnostics for the latter while retaining the diagnostics for the former. This patch addresses PR29140. llvm-svn: 281609
* Check the return of getInteger.Rafael Espindola2016-09-152-1/+7
| | | | llvm-svn: 281608
* [mips][ias] Enable IAS by default for N64 on Debian mips64el.Simon Dardis2016-09-151-0/+4
| | | | | | | | | | | | | | | | | | | Unfortunately we can't enable it for all N64 because it is not yet possible to distinguish N32 from N64. N64 has been confirmed to produce identical (within reason) objects to GAS during stage 2 of compiler recursion on N64-abit Fedora. Unfortunately, Fedora's triples do not distinguish N32 from N64 so I can't enable it by default there. I'm currently repeating this testing for Debian mips64el but it's very unlikely to produce a different result. Patch by: Daniel Sanders Reviewers: sdardis Differential Review: https://reviews.llvm.org/D22678 llvm-svn: 281607
* Reformat x86_64 register infos defines tableDimitar Vlahovski2016-09-151-72/+41
| | | | | | | Fix the table format of the register defines after clang-format. Added guards to prevent future reformatting again from clang-format. llvm-svn: 281606
* Recommit r281318 "[ELF] - Versionscript: support mangled symbols with the ↵George Rimar2016-09-153-16/+42
| | | | | | | | | | | | | | | | | | | | | | | | | same name." Previouly bot was failing: http://lab.llvm.org:8011/builders/clang-with-lto-ubuntu/builds/413/steps/test-stage1-compiler/logs/stdio Fixed possible segfault, so commit should bix the buildbot. Initial commit message: This is PR30312. Info from bug page: Both of these symbols demangle to abc::abc(): _ZN3abcC1Ev _ZN3abcC2Ev (These would be abc's complete object constructor and base object constructor, respectively.) however with "abc::abc()" in the version script only one of the two receives the symbol version. Patch fixes that. It uses testcase created by Ed Maste (D24306). Differential revision: https://reviews.llvm.org/D24336 llvm-svn: 281605
* [ARM] Promote small global constants to constant poolsJames Molloy2016-09-155-1/+264
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a constant is unamed_addr and is only used within one function, we can save on the code size and runtime cost of an indirection by changing the global's storage to inside the constant pool. For example, instead of: ldr r0, .CPI0 bl printf bx lr .CPI0: &format_string format_string: .asciz "hello, world!\n" We can emit: adr r0, .CPI0 bl printf bx lr .CPI0: .asciz "hello, world!\n" This can cause significant code size savings when many small strings are used in one function (4 bytes per string). This recommit contains fixes for a nasty bug related to fast-isel fallback - because fast-isel doesn't know about this optimization, if it runs and emits references to a string that we inline (because fast-isel fell back to SDAG) we will end up with an inlined string and also an out-of-line string, and we won't emit the out-of-line string, causing backend failures. llvm-svn: 281604
* [libcxx] Allow sanitizing libcxx with ASan+UBSan simultaneouslyKuba Brecka2016-09-152-7/+15
| | | | | | | | Allow building with LLVM_USE_SANITIZER=“Address;Undefined” (and “Undefined;Address”). Differential Revision: https://reviews.llvm.org/D24569 llvm-svn: 281603
* GlobalISel: legalize GEP instructions with small offsets.Tim Northover2016-09-153-0/+44
| | | | llvm-svn: 281602
* Fix TestSymbolContextTwoFiles on Android after rL281595Tamas Berghammer2016-09-151-1/+1
| | | | llvm-svn: 281601
* GlobalISel: relax type constraints on G_ICMP to allow pointers.Tim Northover2016-09-155-5/+21
| | | | llvm-svn: 281600
* GlobalISel: remove "unsized" LLTTim Northover2016-09-1510-55/+16
| | | | | | | | It was only really there as a sentinel when instructions had to have precisely one type. Now that registers are typed, each register really has to have a type that is sized. llvm-svn: 281599
* llvm/test/Transforms/CorrelatedValuePropagation/alloca.ll REQUIRES +Asserts.NAKAMURA Takumi2016-09-151-0/+1
| | | | llvm-svn: 281598
* GlobalISel: cache pointer sizes in LLTTim Northover2016-09-158-64/+78
| | | | | | | Otherwise everything that needs to work out what size they are has to keep a DataLayout handy, which is a bit silly and very annoying. llvm-svn: 281597
* [ARM] ARM-specific attributes should be accepted for big-endianOliver Stannard2016-09-152-1/+4
| | | | | | | | | | | | | | The ARM-specific C attributes (currently just interrupt) need to check for both the big- and little-endian versions of the triples, so that they are accepted for both big and little endian targets. TargetWindows and TargetMicrosoftCXXABI also only use the little-endian triples, but this is correct as windows is not supported on big-endian ARM targets (and this is asserted in lib/Basic/Targets.cpp). Differential Revision: https://reviews.llvm.org/D24245 llvm-svn: 281596
* Add support for DW_AT_ranges_base attributeTamas Berghammer2016-09-1510-33/+95
| | | | | | | | | | | | | It is a new attribute emitted by clang as a GNU extension and will be part of Dwarf5. The purpose of the attribute is to specify a compile unit level base value for all DW_AT_ranges to reduce the number of relocations have to be done by the linker. Fixes (at least partially): https://llvm.org/pr28826 Differential revision: https://reviews.llvm.org/D24514 llvm-svn: 281595
* Try to fix windows build after rL281569Tamas Berghammer2016-09-152-2/+2
| | | | llvm-svn: 281594
OpenPOWER on IntegriCloud