summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Change LowerFP_TO_SINT to create the specific code it needs instead of Chris Lattner2007-10-151-4/+11
| | | | | | | | | | unconditionally creating an i64 bitcast. With the future legalizer design, operation legalization can't introduce new nodes with illegal types. This fixes the rest of olden on ppc32. llvm-svn: 43005
* LowerFP_TO_SINT must not create a stack object if it's not needed.Evan Cheng2007-10-152-6/+24
| | | | llvm-svn: 43004
* Add removeModuleProvider()Devang Patel2007-10-152-1/+20
| | | | llvm-svn: 43002
* Reapply the fix in 42908 for this file. This changes the function namesDan Gohman2007-10-151-6/+6
| | | | | | from "test" to "foo" so that they don't match the grep -i ST. llvm-svn: 43001
* Several name lookup conflict detection fixes involving objective-c names.Fariborz Jahanian2007-10-153-4/+46
| | | | llvm-svn: 43000
* Fixed incorrect renaming of method name (forgot two characters).Ted Kremenek2007-10-151-2/+2
| | | | llvm-svn: 42999
* Added more doxygen comments.Ted Kremenek2007-10-151-19/+56
| | | | | | | Renamed internal method of ImutAVLTree::RemoveMutableFlag to MarkImmutable. Added enum for bit manipulation (more self-documentating). llvm-svn: 42998
* Fix PR1729: watch out for val# with no def.Evan Cheng2007-10-152-8/+413
| | | | llvm-svn: 42996
* Move CreateStackTemporary out to SelectionDAGChris Lattner2007-10-151-20/+7
| | | | llvm-svn: 42995
* add a new CreateStackTemporary helper method.Chris Lattner2007-10-152-0/+17
| | | | llvm-svn: 42994
* implement promotion of BR_CC operands, fixing bisort on ppc.Chris Lattner2007-10-151-2/+65
| | | | llvm-svn: 42992
* updates from duncanChris Lattner2007-10-151-5/+5
| | | | llvm-svn: 42991
* Fix run line. Tanya Lattner2007-10-151-1/+1
| | | | llvm-svn: 42990
* New test.Devang Patel2007-10-151-0/+5
| | | | llvm-svn: 42986
* Achieve same result but use fewer lines of code.Devang Patel2007-10-151-8/+7
| | | | llvm-svn: 42985
* Fast-track obviously over-large and over-small exponents during decimal->Neil Booth2007-10-151-8/+44
| | | | | | | | | | integer conversion. In some such cases this makes us one or two orders of magnitude faster than NetBSD's libc. Glibc seems to have a similar fast path. Also, tighten up some upper bounds to save a bit of memory. llvm-svn: 42984
* Added ASTContext::setObjcIdType/getObjcIdType(), set by Sema.Steve Naroff2007-10-155-7/+31
| | | | | | Also noticed ASTContext::BuiltinVaListType wasn't being initialized to the null type (so I set it). llvm-svn: 42983
* Fix some typos. Call getTypeToTransformTo rather thanDuncan Sands2007-10-151-14/+14
| | | | | | | | | getTypeToExpandTo. The difference is that getTypeToExpandTo gives the final result of expansion (eg: i128 -> i32 on a 32 bit machine) while getTypeToTransformTo does just one step (i128 -> i64). llvm-svn: 42982
* One mundane change: Change ReplaceAllUsesOfValueWith to *optionally* Chris Lattner2007-10-157-61/+1605
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | take a deleted nodes vector, instead of requiring it. One more significant change: Implement the start of a legalizer that just works on types. This legalizer is designed to run before the operation legalizer and ensure just that the input dag is transformed into an output dag whose operand and result types are all legal, even if the operations on those types are not. This design/impl has the following advantages: 1. When finished, this will *significantly* reduce the amount of code in LegalizeDAG.cpp. It will remove all the code related to promotion and expansion as well as splitting and scalarizing vectors. 2. The new code is very simple, idiomatic, and modular: unlike LegalizeDAG.cpp, it has no 3000 line long functions. :) 3. The implementation is completely iterative instead of recursive, good for hacking on large dags without blowing out your stack. 4. The implementation updates nodes in place when possible instead of deallocating and reallocating the entire graph that points to some mutated node. 5. The code nicely separates out handling of operations with invalid results from operations with invalid operands, making some cases simpler and easier to understand. 6. The new -debug-only=legalize-types option is very very handy :), allowing you to easily understand what legalize types is doing. This is not yet done. Until the ifdef added to SelectionDAGISel.cpp is enabled, this does nothing. However, this code is sufficient to legalize all of the code in 186.crafty, olden and freebench on an x86 machine. The biggest issues are: 1. Vectors aren't implemented at all yet 2. SoftFP is a mess, I need to talk to Evan about it. 3. No lowering to libcalls is implemented yet. 4. Various operations are missing etc. 5. There are FIXME's for stuff I hax0r'd out, like softfp. Hey, at least it is a step in the right direction :). If you'd like to help, just enable the #ifdef in SelectionDAGISel.cpp and compile code with it. If this explodes it will tell you what needs to be implemented. Help is certainly appreciated. Once this goes in, we can do three things: 1. Add a new pass of dag combine between the "type legalizer" and "operation legalizer" passes. This will let us catch some long-standing isel issues that we miss because operation legalization often obfuscates the dag with target-specific nodes. 2. We can rip out all of the type legalization code from LegalizeDAG.cpp, making it much smaller and simpler. When that happens we can then reimplement the core functionality left in it in a much more efficient and non-recursive way. 3. Once the whole legalizer is non-recursive, we can implement whole-function selectiondags maybe... llvm-svn: 42981
* One xform performed by LegalizeDAG is transformation of "store of fp" to ↵Chris Lattner2007-10-151-6/+28
| | | | | | | | | | | | | "store of int". Make two changes: 1) only xform "store of f32" if i32 is a legal type for the target. 2) only xform "store of f64" if either i64 or i32 are legal for the target. 3) if i64 isn't legal, manually lower to 2 stores of i32 instead of letting a later pass of legalize do it. This is ugly, but helps future changes I'm about to commit. llvm-svn: 42980
* avoid an APFloat copy.Chris Lattner2007-10-151-1/+1
| | | | llvm-svn: 42979
* Add a (disabled by default) way to view the ID of a node.Chris Lattner2007-10-151-0/+4
| | | | llvm-svn: 42978
* remove dead enum, make setNodeId public.Chris Lattner2007-10-151-11/+4
| | | | llvm-svn: 42977
* Fix 80 col violationChris Lattner2007-10-151-3/+3
| | | | llvm-svn: 42976
* Teach the type checker about "id". This removes the following bogus warning...Steve Naroff2007-10-152-2/+24
| | | | | | | | | [dylan:~/llvm/tools/clang] admin% ../../Debug/bin/clang t.m t.m:29:18: warning: incompatible pointer types assigning 'id' to 'NSString *' resultString = [[NSString alloc] initWithFormat:0 arguments:0]; ~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ llvm-svn: 42975
* Add support for Pascal strings.Anders Carlsson2007-10-158-4/+45
| | | | llvm-svn: 42974
* Fix a warningAnders Carlsson2007-10-151-1/+1
| | | | llvm-svn: 42973
* Handle PPC long double in CBackend.Dale Johannesen2007-10-151-0/+9
| | | | llvm-svn: 42972
* - Teach ObjcInterfaceDecl::lookupInstance/ClassMethod to look through protocols.Steve Naroff2007-10-144-3/+38
| | | | | | | - Start looking up methods in the global method pools (for "id"). - Start integrating interface types into the type system. llvm-svn: 42971
* remove misleading comment.Chris Lattner2007-10-141-2/+1
| | | | llvm-svn: 42970
* If a target doesn't have HasMULHU or HasUMUL_LOHI, ExpandOp would returnChris Lattner2007-10-141-1/+0
| | | | | | without lo/hi set. Fall through to making a libcall instead. llvm-svn: 42969
* Add category lookup (removing a couple FIXME's).Steve Naroff2007-10-143-11/+37
| | | | | | Changed ObjcInterfaceDecl::ListCategories->CategoryList. llvm-svn: 42968
* Fix -ast-dump for ObjC.Steve Naroff2007-10-141-0/+6
| | | | llvm-svn: 42967
* Consolidate logic for creating NaNs. Silence compiler warning.Neil Booth2007-10-142-10/+16
| | | | llvm-svn: 42966
* Whether arithmetic is supported is a property of the semantics. Make itNeil Booth2007-10-141-41/+36
| | | | | | so, and clean up the checks by putting them in an inline function. llvm-svn: 42965
* Separate out parsing of decimal number. Use this to only allocateNeil Booth2007-10-141-97/+150
| | | | | | | memory for the significand once up-front. Also ignore insignificant trailing zeroes; this saves unnecessary multiplications later. llvm-svn: 42964
* New test case.Evan Cheng2007-10-141-0/+28
| | | | llvm-svn: 42963
* Unbreak x86-64.Evan Cheng2007-10-141-4/+3
| | | | llvm-svn: 42962
* When coalescing an EXTRACT_SUBREG and the dst register is a physical register,Evan Cheng2007-10-143-27/+29
| | | | | | | | the source register will be coalesced to the super register of the LHS. Properly merge in the live ranges of the resulting coalesced interval that were part of the original source interval to the live interval of the super-register. llvm-svn: 42961
* Revert 42908 for now.Evan Cheng2007-10-1413-78/+93
| | | | llvm-svn: 42960
* Fix type mismatch error in PPC Altivec (only causesDale Johannesen2007-10-141-2/+2
| | | | | | a problem when asserts are on). From vecLib. llvm-svn: 42959
* Disable some compile-time optimizations on PPCDale Johannesen2007-10-142-0/+15
| | | | | | long double. llvm-svn: 42958
* - Added Sema::AddFactoryMethodToGlobalPool and ↵Steve Naroff2007-10-145-9/+92
| | | | | | | | | | | Sema::AddInstanceMethodToGlobalPool and DenseMaps. This will allow us to efficiently lookup a method from a selector given no type information (for the "id" data type). - Fixed some funky "} else {" indentation in Sema::ActOnAddMethodsToObjcDecl(). I'd prefer we stay away from this style...it wastes space and isn't any easier to read (from my perspective, at least:-) - Changed Parser::ParseObjCInterfaceDeclList() to only call Action::ActOnAddMethodsToObjcDecl() when it actually has methods to add (since most interface have methods, this is a very minor cleanup). llvm-svn: 42957
* Fixing a typo. Found by Kevin André!Gordon Henriksen2007-10-141-1/+1
| | | | llvm-svn: 42956
* Clarify that fastcc has a problem with nested functionDuncan Sands2007-10-131-1/+1
| | | | | | trampolines, rather than with nested functions themselves. llvm-svn: 42955
* Enhance the truncstore optimization code to handle shiftedChris Lattner2007-10-131-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | values and propagate demanded bits through them in simple cases. This allows this code: void foo(char *P) { strcpy(P, "abc"); } to compile to: _foo: ldrb r3, [r1] ldrb r2, [r1, #+1] ldrb r12, [r1, #+2]! ldrb r1, [r1, #+1] strb r1, [r0, #+3] strb r2, [r0, #+1] strb r12, [r0, #+2] strb r3, [r0] bx lr instead of: _foo: ldrb r3, [r1, #+3] ldrb r2, [r1, #+2] orr r3, r2, r3, lsl #8 ldrb r2, [r1, #+1] ldrb r1, [r1] orr r2, r1, r2, lsl #8 orr r3, r2, r3, lsl #16 strb r3, [r0] mov r2, r3, lsr #24 strb r2, [r0, #+3] mov r2, r3, lsr #16 strb r2, [r0, #+2] mov r3, r3, lsr #8 strb r3, [r0, #+1] bx lr testcase here: test/CodeGen/ARM/truncstore-dag-combine.ll This also helps occasionally for X86 and other cases not involving unaligned load/stores. llvm-svn: 42954
* new testcaseChris Lattner2007-10-131-0/+18
| | | | llvm-svn: 42953
* Add a simple optimization to simplify the input toChris Lattner2007-10-132-1/+43
| | | | | | | truncate and truncstore instructions, based on the knowledge that they don't demand the top bits. llvm-svn: 42952
* Fix an incorrect assertion.Anders Carlsson2007-10-131-2/+3
| | | | llvm-svn: 42951
* If the power of 5 is exact, and the reciprocal exact, the error is zero not ↵Neil Booth2007-10-131-1/+1
| | | | | | one half-ulps. This prevents an infinite loop in rare cases. llvm-svn: 42950
OpenPOWER on IntegriCloud