aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineFunction.cpp
AgeCommit message (Collapse)AuthorFilesLines
2012-11-01Revert the majority of the next patch in the address space series:Chandler Carruth1-2/+2
r165941: Resubmit the changes to llvm core to update the functions to support different pointer sizes on a per address space basis. Despite this commit log, this change primarily changed stuff outside of VMCore, and those changes do not carry any tests for correctness (or even plausibility), and we have consistently found questionable or flat out incorrect cases in these changes. Most of them are probably correct, but we need to devise a system that makes it more clear when we have handled the address space concerns correctly, and ideally each pass that gets updated would receive an accompanying test case that exercises that pass specificaly w.r.t. alternate address spaces. However, from this commit, I have retained the new C API entry points. Those were an orthogonal change that probably should have been split apart, but they seem entirely good. In several places the changes were very obvious cleanups with no actual multiple address space code added; these I have not reverted when I spotted them. In a few other places there were merge conflicts due to a cleaner solution being implemented later, often not using address spaces at all. In those cases, I've preserved the new code which isn't address space dependent. This is part of my ongoing effort to clean out the partial address space code which carries high risk and low test coverage, and not likely to be finished before the 3.2 release looms closer. Duncan and I would both like to see the above issues addressed before we return to these changes. llvm-svn: 167222
2012-10-15Resubmit the changes to llvm core to update the functions to support ↵Micah Villmow1-2/+2
different pointer sizes on a per address space basis. llvm-svn: 165941
2012-10-11Revert 165732 for further review.Micah Villmow1-2/+2
llvm-svn: 165747
2012-10-11Add in the first iteration of support for llvm/clang/lldb to allow variable ↵Micah Villmow1-2/+2
per address space pointer sizes to be optimized correctly. llvm-svn: 165726
2012-10-09Create enums for the different attributes.Bill Wendling1-2/+2
We use the enums to query whether an Attributes object has that attribute. The opaque layer is responsible for knowing where that specific attribute is stored. llvm-svn: 165488
2012-10-08Move TargetData to DataLayout.Micah Villmow1-6/+6
llvm-svn: 165402
2012-09-26Remove the `hasFnAttr' method from Function.Bill Wendling1-2/+2
The hasFnAttr method has been replaced by querying the Attributes explicitly. No intended functionality change. llvm-svn: 164725
2012-09-21Make the 'get*AlignmentFromAttr' functions into member functions within the ↵Bill Wendling1-2/+2
Attributes class. Now with fix. llvm-svn: 164370
2012-09-20Revert r164308 to fix buildbots.Bill Wendling1-2/+2
llvm-svn: 164309
2012-09-20Make the 'get*AlignmentFromAttr' functions into member functions within the ↵Bill Wendling1-2/+2
Attributes class. llvm-svn: 164308
2012-09-11Release build: guard dump functions withManman Ren1-4/+4
"#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)" No functional change. Update r163339. llvm-svn: 163653
2012-09-06Release build: guard dump functions with "ifndef NDEBUG"Manman Ren1-0/+8
No functional change. llvm-svn: 163339
2012-09-06Add a new optimization pass: Stack Coloring, that merges disjoint static ↵Nadav Rotem1-1/+3
allocations (allocas). Allocas are known to be disjoint if they are marked by disjoint lifetime markers (@llvm.lifetime.XXX intrinsics). llvm-svn: 163299
2012-09-05Stop casting away const qualifier needlessly.Roman Divacky1-1/+1
llvm-svn: 163258
2012-08-22Tidy up a few more uses of MF.getFunction()->getName().David Blaikie1-4/+4
Based on CR feedback from r162301 and Craig Topper's refactoring in r162347 here are a few other places that could use the same API (& in one instance drop a Function.h dependency). llvm-svn: 162367
2012-08-22Add a getName function to MachineFunction. Use it in places that previously ↵Craig Topper1-1/+6
did getFunction()->getName(). Remove includes of Function.h that are no longer needed. llvm-svn: 162347
2012-06-28Move lib/Analysis/DebugInfo.cpp to lib/VMCore/DebugInfo.cpp andBill Wendling1-1/+1
include/llvm/Analysis/DebugInfo.h to include/llvm/DebugInfo.h. The reasoning is because the DebugInfo module is simply an interface to the debug info MDNodes and has nothing to do with analysis. llvm-svn: 159312
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