aboutsummaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* If an executable is run through a symlink, dladdr will return theChris Lattner2009-02-191-3/+8
| | | | | | | | | symlink. We really want the ultimate executable being run, not the symlink. This lets clang find its headers when invoked through a symlink. rdar://6602012 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65017 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the logic in this assertion to properly validate the numberDan Gohman2009-02-191-2/+3
| | | | | | | of arguments. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64999 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply r57340. VMKit does not presently rely on materializeFunctionDan Gohman2009-02-191-2/+2
| | | | | | | | being called with the lock released, and this fixes a race condition in the JIT as used by lli. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64997 91177308-0d34-0410-b5e6-96231b3b80d8
* Put code that generates debug labels into TableGen so that it can be used byBill Wendling2009-02-187-20/+10
| | | | | | | everyone. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64978 91177308-0d34-0410-b5e6-96231b3b80d8
* add proper asmwriter and asmparser support for anonymous functions.Chris Lattner2009-02-182-11/+15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64953 91177308-0d34-0410-b5e6-96231b3b80d8
* In theory the aliasee may have dead constant usersDuncan Sands2009-02-181-0/+1
| | | | | | | | | here. Since we only do the transform if there is one use, strip off any such users in the hope of making the transform fire more often. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64926 91177308-0d34-0410-b5e6-96231b3b80d8
* The subprogram die may not exist while creating "default" scope.Devang Patel2009-02-181-1/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64920 91177308-0d34-0410-b5e6-96231b3b80d8
* Use a sign-extend instead of a zero-extend when promoting aDan Gohman2009-02-182-15/+54
| | | | | | | | | | | | | trip count value when the original loop iteration condition is signed and the canonical induction variable won't undergo signed overflow. This isn't required for correctness; it just preserves more information about original loop iteration values. Add a getTruncateOrSignExtend method to ScalarEvolution, following getTruncateOrZeroExtend. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64918 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify by using dyn_cast instead of isa and cast.Dan Gohman2009-02-181-6/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64917 91177308-0d34-0410-b5e6-96231b3b80d8
* Add explicit keywords.Dan Gohman2009-02-182-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64915 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support to the JIT for true non-lazy operation. When a call to a functionNate Begeman2009-02-189-40/+255
| | | | | | | | | | | | | | | | | | | | | that has not been JIT'd yet, the callee is put on a list of pending functions to JIT. The call is directed through a stub, which is updated with the address of the function after it has been JIT'd. A new interface for allocating and updating empty stubs is provided. Add support for removing the ModuleProvider the JIT was created with, which would otherwise invalidate the JIT's PassManager, which is initialized with the ModuleProvider's Module. Add support under a new ExecutionEngine flag for emitting the infomration necessary to update Function and GlobalVariable stubs after JITing them, by recording the address of the stub and the name of the GlobalValue. This allows code to be copied from one address space to another, where libraries may live at different virtual addresses, and have the stubs updated with their new correct target addresses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64906 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor out the code to add a MachineOperand to a MachineInstrBuilder.Dan Gohman2009-02-188-159/+38
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64891 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate several more unnecessary intptr_t casts.Dan Gohman2009-02-185-9/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64888 91177308-0d34-0410-b5e6-96231b3b80d8
* GV with null value initializer shouldn't go to BSS if it's meant for a ↵Evan Cheng2009-02-183-3/+8
| | | | | | mergeable strings section. Currently it only checks for Darwin. Someone else please check if it should apply to other targets as well. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64877 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a corner case in the new indvars promotion logic: if thereDan Gohman2009-02-181-19/+25
| | | | | | | | | | | are multiple IV's in a loop, some of them may under go signed or unsigned wrapping even if the IV that's used in the loop exit condition doesn't. Restrict sign-extension-elimination and zero-extension-elimination to only those that operate on the original loop-controlling IV. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64866 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a typo in a comment.Dan Gohman2009-02-181-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64859 91177308-0d34-0410-b5e6-96231b3b80d8
* If an alias is dead and so is its aliasee, then globaldce wouldDuncan Sands2009-02-171-8/+16
| | | | | | | | crash because the alias would still be using the aliasee when the aliasee was deleted. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64844 91177308-0d34-0410-b5e6-96231b3b80d8
* The debugger sometimes lookup dynamically in the runtime to find ivar info ↵Devang Patel2009-02-173-4/+16
| | | | | | | | | of any Objective-C classes. It would be very helpful to debugger if the compiler encodes runtime version number in DWARF. Add support for two additional DWARF attributes to encode Objective-C runtime version number. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64834 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove trailing whitespace to reduce later commit patch noise.Scott Michel2009-02-178-1609/+1609
| | | | | | | | | (Note: Eventually, commits like this will be handled via a pre-commit hook that does this automagically, as well as expand tabs to spaces and look for 80-col violations.) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64827 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit debug info for bitfields.Devang Patel2009-02-172-4/+30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64815 91177308-0d34-0410-b5e6-96231b3b80d8
* LoopIndexSplit doesn't actually use ScalarEvolution.Dan Gohman2009-02-171-4/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64811 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a method to ScalarEvolution for telling it when a loop has beenDan Gohman2009-02-173-12/+32
| | | | | | | | | | | | modified in a way that may effect the trip count calculation. Change IndVars to use this method when it rewrites pointer or floating-point induction variables instead of using a doInitialization method to sneak these changes in before ScalarEvolution has a chance to see the loop. This eliminates the need for LoopPass to depend on ScalarEvolution. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64810 91177308-0d34-0410-b5e6-96231b3b80d8
* commit a tweaked version of Daniel's patch for PR3599. We nowChris Lattner2009-02-171-26/+29
| | | | | | | | eliminate all the extensions and all but the one required truncate from the testcase, but the or/and/shift stuff still isn't zapped. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64809 91177308-0d34-0410-b5e6-96231b3b80d8
* Move dumpPassStructure out of line.Dan Gohman2009-02-171-0/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64796 91177308-0d34-0410-b5e6-96231b3b80d8
* Delete trailing whitespace.Dan Gohman2009-02-171-34/+34
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64784 91177308-0d34-0410-b5e6-96231b3b80d8
* This transform also applies to private linkage.Duncan Sands2009-02-171-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64773 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix 80-column violation.Dan Gohman2009-02-171-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64766 91177308-0d34-0410-b5e6-96231b3b80d8
* A couple of places where reused use operands should be marked kill. This is ↵Evan Cheng2009-02-171-0/+11
| | | | | | exposed by recent availability fallthrough changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64745 91177308-0d34-0410-b5e6-96231b3b80d8
* add a horrible noteChris Lattner2009-02-171-0/+41
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64719 91177308-0d34-0410-b5e6-96231b3b80d8
* --- Merging (from foreign repository) r64714 into '.':Bill Wendling2009-02-173-31/+59
| | | | | | | | | | | | | U include/llvm/CodeGen/DebugLoc.h U lib/CodeGen/SelectionDAG/LegalizeDAG.cpp U lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp U lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp Enable debug location generation at -Os. This goes with the reapplication of the r63639 patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64715 91177308-0d34-0410-b5e6-96231b3b80d8
* Strengthen the "non-constant stride must dominate loop preheader" check.Evan Cheng2009-02-172-9/+44
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64703 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify; fix some 80-column violations.Dan Gohman2009-02-171-6/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64702 91177308-0d34-0410-b5e6-96231b3b80d8
* Delete trailing whitespace.Dan Gohman2009-02-161-5/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64694 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix EnforceKnownAlignment so that it doesn't ever reduce the alignmentDan Gohman2009-02-161-4/+12
| | | | | | | of an alloca or global variable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64693 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typo caused by too much surfing, dudes...Nick Lewycky2009-02-161-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64626 91177308-0d34-0410-b5e6-96231b3b80d8
* Delete this long-commented-out code. The situation it seems to haveDan Gohman2009-02-161-26/+0
| | | | | | | | been written for is no longer relevant with the elimination of signed and unsigned types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64625 91177308-0d34-0410-b5e6-96231b3b80d8
* Change these tests to use regular loads instead of llvm.x86.sse2.loadu.dq.Dan Gohman2009-02-161-3/+5
| | | | | | | | | Enhance instcombine to use the preferred field of GetOrEnforceKnownAlignment in more cases, so that regular IR operations are optimized in the same way that the intrinsics currently are. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64623 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't assume that a left-shift of a value with one bit set will haveDan Gohman2009-02-151-6/+23
| | | | | | | | | one bit set, because the bit may be shifted off the end. Instead, just check for a constant 1 being shifted. This is still sufficient to handle all the cases in test/CodeGen/X86/bt.ll. This fixes PR3583. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64622 91177308-0d34-0410-b5e6-96231b3b80d8
* MachineLICM now handles these cases.Dan Gohman2009-02-151-85/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64620 91177308-0d34-0410-b5e6-96231b3b80d8
* Update the list of function annotations for nocapture. All of these came upNick Lewycky2009-02-151-47/+186
| | | | | | | | | | | | when I was looking at functions used by python. Highlights include, better largefile support (64-bit file sizes on 32-bit systems), fputs string is nocapture, popen/pclose added (popen being noalias return), modf and frexp and friends. Also added some missing 'break' statements and combined identical sections. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64615 91177308-0d34-0410-b5e6-96231b3b80d8
* On 64bit we may have a personality function which requires 64 bits toNicolas Geoffray2009-02-151-7/+13
| | | | | | | | be encoded. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64600 91177308-0d34-0410-b5e6-96231b3b80d8
* Make this more useful for cleaning up after theDuncan Sands2009-02-151-15/+5
| | | | | | | | one-definition-rule llvm-gcc changes (coming soon to a tree near you!). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64588 91177308-0d34-0410-b5e6-96231b3b80d8
* If the target of an alias has internal linkage, then theDuncan Sands2009-02-151-7/+55
| | | | | | | | | alias can be morphed into the target. Implement this transform, and fix a crash in the existing transform at the same time. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64583 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR3522. It's not safe to sink into landing pad BB's.Evan Cheng2009-02-151-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64582 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix pr3571: If stride is a value defined by an instruction, make sure it ↵Evan Cheng2009-02-151-5/+15
| | | | | | dominates the loop preheader. When IV users are strength reduced, the stride is inserted into the preheader. It could create a use before def situation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64579 91177308-0d34-0410-b5e6-96231b3b80d8
* ifdef out unneeded if statement.Evan Cheng2009-02-151-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64575 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix warning on gcc 4.3.Mikhail Glushenkov2009-02-151-1/+4
| | | | | | "system() declared with attribute warn_unused_result." git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64574 91177308-0d34-0410-b5e6-96231b3b80d8
* Whitespace fixes.Mikhail Glushenkov2009-02-151-58/+58
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64573 91177308-0d34-0410-b5e6-96231b3b80d8
* Unbreak the build on win32.Cedric Venet2009-02-143-3/+4
| | | | | | | | | | | Cleanup some warning. Remark: when struct/class are declared differently than they are defined, this make problem for VC++ since it seems to mangle class differently that struct. These error are very hard to understand and find. So please, try to keep your definition/declaration in sync. Only tested with VS2008. hope it does not break anything. feel free to revert. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64554 91177308-0d34-0410-b5e6-96231b3b80d8
* Generalize some alias analysis logic from atomicDuncan Sands2009-02-142-52/+6
| | | | | | | intrinsics to any IntrWriteArgMem intrinsics. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64551 91177308-0d34-0410-b5e6-96231b3b80d8