summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Give MachineFunctionAnalysis a destructor so it can verify thatDan Gohman2009-08-011-0/+4
| | | | | | that it released its allocated memory. llvm-svn: 77775
* Delete a redundant variable.Dan Gohman2009-08-011-1/+0
| | | | llvm-svn: 77774
* Minor code simplifications.Dan Gohman2009-08-011-8/+8
| | | | llvm-svn: 77769
* SelectionDAGISel no longer needs to check hasAvailableExternallyLinkage,Dan Gohman2009-08-011-5/+0
| | | | | | | as it is now a MachineFunctionPass, and MachineFunctionPass now handles this. llvm-svn: 77760
* Make UnreachableMachineBlockElim preserve MachineDominatorTree andDan Gohman2009-08-011-0/+15
| | | | | | | | | MachineLoopInfo. llc now runs MachineLoopInfo and MachineDominatorTree only twice, instead of three times. llvm-svn: 77759
* Use setPreservesAll and setPreservesCFG in CodeGen passes.Dan Gohman2009-07-3117-14/+31
| | | | llvm-svn: 77754
* SelectionDAGISel does not "preserve all", since it makes lots of changesDan Gohman2009-07-311-1/+3
| | | | | | to the MachineFunction. llvm-svn: 77753
* Use a range insert instead of an explicit loop.Dan Gohman2009-07-311-2/+1
| | | | llvm-svn: 77752
* Allow target intrinsics that return multiple values, i.e., struct types,Bob Wilson2009-07-311-15/+9
| | | | | | | | | | | | | | | | | | | | | | | | in SelectionDAGLowering::visitTargetIntrinsic. This removes a bit of special-case code for vector types. After staring at it for a while, I managed to convince myself that it is not necessary. The only case where TLI.getValueType() differs from MVT::getMVT is for iPTR, so this code could potentially make a difference for a vector of pointers. But, it looks like that is not supported. Calling TLI.getValueType() on a vector of pointers leads to the following sequence of calls: TargetLowering::getValueType MVT::getMVT MVT::getVectorVT(iPTR, num elements) MVT::getExtendedVectorVT MVT::getTypeForMVT for iPTR assertion fails "Type is not extended!" So, unless I'm really missing something, this bit of code is irrelevant to the current version of LLVM, which is consistent with the fact that I don't see this code in other similar places. llvm-svn: 77747
* add some comments on how this is *supposed* to work. We don'tChris Lattner2009-07-311-0/+27
| | | | | | | need the PreferredEHDataFormat hook, but I have yet-more refactoring to do before I can zap it. llvm-svn: 77742
* rearrange a conditional. Even if this weren't #if 0'd out, this wouldChris Lattner2009-07-311-4/+5
| | | | | | have no functionality change. llvm-svn: 77741
* Simplify operand padding by keying off tabs in the asm stream. IfDavid Greene2009-07-311-1/+21
| | | | | | | | | | | | padding is disabled, tabs get replaced by spaces except in the case of the first operand, where the tab is output to line up the operands after the mnemonics. Add some better comments and eliminate redundant code. Fix some testcases to not assume tabs. llvm-svn: 77740
* PreferredEHDataFormat is always call with data and global, but this wholeChris Lattner2009-07-311-1/+1
| | | | | | | thing is #if0'd out anyway. Just simplify the code by reducing the interface. Not deleting this is essential for Bill's continuing happiness. llvm-svn: 77736
* move emitUsedDirectiveFor to TargetLoweringObjectFile and rename it toChris Lattner2009-07-311-1/+1
| | | | | | | indicate that it is a predicate, not an emitter. This eliminates TAI dependencies on Mangler and GlobalValue. llvm-svn: 77726
* Move a few more APIs back to 2.5 forms. The only remaining ones left to ↵Owen Anderson2009-07-314-8/+8
| | | | | | | | change back are metadata related, which I'm waiting on to avoid conflicting with Devang. llvm-svn: 77721
* Update CMake files.Ted Kremenek2009-07-311-0/+2
| | | | llvm-svn: 77709
* switch off of 'Section' onto MCSection. We're not properly usingChris Lattner2009-07-314-13/+17
| | | | | | MCSection subclasses yet, but this is a step in the right direction. llvm-svn: 77708
* MachineFunction no longer needs Annotation.Dan Gohman2009-07-311-2/+1
| | | | llvm-svn: 77704
* Reapply r77654 with a fix: MachineFunctionPass's getAnalysisUsageDan Gohman2009-07-319-91/+113
| | | | | | | | shouldn't do AU.setPreservesCFG(), because even though CodeGen passes don't modify the LLVM IR CFG, they may modify the MachineFunction CFG, and passes like MachineLoop are registered with isCFGOnly set to true. llvm-svn: 77691
* refactor section construction in TLOF to be through an explicitChris Lattner2009-07-313-0/+15
| | | | | | initialize method, which can be called when an MCContext is available. llvm-svn: 77687
* Move getTrue() and getFalse() to 2.5-like APIs.Owen Anderson2009-07-311-4/+4
| | | | llvm-svn: 77685
* Revert r77654, it appears to be causing llvm-gcc bootstrap failures, and manyDaniel Dunbar2009-07-319-111/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | failures when building assorted projects with clang. --- Reverse-merging r77654 into '.': U include/llvm/CodeGen/Passes.h U include/llvm/CodeGen/MachineFunctionPass.h U include/llvm/CodeGen/MachineFunction.h U include/llvm/CodeGen/LazyLiveness.h U include/llvm/CodeGen/SelectionDAGISel.h D include/llvm/CodeGen/MachineFunctionAnalysis.h U include/llvm/Function.h U lib/Target/CellSPU/SPUISelDAGToDAG.cpp U lib/Target/PowerPC/PPCISelDAGToDAG.cpp U lib/CodeGen/LLVMTargetMachine.cpp U lib/CodeGen/MachineVerifier.cpp U lib/CodeGen/MachineFunction.cpp U lib/CodeGen/PrologEpilogInserter.cpp U lib/CodeGen/MachineLoopInfo.cpp U lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp D lib/CodeGen/MachineFunctionAnalysis.cpp D lib/CodeGen/MachineFunctionPass.cpp U lib/CodeGen/LiveVariables.cpp llvm-svn: 77661
* Manage MachineFunctions with an analysis Pass instead of the AnnotableDan Gohman2009-07-319-91/+111
| | | | | | | mechanism. To support this, make MachineFunctionPass a little more complete. llvm-svn: 77654
* Fix cmake build.Benjamin Kramer2009-07-311-1/+0
| | | | llvm-svn: 77649
* Removed the BigBlock register allocator.Lang Hames2009-07-301-892/+0
| | | | llvm-svn: 77640
* Move more code back to 2.5 APIs.Owen Anderson2009-07-301-2/+1
| | | | llvm-svn: 77635
* Start using DebugInfoFinder.Devang Patel2009-07-301-13/+11
| | | | llvm-svn: 77621
* Allow targets to define libcall names for mem(cpy,set,move) intrinsics, ↵Sanjiv Gupta2009-07-302-3/+9
| | | | | | rather than hardcoding them in DAG lowering. llvm-svn: 77586
* Optimize some common usage patterns of atomic built-ins ↵Evan Cheng2009-07-301-0/+1
| | | | | | | | | | | | __sync_add_and_fetch() and __sync_sub_and_fetch. When the return value is not used (i.e. only care about the value in the memory), x86 does not have to use add to implement these. Instead, it can use add, sub, inc, dec instructions with the "lock" prefix. This is currently implemented using a bit of instruction selection trick. The issue is the target independent pattern produces one output and a chain and we want to map it into one that just output a chain. The current trick is to select it into a merge_values with the first definition being an implicit_def. The proper solution is to add new ISD opcodes for the no-output variant. DAG combiner can then transform the node before it gets to target node selection. Problem #2 is we are adding a whole bunch of x86 atomic instructions when in fact these instructions are identical to the non-lock versions. We need a way to add target specific information to target nodes and have this information carried over to machine instructions. Asm printer (or JIT) can use this information to add the "lock" prefix. llvm-svn: 77582
* Move types back to the 2.5 API.Owen Anderson2009-07-299-49/+34
| | | | llvm-svn: 77516
* inline the global 'getInstrOperandRegClass' function into its callersChris Lattner2009-07-294-14/+18
| | | | | | now that TargetOperandInfo does the heavy lifting. llvm-svn: 77508
* Forgot to output the base offset.Bill Wendling2009-07-291-4/+8
| | | | llvm-svn: 77505
* 1. Introduce a new TargetOperandInfo::getRegClass() helper methodChris Lattner2009-07-291-4/+2
| | | | | | | | | | | | | and convert code to using it, instead of having lots of things poke the isLookupPtrRegClass() method directly. 2. Make PointerLikeRegClass contain a 'kind' int, and store it in the existing regclass field of TargetOperandInfo when the isLookupPtrRegClass() predicate is set. Make getRegClass pass this into TargetRegisterInfo::getPointerRegClass(), allowing targets to have multiple ptr_rc things. llvm-svn: 77504
* Remove now unused Context variables.Benjamin Kramer2009-07-291-1/+0
| | | | llvm-svn: 77495
* Move ConstantExpr to 2.5 API.Owen Anderson2009-07-292-2/+2
| | | | llvm-svn: 77494
* pass the mangler down into the various SectionForGlobal methods.Chris Lattner2009-07-292-3/+4
| | | | | | No functionality change. llvm-svn: 77432
* Move comment to above method.Bill Wendling2009-07-291-21/+21
| | | | llvm-svn: 77412
* - Temporarily unbreak the build by forcing the TType "absptr", which isn'tBill Wendling2009-07-292-50/+75
| | | | | | | correct. But what are you going to do? I'll fix this in the future. - Move another large loop into its own method. llvm-svn: 77408
* Cleanup code to use iterators instead of ".size()".Bill Wendling2009-07-281-21/+25
| | | | | | Does any one else hate the name "const_reverse_iterator" as much as I do? llvm-svn: 77399
* Doxygenify comments.Bill Wendling2009-07-282-2/+4
| | | | llvm-svn: 77394
* Split out large loop into it's very own method. No intended functionality ↵Bill Wendling2009-07-282-42/+62
| | | | | | change. llvm-svn: 77393
* Output the EH TType format and base offset only if there are types that we'reBill Wendling2009-07-281-6/+15
| | | | | | going to emit. llvm-svn: 77382
* Use the preferred EH data format for the preferred EH data format.Bill Wendling2009-07-281-2/+2
| | | | llvm-svn: 77373
* Fix a typo.Evan Cheng2009-07-281-1/+1
| | | | llvm-svn: 77369
* Return ConstantVector to 2.5 API.Owen Anderson2009-07-282-2/+2
| | | | llvm-svn: 77366
* Handle null and file symbol on doInitializationBruno Cardoso Lopes2009-07-282-9/+8
| | | | llvm-svn: 77354
* Change ConstantArray to 2.5 API.Owen Anderson2009-07-282-2/+2
| | | | llvm-svn: 77347
* Add reload and remat backscheduling. This is disabled by default. UseDavid Greene2009-07-281-26/+150
| | | | | | -schedule-spills=true to enable. llvm-svn: 77327
* Rip all of the global variable lowering logic out of TargetAsmInfo. SinceChris Lattner2009-07-285-25/+43
| | | | | | | | | | | | | | | | | | | | it is highly specific to the object file that will be generated in the end, this introduces a new TargetLoweringObjectFile interface that is implemented for each of ELF/MachO/COFF/Alpha/PIC16 and XCore. Though still is still a brutal and ugly refactoring, this is a major step towards goodness. This patch also: 1. fixes a bunch of dangling pointer problems in the PIC16 backend. 2. disables the TargetLowering copy ctor which PIC16 was accidentally using. 3. gets us closer to xcore having its own crazy target section flags and pic16 not having to shadow sections with its own objects. 4. fixes wierdness where ELF targets would set CStringSection but not CStringSection_. Factor the code better. 5. fixes some bugs in string lowering on ELF targets. llvm-svn: 77294
* Avoid build warnings.Mike Stump2009-07-271-0/+1
| | | | llvm-svn: 77271
OpenPOWER on IntegriCloud