aboutsummaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Tests of the ocaml (and thus C) bindings for constants.Gordon Henriksen2007-09-181-0/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42101 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the entries for 64-bit CMP, IMUL, and a few others into the correctDan Gohman2007-09-181-6/+11
| | | | | | | | tables so that they are eligible for reload/remat folding. And add entries for JMP and CALL. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42094 91177308-0d34-0410-b5e6-96231b3b80d8
* Incorporating review feedback for GC verifier patch.Gordon Henriksen2007-09-181-11/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42087 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't pass back a reference to a temporary.Bill Wendling2007-09-181-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42086 91177308-0d34-0410-b5e6-96231b3b80d8
* The exception handling function info should be reset for each newBill Wendling2007-09-181-4/+2
| | | | | | | | | function. The information isn't used heavily -- it's only used at the end of exception handling emission -- so there's no need to cache it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42078 91177308-0d34-0410-b5e6-96231b3b80d8
* C bindings for libLLVMCore.a and libLLVMBitWriter.a.Gordon Henriksen2007-09-182-0/+373
| | | | | | | | | | | | | | | | | | | | | | | | | | | - The naming prefix is LLVM. - All types are represented using opaque references. - Functions are not named LLVM{Type}{Method}; the names became unreadable goop. Instead, they are named LLVM{ImperativeSentence}. - Where an attribute only appears once in the class hierarchy (e.g., linkage only applies to values; parameter types only apply to function types), the class is omitted from identifiers for brevity. Tastes like methods. - Strings are C strings or string/length tuples on a case-by-case basis. - APIs which give the caller ownership of an object are not mapped (removeFromParent, certain constructor overloads). This keeps keep memory management as simple as possible. For each library with bindings: llvm-c/<LIB>.h - Declares the bindings. lib/<LIB>/<LIB>.cpp - Implements the bindings. So just link with the library of your choice and use the C header instead of the C++ one. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42077 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR1657Devang Patel2007-09-181-0/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42075 91177308-0d34-0410-b5e6-96231b3b80d8
* Objective-C was generating EH frame info like this:Bill Wendling2007-09-182-10/+20
| | | | | | | | | | "_-[NSString(local) isNullOrNil]".eh = 0 .no_dead_strip "_-[NSString(local) isNullOrNil]".eh The ".eh" should be inside the quotes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42074 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for appending a suffix to the end of a mangled name.Bill Wendling2007-09-171-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42071 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not hide APInt::dump() inside #ifndef NDEBUG.Devang Patel2007-09-172-6/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42068 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not eliminate loop when it is invalid to do so. For example,Devang Patel2007-09-171-14/+35
| | | | | | | | | | | | | | | | for(int i = 0; i < N; i++) { if ( i == XYZ) { A; else B; } C; D; } git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42058 91177308-0d34-0410-b5e6-96231b3b80d8
* Skeleton for transformations to truncate loop's iteration space.Devang Patel2007-09-171-2/+198
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42054 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix for PR1633: Verifier doesn't fully verify GC intrinsicsGordon Henriksen2007-09-171-0/+36
| | | | | | | | | | | | | | | LLVM now enforces the following prototypes for the write barriers: <ty>* @llvm.gcread(<ty2>*, <ty>**) void @llvm.gcwrite(<ty>*, <ty2>*, <ty>**) And for @llvm.gcroot, the first stack slot is verified to be an alloca or a bitcast of an alloca. Fixes test/CodeGen/Generic/GC/lower_gcroot.ll, which violated these. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42051 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove RSTRegClass case from loadRegFromStackSlotDale Johannesen2007-09-172-5/+3
| | | | | | | | | | and storeRegToStackSlot. Evan and I concluded this should never be needed and it appears to be true. (It if is needed, adjustment would be needed for long double to work.) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42049 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix comment.Devang Patel2007-09-171-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42048 91177308-0d34-0410-b5e6-96231b3b80d8
* This is not ideal but unbreaks build failure.Devang Patel2007-09-171-0/+2
| | | | | | | APInt::dump() is inside #ifndef NDEBUG, however SelectionDAG dump() routines are not. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42047 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement x86 long double in jit (not reallyDale Johannesen2007-09-172-4/+93
| | | | | | | | complete, but common cases work) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42043 91177308-0d34-0410-b5e6-96231b3b80d8
* Merge DenseMapKeyInfo & DenseMapValueInfo into DenseMapInfoChris Lattner2007-09-177-12/+34
| | | | | | | | Add a new DenseMapInfo::isEqual method to allow clients to redefine the equality predicate used when probing the hash table. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42042 91177308-0d34-0410-b5e6-96231b3b80d8
* X86ISD::TEST is dead.Evan Cheng2007-09-171-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42037 91177308-0d34-0410-b5e6-96231b3b80d8
* Instcombine x-((x/y)*y) into a remainder operator.Dan Gohman2007-09-171-1/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42035 91177308-0d34-0410-b5e6-96231b3b80d8
* Add 64-bit jmp instructions to the list of instructions thatDan Gohman2007-09-171-0/+2
| | | | | | | can terminate a block with no fall-through. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42029 91177308-0d34-0410-b5e6-96231b3b80d8
* Use xorl instead of xorq to enter a zero into a 64-bit register.Dan Gohman2007-09-171-2/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42027 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit integer x<1 as x<=0, as comparisons with zero (now includeingDan Gohman2007-09-171-0/+5
| | | | | | | 64-bit) can use test instead of cmp with an immediate. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42026 91177308-0d34-0410-b5e6-96231b3b80d8
* Use "test reg,reg" in place of "cmp reg,0" for 64-bit operands. This wasDan Gohman2007-09-171-0/+6
| | | | | | | previously only done for 32-bit and smaller operands. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42024 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor the trampoline transformation into a subroutine.Duncan Sands2007-09-171-137/+148
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42021 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement x86 long double (uses host long double,Dale Johannesen2007-09-171-5/+30
| | | | | | | | so only works on x86 target). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42019 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bug in andersen's related to test_and_set.Daniel Berlin2007-09-161-4/+3
| | | | | | | | Add operator == and != to SparseBitVector. Simplify code for test_and_set git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42018 91177308-0d34-0410-b5e6-96231b3b80d8
* Rewrite of andersen's to be about 100x faster, cleaner, and begin to support ↵Daniel Berlin2007-09-161-324/+687
| | | | | | field sensitivity git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42016 91177308-0d34-0410-b5e6-96231b3b80d8
* Follow-up to patch r41999. Make the conditional that emits the personality stubBill Wendling2007-09-161-1/+1
| | | | | | | | | match the conditional that turns on exception handling emittion in the asm printer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42008 91177308-0d34-0410-b5e6-96231b3b80d8
* Adjust per revew comments.Dale Johannesen2007-09-161-16/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42002 91177308-0d34-0410-b5e6-96231b3b80d8
* Only emit the personality function as a global value if the backend actuallyBill Wendling2007-09-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | supports it. This solves this error on the Darwin x86-64 platform: $ cat testcase.ii struct A { A(); }; A *bork() { return new A; } $ llvm-g++ -arch x86_64 -c testcase.ii /var/tmp//cc3U8fd8.s:52:unknown section type: non_lazy_symbol_pointers /var/tmp//cc3U8fd8.s:52:Rest of line ignored. 1st junk character valued 76 (L). /var/tmp//cc3U8fd8.s:53:Unknown pseudo-op: .indirect_symbol /var/tmp//cc3U8fd8.s:53:Rest of line ignored. 1st junk character valued 95 (_). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41999 91177308-0d34-0410-b5e6-96231b3b80d8
* Be more careful when constant-folding PHI nodes.Owen Anderson2007-09-161-1/+16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41998 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR1666, SPASS with the CBE and 254.gap with the CBE.Chris Lattner2007-09-151-45/+27
| | | | | | | | | GCC optimizes away things like ptr < NULL to false. To "fix" this, have the CBE emit casts of pointers to intptr_t when doing relational pointer comparisons. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41983 91177308-0d34-0410-b5e6-96231b3b80d8
* Add patterns for SHLD64* and SHRD64*.Dan Gohman2007-09-142-12/+28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41975 91177308-0d34-0410-b5e6-96231b3b80d8
* fix a gcc warning: comparison between signed and unsigned integer expressionsChris Lattner2007-09-141-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41972 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove RLE. It is subsumed by GVN.Owen Anderson2007-09-141-135/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41968 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the assumption that FP's are either float orDale Johannesen2007-09-1410-51/+108
| | | | | | | | | | | | | | | double from some of the many places in the optimizers it appears, and do something reasonable with x86 long double. Make APInt::dump() public, remove newline, use it to dump ConstantSDNode's. Allow APFloats in FoldingSet. Expand X86 backend handling of long doubles (conversions to/from int, mostly). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41967 91177308-0d34-0410-b5e6-96231b3b80d8
* Add implicit def of EFLAGS on those instructions that may modify flags.Evan Cheng2007-09-145-54/+85
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41962 91177308-0d34-0410-b5e6-96231b3b80d8
* And an FoldingSetImpl::NodeID::AddInteger overload for int64_t, to avoidDan Gohman2007-09-141-0/+3
| | | | | | | ambiguity. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41960 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove isReg, isImm, and isMBB, and change all their users to use Dan Gohman2007-09-1415-51/+51
| | | | | | | | isRegister, isImmediate, and isMachineBasicBlock, which are equivalent, and more popular. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41958 91177308-0d34-0410-b5e6-96231b3b80d8
* Change "tmp." to "tmp" for temporaries created by ScalarEvolutionExpanderDan Gohman2007-09-141-1/+1
| | | | | | | for consistency with many other transforms. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41957 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove spurious consts. This fixes warnings with compilers thatDan Gohman2007-09-143-5/+5
| | | | | | | are strict about such things. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41956 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for functions with byval arguments on x86Rafael Espindola2007-09-142-17/+23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41953 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a logic error in ValueIsOnlyUsedLocallyOrStoredToOneGlobal that caused Chris Lattner2007-09-141-4/+4
| | | | | | | | miscompilation of 188.ammp. Reject select and bitcast in ValueIsOnlyUsedLocallyOrStoredToOneGlobal because RewriteHeapSROALoadUser can't handle it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41950 91177308-0d34-0410-b5e6-96231b3b80d8
* silence a bogus gcc warning.Chris Lattner2007-09-141-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41949 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix comments.Evan Cheng2007-09-141-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41947 91177308-0d34-0410-b5e6-96231b3b80d8
* Temporary reverting r41817Bill Wendling2007-09-141-15/+5
| | | | | | | | | (http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070910/053370.html). It's causing SPASS to fail. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41938 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach GlobalLoadUsesSimpleEnoughForHeapSRA and the SROA rewriter how to handleChris Lattner2007-09-131-14/+62
| | | | | | | | a limited form of PHI nodes. This finally fixes PR1639, speeding 179.art up from 7.84s to 3.13s on PPC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41933 91177308-0d34-0410-b5e6-96231b3b80d8
* be tolerant of PHI nodes when rewriting heap SROA code. This is a stepChris Lattner2007-09-131-26/+50
| | | | | | | along the way of PR1639 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41930 91177308-0d34-0410-b5e6-96231b3b80d8
* refactor some code, no functionality change. On the path to PR1639Chris Lattner2007-09-131-50/+56
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41929 91177308-0d34-0410-b5e6-96231b3b80d8