aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineFunction.cpp
AgeCommit message (Collapse)AuthorFilesLines
2012-06-19Tidy up.Chad Rosier1-17/+20
llvm-svn: 158762
2012-06-19Add an ensureMaxAlignment() function to MachineFrameInfo (analogous toChad Rosier1-1/+1
ensureAlignment() in MachineFunction). Also, drop setMaxAlignment() in favor of this new function. This creates a main entry point to setting MaxAlignment, which will be helpful for future work. No functionality change intended. llvm-svn: 158758
2012-03-31Teach CodeGen's version of computeMaskedBits to understand the range metadata.Rafael Espindola1-2/+3
This is the CodeGen equivalent of r153747. I tested that there is not noticeable performance difference with any combination of -O0/-O2 /-g when compiling gcc as a single compilation unit. llvm-svn: 153817
2012-03-27Print SSA and liveness tracking flags in MF::print().Jakob Stoklund Olesen1-1/+7
llvm-svn: 153518
2012-03-04Use uint16_t to store registers in callee saved register tables to reduce ↵Craig Topper1-1/+1
size of static data. llvm-svn: 151996
2012-02-06Move some llvm_unreachable's from r149849 out of switch statements to ↵Craig Topper1-2/+2
satisfy -Wcovered-switch-default llvm-svn: 149860
2012-02-05Convert assert(0) to llvm_unreachableCraig Topper1-4/+2
llvm-svn: 149816
2012-02-03Add a new MachineJumpTableInfo entry type, EK_GPRel64BlockAddress, which isAkira Hatanaka1-0/+4
needed to emit a 64-bit gp-relative relocation entry. Make changes necessary for emitting jump tables which have entries with directive .gpdword. This patch does not implement the parts needed for direct object emission or JIT. llvm-svn: 149668
2012-01-27make sure the file's matching header is #include'd first.Chris Lattner1-3/+1
llvm-svn: 149113
2012-01-27Rewrite CanShareConstantPoolEntry to be implemented in terms of theChris Lattner1-26/+26
mid-level constant folding APIs instead of doing its own analysis. This makes it more general (e.g. can now share a <2 x i64> with a <4 x i32>) and avoid duplicating a bunch of logic. llvm-svn: 149111
2012-01-26progress making the world safe to ConstantDataVector. WhileChris Lattner1-1/+4
we're at it, allow PatternMatch's "neg" pattern to match integer vector negations, and enhance ComputeNumSigned bits to handle shl of vectors. llvm-svn: 149082
2011-12-22drop unneeded config.h includesDylan Noblesmith1-1/+0
llvm-svn: 147197
2011-12-20Unweaken vtables as per ↵David Blaikie1-0/+2
http://llvm.org/docs/CodingStandards.html#ll_virtual_anch llvm-svn: 146960
2011-11-15Remove all remaining uses of Value::getNameStr().Benjamin Kramer1-1/+1
llvm-svn: 144648
2011-11-15Twinify GraphWriter a little bit.Benjamin Kramer1-2/+2
llvm-svn: 144647
2011-07-18land David Blaikie's patch to de-constify Type, with a few tweaks.Chris Lattner1-1/+1
llvm-svn: 135375
2011-06-28- Rename TargetInstrDesc, TargetOperandInfo to MCInstrDesc and MCOperandInfo andEvan Cheng1-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
2011-05-06Make the logic for determining function alignment more explicit. No ↵Eli Friedman1-1/+5
functionality change. llvm-svn: 131012
2011-05-02Use the PrintReg adaptor to correctly print live-in registers in debug output.Jakob Stoklund Olesen1-17/+5
llvm-svn: 130715
2011-02-22MachineConstantPoolValues are not uniqued, so they need to be freed if theyCameron Zwarich1-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
2011-02-21Revert r124611 - "Keep track of incoming argument's location while emitting ↵Devang Patel1-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
2011-01-31Keep track of incoming argument's location while emitting LiveIns.Devang Patel1-1/+3
llvm-svn: 124611
2011-01-10Rename TargetFrameInfo into TargetFrameLowering. Also, put couple of FIXMEs ↵Anton Korobeynikov1-3/+3
and fixes here and there. llvm-svn: 123170
2010-11-14move the pic base symbol stuff up to MachineFunctionChris Lattner1-0/+7
since it is trivial and will be shared between ppc and x86. This substantially simplifies the X86 backend also. llvm-svn: 119089
2010-10-31Attach a GCModuleInfo to a MachineFunction.Nicolas Geoffray1-2/+3
llvm-svn: 117867
2010-10-30Include MachineBasicBlock numbers in viewCFG() output.Jakob Stoklund Olesen1-8/+6
llvm-svn: 117765
2010-10-26Teach MachineBasicBlock::print() to annotate instructions and blocks withJakob Stoklund Olesen1-2/+2
SlotIndexes when available. llvm-svn: 117392
2010-10-20Make CodeGen TBAA-aware.Dan Gohman1-5/+10
llvm-svn: 116890
2010-09-21force clients of MachineFunction::getMachineMemOperand to provide aChris Lattner1-14/+4
MachinePointerInfo, propagating the type out a level of API. Remove the old MachineFunction::getMachineMemOperand impl. llvm-svn: 114393
2010-09-21start pushing MachinePointerInfo out through the MachineMemOperand interfaceChris Lattner1-5/+11
to the MachineFunction construction methods. llvm-svn: 114390
2010-07-27It's better to have the arrays, which would trigger the creation of stackBill Wendling1-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
2010-07-23Remove too-strict assertion. We may want the vreg copy of the physical registerJim Grosbach1-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
2010-07-07Fix debugging strings.Dan Gohman1-2/+2
llvm-svn: 107795
2010-07-04Infer alignments of fixed frame objects when they are constructed. This ↵Evan Cheng1-1/+7
ensures remat'ed loads from fixed slots have the right alignments. llvm-svn: 107591
2010-07-03Remove isSS argument from CreateFixedObject. Fixed objects cannot be spill ↵Evan Cheng1-2/+2
slots so it's always false. llvm-svn: 107550
2010-06-29Revert r107205 and r107207.Bill Wendling1-7/+6
llvm-svn: 107215
2010-06-29Introducing the "linker_weak" linkage type. This will be used for Objective-CBill Wendling1-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
2010-05-24Avoid adding duplicate function live-in's.Evan Cheng1-2/+8
llvm-svn: 104560
2010-04-15Add more const qualifiers for LLVM IR pointers in CodeGen.Dan Gohman1-1/+1
llvm-svn: 101342
2010-04-15Add const qualifiers to CodeGen's use of LLVM IR constructs.Dan Gohman1-8/+8
llvm-svn: 101334
2010-04-05enhance MachineFunction to have a MMI pointer.Chris Lattner1-2/+3
llvm-svn: 100414
2010-04-02Ok, third time's the charm. No changes from last time except the CMakeDavid Greene1-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
2010-04-02Switch the code generator (except the JIT) onto the new DebugLocChris Lattner1-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
2010-04-02Revert 100204. It broke a bunch of tests and apparently changed what passes ↵Evan Cheng1-0/+34
are run during codegen. llvm-svn: 100207
2010-04-02Let's try this again. Re-apply 100143 including an apparent missingDavid Greene1-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
2010-04-01Revert r100143.Eric Christopher1-0/+34
llvm-svn: 100146
2010-04-01Add some switches helpful for debugging:David Greene1-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
2010-03-30Rip out the 'is temporary' nonsense from the MCContext interface toChris Lattner1-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
2010-03-19Stop trying to merge identical jump tables. This had been inadvertentlyBob Wilson1-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
2010-03-18Define placement new wrappers for BumpPtrAllocator andDan Gohman1-10/+6
RecyclingAllocator to allow client code to be simpler, and simplify several clients. llvm-svn: 98847