summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [PM] Port SROA to the new pass manager.Chandler Carruth2015-09-128-410/+477
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some ways this is a very boring port to the new pass manager as there are no interesting analyses or dependencies or other oddities. However, this does introduce the first good example of a transformation pass with non-trivial state porting to the new pass manager. I've tried to carve out patterns here to replicate elsewhere, and would appreciate comments on whether folks like these patterns: - A common need in the new pass manager is to effectively lift the pass class and some of its state into a public header file. Prior to this, LLVM used anonymous namespaces to provide "module private" types and utilities, but that doesn't scale to cases where a public header file is needed and the new pass manager will exacerbate that. The pattern I've adopted here is to use the namespace-cased-name of the core pass (what would be a module if we had them) as a module-private namespace. Then utility and other code can be declared and defined in this namespace. At some point in the future, we could even have (conditionally compiled) code that used modules features when available to do the same basic thing. - I've split the actual pass run method in two in order to expose a private method usable by the old pass manager to wrap the new class with a minimum of duplicated code. I actually looked at a bunch of ways to automate or generate these, but they are all quite terrible IMO. The fundamental need is to extract the set of analyses which need to cross this interface boundary, and that will end up being too unpredictable to effectively encapsulate IMO. This is also a relatively small amount of boiler plate that will live a relatively short time, so I'm not too worried about the fact that it is boiler plate. The rest of the patch is totally boring but results in a massive diff (sorry). It just moves code around and removes or adds qualifiers to reflect the new name and nesting structure. Differential Revision: http://reviews.llvm.org/D12773 llvm-svn: 247501
* [CodeGen] Remove wrapper-free always_inline functions from COMDATsDavid Majnemer2015-09-122-13/+17
| | | | | | always_inline functions without a wrapper don't need to be in a COMDAT. llvm-svn: 247500
* ubsan: Also disable vptr validation on powerpc64le.Peter Collingbourne2015-09-121-1/+2
| | | | llvm-svn: 247499
* Clean up trailing whitespace in the builtin headersSean Silva2015-09-1213-103/+103
| | | | llvm-svn: 247498
* Clean up: Refactoring the hardcoded value of 6 for ↵Larisse Voufo2015-09-124-11/+27
| | | | | | FindAvailableLoadedValue()'s parameter MaxInstsToScan. llvm-svn: 247497
* clang/test/Driver/stackrealign.c REQUIRES clang-driver.NAKAMURA Takumi2015-09-121-0/+1
| | | | | | GCC driver, for example cygwin, both "-mstackrealign" "-mno-stackrealign" are passed. llvm-svn: 247496
* Fix typos.Bruce Mitchener2015-09-1215-47/+47
| | | | | | | | | | Summary: This fixes a variety of typos in docs, code and headers. Subscribers: jholewinski, sanjoy, arsenm, llvm-commits Differential Revision: http://reviews.llvm.org/D12626 llvm-svn: 247495
* Always_inline codegen rewrite.Evgeniy Stepanov2015-09-1216-28/+361
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current implementation may end up emitting an undefined reference for an "inline __attribute__((always_inline))" function by generating an "available_externally alwaysinline" IR function for it and then failing to inline all the calls. This happens when a call to such function is in dead code. As the inliner is an SCC pass, it does not process dead code. Libc++ relies on the compiler never emitting such undefined reference. With this patch, we emit a pair of 1. internal alwaysinline definition (called F.alwaysinline) 2a. A stub F() { musttail call F.alwaysinline } -- or, depending on the linkage -- 2b. A declaration of F. The frontend ensures that F.inlinefunction is only used for direct calls, and the stub is used for everything else (taking the address of the function, really). Declaration (2b) is emitted in the case when "inline" is meant for inlining only (like __gnu_inline__ and some other cases). This approach, among other nice properties, ensures that alwaysinline functions are always internal, making it impossible for a direct call to such function to produce an undefined symbol reference. This patch is based on ideas by Chandler Carruth and Richard Smith. llvm-svn: 247494
* ubsan: Disable vptr validation on powerpc64.Peter Collingbourne2015-09-122-3/+3
| | | | | | Should fix sanitizer-ppc64-linux1 bot. llvm-svn: 247493
* Move asserts from PHINode::addIncoming to PHINode::setIncoming*Hal Finkel2015-09-121-4/+4
| | | | | | | | | | We had asserts in PHINode::addIncoming to check that the value types matched the type of the PHI, and that the associated BB was not null. These did not catch, however, later uses of setIncomingValue and setIncomingBlock (which are called by addIncoming as well). Moving the asserts to PHINode::setIncoming* provides better coverage. NFC. llvm-svn: 247492
* Revert "Specify target triple in alwaysinline tests."Evgeniy Stepanov2015-09-1116-355/+28
| | | | | | | | | Revert "Always_inline codegen rewrite." Breaks gdb & lldb tests. Breaks on Fedora 22 x86_64. llvm-svn: 247491
* dsymutil: Factor out the relocation handling into a RelocationManager (NFC)Adrian Prantl2015-09-111-125/+176
| | | | llvm-svn: 247490
* [clang-tidy] misc-sizeof-container: whitelist std::bitset<>.Alexander Kornienko2015-09-112-0/+9
| | | | | | | It's fine to use sizeof on std::bitset<>, since it doesn't have any external storage, everything's inside. llvm-svn: 247489
* Add new test file missing from r247486.Richard Smith2015-09-111-0/+6
| | | | llvm-svn: 247488
* Start adding support for creating shared libraries.Rafael Espindola2015-09-1110-20/+42
| | | | | | | | | | They are not fully functional yet, but this implements enough support for lld itself to read them. With that, delete the .so binary we were using for tests and start eating our own dog food. llvm-svn: 247487
* [modules] When picking one of two template declarations as a lookup result,Richard Smith2015-09-114-1/+25
| | | | | | | | it's not sufficient to prefer the declaration with more default arguments, or the one that's visible; they might both be visible, but one of them might have a visible default argument where the other has a hidden default argument. llvm-svn: 247486
* [clang-tidy] Fix minor issues in the testing script.Alexander Kornienko2015-09-111-4/+5
| | | | llvm-svn: 247485
* ubsan: Implement memory permission validation for vtables.Peter Collingbourne2015-09-113-0/+75
| | | | | | | | | | | | | | | | | | | | If the pointer passed to the getVtablePrefix function was read from a freed object, we may end up following pointers into objects on the heap and printing bogus dynamic type names in diagnostics. However, we know that vtable pointers will generally only point into memory mapped from object files, not objects on the heap. This change causes us to only follow pointers in a vtable if the vtable and one of the virtual functions it points to appear to have appropriate permissions (i.e. non-writable, and maybe executable), which will generally exclude heap pointers. Only enabled for Linux; this hasn't been tested on FreeBSD, and vtables are writable on Mac (PR24782) so this won't work there. Differential Revision: http://reviews.llvm.org/D12790 llvm-svn: 247484
* [MC] Fix style bugs introduced in r247471. Reported by Rafael Espindola.Davide Italiano2015-09-111-3/+3
| | | | llvm-svn: 247483
* When comparing two block captures for layout, don't crashJohn McCall2015-09-112-1/+10
| | | | | | | | if they have the same alignment and one was 'this'. Fixes PR24780. llvm-svn: 247482
* Fix handling of _start being undefined.Rafael Espindola2015-09-112-2/+7
| | | | | | We were crashing before. llvm-svn: 247481
* Merge TempScop into ScopMichael Kruse2015-09-112-165/+88
| | | | | | | | | | | Summary: TempScop is basically a holder for AccFuncMap, the dictionary from BasicBlocks to IRAccess lists. We move the list into polly::Scop and remove the polly::TempScop class. There is one small change in behavior: If ScopInfo finds that its AssumedContext is impossible, it bails out by deleting the Scop object. The TempScop::print (invoked with opt -polly-scops -analyze) cannot print the AccFuncMap anymore as it would with a separate TempScop. Differential Revision: http://reviews.llvm.org/D12803 llvm-svn: 247480
* Fix a thinko causing test logs for crashes to not get written.Zachary Turner2015-09-111-1/+1
| | | | llvm-svn: 247479
* Fix a copy and paste error. Sorry about that.Rafael Espindola2015-09-111-1/+1
| | | | llvm-svn: 247478
* Let selector-expr-lvalue.mm actually test something.Nico Weber2015-09-111-8/+15
| | | | | | | I accidentally introduced a bug locally, and noticed that none of the tests caught it. No longer! llvm-svn: 247477
* [Static Analyzer] Properly cash the configuration option for lambda support. Gabor Horvath2015-09-111-1/+3
| | | | llvm-svn: 247476
* Implement -rpath.Rafael Espindola2015-09-115-1/+26
| | | | llvm-svn: 247475
* [Shave]: pass -isystem dirs and "-Wa," args to moviAsmDouglas Katzman2015-09-112-7/+9
| | | | llvm-svn: 247474
* Specify target triple in alwaysinline tests.Evgeniy Stepanov2015-09-112-6/+6
| | | | | | This should fix the tests on Windows (failing due to mangling differencies). llvm-svn: 247473
* Simplify logic introduced in r247464.David Majnemer2015-09-111-3/+3
| | | | llvm-svn: 247472
* [MC] Don't crash on division by zero.Davide Italiano2015-09-112-1/+17
| | | | | | Differential Revision: http://reviews.llvm.org/D12776 llvm-svn: 247471
* Introspect llvm-config --assertion-mode in cmake out-of-tree buildsMichael Kruse2015-09-111-0/+28
| | | | | | | | | | | | | | | | | | | | When compiling Polly without LLVM sources but with system-installed LLVM, the build process would not honor the LLVM_ENABLE_ASSERTIONS setting LLVM was compiled with, but effectively assume that it is switched off when compiling. During unit-tests llvm-lit would still query the LLVM_ENABLE_ASSERTIONS flag and enable tests which require assertions. Even if enabled for LLVM, Polly does not output its debug info and statistics in this this mode such that 7 tests fail. To fix, we query llvm-config --assertion-mode and if on, enable assertions as HandleLLVMOptions.cmake would do. We cannot reliably use HandleLLVMOptions.cmake itself as the host's LLVM build might have been built using automake and distributions change file locations (e.g. Debian to /usr/share/llvm-${VERSION}/cmake/HandleLLVMOptions.cmake). llvm-svn: 247470
* Add missed import lldbtest.Oleksiy Vyalov2015-09-112-0/+2
| | | | llvm-svn: 247469
* [tooling] In CompileCommand, Expose the 'file' that was associated with the ↵Argyrios Kyrtzidis2015-09-117-8/+37
| | | | | | command. llvm-svn: 247468
* [CMake] [Darwin] Add support for building bootstrap builds with -fltoChris Bieneman2015-09-111-2/+13
| | | | | | When building with LTO the bootstrap builds need to depend on libLTO, llvm-ar, and llvm-ranlib, which all need to be passed into the bootstrap build. This functionality only works on Darwin. llvm-svn: 247467
* [analyzer] Improve behavior if Clang not found.Anton Yartsev2015-09-111-31/+33
| | | | | | | - Eliminate 'No such file or directory at scan-build line ...' error if '$RealBin/bin/clang' or '$RealBin/clang' directory does not exist. - Eliminate 'Use of uninitialized value $Clang in concatenation (.) or string at scan-build line ...' error if help is displayed while $Clang was not found. llvm-svn: 247466
* Always_inline codegen rewrite.Evgeniy Stepanov2015-09-1116-28/+355
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current implementation may end up emitting an undefined reference for an "inline __attribute__((always_inline))" function by generating an "available_externally alwaysinline" IR function for it and then failing to inline all the calls. This happens when a call to such function is in dead code. As the inliner is an SCC pass, it does not process dead code. Libc++ relies on the compiler never emitting such undefined reference. With this patch, we emit a pair of 1. internal alwaysinline definition (called F.alwaysinline) 2a. A stub F() { musttail call F.alwaysinline } -- or, depending on the linkage -- 2b. A declaration of F. The frontend ensures that F.inlinefunction is only used for direct calls, and the stub is used for everything else (taking the address of the function, really). Declaration (2b) is emitted in the case when "inline" is meant for inlining only (like __gnu_inline__ and some other cases). This approach, among other nice properties, ensures that alwaysinline functions are always internal, making it impossible for a direct call to such function to produce an undefined symbol reference. This patch is based on ideas by Chandler Carruth and Richard Smith. llvm-svn: 247465
* [MS ABI] Select an inheritance model in template argumentsDavid Majnemer2015-09-112-3/+16
| | | | | | | | | | | | We used to only select an inheritance model if the pointer to member was nullptr. Instead, select a model regardless of the member pointer's value. N.B. This bug was exposed by making member pointers report true for isIncompleteType but has been latent since the member pointer scheme's inception. llvm-svn: 247464
* [analyzer] Add -analyzer-config option for function size the inliner ↵Devin Coughlin2015-09-115-7/+41
| | | | | | | | | | | | | | | | | | | considers as large Add an option (-analyzer-config min-blocks-for-inline-large=14) to control the function size the inliner considers as large, in relation to "max-times-inline-large". The option defaults to the original hard coded behaviour, which I believe should be adjustable with the other inlining settings. The analyzer-config test has been modified so that the analyzer will reach the getMinBlocksForInlineLarge() method and store the result in the ConfigTable, to ensure it is dumped by the debug checker. A patch by Sean Eveson! Differential Revision: http://reviews.llvm.org/D12406 llvm-svn: 247463
* [Edit] Fix issue with tracking what macro argument inputs have been edited.Argyrios Kyrtzidis2015-09-114-16/+84
| | | | | | This was not working correctly, leading to erroneously rejecting valid edits. llvm-svn: 247462
* Add a non-exiting diagnostic handler for LTO.Yunzhong Gao2015-09-113-3/+25
| | | | | | | This is in order to give LTO clients a chance to do some clean-up before terminating the process. llvm-svn: 247461
* XFAIL miscellaneous tests on windows.Zachary Turner2015-09-1119-0/+33
| | | | | | llvm.org/pr24778 llvm-svn: 247460
* XFAIL 2 breakpoint tests on Windows.Zachary Turner2015-09-112-0/+2
| | | | | | llvm.org/pr24777 llvm-svn: 247459
* XFAIL some more tests related to value apiZachary Turner2015-09-114-1/+4
| | | | | | llvm.org/pr24772 llvm-svn: 247458
* XFAIL TestDisassembleBreakpoint.Zachary Turner2015-09-111-0/+1
| | | | | | | | This is a trivial issue to fix, just marking it for later. Windows prints function signatures a bit differently, and the test expects a specific format. llvm-svn: 247457
* XFAIL tests that try to call a function in the inferior.Zachary Turner2015-09-116-0/+8
| | | | | | llvm.org/pr21765 llvm-svn: 247456
* XFAIL some C++ language specific tests on Windows.Zachary Turner2015-09-118-1/+8
| | | | | | http://llvm.org/pr24764 llvm-svn: 247455
* typo; NFCSanjay Patel2015-09-111-1/+1
| | | | llvm-svn: 247454
* Don't make assumptions about the size of the dynamic string table.Rafael Espindola2015-09-111-6/+1
| | | | | | It contains pathnames, so it can be different in each machine. llvm-svn: 247453
* Fix a small typo in ObjectFileELF.cpp.Stephane Sezer2015-09-111-1/+1
| | | | llvm-svn: 247452
OpenPOWER on IntegriCloud