summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add getNode() to post dominators.Tobias Grosser2010-01-111-0/+4
| | | | | | Implement the same interface as already available for dominators. llvm-svn: 93194
* Use isa<ElaboratedType> rather than getAs<ElaboratedType>, since theDouglas Gregor2010-01-112-2/+6
| | | | | | | latter may (eventually) perform multiple levels of desugaring (thus breaking the newly-added tests) and the former is faster. Thanks, John! llvm-svn: 93192
* Extend r93152 to work on OR r, r. If the source set bits are known not to ↵Evan Cheng2010-01-114-10/+51
| | | | | | overlap, then select as an ADD instead. llvm-svn: 93191
* Add test case from PR5763Douglas Gregor2010-01-111-0/+7
| | | | llvm-svn: 93190
* reduce this to a sensible testcase.Chris Lattner2010-01-111-18/+5
| | | | llvm-svn: 93189
* Allow redefinitions of typedef-names within class scope when the typeDouglas Gregor2010-01-112-5/+29
| | | | | | | | | they redefine is a class-name but not a typedef-name, per C++0x [dcl.typedef]p4. The code in the test was valid C++98 and is valid C++0x, but an unintended consequence of DR56 made it ill-formed in C++03 (which we were luck enough to implement). Fixes PR5455. llvm-svn: 93188
* Shorten up this testcase.David Greene2010-01-111-378/+0
| | | | llvm-svn: 93187
* Fix a problem related to rewrite of anonymous unions.Fariborz Jahanian2010-01-112-2/+33
| | | | | | (fixes radar 6948022) llvm-svn: 93186
* Revert 93158. It's breaking quite a few x86_64 tests.Evan Cheng2010-01-116-44/+38
| | | | llvm-svn: 93185
* Avoid adding PHI arguments for a predecessor that has gone away when a ↵Jakob Stoklund Olesen2010-01-112-14/+116
| | | | | | | | BRCOND was constant folded. This fixes PR5980. llvm-svn: 93184
* Remove unused string functions.Benjamin Kramer2010-01-112-83/+0
| | | | llvm-svn: 93183
* Do not turn 8-bit OR to ADD since ADD8ri is not 3-addressfiable.Evan Cheng2010-01-111-4/+1
| | | | llvm-svn: 93182
* Fix pasto.Benjamin Kramer2010-01-111-1/+1
| | | | llvm-svn: 93181
* Disable transformation of select of two loads to a select of address and ↵Mon P Wang2010-01-111-28/+41
| | | | | | | | then a load if the loads are not in the default address space because the transformation discards src value info. llvm-svn: 93180
* Use the new isInteger() method in a couple places, some random cleanup, andChris Lattner2010-01-111-23/+15
| | | | | | add a fixme. llvm-svn: 93179
* When resolving a single function template specialization to aDouglas Gregor2010-01-112-1/+37
| | | | | | | function, be sure to adjust the resulting argument type to a pointer (if necessary). Fixes PR5910 and PR5949. llvm-svn: 93178
* Test case for naming of conversion function template specializationsDouglas Gregor2010-01-111-0/+78
| | | | llvm-svn: 93177
* Avoid use of deprecated functions (CStrInCStrNoCase and StringsEqualNoCase).Benjamin Kramer2010-01-112-13/+13
| | | | llvm-svn: 93175
* Add StrInStrNoCase, a StringRef version of CStrInCStrNoCase.Benjamin Kramer2010-01-112-0/+18
| | | | llvm-svn: 93174
* When computing surrogates for calls to a value of object type, lookDouglas Gregor2010-01-112-6/+12
| | | | | | for all visible conversion functions. llvm-svn: 93173
* Add top level section for named metadata.Devang Patel2010-01-111-8/+35
| | | | llvm-svn: 93172
* Change return type of getObjCEncodingTypeSize() to CharUnits as the units ↵Ken Dyck2010-01-112-8/+8
| | | | | | are in characters. llvm-svn: 93171
* Improve unclear bits and inaccuracies in structure and insertvalueJeffrey Yasskin2010-01-111-6/+9
| | | | | | | | documentation. Patch by Dustin Laurence! llvm-svn: 93170
* Fix type mismatch on 64-bit platforms (GNU ObjC).David Chisnall2010-01-111-1/+1
| | | | llvm-svn: 93169
* Remove some pointless FIXMEs. No functionality changeDouglas Gregor2010-01-111-5/+0
| | | | llvm-svn: 93168
* Update the -tailcallopt description to match djg's improvements to the callingJeffrey Yasskin2010-01-111-5/+0
| | | | | | convention. llvm-svn: 93167
* Add support for out-of-line definitions of conversion functionDouglas Gregor2010-01-111-4/+7
| | | | | | | | templates. Previously, a little thinko in the code that replaced a conversion function template with its redeclaration was causing some very weird lookup behavior. llvm-svn: 93166
* s/NextValueNo/NextMDValueNo while processing metadata.Devang Patel2010-01-112-12/+12
| | | | llvm-svn: 93165
* Tighten up the "cannot return array or function type" diagnostic toDouglas Gregor2010-01-114-5/+8
| | | | | | | say either "array type" or "function type", whichever it is. No reason to make the user guess. llvm-svn: 93164
* Turns out llvm-gcc still uses SplitString with a vector. Add it back until IBenjamin Kramer2010-01-112-0/+18
| | | | | | have a fix. llvm-svn: 93163
* Implement name lookup for conversion function template specializationsDouglas Gregor2010-01-1111-32/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | (C++ [temp.mem]p5-6), which involves template argument deduction based on the type named, e.g., given struct X { template<typename T> operator T*(); } x; when we call x.operator int*(); we perform template argument deduction to determine that T=int. This template argument deduction is needed for template specialization and explicit instantiation, e.g., template<> X::operator float*() { /* ... */ } and when calling or otherwise naming a conversion function (as in the first example). This fixes PR5742 and PR5762, although there's some remaining ugliness that's causing out-of-line definitions of conversion function templates to fail. I'll look into that separately. llvm-svn: 93162
* Reimplement getToken and SplitString as "StringRef helper functions"Benjamin Kramer2010-01-116-49/+44
| | | | | | | | | - getToken is modeled after StringRef::split but it can split on multiple separator chars and skips leading seperators. - SplitString is a StringRef::split variant for more than 2 elements with the same behaviour as getToken. llvm-svn: 93161
* Use a 32-bit and with implicit zero-extension instead of a 64-bit and if itDan Gohman2010-01-112-3/+51
| | | | | | | | | | | has an immediate with at least 32 bits of leading zeros, to avoid needing to materialize that immediate in a register first. FileCheckize, tidy, and extend a testcase to cover this case. This fixes rdar://7527390. llvm-svn: 93160
* Fixup rewrite of ivars accessed via an explicit objectFariborz Jahanian2010-01-112-3/+9
| | | | | | in a function. Fixes radar 7522803. llvm-svn: 93159
* Re-instate MOV64r0 and MOV16r0, with adjustments to work with theDan Gohman2010-01-116-37/+57
| | | | | | | | new AsmPrinter. This is perhaps less elegant than describing them in terms of MOV32r0 and subreg operations, but it allows the current register to rematerialize them. llvm-svn: 93158
* Generalize this check to avoid depending on a specific register assignment.Dan Gohman2010-01-111-1/+1
| | | | llvm-svn: 93157
* Make this test less trivial, to avoid spurious failures.Dan Gohman2010-01-111-2/+2
| | | | llvm-svn: 93156
* Pattern top-level operators don't need to be restricted to aDan Gohman2010-01-112-2/+2
| | | | | | single user. The _su forms are intended for non-top-level nodes. llvm-svn: 93155
* Reword this comment to reference a more fundamental issue.Dan Gohman2010-01-111-2/+2
| | | | llvm-svn: 93154
* Roll out ASTContext::getTypeSizeInChars(), replacing instances ofKen Dyck2010-01-1115-117/+141
| | | | | | | | | | "ASTContext::getTypeSize() / 8". Replace [u]int64_t variables with CharUnits ones as appropriate. Also rename RawType, fromRaw(), and getRaw() in CharUnits to QuantityType, fromQuantity(), and getQuantity() for clarity. llvm-svn: 93153
* Select an OR with immediate as an ADD if the input bits are known zero. This ↵Evan Cheng2010-01-114-10/+64
| | | | | | allow the instruction to be 3address-fied if needed. llvm-svn: 93152
* Implement a feature (-vector-unaligned-mem) to allow targets toDavid Greene2010-01-115-4/+418
| | | | | | | | ignore alignment requirements for SIMD memory operands. This is useful on architectures like the AMD 10h that do not trap on unaligned references if a status bit is twiddled at startup time. llvm-svn: 93151
* Make Clang complain about taking the address of an unqualified member ↵Sebastian Redl2010-01-113-2/+31
| | | | | | function. Fixes PR5985. llvm-svn: 93150
* Respond to Chris' review:Victor Hernandez2010-01-114-14/+23
| | | | | | | Make InsertDbgValueIntrinsic() and get Offset take and recieve a uint64_t. Get constness correct for getVariable() and getValue(). llvm-svn: 93149
* Enhance ScanReachableSymbols::scan(). Now another OSAtomic test case passes.Zhongxing Xu2010-01-113-106/+11
| | | | | | The old test case has a little mistake. llvm-svn: 93148
* add one more bitfield optimization, allowing clang to generateChris Lattner2010-01-112-2/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | good code on PR4216: _test_bitfield: ## @test_bitfield orl $32962, %edi movl $4294941946, %eax andq %rdi, %rax ret instead of: _test_bitfield: movl $4294941696, %ecx movl %edi, %eax orl $194, %edi orl $32768, %eax andq $250, %rdi andq %rax, %rcx movq %rdi, %rax orq %rcx, %rax ret Evan is looking into the remaining andq+imm -> andl optimization. llvm-svn: 93147
* Enhance SVals::getAsRegion: get the region that is converted to an integer.Zhongxing Xu2010-01-113-9/+12
| | | | | | This with previous patch fixes a OSAtomic test case. llvm-svn: 93146
* Extend CanEvaluateZExtd to handle and/or/xor more aggressively in theChris Lattner2010-01-112-0/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BitsToClear case. This allows it to promote expressions which have an and/or/xor after the lshr, promoting cases like test2 (from PR4216) and test3 (random extample extracted from a spec benchmark). clang now compiles the code in PR4216 into: _test_bitfield: ## @test_bitfield movl %edi, %eax orl $194, %eax movl $4294902010, %ecx andq %rax, %rcx orl $32768, %edi andq $39936, %rdi movq %rdi, %rax orq %rcx, %rax ret instead of: _test_bitfield: ## @test_bitfield movl %edi, %eax orl $194, %eax movl $4294902010, %ecx andq %rax, %rcx shrl $8, %edi orl $128, %edi shlq $8, %rdi andq $39936, %rdi movq %rdi, %rax orq %rcx, %rax ret which is still not great, but is progress. llvm-svn: 93145
* Remove the dead TD argument to CanEvaluateZExtd, and add aChris Lattner2010-01-112-15/+81
| | | | | | | | | new BitsToClear result which allows us to start promoting expressions that end with a lshr-by-constant. This is conservatively correct and better than what we had before (see testcases) but still needs to be extended further. llvm-svn: 93144
* improve comments, remove dead TD argument to CanEvaluateSExtd.Chris Lattner2010-01-111-11/+12
| | | | llvm-svn: 93143
OpenPOWER on IntegriCloud