summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineFunction.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Add MachineFrameInfo::getPristineRegisters(MBB) method.Jakob Stoklund Olesen2009-08-131-1/+31
| | | | llvm-svn: 78911
* SjLj based exception handling unwinding support. This patch is nasty, brutishJim Grosbach2009-08-111-0/+3
| | | | | | | | | | | | | and short. Well, it's kinda short. Definitely nasty and brutish. The front-end generates the register/unregister calls into the SjLj runtime, call-site indices and landing pad dispatch. The back end fills in the LSDA with the call-site information provided by the front end. Catch blocks are not yet implemented. Built on Darwin and verified no llvm-core "make check" regressions. llvm-svn: 78625
* Re-apply LiveInterval index dumping patch, with fixes suggested by BillDavid Greene2009-08-031-3/+6
| | | | | | and others. llvm-svn: 78003
* Fix some comments referring to std::cerr.Daniel Dunbar2009-08-031-2/+2
| | | | llvm-svn: 77931
* MachineFunction no longer needs Annotation.Dan Gohman2009-07-311-2/+1
| | | | llvm-svn: 77704
* Reapply r77654 with a fix: MachineFunctionPass's getAnalysisUsageDan Gohman2009-07-311-71/+2
| | | | | | | | 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
* Revert r77654, it appears to be causing llvm-gcc bootstrap failures, and manyDaniel Dunbar2009-07-311-2/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-311-71/+2
| | | | | | | mechanism. To support this, make MachineFunctionPass a little more complete. llvm-svn: 77654
* More migration to raw_ostream, the water has dried up around the iostream hole.Daniel Dunbar2009-07-251-2/+2
| | | | | | | | | | - Some clients which used DOUT have moved to DEBUG. We are deprecating the "magic" DOUT behavior which avoided calling printing functions when the statement was disabled. In addition to being unnecessary magic, it had the downside of leaving code in -Asserts builds, and of hiding potentially unnecessary computations. llvm-svn: 77019
* Switch to getNameStr().Daniel Dunbar2009-07-241-4/+4
| | | | llvm-svn: 76962
* reimplement Constant::ContainsRelocations as Chris Lattner2009-07-221-13/+1
| | | | | | | | | Constant::getRelocationInfo(), which has a much simpler to use API. It still should not be part of libvmcore, but is better than it was. Also teach it to be smart about hidden visibility. llvm-svn: 76700
* no really, I can spell!Chris Lattner2009-07-211-2/+2
| | | | llvm-svn: 76679
* add an API so target-independent codegen can determine if a constantChris Lattner2009-07-211-1/+20
| | | | | | | | pool entry will require relocations against it. I implemented this conservatively for ARM, someone who is knowledgable about it should see if this can be improved. llvm-svn: 76678
* revert r76602, 76603, and r76615, pending design discussions.Chris Lattner2009-07-211-6/+3
| | | | llvm-svn: 76646
* Add PrefixPrinter arguments to the dump routines for MachineFunction andDavid Greene2009-07-211-3/+6
| | | | | | MachineBasicBlock. We'll use these shortly. llvm-svn: 76603
* Add an "alignment" field to the MachineFunction object. It makes more sense toBill Wendling2009-06-301-4/+6
| | | | | | | | | | have the alignment be calculated up front, and have the back-ends obey whatever alignment is decided upon. This allows for future work that would allow for precise no-op placement and the like. llvm-svn: 74564
* My guess is that RegInfo should only call the Allocator.Deallocator if it's notBill Wendling2009-06-251-7/+10
| | | | | | null. llvm-svn: 74147
* Get rid of the global CFGOnly flag by threading a ShortNames parameters ↵Owen Anderson2009-06-241-12/+10
| | | | | | | | through the GraphViz rendering code. Update other uses in the codebase for this change. llvm-svn: 74084
* Temporarily revert r72191. It was causing an assert during llvm-gccBill Wendling2009-05-211-17/+1
| | | | | | bootstrapping. llvm-svn: 72200
* Introduce DebugScope which gets embedded into the machine instructions' ↵Argyrios Kyrtzidis2009-05-201-1/+17
| | | | | | | | DebugLoc. DebugScope refers to a debug region, function or block. llvm-svn: 72191
* Down with static variables!Owen Anderson2009-05-141-4/+8
| | | | | | Part one of many. llvm-svn: 71785
* Removing the HasBuiltinSetjmp flag and associated bits. Flagging the presenceJim Grosbach2009-05-131-1/+0
| | | | | | | | | of exception handling builtin sjlj targets in functions turns out not to be necessary. Marking the intrinsic implementation in the .td file as defining all registers is sufficient to get the context saved properly by the containing function. llvm-svn: 71743
* Add support for GCC compatible builtin setjmp and longjmp intrinsics. This isJim Grosbach2009-05-121-0/+1
| | | | | | | a supporting preliminary patch for GCC-compatible SjLJ exception handling. Note that these intrinsics are not designed to be invoked directly by the user, but rather used by the front-end as target hooks for exception handling. llvm-svn: 71610
* Make DebugLoc independent of DwarfWriter.Argyrios Kyrtzidis2009-04-301-3/+3
| | | | | | | | -Replace DebugLocTuple's Source ID with CompileUnit's GlobalVariable* -Remove DwarfWriter::getOrCreateSourceID -Make necessary changes for the above (fix callsites, etc.) llvm-svn: 70520
* Move duplicated AddLiveIn function from X86 and ARM backends to be a methodBob Wilson2009-04-201-0/+10
| | | | | | | in the MachineFunction class, renaming it to addLiveIn for consistency with the same method in MachineBasicBlock. Thanks for Anton for suggesting this. llvm-svn: 69615
* Move MachineJumpTableInfo::ReplaceMBBInJumpTables out of line.Dan Gohman2009-04-151-0/+17
| | | | llvm-svn: 69125
* Add a new "available_externally" linkage type. This is intendedChris Lattner2009-04-131-2/+8
| | | | | | | | to support C99 inline, GNU extern inline, etc. Related bugzilla's include PR3517, PR3100, & PR2933. Nothing uses this yet, but it appears to work. llvm-svn: 68940
* Now that errs() is properly non-buffered, there's no need toDan Gohman2009-03-231-1/+1
| | | | | | explicitly flush it. llvm-svn: 67526
* Fix some significant problems with constant pools that resulted in ↵Evan Cheng2009-03-131-21/+6
| | | | | | | | | | | | | | | | | | | | | | | unnecessary paddings between constant pool entries, larger than necessary alignments (e.g. 8 byte alignment for .literal4 sections), and potentially other issues. 1. ConstantPoolSDNode alignment field is log2 value of the alignment requirement. This is not consistent with other SDNode variants. 2. MachineConstantPool alignment field is also a log2 value. 3. However, some places are creating ConstantPoolSDNode with alignment value rather than log2 values. This creates entries with artificially large alignments, e.g. 256 for SSE vector values. 4. Constant pool entry offsets are computed when they are created. However, asm printer group them by sections. That means the offsets are no longer valid. However, asm printer uses them to determine size of padding between entries. 5. Asm printer uses expensive data structure multimap to track constant pool entries by sections. 6. Asm printer iterate over SmallPtrSet when it's emitting constant pool entries. This is non-deterministic. Solutions: 1. ConstantPoolSDNode alignment field is changed to keep non-log2 value. 2. MachineConstantPool alignment field is also changed to keep non-log2 value. 3. Functions that create ConstantPool nodes are passing in non-log2 alignments. 4. MachineConstantPoolEntry no longer keeps an offset field. It's replaced with an alignment field. Offsets are not computed when constant pool entries are created. They are computed on the fly in asm printer and JIT. 5. Asm printer uses cheaper data structure to group constant pool entries. 6. Asm printer compute entry offsets after grouping is done. 7. Change JIT code to compute entry offsets on the fly. llvm-svn: 66875
* Constify and don't return a reference.Bill Wendling2009-02-041-1/+1
| | | | llvm-svn: 63689
* Erm. Would be nice to initialize this variable. . .Bill Wendling2009-02-031-1/+1
| | | | llvm-svn: 63677
* Add getDebugLocTuple to retrieve the DebugLocTuple for a given DebugLoc object.Bill Wendling2009-02-031-3/+11
| | | | llvm-svn: 63676
* Create DebugLoc information in FastISel. Several temporary methods wereBill Wendling2009-02-031-2/+3
| | | | | | | created. Specifically, those BuildMIs which use "DebugLoc::getUnknownLoc()". I'll remove them soon. llvm-svn: 63584
* Refine DebugLoc per review comments.Evan Cheng2009-01-271-6/+7
| | | | llvm-svn: 63132
* No need to keep size of DebugLocations vector separately.Evan Cheng2009-01-261-2/+3
| | | | llvm-svn: 63070
* Actually source file has already been uniquified into an id during isel. ↵Evan Cheng2009-01-261-15/+3
| | | | | | Eliminate the StringMap. llvm-svn: 63009
* Add data structure to define and track debug location during codegen.Evan Cheng2009-01-261-0/+27
| | | | llvm-svn: 63008
* Rename getABITypeSize to getTypePaddedSize, asDuncan Sands2009-01-121-2/+2
| | | | | | suggested by Chris. llvm-svn: 62099
* Make MachineFrameInfo::print not crash when no TargetFrameInfo is available.Matthijs Kooijman2008-11-031-1/+2
| | | | llvm-svn: 58606
* Adjust whitespace in debug messages to be more consistentDan Gohman2008-10-151-3/+3
| | | | | | with other debug messages. llvm-svn: 57543
* Make MachineFunction not crash when TargetMachine::getRegisterInfo() returnsMatthijs Kooijman2008-10-131-5/+9
| | | | | | NULL, but just hide some debug output then. llvm-svn: 57437
* Fix these comments to reflect current reality. Surprisingly,Dan Gohman2008-09-161-1/+2
| | | | | | | MachineConstantPool::getConstantPoolIndex actually expects a log2-encoded alignment. llvm-svn: 56248
* Tidy up several unbeseeming casts from pointer to intptr_t.Dan Gohman2008-09-041-2/+2
| | | | llvm-svn: 55779
* get MachineConstantPool off std::ostream, onto raw_ostream. It would beChris Lattner2008-08-231-8/+6
| | | | | | really nice if someone converted MachineFunction::print to raw_ostream. llvm-svn: 55268
* Switch the asmprinter (.ll) and all the stuff it requires over toChris Lattner2008-08-231-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | use raw_ostream instead of std::ostream. Among other goodness, this speeds up llvm-dis of kc++ with a release build from 0.85s to 0.49s (88% faster). Other interesting changes: 1) This makes Value::print be non-virtual. 2) AP[S]Int and ConstantRange can no longer print to ostream directly, use raw_ostream instead. 3) This fixes a bug in raw_os_ostream where it didn't flush itself when destroyed. 4) This adds a new SDNode::print method, instead of only allowing "dump". A lot of APIs have both std::ostream and raw_ostream versions, it would be useful to go through and systematically anihilate the std::ostream versions. This passes dejagnu, but there may be minor fallout, plz let me know if so and I'll fix it. llvm-svn: 55263
* Fold the useful features of alist and alist_node into ilist, andDan Gohman2008-07-281-19/+1
| | | | | | | | | | | | | | | | a new ilist_node class, and remove them. Unlike alist_node, ilist_node doesn't attempt to manage storage itself, so it avoids the associated problems, including being opaque in gdb. Adjust the Recycler class so that it doesn't depend on alist_node. Also, change it to use explicit Size and Align parameters, allowing it to work when the largest-sized node doesn't have the greatest alignment requirement. Change MachineInstr's MachineMemOperand list from a pool-backed alist to a std::list for now. llvm-svn: 54146
* Fix uses of underscore-capital names.Dan Gohman2008-07-211-2/+2
| | | | llvm-svn: 53870
* Trim unnecessary #includes.Dan Gohman2008-07-111-1/+0
| | | | llvm-svn: 53471
* Pool-allocation for MachineInstrs, MachineBasicBlocks, andDan Gohman2008-07-071-31/+92
| | | | | | | | | | | MachineMemOperands. The pools are owned by MachineFunctions. This drastically reduces the number of calls to malloc/free made during the "Emit" phase of scheduling, as well as later phases in CodeGen. Combined with other changes, this speeds up the "instruction selection" phase of CodeGen by 10% in some cases. llvm-svn: 53212
* Silence warning when no assertions.Chris Lattner2008-04-061-1/+2
| | | | llvm-svn: 49284
OpenPOWER on IntegriCloud