aboutsummaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* Use BasicBlock::iterator instead of Instruction* for insert points,Dan Gohman2009-04-221-5/+6
| | | | | | | to better handle inserting instructions at the end of a block. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69807 91177308-0d34-0410-b5e6-96231b3b80d8
* Make SCEVExpanders private methods private, instead of protected.Dan Gohman2009-04-221-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69806 91177308-0d34-0410-b5e6-96231b3b80d8
* Add caching of predecessor counts as well as predecessors themselves.Owen Anderson2009-04-221-0/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69791 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix for PR3946, in which SmallVector could behave strangely in corner cases.Owen Anderson2009-04-221-2/+2
| | | | | | | Patch by Peter Johnson. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69785 91177308-0d34-0410-b5e6-96231b3b80d8
* De-pImpl-ify ScalarEvolution. The pImpl pattern doesn't provide muchDan Gohman2009-04-211-7/+109
| | | | | | | | practical benefit in the case of ScalarEvolution, and it's otherwise a nuisance. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69749 91177308-0d34-0410-b5e6-96231b3b80d8
* It has finally happened. Spiller is now using live interval info.Evan Cheng2009-04-211-3/+3
| | | | | | | This fixes a very subtle bug. vr defined by an implicit_def is allowed overlap with any register since it doesn't actually modify anything. However, if it's used as a two-address use, its live range can be extended and it can be spilled. The spiller must take care not to emit a reload for the vn number that's defined by the implicit_def. This is both a correctness and performance issue. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69743 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor out a common base class from SCEVTruncateExpr, SCEVZeroExtendExpr,Dan Gohman2009-04-211-43/+33
| | | | | | | and SCEVSignExtendExpr. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69649 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce encapsulation for ScalarEvolution's TargetData object, and refactorDan Gohman2009-04-212-9/+22
| | | | | | | the code to minimize dependencies on TargetData. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69644 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert ScalarEvolution to use raw_ostream instead of OStream.Dan Gohman2009-04-212-19/+17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69640 91177308-0d34-0410-b5e6-96231b3b80d8
* Move duplicated AddLiveIn function from X86 and ARM backends to be a methodBob Wilson2009-04-201-0/+5
| | | | | | | | in the MachineFunction class, renaming it to addLiveIn for consistency with the same method in MachineBasicBlock. Thanks for Anton for suggesting this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69615 91177308-0d34-0410-b5e6-96231b3b80d8
* Revise my previous change 68996 as suggested by Duncan.Bob Wilson2009-04-201-7/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69607 91177308-0d34-0410-b5e6-96231b3b80d8
* These bitfields were being miscompiled on someDuncan Sands2009-04-201-11/+27
| | | | | | | | | 64 bit platforms when building with optimization. So replace them by a hand-coded implementation. This fixes PR3822. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69597 91177308-0d34-0410-b5e6-96231b3b80d8
* Make all raw_ostreams support the tell() function.Douglas Gregor2009-04-201-0/+34
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69583 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix missing text in doxygen documentation.Nick Lewycky2009-04-191-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69529 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the SimpleTy enumerated type field from the MVTDuncan Sands2009-04-191-14/+8
| | | | | | | | | | value type union: this field was causing problems for some compilers on 64 bit systems, presumably because SimpleTy is 32 bits wide while the other fields are 64 bits wide. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69515 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't try to make BUILD_VECTOR operands have the sameDuncan Sands2009-04-181-1/+4
| | | | | | | | | | | | | | | | | | type as the vector element type: allow them to be of a wider integer type than the element type all the way through the system, and not just as far as LegalizeDAG. This should be safe because it used to be this way (the old type legalizer would produce such nodes), so backends should be able to handle it. In fact only targets which have legal vector types with an illegal promoted element type will ever see this (eg: <4 x i16> on ppc). This fixes a regression with the new type legalizer (vec_splat.ll). Also, treat SCALAR_TO_VECTOR the same as BUILD_VECTOR. After all, it is just a special case of BUILD_VECTOR. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69467 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a ScalarEvolution::getCouldNotCompute() function, and use itDan Gohman2009-04-181-0/+1
| | | | | | | instead of allocating and leaking new SCEVCouldNotCompute objects. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69452 91177308-0d34-0410-b5e6-96231b3b80d8
* Use more const qualifiers with SCEV interfaces.Dan Gohman2009-04-182-27/+27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69450 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new LiveInterval::overlaps(). It checks if the live interval overlaps ↵Evan Cheng2009-04-181-0/+4
| | | | | | a range specified by [Start, End). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69434 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up formatting, remove trailing whitespace, fix comment typos andBob Wilson2009-04-171-6/+6
| | | | | | | punctuation. No functional changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69378 91177308-0d34-0410-b5e6-96231b3b80d8
* Delete an unused field.Dan Gohman2009-04-171-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69375 91177308-0d34-0410-b5e6-96231b3b80d8
* Use CallConvLower.h and TableGen descriptions of the calling conventionsBob Wilson2009-04-172-4/+47
| | | | | | | for ARM. Patch by Sandeep Patel. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69371 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a comment to describe LLVMMatchType.Bob Wilson2009-04-161-0/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69313 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach SCEVExpander::InsertCastOfTo to avoid creating inttoptr-of-ptrtointDan Gohman2009-04-161-2/+2
| | | | | | | and ptrtoint-of-inttoptr expressions. This fixes a regression in 300.twolf. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69293 91177308-0d34-0410-b5e6-96231b3b80d8
* Expand GEPs in ScalarEvolution expressions. SCEV expressions can nowDan Gohman2009-04-162-7/+12
| | | | | | | | | | | | | | | | | | | | | | have pointer types, though in contrast to C pointer types, SCEV addition is never implicitly scaled. This not only eliminates the need for special code like IndVars' EliminatePointerRecurrence and LSR's own GEP expansion code, it also does a better job because it lets the normal optimizations handle pointer expressions just like integer expressions. Also, since LLVM IR GEPs can't directly index into multi-dimensional VLAs, moving the GEP analysis out of client code and into the SCEV framework makes it easier for clients to handle multi-dimensional VLAs the same way as other arrays. Some existing regression tests show improved optimization. test/CodeGen/ARM/2007-03-13-InstrSched.ll in particular improved to the point where if-conversion started kicking in; I turned it off for this test to preserve the intent of the test. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69258 91177308-0d34-0410-b5e6-96231b3b80d8
* If FastISel is run and it has known DebugLoc then use it.Devang Patel2009-04-161-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69253 91177308-0d34-0410-b5e6-96231b3b80d8
* Generalize one of the SelectionDAG::ReplaceAllUsesWith overloadsDan Gohman2009-04-152-9/+3
| | | | | | | | | to support replacing a node with another that has a superset of the result types. Use this instead of calling ReplaceAllUsesOfValueWith for each value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69209 91177308-0d34-0410-b5e6-96231b3b80d8
* 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