aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Call getFunctionNumber() instead of referencing FunctionNumber directly,Dan Gohman2007-10-081-1/+1
| | | | | | | for consistency. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42769 91177308-0d34-0410-b5e6-96231b3b80d8
* Migrate X86 and ARM from using X86ISD::{,I}DIV and ARMISD::MULHILO{U,S} toDan Gohman2007-10-082-40/+140
| | | | | | | | | use ISD::{S,U}DIVREM and ISD::{S,U}MUL_HIO. Move the lowering code associated with these operators into target-independent in LegalizeDAG.cpp and TargetLowering.cpp. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42762 91177308-0d34-0410-b5e6-96231b3b80d8
* DAGCombiner support for UDIVREM/SDIVREM and UMUL_LOHI/SMUL_LOHI. Dan Gohman2007-10-081-17/+137
| | | | | | | | | | Check if one of the two results unneeded so see if a simpler operator could bs used. Also check to see if each of the two computations could be simplified if they were split into separate operators. Factor out the code that calls visit() so that it can be used for this purpose. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42759 91177308-0d34-0410-b5e6-96231b3b80d8
* Add convenience overloads of SelectionDAG::getNode that take a SDVTListDan Gohman2007-10-081-0/+36
| | | | | | | and individual SDOperand operands. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42753 91177308-0d34-0410-b5e6-96231b3b80d8
* In -debug mode, dump SelectionDAGs both before and after theDan Gohman2007-10-081-1/+7
| | | | | | | optimization passes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42749 91177308-0d34-0410-b5e6-96231b3b80d8
* Kill cycle of an live range is always the last use index + 1.Evan Cheng2007-10-081-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42742 91177308-0d34-0410-b5e6-96231b3b80d8
* convertFromInteger, as originally written, expected sign-extendedNeil Booth2007-10-072-3/+3
| | | | | | | | | | input. APInt unfortunately zero-extends signed integers, so Dale modified the function to expect zero-extended input. Make this assumption explicit in the function name. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42732 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply 42677.Evan Cheng2007-10-061-3/+52
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42692 91177308-0d34-0410-b5e6-96231b3b80d8
* revert evan's patch until the header is committedChris Lattner2007-10-061-52/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42686 91177308-0d34-0410-b5e6-96231b3b80d8
* Added DAG xforms. e.g.Evan Cheng2007-10-061-3/+52
| | | | | | | | | (vextract (v4f32 s2v (f32 load $addr)), 0) -> (f32 load $addr) (vextract (v4i32 bc (v4f32 s2v (f32 load $addr))), 0) -> (i32 load $addr) Remove x86 specific patterns. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42677 91177308-0d34-0410-b5e6-96231b3b80d8
* Next powerpc long double bits. Comparisons work,Dale Johannesen2007-10-061-28/+56
| | | | | | | | although not well, and shortening FP converts. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42672 91177308-0d34-0410-b5e6-96231b3b80d8
* First round of ppc long double. call/return andDale Johannesen2007-10-052-31/+86
| | | | | | | | | | basic arithmetic works. Rename RTLIB long double functions to distinguish different flavors of long double; the lib functions have different names, alas. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42644 91177308-0d34-0410-b5e6-96231b3b80d8
* Legalize support for MUL_LOHI and DIVREM.Dan Gohman2007-10-051-0/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42636 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a typo in a comment.Dan Gohman2007-10-051-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42635 91177308-0d34-0410-b5e6-96231b3b80d8
* Provide names for MUL_LOHI and DIVREM operators.Dan Gohman2007-10-051-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42634 91177308-0d34-0410-b5e6-96231b3b80d8
* Chain producing nodes cannot be moved, not chain reading nodes.Evan Cheng2007-10-051-5/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42627 91177308-0d34-0410-b5e6-96231b3b80d8
* Oops. Didn't mean to leave this in.Evan Cheng2007-10-051-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42626 91177308-0d34-0410-b5e6-96231b3b80d8
* If a node that defines a physical register that is expensive to copy. TheEvan Cheng2007-10-052-47/+165
| | | | | | | | | | scheduler will try a number of tricks in order to avoid generating the copies. This may not be possible in case the node produces a chain value that prevent movement. Try unfolding the load from the node before to allow it to be moved / cloned. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42625 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a variant of getTargetNode() that takes a vector of MVT::ValueType.Evan Cheng2007-10-051-0/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42620 91177308-0d34-0410-b5e6-96231b3b80d8
* Silence a warning.Evan Cheng2007-10-051-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42619 91177308-0d34-0410-b5e6-96231b3b80d8
* Use empty() member functions when that's what's being tested for insteadDan Gohman2007-10-034-15/+13
| | | | | | | of comparing begin() and end(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42585 91177308-0d34-0410-b5e6-96231b3b80d8
* Rewrite sqrt and powi to use anyfloat. By popular demand.Dale Johannesen2007-10-022-39/+30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42537 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix stride computations for long double arrays.Dale Johannesen2007-10-012-3/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42508 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the code that emits the .file directives so that it runs after theDan Gohman2007-10-011-16/+17
| | | | | | | SourceFiles list is fully filled in so that it sees all of the files. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42506 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove simple scheduler.Evan Cheng2007-10-011-1165/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42499 91177308-0d34-0410-b5e6-96231b3b80d8
* remove dup commentDale Johannesen2007-09-301-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42486 91177308-0d34-0410-b5e6-96231b3b80d8
* Constant fold int-to-long-double conversions;Dale Johannesen2007-09-302-2/+2
| | | | | | | | | use APFloat for int-to-float/double; use round-to-nearest for these (implementation-defined, seems to match gcc). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42484 91177308-0d34-0410-b5e6-96231b3b80d8
* This is done already.Gordon Henriksen2007-09-291-7/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42467 91177308-0d34-0410-b5e6-96231b3b80d8
* Collector is the base class for garbage collection code generators.Gordon Henriksen2007-09-292-0/+391
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This version enhances the previous patch to add root initialization as discussed here: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070910/053455.html Collector gives its subclasses control over generic algorithms: unsigned NeededSafePoints; //< Bitmask of required safe points. bool CustomReadBarriers; //< Default is to insert loads. bool CustomWriteBarriers; //< Default is to insert stores. bool CustomRoots; //< Default is to pass through to backend. bool InitRoots; //< If set, roots are nulled during lowering. It also has callbacks which collectors can hook: /// If any of the actions are set to Custom, this is expected to /// be overriden to create a transform to lower those actions to /// LLVM IR. virtual Pass *createCustomLoweringPass() const; /// beginAssembly/finishAssembly - Emit module metadata as /// assembly code. virtual void beginAssembly(Module &M, std::ostream &OS, AsmPrinter &AP, const TargetAsmInfo &TAI) const; virtual void finishAssembly(Module &M, CollectorModuleMetadata &CMM, std::ostream &OS, AsmPrinter &AP, const TargetAsmInfo &TAI) const; Various other independent algorithms could be implemented, but were not necessary for the initial two collectors. Some examples are listed here: http://llvm.org/docs/GarbageCollection.html#collector-algos git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42466 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach SplitVectorOp how to split INSERT_VECTOR_ELT.Dan Gohman2007-09-281-0/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42457 91177308-0d34-0410-b5e6-96231b3b80d8
* If two instructions are both two-address code, favors (schedule closer toEvan Cheng2007-09-282-8/+25
| | | | | | | | terminator) the one that has a CopyToReg use. This fixes 2006-05-11-InstrSched.ll with -new-cc-modeling-scheme. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42453 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove a poor scheduling heuristic.Evan Cheng2007-09-281-34/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42443 91177308-0d34-0410-b5e6-96231b3b80d8
* Trim some unneeded fields.Evan Cheng2007-09-283-26/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42442 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix long double -> uint64 conversion.Dale Johannesen2007-09-281-1/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42440 91177308-0d34-0410-b5e6-96231b3b80d8
* minor long double related changesDale Johannesen2007-09-282-0/+19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42439 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the checks for DW_FORM_data4 consistent with the others, andDan Gohman2007-09-281-2/+6
| | | | | | | add more such code for DIEDwarfLabel::SizeOf and DIEObjectLabel::SizeOf. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42435 91177308-0d34-0410-b5e6-96231b3b80d8
* Use 32-bit data directives for DW_FORM_data4 format data, even onDan Gohman2007-09-281-8/+10
| | | | | | | targets with 64-bit addresses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42434 91177308-0d34-0410-b5e6-96231b3b80d8
* Add sqrt and powi intrinsics for long double.Dale Johannesen2007-09-283-6/+19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42423 91177308-0d34-0410-b5e6-96231b3b80d8
* TargetAsmInfo::getAddressSize() was incorrect for x86-64 and 64-bit targetsDan Gohman2007-09-271-15/+16
| | | | | | | | | other than PPC64. Instead of fixing it, just remove it and fix all the places that use it to use TargetData::getPointerSize() instead, as there aren't very many. Most of the references were in DwarfWriter.cpp. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42419 91177308-0d34-0410-b5e6-96231b3b80d8
* CollectorMetadata abstractly describes stack maps for a function.Gordon Henriksen2007-09-271-0/+185
| | | | | | | | | | | | | | | | | | | | It includes: - location and of each safe point in machine code (identified by a label) - location of each root within the stack frame (identified by an offset), including the metadata tag provided to llvm.gcroot in the user program - size of the stack frame (for collectors which want to cheat on stack crawling :) - and eventually will include liveness It is to be populated by back-ends during code-generation. CollectorModuleMetadata aggregates this information across the entire module. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42418 91177308-0d34-0410-b5e6-96231b3b80d8
* My previous Registry.h header, as well as Collectors.h, which is theGordon Henriksen2007-09-271-0/+21
| | | | | | | registry for dynamically-loaded garbage collection compiler plugins. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42415 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid inserting a live register more than once.Evan Cheng2007-09-271-8/+18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42410 91177308-0d34-0410-b5e6-96231b3b80d8
* Silence a compiler warning.Evan Cheng2007-09-271-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42389 91177308-0d34-0410-b5e6-96231b3b80d8
* Boogs.Evan Cheng2007-09-271-10/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42388 91177308-0d34-0410-b5e6-96231b3b80d8
* Be smarter about which node to force schedule. Reduce # of duplications + ↵Evan Cheng2007-09-271-84/+120
| | | | | | copies; Added statistics. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42387 91177308-0d34-0410-b5e6-96231b3b80d8
* Backtracking only when it won't create a cycle.Evan Cheng2007-09-271-23/+35
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42384 91177308-0d34-0410-b5e6-96231b3b80d8
* Make temporaries explicit to avoid prematureDale Johannesen2007-09-261-1/+3
| | | | | | | | destruction of compiler-created ones. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42383 91177308-0d34-0410-b5e6-96231b3b80d8
* - Move getPhysicalRegisterRegClass() from ScheduleDAG to MRegisterInfo.Evan Cheng2007-09-262-89/+191
| | | | | | | | - Added ability to emit cross class register copies to the BBRU scheduler. - More aggressive backtracking. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42375 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable codegen for long double abs, sin, cosDale Johannesen2007-09-261-3/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42368 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix f80 UNDEF.Dale Johannesen2007-09-261-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42359 91177308-0d34-0410-b5e6-96231b3b80d8