summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Revert r100193 since it causes failures in objc in clangMon P Wang2010-04-0210-99/+52
| | | | llvm-svn: 100200
* Revert r100191 since it breaks objc in clang Mon P Wang2010-04-0228-314/+143
| | | | llvm-svn: 100199
* Sema/Obj-C: Simplify -- eliminate dead casts & provable asserts, and narrow ↵Daniel Dunbar2010-04-021-7/+5
| | | | | | type. llvm-svn: 100197
* Rework our handling of copy construction of temporaries, which was aDouglas Gregor2010-04-0210-109/+224
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | poor (and wrong) approximation of the actual rules governing when to build a copy and when it can be elided. The correct implementation is actually simpler than the approximation. When we only enumerate constructors as part of initialization (e.g., for direct initialization or when we're copying from a class type or one of its derived classes), we don't create a copy. When we enumerate all conversion functions, we do create a copy. Before, we created some extra copies and missed some others. The new test copy-initialization.cpp shows a case where we missed creating a (required, non-elidable) copy as part of a user-defined conversion, which resulted in a miscompile. This commit also fixes PR6757, where the missing copy made us reject well-formed code in the ternary operator. This commit also cleans up our handling of copy elision in the case where we create an extra copy of a temporary object, which became necessary now that we produce the right copies. The code that seeks to find the temporary object being copied has moved into Expr::getTemporaryObject(); it used to have two different not-quite-the-same implementations, one in Sema and one in CodeGen. Note that we still do not attempt to perform the named return value optimization, so we miss copy elisions for return values and throw expressions. llvm-svn: 100196
* Reapply patch for adding support for address spaces and added a isVolatile ↵Mon P Wang2010-04-0210-52/+99
| | | | | | field to memcpy, memmove, and memset. llvm-svn: 100193
* Reapply address space patch after fixing an issue in MemCopyOptimizer.Mon P Wang2010-04-0228-143/+314
| | | | | | | Added support for address spaces and added a isVolatile field to memcpy, memmove, and memset, e.g., llvm.memcpy.i32(i8*, i8*, i32, i32) -> llvm.memcpy.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1) llvm-svn: 100191
* CG/NeXT: Assert some invariants on an ivar's containing decl context that I ↵Daniel Dunbar2010-04-021-0/+13
| | | | | | am about to refactor based on, following some testing. llvm-svn: 100188
* Add an explicit keyword.Dan Gohman2010-04-021-1/+1
| | | | llvm-svn: 100187
* Manually notify ScalarEvolution before making an operand replacement, sinceDan Gohman2010-04-022-0/+48
| | | | | | it can't currently observe such changes automatically. llvm-svn: 100186
* Fix SpecificBumpPtrAllocator iteration.Torok Edwin2010-04-021-1/+1
| | | | | | | | Need to start from (char*)(Slab+1), and not from (char*)Slab+1. This fixes crashes in Win64 debug mode. Thanks to Nicolas Capens! llvm-svn: 100184
* Add notes about dragonegg.Duncan Sands2010-04-021-5/+25
| | | | llvm-svn: 100183
* If a constructor is a dependent context, just set the base and member ↵Anders Carlsson2010-04-022-110/+80
| | | | | | initializers as they are written. Fixes a bug where we wouldn't show initialization order warnings when instantiating. llvm-svn: 100180
* Diagnose multiple base and member initializers in class templates.Anders Carlsson2010-04-022-46/+65
| | | | llvm-svn: 100179
* Recommit 100158 now that the buildbots are happy again.Bob Wilson2010-04-021-21/+29
| | | | llvm-svn: 100177
* Remove FIXME - if there's a better way to do this it isn't here.Eric Christopher2010-04-021-3/+0
| | | | llvm-svn: 100176
* More cleanup.Anders Carlsson2010-04-022-16/+8
| | | | llvm-svn: 100175
* Constify.Anders Carlsson2010-04-021-5/+5
| | | | llvm-svn: 100174
* Minor cleanup.Anders Carlsson2010-04-021-68/+79
| | | | llvm-svn: 100173
* Revert the recent alignment changes. They're broken for -Os because,Dan Gohman2010-04-025-16/+4
| | | | | | | in particular, they end up aligning strings at 16-byte boundaries, and there's no way for GlobalOpt to check OptForSize. llvm-svn: 100172
* After trivial coalescing, the MI being visited may have become a copy. Avoid ↵Evan Cheng2010-04-022-1/+75
| | | | | | | | adding it to CSE hash table since copies aren't being considered for CSE and they may be deleted. rdar://7819990 llvm-svn: 100170
* Resolve a layering violation by making AddTaggedVal public forChandler Carruth2010-04-023-24/+21
| | | | | | | | PartialDiagnostic objects, and hoisting the stream operator for QualType into Type.h with the operator for the normal DiagnosticBuilder. Also remove the no longer needed friend declaration for the DeclarationName stream operator. llvm-svn: 100169
* Teach AnalyzeBranch, RemoveBranch and the branchDale Johannesen2010-04-0211-9/+111
| | | | | | | folder to be tolerant of debug info following the branch(es) at the end of a block. llvm-svn: 100168
* Disambiguate conditional expression for newer GCCs.Chandler Carruth2010-04-021-2/+2
| | | | llvm-svn: 100167
* Remove this initializer so that the optimizer doesn't convertDan Gohman2010-04-021-1/+1
| | | | | | unaligned loads into aligned loads. llvm-svn: 100166
* Update this test for the new preferred alignment heuristics.Dan Gohman2010-04-021-1/+1
| | | | llvm-svn: 100165
* Revert 100158 in case it is causing some of the buildbot problems.Bob Wilson2010-04-021-29/+21
| | | | llvm-svn: 100164
* Updated the install location for EnhancedDisassemblySean Callanan2010-04-021-10/+7
| | | | | | | | on Mac OS X to use @rpath rather than an absolute path. Also allowed the version to be set using an environment variable. llvm-svn: 100163
* Change variables which are exactly 16 bytes to be 16-byte-aligned too.Dan Gohman2010-04-021-1/+1
| | | | | | This fixes test/Transforms/GlobalOpt/gv-align.ll. llvm-svn: 100161
* Make globalopt refine global variable alignment.Dan Gohman2010-04-022-1/+13
| | | | llvm-svn: 100160
* Check in a motivating test for the revised access semantics.John McCall2010-04-021-0/+16
| | | | llvm-svn: 100159
* Check for terminating conditions before adding PHIs to the worklists.Bob Wilson2010-04-021-21/+29
| | | | | | This is more efficient than adding them to the worklist and then ignoring them. llvm-svn: 100158
* remove these merge-tracking properties as theyGabor Greif2010-04-020-0/+0
| | | | | | might interfere with merges to other branches (as Dan pointed out) llvm-svn: 100157
* If the bitcode reader input stream isn't a multiple of 4 bytes, it's moreDan Gohman2010-04-021-3/+7
| | | | | | | likely not a bitcode file at all, rather than being a bitcode file which is truncated. Check for this case and issue a more relevant error message. llvm-svn: 100156
* Correct the calculation of access to more closely model the wording inJohn McCall2010-04-022-123/+265
| | | | | | the standard. llvm-svn: 100155
* Update analyzer build.Ted Kremenek2010-04-011-1/+1
| | | | llvm-svn: 100153
* Remove trailing whitespace.Bob Wilson2010-04-011-5/+5
| | | | llvm-svn: 100148
* Rewrite another SSAUpdater function to avoid recursion.Bob Wilson2010-04-012-34/+48
| | | | llvm-svn: 100147
* Revert r100143.Eric Christopher2010-04-0115-285/+42
| | | | llvm-svn: 100146
* Revert r100117.Devang Patel2010-04-011-18/+6
| | | | llvm-svn: 100145
* Minor cleanup with the ternary operatorDouglas Gregor2010-04-011-2/+2
| | | | llvm-svn: 100144
* Add some switches helpful for debugging:David Greene2010-04-0114-42/+282
| | | | | | | | | | | | | | | | | | | | | | | -print-before=<Pass Name> Dump IR before running pass <Pass Name>. -print-before-all Dump IR before running each pass. -print-after-all Dump IR after running each pass. These are helpful when tracking down a miscompilation. It is easy to get IR dumps and do diffs on them, etc. To make this work well, add a new getPrinterPass API to Pass so that each kind of pass (ModulePass, FunctionPass, etc.) can create a Pass suitable for dumping out the kind of object the Pass works on. llvm-svn: 100143
* In 64-bit mode, use i64 to lower memcpy / memset instead of f64.Evan Cheng2010-04-013-9/+26
| | | | llvm-svn: 100137
* Do not eagerly record known previous location. DBG_VALUE may not cause a new ↵Devang Patel2010-04-011-1/+2
| | | | | | label due to one or other reason. llvm-svn: 100134
* Skip checking preferred alignment of GVs defined in other translation units ↵Evan Cheng2010-04-011-1/+1
| | | | | | all together. llvm-svn: 100133
* Add comments about DstAlign and SrcAlign.Evan Cheng2010-04-015-8/+31
| | | | llvm-svn: 100132
* Change another SSAUpdater function to avoid recursion.Bob Wilson2010-04-012-19/+25
| | | | llvm-svn: 100131
* Simplify the code to check for existing PHIs, now that it is only used inBob Wilson2010-04-011-30/+12
| | | | | | one place. This removes the template function added in svn 94690. llvm-svn: 100130
* Relax the typesafty rules of block pointers types whichFariborz Jahanian2010-04-012-6/+7
| | | | | | take'id' or return 'id' in their type. Fixes radar 7814131. llvm-svn: 100129
* The SSAUpdater should avoid recursive traversals of the CFG, since that mayBob Wilson2010-04-012-16/+24
| | | | | | blow out the stack for really big functions. Start by fixing an easy case. llvm-svn: 100126
* Overhaul checking of non-type template arguments that should refer toDouglas Gregor2010-04-019-188/+347
| | | | | | | | | | | an object or function. Our previous checking was too lax, and ended up allowing missing or extraneous address-of operators, among other evils. The new checking provides better diagnostics and adheres more closely to the standard. Fixes PR6563 and PR6749. llvm-svn: 100125
OpenPOWER on IntegriCloud