summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [LPM] Use a map from analysis ID to immutable passes in the legacy passChandler Carruth2015-09-102-22/+28
| | | | | | | | | | | | manager to avoid a slow linear scan of every immutable pass and on every attempt to find an analysis pass. This speeds up 'check-llvm' on an unoptimized build for me by 15%, YMMV. It should also help (a tiny bit) other folks that are really bottlenecked on repeated runs of tiny pass pipelines across small IR files. llvm-svn: 247240
* CFI: Add diagnostic handler and tests for indirect call checker.Peter Collingbourne2015-09-105-1/+91
| | | | | | Differential Revision: http://reviews.llvm.org/D11858 llvm-svn: 247239
* CFI: Introduce -fsanitize=cfi-icall flag.Peter Collingbourne2015-09-1019-126/+230
| | | | | | | | | | This flag causes the compiler to emit bit set entries for functions as well as runtime bitset checks at indirect call sites. Depends on the new function bitset mechanism. Differential Revision: http://reviews.llvm.org/D11857 llvm-svn: 247238
* Enable the shrink wrapping optimization for PPC64.Kit Barton2015-09-104-77/+645
| | | | | | | | | | | | | | The changes in this patch are as follows: 1. Modify the emitPrologue and emitEpilogue methods to work properly when the prologue and epilogue blocks are not the first/last blocks in the function 2. Fix a bug in PPCEarlyReturn optimization caused by an empty entry block in the function 3. Override the runShrinkWrap PredicateFtor (defined in TargetMachine) to check whether shrink wrapping should run: Shrink wrapping will run on PPC64 (Little Endian and Big Endian) unless -enable-shrink-wrap=false is specified on command line A new test case, ppc-shrink-wrapping.ll was created based on the existing shrink wrapping tests for x86, arm, and arm64. Phabricator review: http://reviews.llvm.org/D11817 llvm-svn: 247237
* [AArch64] Match FI+offset in STNP addressing mode.Ahmed Bougacha2015-09-103-6/+28
| | | | | | | | | | | | | | | First, we need to teach isFrameOffsetLegal about STNP. It already knew about the STP/LDP variants, but those were probably never exercised, because it's only the load/store optimizer that generates STP/LDP, and the only user of the method is frame lowering, which runs earlier. The STP/LDP cases were wrong: they didn't take into account the fact that they return two results, not one, so the immediate offset will be the 4th operand, not the 3rd. Follow-up to r247234. llvm-svn: 247236
* [MC] Convert all the remaining tests from macho-dump to llvm-readobj.Davide Italiano2015-09-1037-4561/+5023
| | | | | | | | | This sort-of deprecates macho-dump. It may take still a little while to garbage collect it, but at least there's no real usage of it in the tree anymore. New tests should always rely on llvm-readobj or llvm-objdump. llvm-svn: 247235
* [AArch64] Match base+offset in STNP addressing mode.Ahmed Bougacha2015-09-102-14/+181
| | | | | | Followup to r247231. llvm-svn: 247234
* EmitRecord* API change: accepts ArrayRef instead of a SmallVector (NFC)Mehdi Amini2015-09-104-236/+148
| | | | | | | | | | | | | | | This reapply a variant commit r247179 after post-commit review from D.Blaikie. Hopefully I got it right this time: lifetime of initializer list ends as with any expression, which make invalid the pattern: ArrayRef<int> Arr = { 1, 2, 3, 4}; Just like StringRef, ArrayRef shouldn't be used to initialize local variable but only as function argument. From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 247233
* Makes EmitRecord() accepting ArrayRef and raw array (NFC)Mehdi Amini2015-09-101-5/+5
| | | | | | | | After r247186, a vector is no longer needed as the push_front for the code is removed. From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 247232
* [AArch64] Support selecting STNP.Ahmed Bougacha2015-09-104-0/+270
| | | | | | | | | | | | | | | | | | We could go through the load/store optimizer and match STNP where we would have matched a nontemporal-annotated STP, but that's not reliable enough, as an opportunistic optimization. Insetad, we can guarantee emitting STNP, by matching them at ISel. Since there are no single-input nontemporal stores, we have to resort to some high-bits-extracting trickery to generate an STNP from a plain store. Also, we need to support another, LDP/STP-specific addressing mode, base + signed scaled 7-bit immediate offset. For now, only match the base. Let's make it smart separately. Part of PR24086. llvm-svn: 247231
* AMDGPU/SI: Fix more cases of losing exec operandsMatt Arsenault2015-09-103-16/+12
| | | | llvm-svn: 247230
* AMDGPU/SI: Fix creating v_mov_b32s without exec usesMatt Arsenault2015-09-101-2/+14
| | | | | | | This will be caught by existing tests with a verifier check to be added in a future commit. llvm-svn: 247229
* Don't crash when emitting a block under returns_nonnull.John McCall2015-09-102-2/+15
| | | | | | rdar://22071955 llvm-svn: 247228
* Removed debug prints that I accidentally left in.Greg Clayton2015-09-101-6/+0
| | | | llvm-svn: 247227
* Revert r247216: "Fix Clang-tidy misc-use-override warnings, other minor fixes"Hans Wennborg2015-09-109-94/+95
| | | | | | | This caused build breakges, e.g. http://lab.llvm.org:8011/builders/clang-x86_64-ubuntu-gdb-75/builds/24926 llvm-svn: 247226
* [CodeGen] Make x86 nontemporal store patfrags generic. NFC.Ahmed Bougacha2015-09-102-19/+18
| | | | | | To be used by other targets. llvm-svn: 247225
* On MacOSX, revamp the way we link against the llvm/clang .a files by making ↵Greg Clayton2015-09-101-38/+39
| | | | | | a text file that contains all .a filenames and use that when linking in Xcode. llvm-svn: 247224
* [RewriteStatepointsForGC] Minor refactor to use shared implementation [NFC]Philip Reames2015-09-101-8/+1
| | | | llvm-svn: 247223
* Revert r247218: "Fix Clang-tidy misc-use-override warnings, other minor fixes"Hans Wennborg2015-09-106-32/+30
| | | | | | | | | | | Seems it broke the Polly build. From http://lab.llvm.org:8011/builders/perf-x86_64-penryn-O3-polly-fast/builds/11687/steps/compile/logs/stdio: In file included from /home/grosser/buildslave/perf-x86_64-penryn-O3-polly-fast/llvm.src/lib/TableGen/Record.cpp:14:0: /home/grosser/buildslave/perf-x86_64-penryn-O3-polly-fast/llvm.src/include/llvm/TableGen/Record.h:369:3: error: looser throw specifier for 'virtual llvm::TypedInit::~TypedInit()' /home/grosser/buildslave/perf-x86_64-penryn-O3-polly-fast/llvm.src/include/llvm/TableGen/Record.h:270:11: error: overriding 'virtual llvm::Init::~Init() noexcept (true)' llvm-svn: 247222
* [RewriteStatepointsForGC] Strengthen a confusingly weak assertion [NFC]Philip Reames2015-09-101-3/+3
| | | | | | The assertion was weaker than it should be and gave the impression we're growing the number of base defining values being considered during the fixed point interation. That's not true. The tighter form of the assert is useful documentation. llvm-svn: 247221
* [RewriteStatepointsForGC] One last bit of naming [NFCI]Philip Reames2015-09-101-7/+7
| | | | llvm-svn: 247220
* [WinEH] Add codegen support for cleanuppad and cleanupretReid Kleckner2015-09-1013-70/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | All of the complexity is in cleanupret, and it mostly follows the same codepaths as catchret, except it doesn't take a return value in RAX. This small example now compiles and executes successfully on win32: extern "C" int printf(const char *, ...) noexcept; struct Dtor { ~Dtor() { printf("~Dtor\n"); } }; void has_cleanup() { Dtor o; throw 42; } int main() { try { has_cleanup(); } catch (int) { printf("caught it\n"); } } Don't try to put the cleanup in the same function as the catch, or Bad Things will happen. llvm-svn: 247219
* Fix Clang-tidy misc-use-override warnings, other minor fixesHans Wennborg2015-09-106-30/+32
| | | | | | | | Patch by Eugene Zelenko! Differential Revision: http://reviews.llvm.org/D12741 llvm-svn: 247218
* [RewriteStatepointsForGC] Further style/naming fixup [NFCI]Philip Reames2015-09-101-26/+26
| | | | llvm-svn: 247217
* Fix Clang-tidy misc-use-override warnings, other minor fixesHans Wennborg2015-09-109-95/+94
| | | | | | | | Patch by Eugene Zelenko! Differential Revision: http://reviews.llvm.org/D12740 llvm-svn: 247216
* Bitcode Writer: EmitRecordWith* takes an ArrayRef instead of a SmallVector (NFC)Mehdi Amini2015-09-101-21/+22
| | | | | | | | This reapply commit r247178 after post-commit review from D.Blaikie in a way that makes it compatible with the existing API. From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 247215
* Add makeArrayRef() overload for ArrayRef input (no-op/identity) NFCMehdi Amini2015-09-102-0/+26
| | | | | | | | | | | | | | | The purpose is to allow templated wrapper to work with either ArrayRef or any convertible operation: template<typename Container> void wrapper(const Container &Arr) { impl(makeArrayRef(Arr)); } with Container being a std::vector, a SmallVector, or an ArrayRef. From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 247214
* [RewriteStatepointsForGC] More naming cleanup [NFCI]Philip Reames2015-09-101-6/+6
| | | | llvm-svn: 247213
* [RewriteStatepointsForGC] Code cleanup [NFC]Philip Reames2015-09-091-25/+26
| | | | | | Factor out common code related to naming values, fix a small style issue. More to follow in separate changes. llvm-svn: 247211
* [RewriteStatepointsForGC] Extend base pointer inference to handle insertelementPhilip Reames2015-09-092-59/+144
| | | | | | | | | | | | This change is simply enhancing the existing inference algorithm to handle insertelement instructions by conservatively inserting a new instruction to propagate the vector of associated base pointers. In the process, I'm ripping out the peephole optimizations which mostly helped cover the fact this hadn't been done. Note that most of the newly inserted nodes will be nearly immediately removed by the post insertion optimization pass introduced in 246718. Arguably, we should be trying harder to avoid the malloc traffic here, but I'd rather get the code correct, then worry about compile time. Unlike previous extensions of the algorithm to handle more case, I discovered the existing code was causing miscompiles in some cases. In particular, we had an implicit assumption that the peephole covered *all* insert element instructions, so if we had a value directly based on a insert element the peephole didn't cover, we proceeded as if it were a base anyways. Not good. I believe we had the same issue with shufflevector which is why I adjusted the predicate for them as well. Differential Revision: http://reviews.llvm.org/D12583 llvm-svn: 247210
* ARC: Fix the precise-lifetime suppression of returns_inner_pointerJohn McCall2015-09-092-13/+155
| | | | | | | | receiver extension for message sends via property syntax. rdar://22172983 llvm-svn: 247209
* [RewriteStatepointsForGC] Make base pointer inference deterministicPhilip Reames2015-09-091-44/+35
| | | | | | | | | | | | | | Previously, the base pointer algorithm wasn't deterministic. The core fixed point was (of course), but we were inserting new nodes and optimizing them in an order which was unspecified and variable. We'd somewhat hacked around this for testing by sorting by value name, but that doesn't solve the general determinism problem. Instead, we can use the order of traversal over the def/use graph to give us a single consistent ordering. Today, this is a DFS order, but the exact order doesn't mater provided it's deterministic for a given input. (Q: It is safe to rely on a deterministic order of operands right?) Note that this only fixes the determinism within a single inference step. The inference step is currently invoked many times in a non-deterministic order. That's a future change in the sequence. :) Differential Revision: http://reviews.llvm.org/D12640 llvm-svn: 247208
* Fix access control for lookups using the Microsoft __super extension.John McCall2015-09-092-2/+64
| | | | | | rdar://22464808 llvm-svn: 247207
* Fix a small comment typo in Windows Process code.Stephane Sezer2015-09-091-3/+3
| | | | llvm-svn: 247206
* Change the load addr into something that works on linux x86_64.Rafael Espindola2015-09-0912-50/+56
| | | | | | With this simple static programs run again. llvm-svn: 247205
* thread_local is not implemented for targeting cygwin yet.NAKAMURA Takumi2015-09-091-0/+1
| | | | llvm-svn: 247204
* convert builtin_unpredictable on a switch into metadata for LLVMSanjay Patel2015-09-092-3/+30
| | | | llvm-svn: 247203
* Fix the build-llvm.pl to not create one monster .a file from all of the llvm ↵Greg Clayton2015-09-092-83/+65
| | | | | | and clang .a files. We now just make a file list which we pass to the linker. llvm-svn: 247202
* LowerBitSets: Fix non-determinism bug.Peter Collingbourne2015-09-093-11/+29
| | | | | | | | Visit disjoint sets in a deterministic order based on the maximum BitSetNM index, otherwise the order in which we visit them will depend on pointer comparisons. This was being exposed by MSan. llvm-svn: 247201
* Introduce the notion of an escape helper. Different languages have different ↵Enrico Granata2015-09-0910-350/+450
| | | | | | | | notion of what to print in a string and how to escape non-printable things. The escape helper is where this notion is provided to LLDB This is NFC, other than a code re-org llvm-svn: 247200
* Generating assumption loads of vptr after ctor call (fixed)Piotr Padlewski2015-09-0913-148/+570
| | | | | | | | | | | | | | | | | Generating call assume(icmp %vtable, %global_vtable) after constructor call for devirtualization purposes. For more info go to: http://lists.llvm.org/pipermail/cfe-dev/2015-July/044227.html Edit: Fixed version because of PR24479. After this patch got reverted because of ScalarEvolution bug (D12719) Merged after John McCall big patch (Added Address). http://reviews.llvm.org/D11859 llvm-svn: 247199
* [PM] Update Polly for the new AA infrastructure landed in r247167.Chandler Carruth2015-09-0914-32/+48
| | | | llvm-svn: 247198
* Remove unused function.Greg Clayton2015-09-092-23/+0
| | | | llvm-svn: 247197
* Now that CompilerType uses a "TypeSystem *" and a "void *" instead of a ↵Greg Clayton2015-09-091-0/+4
| | | | | | | | "clang::ASTContext *" and a "void *", we need to know if anyone is trying to create a CompilerType from a clang::ASTContext that has no backing ClangASTContext. This assert will fire if this is the case and we will need to fix the offending code. llvm-svn: 247196
* Remove Target::GetBasicType()Enrico Granata2015-09-091-5/+0
| | | | | | | | I was experimenting with it briefly, and then settled on Target::GetTypeSystem + TypeSystem::GetBasicType, so this API is not necessary to have Thanks to Ryan Brown for bringing it to my attention llvm-svn: 247195
* [Concepts] Add diagnostic; invalid specifier on function or variable concept ↵Nathan Wilson2015-09-093-1/+59
| | | | | | | | | | | | | | declaration Summary: Diagnose variable and function concept declarations when an invalid specifier appears Reviewers: rsmith, aaron.ballman, faisalv, fraggamuffin, hubert.reinterpretcast Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D12435 llvm-svn: 247194
* Remove a call to deleted function.Greg Clayton2015-09-091-1/+0
| | | | llvm-svn: 247193
* [SEH] Emit 32-bit SEH tables for the new EH IRReid Kleckner2015-09-099-103/+522
| | | | | | | | | | | The 32-bit tables don't actually contain PC range data, so emitting them is incredibly simple. The 64-bit tables, on the other hand, use the same table for state numbering as well as label ranges. This makes things more difficult, so it will be implemented later. llvm-svn: 247192
* For now skip ThreadSpecificBreakTestCase on FreeBSDEd Maste2015-09-091-0/+1
| | | | | | | | | | It often hangs or times out, and obscures issues with other tests. Just skip it for now (until the FreeBSD test suite is producing consistent results) so that we can get a buildbot back. Previous investigation (for failures) in llvm.org/pr18522 llvm-svn: 247190
* Preparatory work for letting language plugins help the StringPrinter with ↵Enrico Granata2015-09-096-125/+130
| | | | | | formatting special characters llvm-svn: 247189
OpenPOWER on IntegriCloud