summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* Add constant support to object size handling and remove defaultEric Christopher2010-01-291-10/+36
| | | | | | | | | lowering. We'll either figure it out, or not and be lowered by SelectionDAGBuild. Add test. llvm-svn: 94775
* Generic reformatting and comment fixing. No functionality change.Bill Wendling2010-01-291-19/+20
| | | | llvm-svn: 94771
* Add newline to debugging output, and fix some grammar-os in comment.Bill Wendling2010-01-291-5/+5
| | | | llvm-svn: 94765
* Added a custom TableGen backend to support theSean Callanan2010-01-291-0/+1
| | | | | | | enhanced disassembler, and the necessary makefile rules to build the table for X86. llvm-svn: 94764
* mem2reg erases the dbg.declare intrinsics that it converts to dbg.val intrinsicsVictor Hernandez2010-01-291-3/+13
| | | | llvm-svn: 94763
* Assign the ordering of SDNodes in a much less intrusive fashion. After theBill Wendling2010-01-283-691/+171
| | | | | | | "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. llvm-svn: 94757
* Remove the folding ruleDan Gohman2010-01-281-22/+0
| | | | | | | | | | | | | | | | | getelementptr (i8* inttoptr (i64 1 to i8*), i32 -1) to inttoptr (i64 0 to i8*) from the VMCore constant folder. It didn't handle sign-extension properly in the case where the source integer is smaller than a pointer size. And, it relied on an assumption about sizeof(i8). The Analysis constant folder still folds these kinds of things; it has access to TargetData, so it can do them right. Add a testcase which tests that the VMCore constant folder doesn't miscompile this, and that the Analysis folder does fold it. llvm-svn: 94750
* Replace strcpy with memcpy when we have the length around anyway.Benjamin Kramer2010-01-283-6/+9
| | | | llvm-svn: 94746
* Fix PR6165. The bug was that LHSKnownZero was being and'd with DemandedMaskDuncan Sands2010-01-281-2/+11
| | | | | | | when it should have been and'd with LowBits. Fix that and while there beef up the logic in the case of a negative LHS. llvm-svn: 94745
* Add llvm::Program::ChangeStderrToBinary().Douglas Gregor2010-01-282-0/+10
| | | | llvm-svn: 94743
* Check Type::isSized before calling ScalarEvolution::getAllocSizeExpr,Dan Gohman2010-01-281-21/+23
| | | | | | rather than after. llvm-svn: 94742
* convert the last 3 targets to use EmitFunctionBody() now thatChris Lattner2010-01-283-145/+47
| | | | | | | | | | | | it has before/end body hooks. lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp | 49 ++----------- lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp | 87 ++++++------------------ lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp | 56 +++------------ test/CodeGen/XCore/ashr.ll | 2 4 files changed, 48 insertions(+), 146 deletions(-) llvm-svn: 94741
* Make getAlignOf return an i64, for consistency with getSizeOf andDan Gohman2010-01-281-2/+2
| | | | | | | getOffsetOf, and remove the comment about assuming i8 is byte-aligned, which is no longer applicable. llvm-svn: 94738
* Remove SCEVAllocSizeExpr and SCEVFieldOffsetExpr, and in their placeDan Gohman2010-01-284-109/+133
| | | | | | | | | | | | | | | | 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. llvm-svn: 94737
* add target hooks for emitting random gunk before and after the function body.Chris Lattner2010-01-281-0/+6
| | | | llvm-svn: 94732
* Fix a bug introduced by r94490 where it created a X86ISD::CMP whose output ↵Evan Cheng2010-01-281-1/+1
| | | | | | | | type is different from its inputs. This fixes PR6146. llvm-svn: 94731
* switch blackfin to the default runOnMachineFunctionChris Lattner2010-01-281-43/+1
| | | | llvm-svn: 94729
* eliminate a now-useless class.Chris Lattner2010-01-281-13/+1
| | | | llvm-svn: 94728
* Switch MSP430, SPU, Sparc, and SystemZ to use EmitFunctionBody().Chris Lattner2010-01-286-284/+30
| | | | | | | Diffstat: 6 files changed, 30 insertions(+), 284 deletions(-) llvm-svn: 94727
* Update of 94055 to track the IR level call site information via an intrinsic.Jim Grosbach2010-01-284-6/+36
| | | | | | | This allows code gen and the exception table writer to cooperate to make sure landing pads are associated with the correct invoke locations. llvm-svn: 94726
* Give AsmPrinter the most common expected implementation of Chris Lattner2010-01-283-113/+22
| | | | | | | | runOnMachineFunction, and switch PPC to use EmitFunctionBody. The two ppc asmprinters now don't heave to define runOnMachineFunction. llvm-svn: 94722
* switch ARM to EmitFunctionBody().Chris Lattner2010-01-281-45/+3
| | | | llvm-svn: 94719
* emit a 0 byte instead of a noop if a function is empty on darwin.Chris Lattner2010-01-281-4/+2
| | | | | | "0" is nice and target independent. llvm-svn: 94718
* Remove the argument from EmitJumpTableInfo, because it doesn't need it.Chris Lattner2010-01-2813-101/+94
| | | | | | | | Move the X86 implementation of function body emission up to AsmPrinter::EmitFunctionBody, which works by calling the virtual EmitInstruction method. llvm-svn: 94716
* Drop the argument to AsmPrinter::EmitConstantPool and make it virtual.Chris Lattner2010-01-283-3/+6
| | | | | | | Overload it in the ARM backend to do nothing, since is does insane constant pool emission. llvm-svn: 94708
* don't emit constant pools twice.Chris Lattner2010-01-281-1/+0
| | | | llvm-svn: 94706
* rename printVisibility to EmitVisibility and make it private,Chris Lattner2010-01-281-6/+5
| | | | | | constify EmitLinkage. llvm-svn: 94705
* switch ARM to use EmitFunctionHeader.Chris Lattner2010-01-271-44/+15
| | | | llvm-svn: 94703
* eliminate the ARMFunctionInfo::Align member, using Chris Lattner2010-01-273-19/+6
| | | | | | MachineFunction::Alignment instead. llvm-svn: 94701
* switch blackfin to use EmitFunctionHeader. BlackfinAsmPrinter.cppChris Lattner2010-01-271-37/+5
| | | | | | is now less than 200 LOC! llvm-svn: 94699
* switch mips to use the shared EmitFunctionHeader() functionChris Lattner2010-01-271-41/+19
| | | | llvm-svn: 94698
* If the only use of something is a DEBUG_VALUE, don'tDale Johannesen2010-01-271-0/+14
| | | | | | | let that stop it from being deleted, and change the DEBUG_VALUE value to undef. llvm-svn: 94694
* Treat MO_REG 0 location as undefined in DEBUG_VALUE,Dale Johannesen2010-01-271-2/+8
| | | | | | per document. llvm-svn: 94693
* Need to recurse for all operands of function-local metadata; and handle ↵Victor Hernandez2010-01-271-6/+3
| | | | | | Instructions (which map to themselves) llvm-svn: 94691
* Avoid creating redundant PHIs in SSAUpdater::GetValueInMiddleOfBlock.Bob Wilson2010-01-271-41/+75
| | | | | | | This was already being done in SSAUpdater::GetValueAtEndOfBlock so I've just changed SSAUpdater to check for existing PHIs in both places. llvm-svn: 94690
* Update CMake build.Ted Kremenek2010-01-271-2/+2
| | | | llvm-svn: 94687
* Kill ModuleProvider and ghost linkage by inverting the relationship betweenJeffrey Yasskin2010-01-2733-401/+310
| | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 94686
* Don't bother with sprintf, just pass the Twine through.Benjamin Kramer2010-01-272-6/+2
| | | | llvm-svn: 94684
* Use the less expensive getName function instead of getNameStr.Benjamin Kramer2010-01-271-5/+4
| | | | llvm-svn: 94683
* Silence GCC warnings with asserts turned off. No functionality change.Chandler Carruth2010-01-272-3/+3
| | | | llvm-svn: 94673
* Make SMDiagnostic::Print a const method.Mikhail Glushenkov2010-01-271-1/+1
| | | | llvm-svn: 94672
* Trailing whitespace.Mikhail Glushenkov2010-01-271-19/+19
| | | | llvm-svn: 94671
* add a new AsmPrinter::EmitFunctionEntryLabel virtual function,Chris Lattner2010-01-272-55/+32
| | | | | | | which allows targets to override function entry label emission. Use it to convert linux/ppc to use EmitFunctionHeader(). llvm-svn: 94667
* Perform trivial tail call optimization for callees with "C" ABI. These are doneEvan Cheng2010-01-272-5/+30
| | | | | | | | | even when -tailcallopt is not specified and it does not require changing ABI. First case is the most trivial one. Perform tail call optimization when both the caller and callee do not return values and when the callee does not take any input arguments. llvm-svn: 94664
* merge two ifsChris Lattner2010-01-271-3/+1
| | | | llvm-svn: 94650
* some cleanups.Chris Lattner2010-01-271-14/+15
| | | | llvm-svn: 94649
* no need to check for nullChris Lattner2010-01-271-1/+1
| | | | llvm-svn: 94648
* ppc/linux isn't ready for this and it was an accident that it was included.Chris Lattner2010-01-271-2/+0
| | | | | | This should fix a bunch of linux buildbot failures. llvm-svn: 94643
* When converting dbg.declare to dbg.value, attach promoted store's debug ↵Victor Hernandez2010-01-271-1/+4
| | | | | | metadata to dbg.value llvm-svn: 94634
* Linker needs to do deep-copy of function-local metadata to update references ↵Victor Hernandez2010-01-271-1/+13
| | | | | | to function arguments llvm-svn: 94632
OpenPOWER on IntegriCloud