summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* PTX: Add basic register spilling codeJustin Holewinski2011-06-204-0/+135
| | | | | | | | | | | | The current implementation generates stack loads/stores, which are really just mov instructions from/to "special" registers. This may not be the most efficient implementation, compared to an approach where the stack registers are directly folded into instructions, but this is easier to implement and I have yet to see a case where ptxas is unable to see through this kind of register usage and know what is really going on. llvm-svn: 133443
* Don't apply on PPC64 the 32bit ADDIC optimizations as there's no overflowRoman Divacky2011-06-202-14/+52
| | | | | | with 32bit values. llvm-svn: 133439
* Define va_copy when in C++0x mode; C++0x picked it up from C99.Douglas Gregor2011-06-201-1/+1
| | | | llvm-svn: 133438
* Define __cplusplus to 201103L when in (non-GNU) C++0x mode.Douglas Gregor2011-06-202-4/+11
| | | | llvm-svn: 133437
* This is an automatically reduced test case that crashed in GVN, at someJay Foad2011-06-201-0/+106
| | | | | | point during the development of the phi operand changes. llvm-svn: 133436
* Change how PHINodes store their operands.Jay Foad2011-06-2019-158/+213
| | | | | | | | | | | | | | | | | | | Change PHINodes to store simple pointers to their incoming basic blocks, instead of full-blown Uses. Note that this loses an optimization in SplitCriticalEdge(), because we can no longer walk the use list of a BasicBlock to find phi nodes. See the comment I removed starting "However, the foreach loop is slow for blocks with lots of predecessors". Extend replaceAllUsesWith() on a BasicBlock to also update any phi nodes in the block's successors. This mimics what would have happened when PHINodes were proper Users of their incoming blocks. (Note that this only works if OldBB->replaceAllUsesWith(NewBB) is called when OldBB still has a terminator instruction, so it still has some successors.) llvm-svn: 133435
* Make better use of the PHINode API.Jay Foad2011-06-207-21/+34
| | | | | | | | Change various bits of code to make better use of the existing PHINode API, to insulate them from forthcoming changes in how PHINodes store their operands. llvm-svn: 133434
* Remove the AugmentedUse struct.Jay Foad2011-06-203-20/+9
| | | | | | | | I don't think the AugmentedUse struct buys us much, either in correctness or in ease of use. Ditch it, and simplify Use::getUser() and User::allocHungoffUses(). llvm-svn: 133433
* Re enable 133415 with two fixesRafael Espindola2011-06-201-3/+8
| | | | | | | | * Don't introduce a duplicated bb in the CFG * When making a branch unconditional, clear the PredCond array so that it is really unconditional. llvm-svn: 133432
* Disable the logic added by rafael in commit 133415 to see if it brings theDuncan Sands2011-06-201-1/+1
| | | | | | | | dragonegg buildbots back to life. Original commit message: Teach early dup how to duplicate basic blocks with one successor and only phi instructions into more complex blocks. llvm-svn: 133430
* Use an explicitly 64-bit triple flag to ensure we can easily verify theChandler Carruth2011-06-201-1/+1
| | | | | | | | | | types printed in various diagnostics. We could omit checking for the types, but that can mask errors where the wrong type is streamed into the diagnostic. There was at least one of these caught by this test already. llvm-svn: 133429
* Fix a problem with the diagnostics of invalid arithmetic with functionChandler Carruth2011-06-203-4/+5
| | | | | | | | pointers I found while working on the NULL arithmetic warning. We here always assuming the LHS was the pointer, instead of using the selected pointer expression. llvm-svn: 133428
* Remove this poor "abstraction" from the AST. Sorry! =DChandler Carruth2011-06-201-14/+0
| | | | llvm-svn: 133426
* Move away from the poor "abstraction" I added to Type. John arguedChandler Carruth2011-06-202-32/+52
| | | | | | | | | | | | | | effectively that this abstraction simply doesn't exist. That is highlighted by the fact that by using it we were papering over a more serious error in this warning: the fact that we warned for *invalid* constructs involving member pointers and block pointers. I've fixed the obvious issues with the warning here, but this is confirming an original suspicion that this warning's implementation is flawed. I'm looking into how we can implement this more reasonably. WIP on that front. llvm-svn: 133425
* Fix PromoteIntRes_TRUNCATE: Add support for cases where theNadav Rotem2011-06-202-4/+39
| | | | | | | source vector type is to be split while the target vector is to be promoted. (eg: <4 x i64> -> <4 x i8> ) llvm-svn: 133424
* Remove more unnecessary #include <llvm/ADT/SmallVector.h>Francois Pichet2011-06-205-5/+0
| | | | llvm-svn: 133418
* Remove unnecessary include.Francois Pichet2011-06-201-1/+0
| | | | llvm-svn: 133417
* Fix MSVC build. next() function already exists in the MSVC headers. This ↵Francois Pichet2011-06-201-1/+1
| | | | | | create a overload conflict. Make sure we pick up the llvm one. llvm-svn: 133416
* Teach early dup how to duplicate basic blocks with one successor and only ↵Rafael Espindola2011-06-201-2/+142
| | | | | | | | phi instructions into more complex blocks. llvm-svn: 133415
* Update to match mainline ConstantStruct::get API change. Also, use Chris Lattner2011-06-2012-70/+71
| | | | | | | | | | | ConvertType on InitListExprs as they are being converted. This is needed for a forthcoming patch, and improves the IR generated anyway (see additional type names in testcases). This patch also converts a bunch of std::vector's in CGObjCMac to use C arrays. There are a ton more that should be converted as well. llvm-svn: 133413
* Revamp the "ConstantStruct::get" methods. Previously, these were scatteredChris Lattner2011-06-2013-113/+144
| | | | | | | | | | | | | | | all over the place in different styles and variants. Standardize on two preferred entrypoints: one that takes a StructType and ArrayRef, and one that takes StructType and varargs. In cases where there isn't a struct type convenient, we now add a ConstantStruct::getAnon method (whose name will make more sense after a few more patches land). It would be "really really nice" if the ConstantStruct::get and ConstantVector::get methods didn't make temporary std::vectors. llvm-svn: 133412
* [analyzer] Replace stream-built error message with constant string. No ↵Jordy Rose2011-06-201-5/+4
| | | | | | functionality change. llvm-svn: 133410
* introduce an isLayoutIdentical() method, which is currently just a pointerChris Lattner2011-06-201-1/+8
| | | | | | equality check. llvm-svn: 133409
* [analyzer] Re-enable checking for strncpy, along with a new validation of ↵Jordy Rose2011-06-202-9/+131
| | | | | | the size argument. strncat is not yet up-to-date, but I'm leaving it enabled for now (there shouldn't be any false positives, at least...) llvm-svn: 133408
* Add a RegisterTuples class to Target.td and TableGen.Jakob Stoklund Olesen2011-06-202-1/+146
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A RegisterTuples instance is used to synthesize super-registers by zipping together lists of sub-registers. This is useful for generating pseudo-registers representing register sequence constraints like 'two consecutive GPRs', or 'an even-odd pair of floating point registers'. The RegisterTuples def can be used in register set operations when building register classes. That is the only way of accessing the synthesized super-registers. For example, the ARM QQ register class of pseudo-registers could have been formed like this: // Form pairs Q0_Q1, Q2_Q3, ... def QQPairs : RegisterTuples<[qsub_0, qsub_1], [(decimate QPR, 2), (decimate (shl QPR, 1), 2)]>; def QQ : RegisterClass<..., (add QQPairs)>; Similarly, pseudo-registers representing '3 consecutive D-regs with wraparound' look like: // Form D0_D1_D2, D1_D2_D3, ..., D30_D31_D0, D31_D0_D1. def DSeqTriples : RegisterTuples<[dsub_0, dsub_1, dsub_2], [(rotl DPR, 0), (rotl DPR, 1), (rotl DPR, 2)]>; TableGen automatically computes aliasing information for the synthesized registers. Register tuples are still somewhat experimental. We still need to see how they interact with MC. llvm-svn: 133407
* [analyzer] Eliminate "byte string function" from CStringChecker's ↵Jordy Rose2011-06-203-76/+113
| | | | | | diagnostics, and make it easier to provide custom messages for overflow checking, in preparation for re-enabling strncpy checking. llvm-svn: 133406
* Restructure the API in Type based on a conversation with Richard Smith.Chandler Carruth2011-06-203-28/+25
| | | | | | | | | | | This makes 'isPointerLikeType' a little less confusing, and pulls the decay check into a separate interface that is much more clear and concrete. Also, just implement these as logical wrappers around other predicates. Having a switch based implementation isn't likely to be necessary. We can try to optimize them later if they show up on a profile. llvm-svn: 133405
* Add TestInlinedFrame.py to exercise the newly added SBFrame APIs: ↵Johnny Chen2011-06-205-3/+132
| | | | | | IsInlined() and GetFunctionName(). llvm-svn: 133404
* More fixes: One of my fixes to type_traits earlier today was incorrect, so ↵Howard Hinnant2011-06-193-46/+46
| | | | | | that is reverted. Recently clang appears to have tightened up its definition of is_convertible and that has caused some failures in [unordered_][multi]map. I've switched to using is_constructible to restablish the desired functionality in [unordered_][multi]map. Specifically, inserting rvalues of move-only types for the keys. llvm-svn: 133402
* Miscellaneous minor fixes in <type_traits>Howard Hinnant2011-06-191-2/+16
| | | | llvm-svn: 133401
* Fix a FIXME by making GlobalVariable::getInitializer() return aJay Foad2011-06-199-17/+17
| | | | | | const Constant *. llvm-svn: 133400
* Update test.Benjamin Kramer2011-06-191-27/+27
| | | | llvm-svn: 133390
* Code cleanups: Remove duplicated logic in PromotInteRes_BITCAST, reserve ↵Nadav Rotem2011-06-191-7/+5
| | | | | | vector space, reuse types. llvm-svn: 133389
* Calls to AssertZext and getZeroExtendInReg must be made using scalar types.Nadav Rotem2011-06-191-3/+4
| | | | llvm-svn: 133388
* More clarifications.John McCall2011-06-191-15/+16
| | | | llvm-svn: 133387
* Improve the intro to the runtime-functions section.John McCall2011-06-191-4/+27
| | | | llvm-svn: 133386
* Describe the ARC runtime support calls.John McCall2011-06-191-0/+265
| | | | llvm-svn: 133385
* Turn -Wnull-arithmetic back on by default -- we now have tests for theChandler Carruth2011-06-191-1/+1
| | | | | | | | | false positives, including those in the GCC test suite, and don't warn about them. Let me know if this causes fallout, we can turn it back off if needed. llvm-svn: 133384
* Add test cases for false positives on -Wnull-arithmetic from RichardChandler Carruth2011-06-195-28/+56
| | | | | | | | | | | | | Trieu, and fix them by checking for array and function types as well as pointer types. I've added a predicate method on Type to bundle together the logic we're using here: isPointerLikeType(). I'd welcome better names for this predicate, this is the best I came up with. It's implemented as a switch to be a touch lighter weight than all the chained isa<...> casts that would result otherwise. llvm-svn: 133383
* When promoting the vector elements in CopyToParts, use vector truncNadav Rotem2011-06-191-11/+3
| | | | | | instead of scalarizing, and doing an element-by-element truncat. llvm-svn: 133382
* Reduce the runtime of the test. Keep only the interesting cases.Nadav Rotem2011-06-191-1077/+0
| | | | llvm-svn: 133381
* Handle decltype keyword in Parser::isDeclarationSpecifier.Francois Pichet2011-06-192-0/+9
| | | | | | Fixes PR10154. Found by parsing MFC 2010 code with clang. llvm-svn: 133380
* Bumping Xcode project version for lldb-63.Greg Clayton2011-06-192-16/+16
| | | | llvm-svn: 133378
* Fixed a crasher where we were accessing a symbol with a bad index.Greg Clayton2011-06-191-1/+1
| | | | llvm-svn: 133377
* Make sure we have a valid object file before we try getting the symbol tableGreg Clayton2011-06-191-30/+32
| | | | | | so we avoid crashing. llvm-svn: 133376
* Fixed a case where LLDB would crash if we get C++ operators with invalidGreg Clayton2011-06-192-0/+34
| | | | | | | operator counts due to bad debug DWARF debug info. We now verify the operator has a valid number of params using the clang operator tables. llvm-svn: 133375
* Revert r133373. I was going to use this to teach the Verifier to verify constantNick Lewycky2011-06-191-101/+1
| | | | | | | expressions, but Chris wants to instead reduce the set of possible constant expression types. llvm-svn: 133374
* Add the remaining instructions/constant expressions as Operators so that codeNick Lewycky2011-06-191-1/+101
| | | | | | can manipulate instructions and constantexpr's uniformly. No users yet though. llvm-svn: 133373
* Add support for MSVC __debugbreak compiler intrinsic.Francois Pichet2011-06-191-0/+2
| | | | llvm-svn: 133372
* Remove support for parsing the "type i32" syntax for defining a numberedChris Lattner2011-06-1930-334/+89
| | | | | | | top level type without a specified number. This syntax isn't documented and blocks forward progress. llvm-svn: 133371
OpenPOWER on IntegriCloud