summaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAge
* Split the SelectionDAG-building code, including the FunctionLoweringInfoDan Gohman2008-09-03
| | | | | | | | and SelectionDAGLowering classes, out of SelectionDAGISel.cpp and put it in a separate file, SelectionDAGBuild.cpp. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55701 91177308-0d34-0410-b5e6-96231b3b80d8
* Make UpdateValueMap, createResultReg, etc. protected instead of private so ↵Evan Cheng2008-09-03
| | | | | | they can used by target hooks. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55691 91177308-0d34-0410-b5e6-96231b3b80d8
* s/FP_AlwaysInline/FN_NOTE_AlwaysInline/gDevang Patel2008-09-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55676 91177308-0d34-0410-b5e6-96231b3b80d8
* Getter and setter for function notes.Devang Patel2008-09-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55638 91177308-0d34-0410-b5e6-96231b3b80d8
* plug memleak: destroy internal bufferNuno Lopes2008-09-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55632 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a small pass that sets the readnone/readonlyDuncan Sands2008-09-01
| | | | | | | | | | | | | | | | | | | | | | | | | | attributes on functions, based on the result of alias analysis. It's not hardwired to use GlobalsModRef even though this is the only (AFAIK) alias analysis that results in this pass actually doing something. Enable as follows: opt ... -globalsmodref-aa -markmodref ... Advantages of this pass: (1) records the result of globalsmodref in the bitcode, meaning it is available for use by later passes (currently the pass manager isn't smart enough to magically make an advanced alias analysis available to all later passes), which may expose more optimization opportunities; (2) hopefully speeds up compilation when code is optimized twice, for example when a file is compiled to bitcode, then later LTO is done on it: marking functions readonly/readnone when producing the initial bitcode should speed up alias analysis during LTO; (3) good for discovering that globalsmodref doesn't work very well :) Not currently turned on by default. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55604 91177308-0d34-0410-b5e6-96231b3b80d8
* PR2731: C and Ocaml bindings for setTailCall and isTailCall.Gordon Henriksen2008-08-30
| | | | | | Based on patch by Giorgos Korfiatis. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55570 91177308-0d34-0410-b5e6-96231b3b80d8
* fix some 80-col violationsGabor Greif2008-08-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55565 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix an issue where a use might be selected before a def, and then we didn't ↵Owen Anderson2008-08-30
| | | | | | | | | | | | respect the pre-chosen vreg assignment when selecting the def. This is the naive solution to the problem: insert a copy to the pre-chosen vreg. Other solutions might be preferable, such as: 1) Passing the dest reg into FastEmit_. However, this would require the higher level code to know about reg classes, which they don't currently. 2) Selecting blocks in reverse postorder. This has some compile time cost for computing the order, and we'd need to measure its impact. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55555 91177308-0d34-0410-b5e6-96231b3b80d8
* Add GlobalValue::{removeFromParent,eraseFromParent}Daniel Dunbar2008-08-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55529 91177308-0d34-0410-b5e6-96231b3b80d8
* Add DenseMap::lookup:Daniel Dunbar2008-08-29
| | | | | | | | /// lookup - Return the entry for the specified key, or a default /// constructed value if no such entry exists. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55523 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a target callback for FastISel.Dan Gohman2008-08-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55512 91177308-0d34-0410-b5e6-96231b3b80d8
* rename destroy -> releaseMemory to properly hook into passmgr.Chris Lattner2008-08-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55508 91177308-0d34-0410-b5e6-96231b3b80d8
* erect abstraction boundaries for accessing SDValue members, rename Val -> ↵Gabor Greif2008-08-28
| | | | | | Node to reflect semantics git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55504 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a FastISel bug where the instructions from lowering the argumentsDan Gohman2008-08-28
| | | | | | | were being emitted after the first instructions of the entry block. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55496 91177308-0d34-0410-b5e6-96231b3b80d8
* FastEmitInst_extractsubreg doesn't need to be passed the register class. It ↵Owen Anderson2008-08-28
| | | | | | can get it from MachineRegisterInfo instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55476 91177308-0d34-0410-b5e6-96231b3b80d8
* Split the ATOMIC NodeType's to include the size, e.g.Dale Johannesen2008-08-28
| | | | | | | | | | | | | | | | | | ATOMIC_LOAD_ADD_{8,16,32,64} instead of ATOMIC_LOAD_ADD. Increased the Hardcoded Constant OpActionsCapacity to match. Large but boring; no functional change. This is to support partial-word atomics on ppc; i8 is not a valid type there, so by the time we get to lowering, the ATOMIC_LOAD nodes looks the same whether the type was i8 or i32. The information can be added to the AtomicSDNode, but that is the largest SDNode; I don't fully understand the SDNode allocation, but it is sensitive to the largest node size, so increasing that must be bad. This is the alternative. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55457 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a missing #include. Patch by Andrew John Hughes.Dan Gohman2008-08-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55451 91177308-0d34-0410-b5e6-96231b3b80d8
* Reorganize the lifetimes of the major objects SelectionDAGISelDan Gohman2008-08-27
| | | | | | | | | | | | | | | | | | | | | works with. SelectionDAG, FunctionLoweringInfo, and SelectionDAGLowering objects now get created once per SelectionDAGISel instance, and can be reused across blocks and across functions. Previously, they were created and destroyed each time they were needed. This reorganization simplifies the handling of PHI nodes, and also SwitchCases, JumpTables, and BitTestBlocks. This simplification has the side effect of fixing a bug in FastISel where successor PHI nodes weren't being updated correctly. This is also a step towards making the transition from FastISel into and out of SelectionDAG faster, and also making plain SelectionDAG faster on code with lots of little blocks. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55450 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a helper method that will be used to support EXTRACT_SUBREG for ↵Owen Anderson2008-08-27
| | | | | | selecting trunc's in fast-isel. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55439 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor isSafeToReMat out of 2addr pass.Evan Cheng2008-08-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55430 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new FastISel method, getRegForValue, which takes care ofDan Gohman2008-08-27
| | | | | | | | the details of materializing constants and other values into registers, and make use of it in several places. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55426 91177308-0d34-0410-b5e6-96231b3b80d8
* Unbreak PseudoSourceValue::print. This fixes -print-machine-instrsDan Gohman2008-08-27
| | | | | | | and various other things. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55415 91177308-0d34-0410-b5e6-96231b3b80d8
* Add DebugInfoBuilder. Patch by Talin!Evan Cheng2008-08-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55409 91177308-0d34-0410-b5e6-96231b3b80d8
* Basic FastISel support for floating-point constants.Dan Gohman2008-08-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55401 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor out a large amoutn of the cast handling code in fast isel into helper ↵Owen Anderson2008-08-26
| | | | | | | | | methods. This simultaneously makes the code simpler and adds support for sext as well. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55398 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a MachineInstrBuilder method for adding floating-pointDan Gohman2008-08-26
| | | | | | | immediate operands. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55397 91177308-0d34-0410-b5e6-96231b3b80d8
* disallow direct access to SDValue::ResNo, provide a getter insteadGabor Greif2008-08-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55394 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor the bitcast code into its own function.Dan Gohman2008-08-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55387 91177308-0d34-0410-b5e6-96231b3b80d8
* - small bug corrected: incorrect iterator type.Cedric Venet2008-08-26
| | | | | | - fix to please VS: add a return after an assert. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55380 91177308-0d34-0410-b5e6-96231b3b80d8
* Make TargetInstrInfo::copyRegToReg return a bool indicating whether the copy ↵Owen Anderson2008-08-26
| | | | | | | | | | requested was inserted or not. This allows bitcast in fast isel to properly handle the case where an appropriate reg-to-reg copy is not available. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55375 91177308-0d34-0410-b5e6-96231b3b80d8
* fix doxygen commentGabor Greif2008-08-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55372 91177308-0d34-0410-b5e6-96231b3b80d8
* Grammar fix.Ted Kremenek2008-08-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55371 91177308-0d34-0410-b5e6-96231b3b80d8
* Added "str()" method to raw_string_ostream.Ted Kremenek2008-08-26
| | | | | | | | str() mirrors the same method in std::ostringstream. str() flushes the buffered stream contents to string and returns a reference to the string. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55370 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a RetVT parameter to emitted FastISel methods, so that we will be able ↵Owen Anderson2008-08-25
| | | | | | | | | to pass the desired return type down. This is not currently used. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55345 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for fast isel of (integer) immediate materialization pattens, ↵Owen Anderson2008-08-25
| | | | | | | | | and use them to support bitcast of constants in fast isel. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55325 91177308-0d34-0410-b5e6-96231b3b80d8
* simplify PseudoSourceValue printing a bit. Unnest all of ↵Chris Lattner2008-08-24
| | | | | | PseudoSourceValue.cpp from the llvm namespace. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55293 91177308-0d34-0410-b5e6-96231b3b80d8
* Print PseudoSourceValue.Evan Cheng2008-08-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55291 91177308-0d34-0410-b5e6-96231b3b80d8
* we should use 'class' for non-pod types instead of 'struct' toChris Lattner2008-08-24
| | | | | | | make it easier to deal with the VC++ struct/class bug. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55290 91177308-0d34-0410-b5e6-96231b3b80d8
* Updating VC++ project.Cedric Venet2008-08-24
| | | | | | Adding one include file and correct one declaration from class to struct in order to make llvm compile on VC2005. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55279 91177308-0d34-0410-b5e6-96231b3b80d8
* get MachineConstantPool off std::ostream, onto raw_ostream. It would beChris Lattner2008-08-23
| | | | | | | really nice if someone converted MachineFunction::print to raw_ostream. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55268 91177308-0d34-0410-b5e6-96231b3b80d8
* remove dead method.Chris Lattner2008-08-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55266 91177308-0d34-0410-b5e6-96231b3b80d8
* Add raw_stream adaptors that write into an std::string and ↵Chris Lattner2008-08-23
| | | | | | SmallVector/SmallString. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55265 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch the asmprinter (.ll) and all the stuff it requires over toChris Lattner2008-08-23
| | | | | | | | | | | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55263 91177308-0d34-0410-b5e6-96231b3b80d8
* Split format() out to its own file, add support for formattingChris Lattner2008-08-23
| | | | | | | up to three values in one call. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55251 91177308-0d34-0410-b5e6-96231b3b80d8
* conditionalize this to work on windows, untested but it should workChris Lattner2008-08-23
| | | | | | | according to the intarnetz git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55248 91177308-0d34-0410-b5e6-96231b3b80d8
* add a simple mechanism for formatted output. This gives raw_ostream's Chris Lattner2008-08-23
| | | | | | | | | | all the power and risk of fprintf format strings. Use them like this: OS << format("%10.4f", 42.0) << "\n" << format("%x", 42) << '\n'; git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55246 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new trivial -inst-namer pass which makes it possible to diff theChris Lattner2008-08-23
| | | | | | | before/after effects of a pass, crazy! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55230 91177308-0d34-0410-b5e6-96231b3b80d8
* Make MBBMap a DenseMap instead of a std::map.Dan Gohman2008-08-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55220 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the point at which FastISel taps into the SelectionDAGISelDan Gohman2008-08-23
| | | | | | | | | | | | | | | | | | | process up to a higher level. This allows FastISel to leverage more of SelectionDAGISel's infastructure, such as updating Machine PHI nodes. Also, implement transitioning from SDISel back to FastISel in the middle of a block, so it's now possible to go back and forth. This allows FastISel to hand individual CallInsts and other complicated things off to SDISel to handle, while handling the rest of the block itself. To help support this, reorganize the SelectionDAG class so that it is allocated once and reused throughout a function, instead of being completely reallocated for each block. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55219 91177308-0d34-0410-b5e6-96231b3b80d8