aboutsummaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Pass callsite return type to TargetLowering::LowerCall and use that to check ↵Evan Cheng2010-02-0225-34/+30
| | | | | | sibcall eligibility. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95130 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate FileModel::Model, just use CodeGenFileType. The clientChris Lattner2010-02-024-13/+10
| | | | | | | | of the code generator shouldn't care what object format a target uses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95124 91177308-0d34-0410-b5e6-96231b3b80d8
* remove the remnants of TargetMachOWriterInfo.Chris Lattner2010-02-022-26/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95114 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new top-level MachO.h file for manifest constants, fixing Chris Lattner2010-02-021-3/+3
| | | | | | | a layering violation from MC -> Target. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95113 91177308-0d34-0410-b5e6-96231b3b80d8
* Added t2BFI (Bitfield Insert) entry for disassembler, with blank pattern field.Johnny Chen2010-02-021-1/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95112 91177308-0d34-0410-b5e6-96231b3b80d8
* remove PPCMachOWriterInfo.Chris Lattner2010-02-025-214/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95111 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate all forms of addPassesToEmitMachineCode exceptChris Lattner2010-02-021-72/+8
| | | | | | | | | | the one used by the JIT. Remove all forms of addPassesToEmitFileFinish except the one used by the static code generator. Inline the remaining version of addPassesToEmitFileFinish into its only caller. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95109 91177308-0d34-0410-b5e6-96231b3b80d8
* Test revert 95050; there's a good chance it's causingDale Johannesen2010-02-021-14/+0
| | | | | | | | buildbot failure. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95103 91177308-0d34-0410-b5e6-96231b3b80d8
* Inline addAssemblyEmitter into its one real caller and deleteChris Lattner2010-02-021-31/+7
| | | | | | | | the -print-emitted-asm option. The JIT shouldn't have to pull in the asmprinter. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95100 91177308-0d34-0410-b5e6-96231b3b80d8
* Adding missing methods for creating Add, Mul, Neg and Sub with NUW.Duncan Sands2010-02-022-2/+30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95086 91177308-0d34-0410-b5e6-96231b3b80d8
* Apparently gdb is not amused by empty lines in pubtypes section.Devang Patel2010-02-021-2/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95064 91177308-0d34-0410-b5e6-96231b3b80d8
* NULL terminate name in pubtypes sections.Devang Patel2010-02-021-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95062 91177308-0d34-0410-b5e6-96231b3b80d8
* don't turn (A & (C0?-1:0)) | (B & ~(C0?-1:0)) -> C0 ? A : BChris Lattner2010-02-021-9/+13
| | | | | | | | for vectors. Codegen is generating awful code or segfaulting in various cases (e.g. PR6204). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95058 91177308-0d34-0410-b5e6-96231b3b80d8
* fix a crash in loop unswitch on a loop invariant vector condition.Chris Lattner2010-02-021-1/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95055 91177308-0d34-0410-b5e6-96231b3b80d8
* Perform sibcall in some cases when arguments are passes memory. Look for casesEvan Cheng2010-02-021-6/+49
| | | | | | | | | | | | | | where callee's arguments are already in the caller's own caller's stack and they line up perfectly. e.g. extern int foo(int a, int b, int c); int bar(int a, int b, int c) { return foo(a, b, c); } git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95053 91177308-0d34-0410-b5e6-96231b3b80d8
* Make local RA smarter about reusing input register of a copyDale Johannesen2010-02-021-0/+14
| | | | | | | | | as output. Needed for (functional) correctness in inline asm, and should be generally beneficial. 7361612. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95050 91177308-0d34-0410-b5e6-96231b3b80d8
* LangRef.html says that inttoptr and ptrtoint always use zero-extensionDan Gohman2010-02-021-21/+32
| | | | | | | when the cast is extending. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95046 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor out alignof expression folding into a separate function andDan Gohman2010-02-021-26/+69
| | | | | | | generalize it to handle more cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95045 91177308-0d34-0410-b5e6-96231b3b80d8
* Various code simplifications.Dan Gohman2010-02-021-31/+28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95044 91177308-0d34-0410-b5e6-96231b3b80d8
* Update CMake.Daniel Dunbar2010-02-021-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95041 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't need to check the last argument since it'll always be bool. We alsoEric Christopher2010-02-021-5/+1
| | | | | | | don't use TargetData here. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95040 91177308-0d34-0410-b5e6-96231b3b80d8
* More indentation/tabification fixes.Eric Christopher2010-02-021-13/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95036 91177308-0d34-0410-b5e6-96231b3b80d8
* Untabify previous commit.Eric Christopher2010-02-021-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95035 91177308-0d34-0410-b5e6-96231b3b80d8
* Kill the Mach-O writer, and temporarily make filetype=obj an error.Nate Begeman2010-02-013-230/+1
| | | | | | | The MCStreamer based assemblers will take over for this functionality. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95033 91177308-0d34-0410-b5e6-96231b3b80d8
* Formatting.Eric Christopher2010-02-011-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95027 91177308-0d34-0410-b5e6-96231b3b80d8
* MOVi16 should also be marked as a UnaryDP instruction, i.e., it doesn't have aJohnny Chen2010-02-011-1/+1
| | | | | | | Rn operand. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95025 91177308-0d34-0410-b5e6-96231b3b80d8
* Add "dump" method to IVUsersOneStride.Bill Wendling2010-02-011-0/+23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95022 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR6196. GV callee may not be a function.Evan Cheng2010-02-011-3/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95017 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve EXTRACT_VECTOR_ELT patch based on comments from DuncanMon P Wang2010-02-012-10/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95012 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an option to GVN to remove all partially redundant loads. This is currentlyBob Wilson2010-02-011-80/+107
| | | | | | | | | | disabled by default. This divides the existing load PRE code into 2 phases: first it checks that it is safe to move the load to each of the predecessors where it is unavailable, and then if it is safe, the code is changed to move the load. Radar 7571861. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95007 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate a bunch of pointless LLVMContext arguments.Chris Lattner2010-02-014-204/+149
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95001 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typo "of" -> "or" and change the way a line was formatted to fitDuncan Sands2010-02-011-2/+2
| | | | | | | into 80 columns to match my artistic preferences. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95000 91177308-0d34-0410-b5e6-96231b3b80d8
* fix PR6195, a bug constant folding scalar -> vector compares.Chris Lattner2010-02-011-3/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94997 91177308-0d34-0410-b5e6-96231b3b80d8
* fix PR 6157. Testcase pending.Dale Johannesen2010-02-011-0/+35
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94996 91177308-0d34-0410-b5e6-96231b3b80d8
* cleanups.Chris Lattner2010-02-011-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94995 91177308-0d34-0410-b5e6-96231b3b80d8
* fix PR6197 - infinite recursion in ipsccp due to block addressesChris Lattner2010-02-011-19/+47
| | | | | | | evaluateICmpRelation wasn't handling blockaddress. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94993 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed a couple of optimization with EXTRACT_VECTOR_ELT that assumes the resultMon P Wang2010-02-012-5/+12
| | | | | | | | | type is the same as the element type of the vector. EXTRACT_VECTOR_ELT can be used to extended the width of an integer type. This fixes a bug for Generic/vector-casts.ll on a ppc750. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94990 91177308-0d34-0410-b5e6-96231b3b80d8
* Generalize target-independent folding rules for sizeof to handle moreDan Gohman2010-02-014-64/+267
| | | | | | | | | | | | | | | | | | | | cases, and implement target-independent folding rules for alignof and offsetof. Also, reassociate reassociative operators when it leads to more folding. Generalize ScalarEvolution's isOffsetOf to recognize offsetof on arrays. Rename getAllocSizeExpr to getSizeOfExpr, and getFieldOffsetExpr to getOffsetOfExpr, for consistency with analagous ConstantExpr routines. Make the target-dependent folder promote GEP array indices to pointer-sized integers, to make implicit casting explicit and exposed to subsequent folding. And add a bunch of testcases for this new functionality, and a bunch of related existing functionality. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94987 91177308-0d34-0410-b5e6-96231b3b80d8
* fix rdar://7590304, a miscompilation of objc apps on arm. The callerChris Lattner2010-02-011-3/+7
| | | | | | | | | | of objc message send was getting marked arm_apcscc, but the prototype isn't. This is fine at runtime because objcmsgsend is implemented in assembly. Only turn a mismatched caller and callee into 'unreachable' if the callee is a definition. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94986 91177308-0d34-0410-b5e6-96231b3b80d8
* fix rdar://7590304, an infinite loop in instcombine. In the invokeChris Lattner2010-02-011-1/+6
| | | | | | | | | | | | | | case, instcombine can't zap the invoke for fear of changing the CFG. However, we have to do something to prevent the next iteration of instcombine from inserting another store -> undef before the invoke thereby getting into infinite iteration between dead store elim and store insertion. Just zap the callee to null, which will prevent the next iteration from doing anything. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94985 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix pr6198 by moving the isSized() check to an outer conditional.Bob Wilson2010-02-011-6/+8
| | | | | | | | The testcase from pr6198 does not crash for me -- I don't know what's up with that -- so I'm not adding it to the tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94984 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a getNUWMul function.Dan Gohman2010-02-011-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94982 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a generalized form of ConstantExpr::getOffsetOf which works forDan Gohman2010-02-011-4/+9
| | | | | | | | array types as well as struct types, and which accepts arbitrary Constant indicies. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94981 91177308-0d34-0410-b5e6-96231b3b80d8
* MulOp is actually a Mips specific node, so do the match using Opcode. This ↵Bruno Cardoso Lopes2010-02-011-1/+1
| | | | | | fixes PR6192 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94977 91177308-0d34-0410-b5e6-96231b3b80d8
* Undo r94946 now all the tests are passing again.Evan Cheng2010-02-011-11/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94970 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix stack size bug while using o32 abiBruno Cardoso Lopes2010-02-011-10/+18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94969 91177308-0d34-0410-b5e6-96231b3b80d8
* For MVNr and MVNs, we need to set Inst{25} = 0 so as not to confuse the decoder.Johnny Chen2010-01-311-1/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94955 91177308-0d34-0410-b5e6-96231b3b80d8
* Change TAILJMP's to be varargs and transfer implicit uses over from ↵Evan Cheng2010-01-313-7/+13
| | | | | | TCRETURN's. Otherwise the missing uses can make post-regalloc scheduling do bad things. This fixes 403.gcc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94950 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a missing check from my last commit.Evan Cheng2010-01-311-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94949 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid recursive sibcall's.Evan Cheng2010-01-311-6/+20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94946 91177308-0d34-0410-b5e6-96231b3b80d8