aboutsummaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* Pass callsite return type to TargetLowering::LowerCall and use that to check ↵Evan Cheng2010-02-021-1/+1
| | | | | | sibcall eligibility. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95130 91177308-0d34-0410-b5e6-96231b3b80d8
* Make DenseSet's erase pass on the return value rather than swallowing it.Dan Gohman2010-02-021-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95127 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix function names in comments. Thanks Duncan!Dan Gohman2010-02-021-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95126 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate FileModel::Model, just use CodeGenFileType. The clientChris Lattner2010-02-021-26/+20
| | | | | | | | 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-118/+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-0/+56
| | | | | | | a layering violation from MC -> Target. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95113 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate all forms of addPassesToEmitMachineCode exceptChris Lattner2010-02-021-79/+0
| | | | | | | | | | 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
* Inline addAssemblyEmitter into its one real caller and deleteChris Lattner2010-02-021-8/+0
| | | | | | | | 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-026-1/+88
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95086 91177308-0d34-0410-b5e6-96231b3b80d8
* Return value on every path.Zhongxing Xu2010-02-021-3/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95075 91177308-0d34-0410-b5e6-96231b3b80d8
* simplify code.Zhongxing Xu2010-02-021-9/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95074 91177308-0d34-0410-b5e6-96231b3b80d8
* More logic correction: RemoveOverlap should always create new tree. Add aZhongxing Xu2010-02-021-10/+10
| | | | | | | parameter to record whether changes actually happened. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95073 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a lookup method to the IntervalMap. The difference from the original Zhongxing Xu2010-02-021-1/+36
| | | | | | | lookup is that if the lookup key is contained in the key, we return the data. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95070 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bunch of errors in the old logic.Zhongxing Xu2010-02-021-7/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95056 91177308-0d34-0410-b5e6-96231b3b80d8
* 11.8p1: A nested class is a member and as such has the same access rights asZhongxing Xu2010-02-021-3/+0
| | | | | | | any other member. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95047 91177308-0d34-0410-b5e6-96231b3b80d8
* Kill the Mach-O writer, and temporarily make filetype=obj an error.Nate Begeman2010-02-012-17/+0
| | | | | | | 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
* Add "dump" method to IVUsersOneStride.Bill Wendling2010-02-011-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95022 91177308-0d34-0410-b5e6-96231b3b80d8
* Do an early exit when the result is known cheaply.Duncan Sands2010-02-011-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95002 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate a bunch of pointless LLVMContext arguments.Chris Lattner2010-02-011-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95001 91177308-0d34-0410-b5e6-96231b3b80d8
* Generalize target-independent folding rules for sizeof to handle moreDan Gohman2010-02-012-3/+17
| | | | | | | | | | | | | | | | | | | | 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
* Add a getNUWMul function.Dan Gohman2010-02-011-0/+1
| | | | 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-3/+8
| | | | | | | | 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
* Add an immutable interval map, prepared to be used by flat memory model Zhongxing Xu2010-02-013-2/+203
| | | | | | | in the analyzer. WIP. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94976 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify code. We can compare TNew with T in one batch.Zhongxing Xu2010-02-011-14/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94973 91177308-0d34-0410-b5e6-96231b3b80d8
* Moved InstallLexer() from the X86-specific AsmLexerSean Callanan2010-01-311-0/+10
| | | | | | | | | to the TargetAsmLexer class so that clients can actually use the TargetAsmLexer they get from a Target. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94940 91177308-0d34-0410-b5e6-96231b3b80d8
* Check alignment of loads when deciding whether it is safe to execute themBob Wilson2010-01-301-1/+1
| | | | | | | | unconditionally. Besides checking the offset, also check that the underlying object is aligned as much as the load itself. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94875 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure the size is doubled (not 4x).Junjie Gu2010-01-291-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94845 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename two IRReader.h functions to indicate that they return a ModuleJeffrey Yasskin2010-01-291-7/+7
| | | | | | | | | that loads its contents lazily from bitcode. I think these are the only remaining mis-named functions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94840 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve isSafeToLoadUnconditionally to recognize that GEPs with constantBob Wilson2010-01-291-1/+2
| | | | | | | | indices are safe if the result is known to be within the bounds of the underlying object. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94829 91177308-0d34-0410-b5e6-96231b3b80d8
* Assign the ordering of SDNodes in a much less intrusive fashion. After theBill Wendling2010-01-281-1/+1
| | | | | | | | "visit*" method is called, take the newly created nodes, walk them in a DFS fashion, and if they don't have an ordering set, then give it one. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94757 91177308-0d34-0410-b5e6-96231b3b80d8
* Add llvm::Program::ChangeStderrToBinary().Douglas Gregor2010-01-281-2/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94743 91177308-0d34-0410-b5e6-96231b3b80d8
* Make getAlignOf return an i64, for consistency with getSizeOf andDan Gohman2010-01-281-2/+1
| | | | | | | | getOffsetOf, and remove the comment about assuming i8 is byte-aligned, which is no longer applicable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94738 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove SCEVAllocSizeExpr and SCEVFieldOffsetExpr, and in their placeDan Gohman2010-01-282-98/+11
| | | | | | | | | | | | | | | | | use plain SCEVUnknowns with ConstantExpr::getSizeOf and ConstantExpr::getOffsetOf constants. This eliminates a bunch of special-case code. Also add code for pattern-matching these expressions, for clients that want to recognize them. Move ScalarEvolution's logic for expanding array and vector sizeof expressions into an element count times the element size, to expose the multiplication to subsequent folding, into the regular constant folder. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94737 91177308-0d34-0410-b5e6-96231b3b80d8
* add target hooks for emitting random gunk before and after the function body.Chris Lattner2010-01-281-0/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94732 91177308-0d34-0410-b5e6-96231b3b80d8
* Update of 94055 to track the IR level call site information via an intrinsic.Jim Grosbach2010-01-282-2/+29
| | | | | | | | | This allows code gen and the exception table writer to cooperate to make sure landing pads are associated with the correct invoke locations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94726 91177308-0d34-0410-b5e6-96231b3b80d8
* Give AsmPrinter the most common expected implementation of Chris Lattner2010-01-281-0/+9
| | | | | | | | | | runOnMachineFunction, and switch PPC to use EmitFunctionBody. The two ppc asmprinters now don't heave to define runOnMachineFunction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94722 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the argument from EmitJumpTableInfo, because it doesn't need it.Chris Lattner2010-01-281-2/+11
| | | | | | | | | | Move the X86 implementation of function body emission up to AsmPrinter::EmitFunctionBody, which works by calling the virtual EmitInstruction method. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94716 91177308-0d34-0410-b5e6-96231b3b80d8
* Drop the argument to AsmPrinter::EmitConstantPool and make it virtual.Chris Lattner2010-01-281-1/+1
| | | | | | | | | Overload it in the ARM backend to do nothing, since is does insane constant pool emission. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94708 91177308-0d34-0410-b5e6-96231b3b80d8
* rename printVisibility to EmitVisibility and make it private,Chris Lattner2010-01-281-5/+5
| | | | | | | constify EmitLinkage. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94705 91177308-0d34-0410-b5e6-96231b3b80d8
* add a helper function for bumping up the alignment of a machine function.Chris Lattner2010-01-271-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94700 91177308-0d34-0410-b5e6-96231b3b80d8
* Changed constants to an enum so as not to pollute theSean Callanan2010-01-271-4/+4
| | | | | | | global namespace needlessly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94697 91177308-0d34-0410-b5e6-96231b3b80d8
* Added a header file defining the externally-visible C APISean Callanan2010-01-271-0/+470
| | | | | | | for the LLVM disassemblers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94696 91177308-0d34-0410-b5e6-96231b3b80d8
* Kill ModuleProvider and ghost linkage by inverting the relationship betweenJeffrey Yasskin2010-01-2710-190/+209
| | | | | | | | | | | | | | | | | | | | | | Modules and ModuleProviders. Because the "ModuleProvider" simply materializes GlobalValues now, and doesn't provide modules, it's renamed to "GVMaterializer". Code that used to need a ModuleProvider to materialize Functions can now materialize the Functions directly. Functions no longer use a magic linkage to record that they're materializable; they simply ask the GVMaterializer. Because the C ABI must never change, we can't remove LLVMModuleProviderRef or the functions that refer to it. Instead, because Module now exposes the same functionality ModuleProvider used to, we store a Module* in any LLVMModuleProviderRef and translate in the wrapper methods. The bindings to other languages still use the ModuleProvider concept. It would probably be worth some time to update them to follow the C++ more closely, but I don't intend to do it. Fixes http://llvm.org/PR5737 and http://llvm.org/PR5735. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94686 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't bother with sprintf, just pass the Twine through.Benjamin Kramer2010-01-271-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94684 91177308-0d34-0410-b5e6-96231b3b80d8
* Make SMDiagnostic::Print a const method.Mikhail Glushenkov2010-01-271-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94672 91177308-0d34-0410-b5e6-96231b3b80d8
* Trailing whitespace.Mikhail Glushenkov2010-01-271-19/+19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94671 91177308-0d34-0410-b5e6-96231b3b80d8
* add a new AsmPrinter::EmitFunctionEntryLabel virtual function,Chris Lattner2010-01-271-0/+2
| | | | | | | | which allows targets to override function entry label emission. Use it to convert linux/ppc to use EmitFunctionHeader(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94667 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove a dead target hook.Evan Cheng2010-01-271-13/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94646 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate target hook IsEligibleForTailCallOptimization.Evan Cheng2010-01-271-7/+1
| | | | | | | | | | Target independent isel should always pass along the "tail call" property. Change target hook LowerCall's parameter "isTailCall" into a refernce. If the target decides it's impossible to honor the tail call request, it should set isTailCall to false to make target independent isel happy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94626 91177308-0d34-0410-b5e6-96231b3b80d8
* pull linkage emission code out to a new EmitLinkage function.Chris Lattner2010-01-261-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94621 91177308-0d34-0410-b5e6-96231b3b80d8