summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineFunction.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove all remaining uses of Value::getNameStr().Benjamin Kramer2011-11-151-1/+1
| | | | llvm-svn: 144648
* Twinify GraphWriter a little bit.Benjamin Kramer2011-11-151-2/+2
| | | | llvm-svn: 144647
* land David Blaikie's patch to de-constify Type, with a few tweaks.Chris Lattner2011-07-181-1/+1
| | | | llvm-svn: 135375
* - Rename TargetInstrDesc, TargetOperandInfo to MCInstrDesc and MCOperandInfo andEvan Cheng2011-06-281-2/+2
| | | | | | | | sink them into MC layer. - Added MCInstrInfo, which captures the tablegen generated static data. Chang TargetInstrInfo so it's based off MCInstrInfo. llvm-svn: 134021
* Make the logic for determining function alignment more explicit. No ↵Eli Friedman2011-05-061-1/+5
| | | | | | functionality change. llvm-svn: 131012
* Use the PrintReg adaptor to correctly print live-in registers in debug output.Jakob Stoklund Olesen2011-05-021-17/+5
| | | | llvm-svn: 130715
* MachineConstantPoolValues are not uniqued, so they need to be freed if theyCameron Zwarich2011-02-221-1/+7
| | | | | | | | | share entries. Add a DenseSet to MachineConstantPool for the MachineCPVs that it owns. This will hopefully fix the MC/ARM/elf-reloc-01.ll failure on the leaks bots. llvm-svn: 126218
* Revert r124611 - "Keep track of incoming argument's location while emitting ↵Devang Patel2011-02-211-3/+1
| | | | | | | | | | | LiveIns." In other words, do not keep track of argument's location. The debugger (gdb) is not prepared to see line table entries for arguments. For the debugger, "second" line table entry marks beginning of function body. This requires some coordination with debugger to get this working. - The debugger needs to be aware of prolog_end attribute attached with line table entries. - The compiler needs to accurately mark prolog_end in line table entries (at -O0 and at -O1+) llvm-svn: 126155
* Keep track of incoming argument's location while emitting LiveIns.Devang Patel2011-01-311-1/+3
| | | | llvm-svn: 124611
* Rename TargetFrameInfo into TargetFrameLowering. Also, put couple of FIXMEs ↵Anton Korobeynikov2011-01-101-3/+3
| | | | | | and fixes here and there. llvm-svn: 123170
* move the pic base symbol stuff up to MachineFunctionChris Lattner2010-11-141-0/+7
| | | | | | | since it is trivial and will be shared between ppc and x86. This substantially simplifies the X86 backend also. llvm-svn: 119089
* Attach a GCModuleInfo to a MachineFunction.Nicolas Geoffray2010-10-311-2/+3
| | | | llvm-svn: 117867
* Include MachineBasicBlock numbers in viewCFG() output.Jakob Stoklund Olesen2010-10-301-8/+6
| | | | llvm-svn: 117765
* Teach MachineBasicBlock::print() to annotate instructions and blocks withJakob Stoklund Olesen2010-10-261-2/+2
| | | | | | SlotIndexes when available. llvm-svn: 117392
* Make CodeGen TBAA-aware.Dan Gohman2010-10-201-5/+10
| | | | llvm-svn: 116890
* force clients of MachineFunction::getMachineMemOperand to provide aChris Lattner2010-09-211-14/+4
| | | | | | | MachinePointerInfo, propagating the type out a level of API. Remove the old MachineFunction::getMachineMemOperand impl. llvm-svn: 114393
* start pushing MachinePointerInfo out through the MachineMemOperand interfaceChris Lattner2010-09-211-5/+11
| | | | | | to the MachineFunction construction methods. llvm-svn: 114390
* It's better to have the arrays, which would trigger the creation of stackBill Wendling2010-07-271-1/+1
| | | | | | | | | protectors, to be near the stack protectors on the stack. Accomplish this by tagging the stack object with a predicate that indicates that it would trigger this. In the prolog-epilog inserter, assign these objects to the stack after the stack protector but before the other objects. llvm-svn: 109481
* Remove too-strict assertion. We may want the vreg copy of the physical registerJim Grosbach2010-07-231-1/+0
| | | | | | | to be of a different register class. For example, in Thumb1 if the live-in is a high register, we want the vreg to be a low register. rdar://8224931 llvm-svn: 109291
* Fix debugging strings.Dan Gohman2010-07-071-2/+2
| | | | llvm-svn: 107795
* Infer alignments of fixed frame objects when they are constructed. This ↵Evan Cheng2010-07-041-1/+7
| | | | | | ensures remat'ed loads from fixed slots have the right alignments. llvm-svn: 107591
* Remove isSS argument from CreateFixedObject. Fixed objects cannot be spill ↵Evan Cheng2010-07-031-2/+2
| | | | | | slots so it's always false. llvm-svn: 107550
* Revert r107205 and r107207.Bill Wendling2010-06-291-7/+6
| | | | llvm-svn: 107215
* Introducing the "linker_weak" linkage type. This will be used for Objective-CBill Wendling2010-06-291-6/+7
| | | | | | | | | | | | | | | | | | | metadata types which should be marked as "weak", but which the linker will remove upon final linkage. For example, the "objc_msgSend_fixup_alloc" symbol is defined like this: .globl l_objc_msgSend_fixup_alloc .weak_definition l_objc_msgSend_fixup_alloc .section __DATA, __objc_msgrefs, coalesced .align 3 l_objc_msgSend_fixup_alloc: .quad _objc_msgSend_fixup .quad L_OBJC_METH_VAR_NAME_1 This is different from the "linker_private" linkage type, because it can't have the metadata defined with ".weak_definition". llvm-svn: 107205
* Avoid adding duplicate function live-in's.Evan Cheng2010-05-241-2/+8
| | | | llvm-svn: 104560
* Add more const qualifiers for LLVM IR pointers in CodeGen.Dan Gohman2010-04-151-1/+1
| | | | llvm-svn: 101342
* Add const qualifiers to CodeGen's use of LLVM IR constructs.Dan Gohman2010-04-151-8/+8
| | | | llvm-svn: 101334
* enhance MachineFunction to have a MMI pointer.Chris Lattner2010-04-051-2/+3
| | | | llvm-svn: 100414
* Ok, third time's the charm. No changes from last time except the CMakeDavid Greene2010-04-021-34/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | source addition. Apparently the buildbots were wrong about failures. --- Add some switches helpful for debugging: -print-before=<Pass Name> Dump IR before running pass <Pass Name>. -print-before-all Dump IR before running each pass. -print-after-all Dump IR after running each pass. These are helpful when tracking down a miscompilation. It is easy to get IR dumps and do diffs on them, etc. To make this work well, add a new getPrinterPass API to Pass so that each kind of pass (ModulePass, FunctionPass, etc.) can create a Pass suitable for dumping out the kind of object the Pass works on. llvm-svn: 100249
* Switch the code generator (except the JIT) onto the new DebugLocChris Lattner2010-04-021-9/+0
| | | | | | | | | | | | | | | representation. This eliminates the 'DILocation' MDNodes for file/line/col tuples from -O0 -g codegen. This remove the old DebugLoc class, making it a typedef for DebugLoc, I'll rename NewDebugLoc next. I didn't update the JIT to use the new apis, so it will continue to work, but be as slow as before. Someone should eventually do this or, better yet, rip out the JIT debug info stuff and build the JIT on top of MC. llvm-svn: 100209
* Revert 100204. It broke a bunch of tests and apparently changed what passes ↵Evan Cheng2010-04-021-0/+34
| | | | | | are run during codegen. llvm-svn: 100207
* Let's try this again. Re-apply 100143 including an apparent missingDavid Greene2010-04-021-34/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | <string> include. For some reason the buildbot choked on this while my builds did not. It's probably due to a difference in system headers. --- Add some switches helpful for debugging: -print-before=<Pass Name> Dump IR before running pass <Pass Name>. -print-before-all Dump IR before running each pass. -print-after-all Dump IR after running each pass. These are helpful when tracking down a miscompilation. It is easy to get IR dumps and do diffs on them, etc. To make this work well, add a new getPrinterPass API to Pass so that each kind of pass (ModulePass, FunctionPass, etc.) can create a Pass suitable for dumping out the kind of object the Pass works on. llvm-svn: 100204
* Revert r100143.Eric Christopher2010-04-011-0/+34
| | | | llvm-svn: 100146
* Add some switches helpful for debugging:David Greene2010-04-011-34/+0
| | | | | | | | | | | | | | | | | | | | | | | -print-before=<Pass Name> Dump IR before running pass <Pass Name>. -print-before-all Dump IR before running each pass. -print-after-all Dump IR after running each pass. These are helpful when tracking down a miscompilation. It is easy to get IR dumps and do diffs on them, etc. To make this work well, add a new getPrinterPass API to Pass so that each kind of pass (ModulePass, FunctionPass, etc.) can create a Pass suitable for dumping out the kind of object the Pass works on. llvm-svn: 100143
* Rip out the 'is temporary' nonsense from the MCContext interface toChris Lattner2010-03-301-3/+1
| | | | | | | | | create symbols. It is extremely error prone and a source of a lot of the remaining integrated assembler bugs on x86-64. This fixes rdar://7807601. llvm-svn: 99902
* Stop trying to merge identical jump tables. This had been inadvertentlyBob Wilson2010-03-191-11/+0
| | | | | | | | | | | disabled for several months (since svn r88806) and no one noticed. My fix for pr6543 yesterday reenabled it, but broke the ARM port's code for using TBB/TBH. Rather than adding a target hook to disable merging for Thumb2 only, I'm just taking this out. It is not common to have identical jump tables, the code we used to merge them was O(N^2), and it only helps code size, not performance. llvm-svn: 98977
* Define placement new wrappers for BumpPtrAllocator andDan Gohman2010-03-181-10/+6
| | | | | | | RecyclingAllocator to allow client code to be simpler, and simplify several clients. llvm-svn: 98847
* Fix pr6543: svn r88806 changed MachineJumpTableInfo::getJumpTableIndex() toBob Wilson2010-03-181-3/+12
| | | | | | | | | | | | | | | | | always create a new jump table. The intention was to avoid merging jump tables in SelectionDAGBuilder, and to wait for the branch folding pass to merge tables. Unfortunately, the same getJumpTableIndex() method is also used to merge tables in branch folding, so as a result of this change branch tables are never merged. Worse, the branch folding code is expecting getJumpTableIndex to always return the index of an existing table, but with this change, it never does so. In at least some cases, e.g., pr6543, this creates references to non-existent tables. I've fixed the problem by adding a new createJumpTableIndex function, which will always create a new table, and I've changed getJumpTableIndex to only look at existing tables. llvm-svn: 98845
* rearrange MCContext ownership. Before LLVMTargetMachine created it Chris Lattner2010-03-131-2/+2
| | | | | | | | | | | and passing off ownership to AsmPrinter. Now MachineModuleInfo creates it and owns it by value. This allows us to use MCSymbols more consistently throughout the rest of the code generator, and simplifies a bit of code. This also allows MachineFunction to keep an MCContext reference handy, and cleans up the TargetRegistry interfaces for AsmPrinters. llvm-svn: 98450
* Add a new jump table encoding to indicate jump tables entriesRichard Osborne2010-03-111-0/+4
| | | | | | are inside the function by the target at the point of use. llvm-svn: 98255
* set the temporary bit on MCSymbols correctly.Chris Lattner2010-03-101-1/+3
| | | | llvm-svn: 98124
* Add support for the 'alignstack' attribute to the x86 backend. Fixes PR5254.Charles Davis2010-02-191-0/+3
| | | | | | Also, FileCheck'ize a test. llvm-svn: 96686
* Fix "the the" and similar typos.Dan Gohman2010-02-101-1/+1
| | | | llvm-svn: 95781
* Silence GCC warnings with asserts turned off. No functionality change.Chandler Carruth2010-01-271-2/+1
| | | | llvm-svn: 94673
* Move getJTISymbol from MachineJumpTableInfo to MachineFunction,Chris Lattner2010-01-261-18/+21
| | | | | | | | | | | | | | | | | | which is more convenient, and change getPICJumpTableRelocBaseExpr to take a MachineFunction to match. Next, move the X86 code that create a PICBase symbol to X86TargetLowering::getPICBaseSymbol from X86MCInstLower::GetPICBaseSymbol, which was an asmprinter specific library. This eliminates a 'gross hack', and allows us to implement X86ISelLowering::getPICJumpTableRelocBaseExpr which now calls it. This in turn allows us to eliminate the X86AsmPrinter::printPICJumpTableSetLabel method, which was the only overload of printPICJumpTableSetLabel. llvm-svn: 94526
* add a new MachineJumpTableInfo::getJTISymbol method,Chris Lattner2010-01-261-8/+28
| | | | | | use it to implement the default TargetLowering::getPICJumpTableRelocBaseExpr llvm-svn: 94523
* make MachineFunction keep track of its ID and make Chris Lattner2010-01-261-5/+5
| | | | | | | | MachineFunctionAnalysis dole them out, instead of having AsmPrinter do both. Have the AsmPrinter::SetupMachineFunction method set the 'AsmPrinter::MF' variable. llvm-svn: 94509
* Add support for target-specific 32-bit custom-lowered Chris Lattner2010-01-261-0/+2
| | | | | | jump table entries. llvm-svn: 94505
* Rearrange handling of jump tables. Highlights:Chris Lattner2010-01-251-11/+49
| | | | | | | | | | | | | | | | | | 1. MachineJumpTableInfo is now created lazily for a function the first time it actually makes a jump table instead of for every function. 2. The encoding of jump table entries is now described by the MachineJumpTableInfo::JTEntryKind enum. This enum is determined by the TLI::getJumpTableEncoding() hook, instead of by lots of code scattered throughout the compiler that "knows" that jump table entries are always 32-bits in pic mode (for example). 3. The size and alignment of jump table entries is now calculated based on their kind, instead of at machinefunction creation time. Future work includes using the EntryKind in more places in the compiler, eliminating other logic that "knows" the layout of jump tables in various situations. llvm-svn: 94470
* Avoid including DebugInfo.h in AsmPrinter.hDevang Patel2010-01-191-0/+1
| | | | llvm-svn: 93864
OpenPOWER on IntegriCloud