aboutsummaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* Allow jumping to the end of a bitstream while readingDouglas Gregor2009-04-151-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69145 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use "protected:" in classes that aren't intended to beDan Gohman2009-04-151-21/+0
| | | | | | | subclassed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69129 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix doxygen comment syntax.Dan Gohman2009-04-151-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69128 91177308-0d34-0410-b5e6-96231b3b80d8
* Move MachineRegisterInfo::setRegClass out of line.Dan Gohman2009-04-151-16/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69126 91177308-0d34-0410-b5e6-96231b3b80d8
* Move MachineJumpTableInfo::ReplaceMBBInJumpTables out of line.Dan Gohman2009-04-151-14/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69125 91177308-0d34-0410-b5e6-96231b3b80d8
* Give RemoveRegOperandFromRegInfo a comment and move theDan Gohman2009-04-151-12/+3
| | | | | | | code out of line. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69124 91177308-0d34-0410-b5e6-96231b3b80d8
* Construct and emit DW_TAG_inlined_subroutine DIEs for inlined subroutine ↵Devang Patel2009-04-151-7/+16
| | | | | | scopes (only in FastISel mode). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69116 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a method to check that the subprogram holds debug info for the given ↵Devang Patel2009-04-151-0/+4
| | | | | | Function or not. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69113 91177308-0d34-0410-b5e6-96231b3b80d8
* Change SelectionDAG type legalization to allow BUILD_VECTOR operands to beBob Wilson2009-04-131-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | promoted to legal types without changing the type of the vector. This is following a suggestion from Duncan (http://lists.cs.uiuc.edu/pipermail/llvmdev/2009-February/019923.html). The transformation that used to be done during type legalization is now postponed to DAG legalization. This allows the BUILD_VECTORs to be optimized and potentially handled specially by target-specific code. It turns out that this is also consistent with an optimization done by the DAG combiner: a BUILD_VECTOR and INSERT_VECTOR_ELT may be combined by replacing one of the BUILD_VECTOR operands with the newly inserted element; but INSERT_VECTOR_ELT allows its scalar operand to be larger than the element type, with any extra high bits being implicitly truncated. The result is a BUILD_VECTOR where one of the operands has a type larger the the vector element type. Any code that operates on BUILD_VECTORs may now need to be aware of the potential type discrepancy between the vector element type and the BUILD_VECTOR operands. This patch updates all of the places that I could find to handle that case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68996 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename COPY_TO_SUBCLASS to COPY_TO_REGCLASS, and generalizeDan Gohman2009-04-132-5/+7
| | | | | | | | it accordingly. Thanks to Jakob Stoklund Olesen for pointing out how this might be useful. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68986 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a static APInt::getNumWordsDouglas Gregor2009-04-131-0/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68977 91177308-0d34-0410-b5e6-96231b3b80d8
* Right now, Debugging information to encode scopes (DW_TAG_lexical_block) ↵Devang Patel2009-04-131-1/+1
| | | | | | | | | relies on DBG_LABEL. Unfortunately this intefers with the quality of optimized code. This patch updates dwarf writer to encode scoping information in DWARF only in FastISel mode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68973 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply 68847.Devang Patel2009-04-132-1/+22
| | | | | | | | Now debug_inlined section is covered by TAI->doesDwarfUsesInlineInfoSection(), which is false by default. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68964 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new TargetInstrInfo MachineInstr opcode, COPY_TO_SUBCLASS.Dan Gohman2009-04-133-10/+54
| | | | | | | | | | | | | | | | | This will be used to replace things like X86's MOV32to32_. Enhance ScheduleDAGSDNodesEmit to be more flexible and robust in the presense of subregister superclasses and subclasses. It can now cope with the definition of a virtual register being in a subclass of a use. Re-introduce the code for recording register superreg classes and subreg classes. This is needed because when subreg extracts and inserts get coalesced away, the virtual registers are left in the correct subclass. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68961 91177308-0d34-0410-b5e6-96231b3b80d8
* Add comments to INSERT_SUBREG, EXTRACT_SURBEG, SUBREG_TO_REG,Dan Gohman2009-04-131-0/+20
| | | | | | | and IMPLICIT_DEF. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68949 91177308-0d34-0410-b5e6-96231b3b80d8
* add AvailableExternally linkage to C bindings.Chris Lattner2009-04-131-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68942 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new "available_externally" linkage type. This is intendedChris Lattner2009-04-132-12/+12
| | | | | | | | | to support C99 inline, GNU extern inline, etc. Related bugzilla's include PR3517, PR3100, & PR2933. Nothing uses this yet, but it appears to work. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68940 91177308-0d34-0410-b5e6-96231b3b80d8
* Regenerate.Nick Lewycky2009-04-131-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68938 91177308-0d34-0410-b5e6-96231b3b80d8
* Use a hashtable for TargetRegisterClass::contains.Owen Anderson2009-04-121-4/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68922 91177308-0d34-0410-b5e6-96231b3b80d8
* optimize FastISel::UpdateValueMap to avoid duplicate map lookups,Chris Lattner2009-04-121-1/+1
| | | | | | | and make it return the assigned register. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68888 91177308-0d34-0410-b5e6-96231b3b80d8
* Add new TargetInstrDesc::hasImplicitUseOfPhysReg andChris Lattner2009-04-121-0/+18
| | | | | | | | hasImplicitDefOfPhysReg methods. Use them to remove a look in X86 fast isel. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68886 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r68847. It breaks the build on non-Darwin targets, with this messageDan Gohman2009-04-112-15/+1
| | | | | | | | | from the assembler: Error: unknown pseudo-op: `.debug_inlined' git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68863 91177308-0d34-0410-b5e6-96231b3b80d8
* Keep track of inlined functions and their locations. This information is ↵Devang Patel2009-04-112-1/+15
| | | | | | | | | | collected when nested llvm.dbg.func.start intrinsics are seen. (Right now, inliner removes nested llvm.dbg.func.start intrinisics during inlining.) Create debug_inlined dwarf section using these information. This info is used by gdb, at least on Darwin, to enable better experience debugging inlined functions. See DwarfWriter.cpp for more information on structure of debug_inlined section. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68847 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugLabelFolder ruthlessly deletes redundant labels. However, sometimes the ↵Devang Patel2009-04-101-0/+17
| | | | | | redundant labels is referenced by debug info somewhere else. This patch provies a way so that dwarf writer can mark labels as used. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68813 91177308-0d34-0410-b5e6-96231b3b80d8
* fix a broken assertion in ilist_iterator, which caused it to crash in theChris Lattner2009-04-101-1/+1
| | | | | | | | | bad case instead of actually assert. Bug pointed out by Jakob Stoklund Olesen! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68785 91177308-0d34-0410-b5e6-96231b3b80d8
* Cleanup. Remove redundant llvm:: , we don't need them since we're insideNick Lewycky2009-04-101-18/+18
| | | | | | | namespace llvm already. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68774 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new Type::getPointerTo method, which is shorthand forChris Lattner2009-04-101-0/+4
| | | | | | | llvm::PointerType::get(). Patch by Anders Johnsen! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68772 91177308-0d34-0410-b5e6-96231b3b80d8
* Add utility function to IRBuilder that takes the difference between twoNick Lewycky2009-04-101-0/+14
| | | | | | | | pointers, taking into account the size of the pointed-to object. Patch by Jeffrey Yasskin! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68768 91177308-0d34-0410-b5e6-96231b3b80d8
* Pass in the std::string parameter instead of returning it by value.Bill Wendling2009-04-101-2/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68747 91177308-0d34-0410-b5e6-96231b3b80d8
* Constify getter methods.Bill Wendling2009-04-101-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68745 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the obsolete SelectionDAG::getNodeValueTypes and simplifyDan Gohman2009-04-091-28/+10
| | | | | | | code that uses it by using SelectionDAG::getVTList instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68744 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the NumVTs field from short to int, since there's noDan Gohman2009-04-091-1/+1
| | | | | | | real need for it to be short. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68742 91177308-0d34-0410-b5e6-96231b3b80d8
* StringMap<DIE*>::iterator::first() returns a pointer to the first character ofBill Wendling2009-04-091-1/+2
| | | | | | | | | the key. This will cause it to create a new std::string, which isn't wanted. Instead, pass back the "const char*". Modify the EmitString() method to take a "const char*". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68741 91177308-0d34-0410-b5e6-96231b3b80d8
* Give register alias checking the hash table treatment too.Owen Anderson2009-04-091-3/+16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68730 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix pr3954. The register scavenger asserts for inline assembly withBob Wilson2009-04-092-7/+5
| | | | | | | | | | | | | register destinations that are tied to source operands. The TargetInstrDescr::findTiedToSrcOperand method silently fails for inline assembly. The existing MachineInstr::isRegReDefinedByTwoAddr was very close to doing what is needed, so this revision makes a few changes to that method and also renames it to isRegTiedToUseOperand (for consistency with the very similar isRegTiedToDefOperand and because it handles both two-address instructions and inline assembly with tied registers). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68714 91177308-0d34-0410-b5e6-96231b3b80d8
* add an accessor method, patch by John McCall!Chris Lattner2009-04-091-0/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68684 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert TargetRegisterInfo's super-register checking to use a pre-computed ↵Owen Anderson2009-04-091-3/+17
| | | | | | hash table just like subregister checking does. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68669 91177308-0d34-0410-b5e6-96231b3b80d8
* Add sys::Path::makeAbsolute().Daniel Dunbar2009-04-091-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68663 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix BitstreamReader's GetCurrentBitNo to return the correct bit number, and ↵Douglas Gregor2009-04-081-2/+1
| | | | | | stop JumpToBit from covering up its mistakes git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68648 91177308-0d34-0410-b5e6-96231b3b80d8
* Use 8 instead of CHAR_BITDouglas Gregor2009-04-081-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68616 91177308-0d34-0410-b5e6-96231b3b80d8
* Add BitstreamWriter::GetCurrentBitNo, to report where we are in the output ↵Douglas Gregor2009-04-081-0/+3
| | | | | | bitstream git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68610 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove AllowInverse: it leaks memory and is not the rightChris Lattner2009-04-081-5/+1
| | | | | | | abstraction for CommandLine. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68588 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement support for using modeling implicit-zero-extension on x86-64Dan Gohman2009-04-081-1/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with SUBREG_TO_REG, teach SimpleRegisterCoalescing to coalesce SUBREG_TO_REG instructions (which are similar to INSERT_SUBREG instructions), and teach the DAGCombiner to take advantage of this on targets which support it. This eliminates many redundant zero-extension operations on x86-64. This adds a new TargetLowering hook, isZExtFree. It's similar to isTruncateFree, except it only applies to actual definitions, and not no-op truncates which may not zero the high bits. Also, this adds a new optimization to SimplifyDemandedBits: transform operations like x+y into (zext (add (trunc x), (trunc y))) on targets where all the casts are no-ops. In contexts where the high part of the add is explicitly masked off, this allows the mask operation to be eliminated. Fix the DAGCombiner to avoid undoing these transformations to eliminate casts on targets where the casts are no-ops. Also, this adds a new two-address lowering heuristic. Since two-address lowering runs before coalescing, it helps to be able to look through copies when deciding whether commuting and/or three-address conversion are profitable. Also, fix a bug in LiveInterval::MergeInClobberRanges. It didn't handle the case that a clobber range extended both before and beyond an existing live range. In that case, multiple live ranges need to be added. This was exposed by the new subreg coalescing code. Remove 2008-05-06-SpillerBug.ll. It was bugpoint-reduced, and the spiller behavior it was looking for no longer occurrs with the new instruction selection. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68576 91177308-0d34-0410-b5e6-96231b3b80d8
* PR2985 / <rdar://problem/6584986>Jim Grosbach2009-04-071-2/+2
| | | | | | | | | | | | When compiling in Thumb mode, only the low (R0-R7) registers are available for most instructions. Breaking the low registers into a new register class handles this. Uses of R12, SP, etc, are handled explicitly where needed with copies inserted to move results into low registers where the rest of the code generator can deal with them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68545 91177308-0d34-0410-b5e6-96231b3b80d8
* Another attempt at fixing PR2975.Torok Edwin2009-04-071-1/+3
| | | | | | | Types can have references to eachother, so we can't just call destroy on them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68523 91177308-0d34-0410-b5e6-96231b3b80d8
* fix comment to reflect the implementation I ended up settling on.Chris Lattner2009-04-071-1/+1
| | | | | | | Thanks to Duncan for noticing this git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68518 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an API for the bitstream reader to read blobs and returnChris Lattner2009-04-071-4/+17
| | | | | | | | them by reference, instead of packing each byte into a smallvector. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68486 91177308-0d34-0410-b5e6-96231b3b80d8
* allow clients to look up abbrev id'sChris Lattner2009-04-061-3/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68471 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new EmitRecordWithBlob API that allows a blob to be emitted Chris Lattner2009-04-061-30/+103
| | | | | | | without converting each byte to a uint64_t to stick in a SmallVector. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68469 91177308-0d34-0410-b5e6-96231b3b80d8
* add a new Blob encoding abbreviation for bitcode files that emitsChris Lattner2009-04-063-10/+49
| | | | | | | | | elements in a form that is efficient for the reader to just get a pointer in memory and start reading. APIs to do efficient reading and writing are still todo. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68465 91177308-0d34-0410-b5e6-96231b3b80d8