summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add an option to parse all comments as documentation commentsDmitri Gribenko2013-04-1011-13/+53
| | | | | | Patch by Amin Shali. llvm-svn: 179180
* Template MachOObjectFile over endianness too.Rafael Espindola2013-04-103-106/+117
| | | | llvm-svn: 179179
* Simplify the templating a bit.Rafael Espindola2013-04-101-24/+19
| | | | | | | Since we only ever instantiate with a type that is a MachOType instantiation, we don't need to pass template argument. llvm-svn: 179178
* [ASan] Do not check the shadow of NULL argument in the time() interceptor.Alexander Potapenko2013-04-102-1/+21
| | | | | | Add a test for time(). llvm-svn: 179177
* Move two methods out of line.Rafael Espindola2013-04-101-15/+21
| | | | llvm-svn: 179176
* [asan] implement callbacks for unaligned loads/storesKostya Serebryany2013-04-103-0/+111
| | | | | | | | | | | | Reviewers: samsonov Reviewed By: samsonov CC: samsonov, llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D652 llvm-svn: 179175
* R600: Add VTX_READ_* and RAT_WRITE_CACHELESS_* when computing cf addrVincent Lejeune2013-04-102-1/+54
| | | | llvm-svn: 179174
* [test] Use lit's shell test runner on WindowsReid Kleckner2013-04-101-3/+12
| | | | | | | | | | | | | | | | | | | | | | Summary: I did a local comparison between using bash and using lit's runner, and more of the suite passes with lit than passes with bash. Most of the bash failures have to do with /dev/null, which is nonsensical on Windows, but the lit runner handles it. The lit shell runner is also much faster than bash, so I would expect most Windows devs would want it by default. The behavior can be overridden on any OS by setting LIT_USE_INTERNAL_SHELL to 0 or 1 in the environment. Reviewers: chapuni, ddunbar CC: llvm-commits, timurrrr Differential Revision: http://llvm-reviews.chandlerc.com/D559 llvm-svn: 179173
* Revert "TMP"Tim Northover2013-04-101-1/+6
| | | | | | This reverts commit e652085eacbec62e4157d08d3f2f875e6e6d5bb4. llvm-svn: 179172
* ARM: Make "SMC" instructions conditional on new TrustZone architecture feature.Tim Northover2013-04-1011-25/+104
| | | | | | | | | | | | These instructions aren't universally available, but depend on a specific extension to the normal ARM architecture (rather than, say, v6/v7/...) so a new feature is appropriate. This also enables the feature by default on A-class cores which usually have these extensions, to avoid breaking existing code and act as a sensible default. llvm-svn: 179171
* TMPTim Northover2013-04-101-6/+1
| | | | llvm-svn: 179170
* Change CloneFunctionInto to always clone Argument attributes induvidually,Joey Gouly2013-04-102-23/+47
| | | | | | | rather than checking if the source and destination have the same number of arguments and copying the attributes over directly. llvm-svn: 179169
* Fixes recovering from errors when parsing braced init lists.Manuel Klimek2013-04-102-0/+39
| | | | | | | Before we would build huge unwrapped lines which take a long time to optimze. llvm-svn: 179168
* Fix labels with trailing comments and cleanup.Daniel Jasper2013-04-104-75/+63
| | | | | | | | | | | | | | | | | | Before: class A { public : // test }; After: class A { public: // test }; Also remove duplicate methods calculating properties of AnnotatedTokens and make them members of AnnotatedTokens so that they are in a common place. llvm-svn: 179167
* R600/SI: dynamical figure out the reg class of MIMGChristian Konig2013-04-107-17/+78
| | | | | | | | Depending on the number of bits set in the writemask. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> llvm-svn: 179166
* R600/SI: adjust writemask to only the used componentsChristian Konig2013-04-105-33/+156
| | | | | | Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> llvm-svn: 179165
* R600/SI: remove image sample writemaskChristian Konig2013-04-103-31/+30
| | | | | | Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> llvm-svn: 179164
* ScopDetect: Allow multiplications of the form <param> * <param>Tobias Grosser2013-04-102-0/+34
| | | | | | | We handle these by treating this result of the multiplication as an additional parameter. llvm-svn: 179163
* Cleanup PPCInstrInfo::DefinesPredicateHal Finkel2013-04-101-5/+10
| | | | | | Implement suggestions made by Bill Schmidt in post-commit review. Thanks! llvm-svn: 179162
* [ASan] fix a typo in legend in error reportAlexey Samsonov2013-04-101-2/+2
| | | | llvm-svn: 179161
* Update formatting to latest version of clang-formatTobias Grosser2013-04-1024-92/+100
| | | | llvm-svn: 179160
* Support SCoPs with multiple exit edgesTobias Grosser2013-04-1010-13/+266
| | | | | | | | | | | | | | | | | | | | | | Regions that have multiple exit edges are very common. A simple if condition yields e.g. such a region: if / \ then else \ / after Region: if -> after This regions contains the bbs 'if', 'then', 'else', but not 'after'. It has two exit edges 'then' -> 'after' and 'else' -> 'after'. Previously we scheduled the RegionSimplify pass to translate such regions into simple regions. With this patch, we now support them natively. Contributed-by: Star Tan <tanmx_star@yeah.net> llvm-svn: 179159
* Codegen: Replace region exit and entries recursivelyTobias Grosser2013-04-101-2/+3
| | | | | | | | | | | | | | During code generation we split the original entry and exit basic blocks of the scop to make room for the newly generated code. To keep the region tree up to date, we need to update the region tree. This patch ensures that not only the region of the scop is updated, but also all child regions that share the same entry or exit block. We have now test case here, as the bug is only exposed by the subsequent commit. The test cases of that commit also cover this bug. Contributed-by: Star Tan <tanmx_star@yeah.net> llvm-svn: 179158
* RegionInfo: Add helpers to replace entry/exit recursivelyTobias Grosser2013-04-102-0/+50
| | | | | | Contributed by: Star Tan <tanmx_star@yeah.net> llvm-svn: 179157
* PPC: Prep for if conversion of bctr[l]Hal Finkel2013-04-103-2/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | This adds in-principle support for if-converting the bctr[l] instructions. These instructions are used for indirect branching. It seems, however, that the current if converter will never actually predicate these. To do so, it would need the ability to hoist a few setup insts. out of the conditionally-executed block. For example, code like this: void foo(int a, int (*bar)()) { if (a != 0) bar(); } becomes: ... beq 0, .LBB0_2 std 2, 40(1) mr 12, 4 ld 3, 0(4) ld 11, 16(4) ld 2, 8(4) mtctr 3 bctrl ld 2, 40(1) .LBB0_2: ... and it would be safe to do all of this unconditionally with a predicated beqctrl instruction. llvm-svn: 179156
* Handle "typeof" in Objective-C format string checking. This previously crashed.Ted Kremenek2013-04-102-0/+10
| | | | | | | | Yes, this came from actual code. Fixes <rdar://problem/13557053>. llvm-svn: 179155
* Add support for computing the exception specification for an inheritingRichard Smith2013-04-104-7/+95
| | | | | | | | | | | constructor. This isn't quite perfect (as usual, we don't handle default arguments correctly yet, and we don't deal with copy/move constructors for arguments correctly either, but this will be fixed when we implement core issue 1351. This completes our support for inheriting constructors. llvm-svn: 179154
* Don't crash when mangling types defined in ObjC class extensions.John McCall2013-04-102-1/+34
| | | | | | | | | The original test case here was mangling a type name for TBAA, but we can provoke this in C++11 easily enough. rdar://13434937 llvm-svn: 179153
* When ObjectFileMachO::ParseSections() notices that it has a truncated file, ↵Jason Molenda2013-04-102-0/+32
| | | | | | | | | | | zero out the SectionList so we don't try to do anything with this file. Currently we end up crashing later in the debug session when we read past the end of the file -- this at least gets us closer with something like ProcessMachCore printing "error: core file has no sections". <rdar://problem/13468295> llvm-svn: 179152
* C++11 inheriting constructors: support for inheriting constructor templates.Richard Smith2013-04-1010-203/+413
| | | | llvm-svn: 179151
* <rdar://problem/13605348> Don't consider invalid user-defined literal ↵Douglas Gregor2013-04-102-0/+15
| | | | | | operators during overload resolution. llvm-svn: 179150
* fix typosSebastian Pop2013-04-101-3/+3
| | | | llvm-svn: 179149
* scop detection: properly instantiate SCEVs to the place where they are usedSebastian Pop2013-04-103-6/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix inspired from c2d4a0627e95c34a819b9d4ffb4db62daa78dade. Given the following code for (i = 0; i < 10; i++) { ; } S: A[i] = 0 When translate the data reference A[i] in statement S using scev, we need to retrieve the scev of 'i' at the location of 'S'. If we do not do this the scev that we obtain will be expressed as {0,+,1}_for and will reference loop iterators that do not surround 'S'. What we really want is the scev to be instantiated to the value of 'i' after the loop. This value is {10}. This used to crash in: int loopDimension = getLoopDepth(Expr->getLoop()); isl_aff *LAff = isl_aff_set_coefficient_si( isl_aff_zero_on_domain(LocalSpace), isl_dim_in, loopDimension, 1); (gdb) p Expr->dump() {8,+,8}<nw><%do.body> (gdb) p getLoopDepth(Expr->getLoop()) $5 = 0 isl_space *Space = isl_space_set_alloc(Ctx, 0, NbLoopSpaces); isl_local_space *LocalSpace = isl_local_space_from_space(Space); As we are trying to create a memory access in a stmt that is outside all loops, LocalSpace has 0 dimensions: (gdb) p NbLoopSpaces $12 = 0 (gdb) p Statement.BB->dump() if.then: ; preds = %do.end %0 = load float* %add.ptr, align 4 store float %0, float* %q.1.reg2mem, align 4 br label %if.end.single_exit and so the scev for %add.ptr should be taken at the place where it is used, i.e., it should be the value on the last iteration of the do.body loop, and not "{8,+,8}<nw><%do.body>". llvm-svn: 179148
* Template the MachO types over endianness.Rafael Espindola2013-04-103-109/+153
| | | | | | For now they are still only used as little endian. llvm-svn: 179147
* Include the more specific header.Rafael Espindola2013-04-101-1/+1
| | | | llvm-svn: 179146
* [frontend] -frewrite-includes: turn implicit module imports into @imports.Argyrios Kyrtzidis2013-04-102-15/+44
| | | | | | rdar://13610250 llvm-svn: 179145
* [frontend] When preprocessing, turn implicit module imports into @imports.Argyrios Kyrtzidis2013-04-102-0/+40
| | | | | | part of rdar://13610250 llvm-svn: 179144
* [frontend] -frewrite-includes: if there was no inclusion, don't add lineinfo ↵Argyrios Kyrtzidis2013-04-102-4/+9
| | | | | | that indicates return from another file. llvm-svn: 179143
* Repeat some #line directive tests for the GNU line marker directive.Michael Ilseman2013-04-101-1/+8
| | | | llvm-svn: 179142
* __sincosf_stret returns sinf / cosf in bits 0:31 and 32:63 of xmm0, not inEvan Cheng2013-04-102-6/+22
| | | | | | | | xmm0 / xmm1. rdar://13599493 llvm-svn: 179141
* Generalize the PassConfig API and remove addFinalizeRegAlloc().Andrew Trick2013-04-102-51/+96
| | | | | | | | | | The target hooks are getting out of hand. What does it mean to run before or after regalloc anyway? Allowing either Pass* or AnalysisID pass identification should make it much easier for targets to use the substitutePass and insertPass APIs, and create less need for badly named target hooks. llvm-svn: 179140
* Improve the diagnostics of the number-reading preprocessor directives.Michael Ilseman2013-04-103-7/+10
| | | | | | | | | | | | | | The GNU line marker directive was sharing code with the #line directive, but some of the warnings/errors were reporting as #line directive diagnostics in both cases. Previously: #line 11foo1 ==> "#line directive requires a simple digit sequence" # 11foo1 ==> "#line directive requires a simple digit sequence" Now, we get: #line 11foo1 ==> "#line directive requires a simple digit sequence" # 11foo1 ==> "GNU line marker directive requires a simple digit sequence" llvm-svn: 179139
* Suppress -Wunused-variable for variables declared in headers, which may inMatt Beaumont-Gay2013-04-104-11/+29
| | | | | | | | | | | fact be defined and used in another TU. Reshuffle some test cases because we suppress -Wunused-variable after we've emitted an error. This fixes PR15558. llvm-svn: 179138
* Don't erroneously put FunctionDecls into CXXRecordDeclsSean Callanan2013-04-091-0/+4
| | | | | | | | | | | if we didn't want to put in a CXXConstructorDecl. This prevents malformed classes (i.e., classes with regular C functions as members) from being generated from type information (and fixes a crash in the test suite). <rdar://problem/13550765> llvm-svn: 179136
* Mips specific inline asm operand modifier 'D' Jack Carter2013-04-092-3/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Modifier 'D' is to use the second word of a double integer. We had previously implemented the pure register varient of the modifier and this patch implements the memory reference. #include "stdio.h" int b[8] = {0,1,2,3,4,5,6,7}; void main() { int i; // The first word. Notice, no 'D' {asm ( "lw %0,%1;" : "=r" (i) : "m" (*(b+4)) );} printf("%d\n",i); // The second word {asm ( "lw %0,%D1;" : "=r" (i) : "m" (*(b+4)) );} printf("%d\n",i); } llvm-svn: 179135
* Allow PPC B and BLR to be if-converted into some predicated formsHal Finkel2013-04-097-0/+297
| | | | | | | | | | | | | | This enables us to form predicated branches (which are the same conditional branches we had before) and also a larger set of predicated returns (including instructions like bdnzlr which is a conditional return and loop-counter decrement all in one). At the moment, if conversion does not capture all possible opportunities. A simple example is provided in early-ret2.ll, where if conversion forms one predicated return, and then the PPCEarlyReturn pass picks up the other one. So, at least for now, we'll keep both mechanisms. llvm-svn: 179134
* Fix the help for unwind-on-error, it no longer controls what happens when an ↵Jim Ingham2013-04-091-1/+1
| | | | | | expression hits a breakpoint. llvm-svn: 179133
* Fix some comment typos.Bob Wilson2013-04-091-2/+2
| | | | llvm-svn: 179132
* Remove outdated run lines from tests.Richard Trieu2013-04-092-2/+0
| | | | | | | | | | These run lines originally tested that the fix-its were properly applied. Originally, the fixits were attached to warnings and were applied by -fixit. Now, the fixits are attached to notes, so nothing happens. These run lines still manage to pass since Clang will produce an empty output which gets piped back to Clang. Then Clang produces no error on an empty input. llvm-svn: 179131
* Hardening so we won't crash if an Objective-C interfaceSean Callanan2013-04-091-0/+3
| | | | | | | | doesn't have a corresponding type. <rdar://problem/13596142> llvm-svn: 179130
OpenPOWER on IntegriCloud