summaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAge
* Add a lto_codegen_compile_to_file to avoid producing a file, reading it toRafael Espindola2011-03-22
| | | | | | memory and writing it back to disk. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128108 91177308-0d34-0410-b5e6-96231b3b80d8
* We don't need a null terminator for the output file.Rafael Espindola2011-03-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128098 91177308-0d34-0410-b5e6-96231b3b80d8
* Propogate the error message, not just the error state.Jim Grosbach2011-03-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128094 91177308-0d34-0410-b5e6-96231b3b80d8
* Properly initialize all fields in CrashReporterCleanupContext. This caused ↵Ted Kremenek2011-03-22
| | | | | | the buildbot failure earlier. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128071 91177308-0d34-0410-b5e6-96231b3b80d8
* Rework CrashRecoveryContextCleanup to provide a simpler way to create ↵Ted Kremenek2011-03-22
| | | | | | | | cleanup objects, and provide a new cleanup for decrementing reference counts of objects with intrusive reference counts. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128055 91177308-0d34-0410-b5e6-96231b3b80d8
* Relax access control on 'Release' method of RefCountedBase.Ted Kremenek2011-03-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128054 91177308-0d34-0410-b5e6-96231b3b80d8
* Library-ize the dyld components of llvm-rtdyld.Jim Grosbach2011-03-21
| | | | | | | | | | | Move the dynamic linking functionality of the llvm-rtdyld program into an ExecutionEngine support library. Update llvm-rtdyld to just load an object file into memory, use the library to process it, then run the _main() function, if one is found. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128031 91177308-0d34-0410-b5e6-96231b3b80d8
* Provide a means for CrashRecovery clients to determine if code is currently ↵Ted Kremenek2011-03-21
| | | | | | running while crash recovery cleanups are being processed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128008 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow a client to clear an IntrustiveRefCntPtr (deliberately leaking the ↵Ted Kremenek2011-03-21
| | | | | | referenced object). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128007 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix unused param warning.Eric Christopher2011-03-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128005 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typos in assert messages.Jay Foad2011-03-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128002 91177308-0d34-0410-b5e6-96231b3b80d8
* We need to pass the TargetMachine object to the InstPrinter if we are printingBill Wendling2011-03-21
| | | | | | | | | | the alias of an InstAlias instead of the thing being aliased. Because we need to know the features that are valid for an InstAlias. This is part of a work-in-progress. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127986 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-apply r127953 with fixes: eliminate empty return block if it has no ↵Evan Cheng2011-03-21
| | | | | | predecessors; update dominator tree if cfg is modified. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127981 91177308-0d34-0410-b5e6-96231b3b80d8
* If a class inherits from RefCountedBaseVPTR allow all its subclasses to be ↵Argyrios Kyrtzidis2011-03-20
| | | | | | used with IntrusiveRefCntPtr. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127966 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r127953, "SimplifyCFG has stopped duplicating returns into predecessorsDaniel Dunbar2011-03-19
| | | | | | to canonicalize IR", it broke a lot of things. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127954 91177308-0d34-0410-b5e6-96231b3b80d8
* SimplifyCFG has stopped duplicating returns into predecessors to canonicalize IREvan Cheng2011-03-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to have single return block (at least getting there) for optimizations. This is general goodness but it would prevent some tailcall optimizations. One specific case is code like this: int f1(void); int f2(void); int f3(void); int f4(void); int f5(void); int f6(void); int foo(int x) { switch(x) { case 1: return f1(); case 2: return f2(); case 3: return f3(); case 4: return f4(); case 5: return f5(); case 6: return f6(); } } => LBB0_2: ## %sw.bb callq _f1 popq %rbp ret LBB0_3: ## %sw.bb1 callq _f2 popq %rbp ret LBB0_4: ## %sw.bb3 callq _f3 popq %rbp ret This patch teaches codegenprep to duplicate returns when the return value is a phi and where the phi operands are produced by tail calls followed by an unconditional branch: sw.bb7: ; preds = %entry %call8 = tail call i32 @f5() nounwind br label %return sw.bb9: ; preds = %entry %call10 = tail call i32 @f6() nounwind br label %return return: %retval.0 = phi i32 [ %call10, %sw.bb9 ], [ %call8, %sw.bb7 ], ... [ 0, %entry ] ret i32 %retval.0 This allows codegen to generate better code like this: LBB0_2: ## %sw.bb jmp _f1 ## TAILCALL LBB0_3: ## %sw.bb1 jmp _f2 ## TAILCALL LBB0_4: ## %sw.bb3 jmp _f3 ## TAILCALL rdar://9147433 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127953 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply 127939 since Daniel fixed the breakage. <rdar://problem/9012638>Stuart Hastings2011-03-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127944 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 127939. <rdar://problem/9012638>Stuart Hastings2011-03-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127943 91177308-0d34-0410-b5e6-96231b3b80d8
* Revise r126127 to address Daniel's comments. <rdar://problem/9012638>Stuart Hastings2011-03-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127939 91177308-0d34-0410-b5e6-96231b3b80d8
* Tweak CrashRecoveryContextCleanup to provide an easy method for clients to ↵Ted Kremenek2011-03-19
| | | | | | select between 'delete' and 'destructor' cleanups, and allow the destructor of CrashRecoveryContextCleanupRegister to be pseudo re-entrant. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127929 91177308-0d34-0410-b5e6-96231b3b80d8
* If an AllocaInst referred by DbgDeclareInst is used by a LoadInst then the ↵Devang Patel2011-03-18
| | | | | | LoadInst should also get a corresponding llvm.dbg.value intrinsic. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127924 91177308-0d34-0410-b5e6-96231b3b80d8
* Beginnings of MC-JIT code generation.Jim Grosbach2011-03-18
| | | | | | | | | | | | | Proof-of-concept code that code-gens a module to an in-memory MachO object. This will be hooked up to a run-time dynamic linker library (see: llvm-rtdyld for similarly conceptual work for that part) which will take the compiled object and link it together with the rest of the system, providing back to the JIT a table of available symbols which will be used to respond to the getPointerTo*() queries. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127916 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid creating canonical induction variables for non-native types.Andrew Trick2011-03-18
| | | | | | | | | For example, on 32-bit architecture, don't promote all uses of the IV to 64-bits just because one use is a 64-bit cast. Alternate implementation of the patch by Arnaud de Grandmaison. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127884 91177308-0d34-0410-b5e6-96231b3b80d8
* Tidy up.Jim Grosbach2011-03-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127883 91177308-0d34-0410-b5e6-96231b3b80d8
* Tweak CrashRecoveryContextCleanup::createCleanup() to use the 'delete' ↵Ted Kremenek2011-03-18
| | | | | | cleanup as opposed to the 'destructor' cleanup (reclaims more memory). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127865 91177308-0d34-0410-b5e6-96231b3b80d8
* Add new CrashRecoveryContextCleanup subclass: ↵Ted Kremenek2011-03-18
| | | | | | CrashRecoveryContextDeleteCleanup. This deletes the object, not just calls its destructor. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127855 91177308-0d34-0410-b5e6-96231b3b80d8
* Augment CrashRecoveryContext to have registered "cleanup" objects that can ↵Ted Kremenek2011-03-18
| | | | | | be used to release resources during a crash. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127849 91177308-0d34-0410-b5e6-96231b3b80d8
* Added isValidRewrite() to check the result of ScalarEvolutionExpander.Andrew Trick2011-03-17
| | | | | | | | | | SCEV may generate expressions composed of multiple pointers, which can lead to invalid GEP expansion. Until we can teach SCEV to follow strict pointer rules, make sure no bad GEPs creep into IR. Fixes rdar://problem/9038671. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127839 91177308-0d34-0410-b5e6-96231b3b80d8
* Use RequiresNullTerminator to create buffers without a null terminatorRafael Espindola2011-03-17
| | | | | | instead of copying. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127835 91177308-0d34-0410-b5e6-96231b3b80d8
* Try to not lose variable's debug info during instcombine.Devang Patel2011-03-17
| | | | | | | | This is done by lowering dbg.declare intrinsic into dbg.value intrinsic. Radar 9143931. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127834 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor into a separate utility function.Devang Patel2011-03-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127832 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an argument to APInt's magic udiv calculation to specify the number of ↵Benjamin Kramer2011-03-17
| | | | | | | | bits that are known zero in the divided number. This will come in handy soon. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127828 91177308-0d34-0410-b5e6-96231b3b80d8
* Dead code elimination may separate the live interval into multiple connected ↵Jakob Stoklund Olesen2011-03-17
| | | | | | | | | components. I have convinced myself that it can only happen when a phi value dies. When it happens, allocate new virtual registers for the components. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127827 91177308-0d34-0410-b5e6-96231b3b80d8
* Add XCore intrinsic for setpsc.Richard Osborne2011-03-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127821 91177308-0d34-0410-b5e6-96231b3b80d8
* Move more logic into getTypeForExtArgOrReturn.Cameron Zwarich2011-03-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127809 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename getTypeForExtendedInteger() to getTypeForExtArgOrReturn().Cameron Zwarich2011-03-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127807 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support in the LTO library for loading an object from the middleRafael Espindola2011-03-17
| | | | | | of an file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127781 91177308-0d34-0410-b5e6-96231b3b80d8
* Rewrite instructions as part of ConnectedVNInfoEqClasses::Distribute.Jakob Stoklund Olesen2011-03-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127779 91177308-0d34-0410-b5e6-96231b3b80d8
* The x86-64 ABI says that a bool is only guaranteed to be sign-extended to a byteCameron Zwarich2011-03-16
| | | | | | | | | | | rather than an int. Thankfully, this only causes LLVM to miss optimizations, not generate incorrect code. This just fixes the zext at the return. We still insert an i32 ZextAssert when reading a function's arguments, but it is followed by a truncate and another i8 ZextAssert so it is not optimized. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127766 91177308-0d34-0410-b5e6-96231b3b80d8
* Add XCore intrinsics for setclk, setrdy.Richard Osborne2011-03-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127761 91177308-0d34-0410-b5e6-96231b3b80d8
* Add checkevent intrinsic to check if any resources owned by the current threadRichard Osborne2011-03-16
| | | | | | | can event. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127741 91177308-0d34-0410-b5e6-96231b3b80d8
* Add TargetData::fitsInLegalInteger().Cameron Zwarich2011-03-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127714 91177308-0d34-0410-b5e6-96231b3b80d8
* Add scei vendorJohn Thompson2011-03-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127705 91177308-0d34-0410-b5e6-96231b3b80d8
* Add XCore intrinsics for getps, setps, setsr and clrsr.Richard Osborne2011-03-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127678 91177308-0d34-0410-b5e6-96231b3b80d8
* PTX: Set PTX 2.0 as the minimum supported versionJustin Holewinski2011-03-15
| | | | | | | | - Remove PTX 1.4 code generation - Change type of intrinsics to .v4.i32 instead of .v4.i16 - Add and/or/xor integer instructions git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127677 91177308-0d34-0410-b5e6-96231b3b80d8
* - Add "Bitcast" target instruction property for instructions which performEvan Cheng2011-03-15
| | | | | | | | nothing more than a bitcast. - Teach tablegen to automatically infer "Bitcast" property. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127667 91177308-0d34-0410-b5e6-96231b3b80d8
* Version N of the llvm_unreachable patch: VC++ doesn't recognize that abort()John McCall2011-03-14
| | | | | | | | | | doesn't return, so just go back to using the old runtime function instead of trying to use abort() when __builtin_unreachable (or an equivalent) isn't supported. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127629 91177308-0d34-0410-b5e6-96231b3b80d8
* Trailing whitespace.Jim Grosbach2011-03-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127620 91177308-0d34-0410-b5e6-96231b3b80d8
* Place context in member variables instead of passing around pointers.Jakob Stoklund Olesen2011-03-14
| | | | | | Use the opportunity to get rid of the trailing underscore variable names. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127618 91177308-0d34-0410-b5e6-96231b3b80d8
* Okay, some compilers complain if you provide the exception-specificationJohn McCall2011-03-14
| | | | | | | | | where none was before. Just don't declare it and hope it's declared in every translation unit that needs it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127612 91177308-0d34-0410-b5e6-96231b3b80d8