summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [AArch64] Disable useAA for Cortex-A57.Hao Liu2014-11-191-1/+1
| | | | | | | | Using AA during CodeGen is very useful for in-order cores. It is less useful for ooo cores. Also I find enabling useAA for Cortex-A57 may generate worse code for some test cases. If useAA in codegen is improved and benefical for ooo cores, we can enable it again. llvm-svn: 222333
* Revert "[ELF] Sectionkey should also contain path."Shankar Easwaran2014-11-191-18/+14
| | | | | | | | This reverts commit r222309. Reverting because of failures on darwin bot. llvm-svn: 222332
* [AArch64] Enable SeparateConstOffsetFromGEP, EarlyCSE and LICM passes on ↵Hao Liu2014-11-194-2/+183
| | | | | | | | | | | | AArch64 backend. SeparateConstOffsetFromGEP can gives more optimizaiton opportunities related to GEPs, which benefits EarlyCSE and LICM. By enabling these passes we can have better address calculations and generate a better addressing mode. Some SPEC 2006 benchmarks (astar, gobmk, namd) have obvious improvements on Cortex-A57. Reviewed in http://reviews.llvm.org/D5864. llvm-svn: 222331
* Revert "[ELF] Rename MergedSection to OutputSection."Shankar Easwaran2014-11-194-95/+102
| | | | | | | | | This reverts commit r222310. Not sure which commit is the cause of the failure on the darwin bot. Will need to revert my changes and commit one change at a time. llvm-svn: 222330
* Revert "[ELF] Create input and output section names"Shankar Easwaran2014-11-195-61/+26
| | | | | | | | This reverts commit r222311. Reverting because of failure in the darwin bot. llvm-svn: 222329
* [SeparateConstOffsetFromGEP] Allow SeparateConstOffsetFromGEP pass to lower ↵Hao Liu2014-11-192-41/+275
| | | | | | | | | | | | GEPs. If LowerGEP is enabled, it can lower a GEP with multiple indices into GEPs with a single index or arithmetic operations. Lowering GEPs can always extract structure indices. Lowering GEPs can also give use more optimization opportunities. It can benefit passes like CSE, LICM and CGP. Reviewed in http://reviews.llvm.org/D5864 llvm-svn: 222328
* Add the exception for strings in logical and expressions to -Wstring-conversionRichard Trieu2014-11-192-2/+26
| | | | | | for C code. llvm-svn: 222327
* Revert "[ELF] Fix creation of segments."Shankar Easwaran2014-11-194-206/+5
| | | | | | | | This reverts commit r222312. There looks to be an intermittent failure in the darwin buildbot. llvm-svn: 222326
* [Mips] Remove unnecessary debug logging codeSimon Atanasyan2014-11-191-43/+0
| | | | | | No functional changes llvm-svn: 222325
* [Mips] Configure PLT and LA25 entries in the corresponding constructorsSimon Atanasyan2014-11-191-24/+24
| | | | | | No functional changes. llvm-svn: 222324
* [Mips] Inline the configurePLTReference methodSimon Atanasyan2014-11-191-9/+2
| | | | | | No functional changes. llvm-svn: 222323
* [Mips] Remove redundant const_castSimon Atanasyan2014-11-191-1/+1
| | | | | | No functional changes. llvm-svn: 222322
* [Mips] Make the function return type constant pointerSimon Atanasyan2014-11-191-2/+2
| | | | | | No functional changes. llvm-svn: 222321
* [Mips] Move setup of LLD_R_MIPS_STO_PLT relocation to the getPLTEntry() routineSimon Atanasyan2014-11-191-20/+5
| | | | | | No functional changes. llvm-svn: 222320
* Remove StringMap::GetOrCreateValue in favor of StringMap::insertDavid Blaikie2014-11-1922-157/+116
| | | | | | | | | | | | | | Having two ways to do this doesn't seem terribly helpful and consistently using the insert version (which we already has) seems like it'll make the code easier to understand to anyone working with standard data structures. (I also updated many references to the Entry's key and value to use first() and second instead of getKey{Data,Length,} and get/setValue - for similar consistency) Also removes the GetOrCreateValue functions so there's less surface area to StringMap to fix/improve/change/accommodate move semantics, etc. llvm-svn: 222319
* Overhaul and separate nullptr_t tests to pass with C++03.Eric Fiselier2014-11-193-34/+95
| | | | | | | | | | | The standard requires that nullptr_t can be reinterpret_cast to an integral type at least the size of nullptr_t. There is no way to emulate this conversion in the C++03 nullptr_t implementation. The test for this conversion has been moved to a new test and marked XFAIL with c++03. This recommits what was originally r222296. llvm-svn: 222318
* clang-format a recent commit I madeDavid Blaikie2014-11-197-16/+15
| | | | llvm-svn: 222317
* Revert r222296 to fix bad commit messageEric Fiselier2014-11-193-95/+34
| | | | llvm-svn: 222316
* Wrap to 80 columns, no behavior change.Nico Weber2014-11-193-9/+10
| | | | llvm-svn: 222315
* Remove accidentally commited line in commit. SorryEric Fiselier2014-11-191-2/+0
| | | | llvm-svn: 222314
* [ELF] Handle ctors/dtors sectionsShankar Easwaran2014-11-192-21/+4
| | | | | | | | Move functionality from MIPS target to DefaultLayout. No change in functionality. llvm-svn: 222313
* [ELF] Fix creation of segments.Shankar Easwaran2014-11-194-5/+206
| | | | | | | Linker was creating a separate output segment in some cases if input sections had huge alignments. This patch fixes the issue. llvm-svn: 222312
* [ELF] Create input and output section namesShankar Easwaran2014-11-196-28/+63
| | | | | | No change in functionality. llvm-svn: 222311
* [ELF] Rename MergedSection to OutputSection.Shankar Easwaran2014-11-194-102/+95
| | | | | | No change in functionality. llvm-svn: 222310
* [ELF] Sectionkey should also contain path.Shankar Easwaran2014-11-191-14/+18
| | | | | | No change in functionality. llvm-svn: 222309
* Teach llvm-build to avoid touching LibraryDependencies.inc unless the contentsPeter Collingbourne2014-11-191-1/+10
| | | | | | change. This saves us from rebuilding llvm-config each time we reconfigure. llvm-svn: 222308
* Expose LLVM version string via macro in llvm-config.h, and modify Go bindingsPeter Collingbourne2014-11-197-4/+34
| | | | | | to make use of it. llvm-svn: 222307
* Standardize on StringMap::insert, removing uses of StringMap::GetOrCreateValue.David Blaikie2014-11-1917-146/+128
| | | | llvm-svn: 222306
* Remove uses of StringMap::GetOrCreateValue in favor of stl-compatible API usageDavid Blaikie2014-11-191-2/+2
| | | | llvm-svn: 222305
* Update for LLVM API changeDavid Blaikie2014-11-191-1/+1
| | | | llvm-svn: 222304
* Update for LLVM API changeDavid Blaikie2014-11-195-6/+6
| | | | llvm-svn: 222303
* Make StringSet::insert return pair<iterator, bool> like other ↵David Blaikie2014-11-194-16/+5
| | | | | | | | | | | | self-associative containers StringSet is still a bit dodgy in that it exposes the raw iterator of the StringMap parent, which exposes the weird detail that StringSet actually has a 'value'... but anyway, this is useful for a handful of clients that want to reference the newly inserted/persistent string data in the StringSet/Map/Entry/thing. llvm-svn: 222302
* Add additional checks to the SavedLocationForRegister methodJason Molenda2014-11-191-5/+28
| | | | | | | | | | | | | | where it is retrieving the Return Address register contents on a target where that's a thing. If we fail to get a valid RA, we force a switch to the fallback unwind plan. This patch adds a sanity check for that fallback unwind plan -- it must get a valid CFA for this frame in addition to being able to retrieve the caller's PC -- and it correctly marks the unwind rules as failing if the fallback unwind plan fails. <rdar://problem/19010211> llvm-svn: 222301
* [mach-o] propagate dylib version numbersNick Kledzik2014-11-1911-29/+125
| | | | | | | | | | | | | | Mach-o does not use a simple SO_NEEDED to track dependent dylibs. Instead, the linker copies four things from each dylib to each client: the runtime path (aka "install name"), the build time, current version (dylib build number), and compatibility version The build time is no longer used (it cause every rebuild of a dylib to be different). The compatibility version is usually just 1.0 and never changes, or the dylib becomes incompatible. This patch copies that information into the NormalizedMachO format and propagates it to clients. llvm-svn: 222300
* llvm-readobj: fix off-by-one error in COFFDumperRui Ueyama2014-11-193-22/+23
| | | | | | | | It printed out base relocation table header as table entry. This patch also makes llvm-readobj to not skip ABSOLUTE entries becuase it was confusing. llvm-svn: 222299
* Cleanup quick_exit tests and get them passing in C++03.Eric Fiselier2014-11-193-2/+53
| | | | | | | | | Wrap the original test in _LIBCPP_HAS_QUICK_EXIT so it only runs when we have quick_exit and add two new tests that check that when _LIBCPP_HAS_QUICK_EXIT is not defined then no definition of std::at_quick_exit or std::quick_exit are available. llvm-svn: 222298
* Make the ASan OS X DYLD_INSERT_LIBRARIES detection path-independentKuba Brecka2014-11-192-1/+34
| | | | | | | | | | Reviewed at http://reviews.llvm.org/D6238 ASan on Darwin during launch reads DYLD_INSERT_LIBRARIES env. variable and if it's not set or if the ASan dylib is not present in there, it relaunches the process. The check whether the dylib is present in the variable is now trying to find a full path in there. This fails in the scenarios where we want to copy the dylib to the executable's directory or somewhere else and set the DYLD_INSERT_LIBRARIES manually, see http://reviews.llvm.org/D6018. Let's change the search in DYLD_INSERT_LIBRARIES to only look for the filename of the dylib and not the full path. llvm-svn: 222297
* diff --git a/test/language.support/support.types/nullptr_t.pass.cpp ↵Eric Fiselier2014-11-193-34/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | b/test/language.support/support.types/nullptr_t.pass.cpp index 6c15fef..4d7c8b0 100644 --- a/test/language.support/support.types/nullptr_t.pass.cpp +++ b/test/language.support/support.types/nullptr_t.pass.cpp @@ -18,42 +18,62 @@ struct A A(std::nullptr_t) {} }; +template <class T> +void test_conversions() +{ + { + T p = 0; + assert(p == nullptr); + } + { + T p = nullptr; + assert(p == nullptr); + assert(nullptr == p); + assert(!(p != nullptr)); + assert(!(nullptr != p)); + } +} + +template <class T> +void test_comparisons() +{ + T p = nullptr; + assert(p == nullptr); + assert(p <= nullptr); + assert(p >= nullptr); + assert(!(p != nullptr)); + assert(!(p < nullptr)); + assert(!(p > nullptr)); + assert(nullptr == p); + assert(nullptr <= p); + assert(nullptr >= p); + assert(!(nullptr != p)); + assert(!(nullptr < p)); + assert(!(nullptr > p)); +} + + int main() { static_assert(sizeof(std::nullptr_t) == sizeof(void*), "sizeof(std::nullptr_t) == sizeof(void*)"); - A* p = 0; - assert(p == nullptr); - void (A::*pmf)() = 0; -#ifdef __clang__ - // GCC 4.2 can't handle this - assert(pmf == nullptr); -#endif - int A::*pmd = 0; - assert(pmd == nullptr); - A a1(nullptr); - A a2(0); - bool b = nullptr; - assert(!b); - assert(nullptr == nullptr); - assert(nullptr <= nullptr); - assert(nullptr >= nullptr); - assert(!(nullptr != nullptr)); - assert(!(nullptr < nullptr)); - assert(!(nullptr > nullptr)); - A* a = nullptr; - assert(a == nullptr); - assert(a <= nullptr); - assert(a >= nullptr); - assert(!(a != nullptr)); - assert(!(a < nullptr)); - assert(!(a > nullptr)); - assert(nullptr == a); - assert(nullptr <= a); - assert(nullptr >= a); - assert(!(nullptr != a)); - assert(!(nullptr < a)); - assert(!(nullptr > a)); - std::ptrdiff_t i = reinterpret_cast<std::ptrdiff_t>(nullptr); - assert(i == 0); + + { + test_conversions<std::nullptr_t>(); + test_conversions<void*>(); + test_conversions<A*>(); + test_conversions<void(*)()>(); + test_conversions<void(A::*)()>(); + test_conversions<int A::*>(); + } + { + test_comparisons<std::nullptr_t>(); + test_comparisons<void*>(); + test_comparisons<A*>(); + test_comparisons<void(*)()>(); + } + { + bool b = nullptr; + assert(!b); + } } diff --git a/test/language.support/support.types/nullptr_t_integral_cast.fail.cpp b/test/language.support/support.types/nullptr_t_integral_cast.fail.cpp new file mode 100644 index 0000000..92bd879 --- /dev/null +++ b/test/language.support/support.types/nullptr_t_integral_cast.fail.cpp @@ -0,0 +1,17 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// typedef decltype(nullptr) nullptr_t; + +#include <cstddef> + +int main() +{ + std::ptrdiff_t i = static_cast<std::ptrdiff_t>(nullptr); +} diff --git a/test/language.support/support.types/nullptr_t_integral_cast.pass.cpp b/test/language.support/support.types/nullptr_t_integral_cast.pass.cpp new file mode 100644 index 0000000..34c7a93 --- /dev/null +++ b/test/language.support/support.types/nullptr_t_integral_cast.pass.cpp @@ -0,0 +1,24 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// NOTE: nullptr_t emulation cannot handle a reinterpret_cast to an +// integral type +// XFAIL: c++98, c++03 + +// typedef decltype(nullptr) nullptr_t; + + +#include <cstddef> +#include <cassert> + +int main() +{ + std::ptrdiff_t i = reinterpret_cast<std::ptrdiff_t>(nullptr); + assert(i == 0); +} llvm-svn: 222296
* Add "-k" and "-K" options to the driver, that allow you to register Jim Ingham2014-11-192-98/+193
| | | | | | | | | | | | some commands that will get run if the target crashes. Also fix the bug where the local .lldbinit file was not getting sourced before not after the target was created from the file options on the driver command line. <rdar://problem/19019843> llvm-svn: 222295
* Use a memcpy so that type based alias analysis sees the change.Rafael Espindola2014-11-191-1/+3
| | | | | | | | | | | | | | | | | The other option would be to do something like if (that.isSingleWord()) VAL = that.VAL; else pVal = that.pVal This bug was causing 86TTI::getIntImmCost to be miscompiled in a LTO bootstrap in stage2, causing the build of stage3 to fail. LLVM is getting quiet good at exploiting this. Not sure if there is anything a sanitizer could do to help llvm-svn: 222294
* Fix MSVC warning.Rui Ueyama2014-11-191-6/+9
| | | | | | | | | This patch fixes the following MSVC warning. warning C4334: '<<' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) llvm-svn: 222293
* [Aarch64] Customer lowering of CTPOP to SIMD should check for NEON availabilityWeiming Zhao2014-11-192-0/+17
| | | | llvm-svn: 222292
* [asan] initial support for experimental basic-block tracing; also add tests ↵Kostya Serebryany2014-11-193-0/+139
| | | | | | for various levels of -fsanitize-coverage llvm-svn: 222291
* [asan] add experimental basic-block tracing to asan-coverage; also fix ↵Kostya Serebryany2014-11-194-7/+77
| | | | | | -fsanitize-coverage=3 which was broken by r221718 llvm-svn: 222290
* llvm-readobj: teach it how to dump COFF base relocation tableRui Ueyama2014-11-197-2/+168
| | | | llvm-svn: 222289
* Introduce llvm::SplitAllCriticalEdgesKostya Serebryany2014-11-193-19/+22
| | | | | | | | | | | | | | | | | | | | Summary: move the code from BreakCriticalEdges::runOnFunction() into a separate utility function llvm::SplitAllCriticalEdges() so that it can be used independently. No functionality change intended. Test Plan: check-llvm Reviewers: nlewycky Reviewed By: nlewycky Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6313 llvm-svn: 222288
* Revert r222039 because of bot failure.Manman Ren2014-11-193-231/+168
| | | | | | | http://lab.llvm.org:8080/green/job/clang-Rlto_master/298/ Hopefully, bot will be green. If not, we will re-submit the commit. llvm-svn: 222287
* R600/SI: Implement areMemAccessesTriviallyDisjointMatt Arsenault2014-11-193-0/+329
| | | | | | | | | This partially makes up for not having address spaces used for alias analysis in some simple cases. This is not yet enabled by default so shouldn't change anything yet. llvm-svn: 222286
* R600/SI: Set hasSideEffects = 0 on load and store instructions.Matt Arsenault2014-11-182-4/+9
| | | | | | | | | | Assuming unmodeled side effects interferes with some scheduling opportunities. Don't put it in the base class of DS instructions since there are a few weird effecting, non load/store instructions there. llvm-svn: 222285
* clang-format: Add option to disable alignment after opening bracketsDaniel Jasper2014-11-186-8/+78
| | | | | | | | | | | | | | Before: SomeFunction(parameter, parameter); After: SomeFunction(parameter, parameter); Patch by Harry Terkelsen, thank you! llvm-svn: 222284
OpenPOWER on IntegriCloud