aboutsummaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* MappedFile is dead, remove it.Chris Lattner2008-04-013-235/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49035 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement Path::MapInFilePages/UnMapFilePages on unix, which Chris Lattner2008-04-012-7/+11
| | | | | | | provides fast MappedFile::getFile for large files. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49034 91177308-0d34-0410-b5e6-96231b3b80d8
* Reimplement MemoryBuffer::getFile with three enhancements:Chris Lattner2008-04-011-85/+64
| | | | | | | | | | | | | | | | | | | | | | | 1) stop using MappedFile. 2) if profitable use the sys::path::MapInFilePages api to read the file. 3) otherwise fallback to read. When sys::path::MapInFilePages is implemented, this provides several benefits: #1: this avoids fragmenting memory for small files. #2: this avoids extraneous stat calls when the file size is known. #3: this only keeps the file descriptor open while reading the file, not for the duration of the lifetime of the memory buffer. This fixes a serious clang FD 'leak' problem. I believe that this will work on a win32 machine, but I don't have one to test on. I'd appreciate it if someone could check. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49031 91177308-0d34-0410-b5e6-96231b3b80d8
* Stub out some sys::Path::MapInFilePages/UnMapFilePages methods.Chris Lattner2008-04-012-0/+20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49030 91177308-0d34-0410-b5e6-96231b3b80d8
* change the archive stuff to use MemoryBuffer instead of mappedfile.Chris Lattner2008-04-013-47/+34
| | | | | | | | MemoryBuffer is higher level and more closely matches the model needed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49029 91177308-0d34-0410-b5e6-96231b3b80d8
* rewrite SourceFile to be in terms of MemoryBuffer, not MappedFile.Chris Lattner2008-04-011-13/+19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49027 91177308-0d34-0410-b5e6-96231b3b80d8
* Make MappedFile::map return a const correct pointer, don't leak address ↵Chris Lattner2008-04-012-2/+3
| | | | | | space on Unix platforms. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49026 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the MappedFile::charBase member, rename base -> getBase() andChris Lattner2008-04-012-7/+8
| | | | | | | make getBase() return a const-correct pointer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49025 91177308-0d34-0410-b5e6-96231b3b80d8
* Change DiffFilesWithTolerance to be written in terms of MemoryBuffer,Chris Lattner2008-04-011-73/+56
| | | | | | | | | not an mmapped file. This more closely matches its requirements and provides an implicitly null terminated buffer, something this routine had to emulate itself before. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49024 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove MappedFile support for mapping files for write and execChris Lattner2008-04-016-112/+18
| | | | | | | | and shared. This complicates the design, is not used, and probably doesn't even work. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49022 91177308-0d34-0410-b5e6-96231b3b80d8
* add missing #includesChris Lattner2008-04-013-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49020 91177308-0d34-0410-b5e6-96231b3b80d8
* More soft fp fixes.Evan Cheng2008-04-011-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49016 91177308-0d34-0410-b5e6-96231b3b80d8
* Pasto.Evan Cheng2008-04-011-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49014 91177308-0d34-0410-b5e6-96231b3b80d8
* Add comment.Evan Cheng2008-04-011-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49013 91177308-0d34-0410-b5e6-96231b3b80d8
* Unbreak ARM / Thumb soft FP support.Evan Cheng2008-04-012-9/+21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49012 91177308-0d34-0410-b5e6-96231b3b80d8
* Accept 'y' constraint (MMX) in inline asm.Dale Johannesen2008-04-011-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49011 91177308-0d34-0410-b5e6-96231b3b80d8
* cleanup the MappedFile API and comments. This removes and updatesChris Lattner2008-04-012-118/+119
| | | | | | | | | | tons of out of date comments (really nothing throws here!) and fixes some other fairly glaring issues: "size" used to return the size of the file *and* change it, depending on how you called it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49009 91177308-0d34-0410-b5e6-96231b3b80d8
* remove DEFINING_FILE_FOR for MappedFile.hChris Lattner2008-04-011-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49008 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit exception handling info for functions which areDale Johannesen2008-03-318-25/+49
| | | | | | | | | | | | | not marked nounwind, or for all functions when -enable-eh is set, provided the target supports Dwarf EH. llvm-gcc generates nounwind in the right places; other FEs will need to do so also. Given such a FE, -enable-eh should no longer be needed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49006 91177308-0d34-0410-b5e6-96231b3b80d8
* It's not safe to fold a load from GV stub or constantpool into a two-address ↵Evan Cheng2008-03-312-2/+11
| | | | | | use. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49002 91177308-0d34-0410-b5e6-96231b3b80d8
* Actually disable crash reporting on Mac OS X, returning bugpoint to speedyNate Begeman2008-03-311-23/+6
| | | | | | | crash miscompilations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49000 91177308-0d34-0410-b5e6-96231b3b80d8
* Set blockBegin to point to the beginning of the block,Dan Gohman2008-03-311-2/+2
| | | | | | | not the end. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48999 91177308-0d34-0410-b5e6-96231b3b80d8
* Move reMaterialize() from TargetRegisterInfo to TargetInstrInfo.Evan Cheng2008-03-3122-141/+87
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48995 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a DAGCombiner optimization to respect volatile qualification.Dan Gohman2008-03-311-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48994 91177308-0d34-0410-b5e6-96231b3b80d8
* Expose Function::viewCFG and Function::viewCFGOnly to bindings.Erick Tryzelaar2008-03-311-0/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48982 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-apply 48911.Evan Cheng2008-03-311-8/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48977 91177308-0d34-0410-b5e6-96231b3b80d8
* The support for remat of instructions with a register operand is hackish, to ↵Evan Cheng2008-03-311-18/+7
| | | | | | say the least. Since the register operand guaranteed to be PIC base and that it is already live at all uses, we are making sure it will not be spilled after its uses are rematerialized for both performance and correctness reasons. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48976 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a major bug in the DFS calculation. Thanks for Christopher Lamb for ↵Owen Anderson2008-03-311-1/+1
| | | | | | pointing this out. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48973 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't eliminate bitcast instructions that change the type of a pointerNate Begeman2008-03-312-19/+26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48971 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix comment typo.Duncan Sands2008-03-301-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48967 91177308-0d34-0410-b5e6-96231b3b80d8
* Moved from PR1570.Nick Lewycky2008-03-301-0/+26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48965 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix "Control reaches the end of non-void function" warnings, Chris Lattner2008-03-309-0/+15
| | | | | | | patch by David Chisnall. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48963 91177308-0d34-0410-b5e6-96231b3b80d8
* minor code cleanups, allow constant folding sinf/cosf.Chris Lattner2008-03-301-20/+26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48961 91177308-0d34-0410-b5e6-96231b3b80d8
* Cosmetic changes.Evan Cheng2008-03-291-24/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48947 91177308-0d34-0410-b5e6-96231b3b80d8
* change iterator invalidation avoidance to just move the iterator backwardChris Lattner2008-03-291-18/+25
| | | | | | | | | | | | | | | | | | | | | | | when something changes, instead of moving forward. This allows us to simplify memset lowering, inserting the memset at the end of the range of stuff we're touching instead of at the start. This, in turn, allows us to make use of the addressing instructions already used in the function instead of inserting our own. For example, we now codegen: %tmp41 = getelementptr [8 x i8]* %ref_idx, i32 0, i32 0 ; <i8*> [#uses=2] call void @llvm.memset.i64( i8* %tmp41, i8 -1, i64 8, i32 1 ) instead of: %tmp20 = getelementptr [8 x i8]* %ref_idx, i32 0, i32 7 ; <i8*> [#uses=1] %ptroffset = getelementptr i8* %tmp20, i64 -7 ; <i8*> [#uses=1] call void @llvm.memset.i64( i8* %ptroffset, i8 -1, i64 8, i32 1 ) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48940 91177308-0d34-0410-b5e6-96231b3b80d8
* make the common case of a single store (which clearly shouldn't be turnedChris Lattner2008-03-291-3/+12
| | | | | | | into a memset!) faster by avoiding an allocation of an std::list node. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48939 91177308-0d34-0410-b5e6-96231b3b80d8
* give form-memset a significantly more sane heuristic, enable it by default.Chris Lattner2008-03-291-7/+49
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48937 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove some unneeded code for LiveInterval joining, and fix a bug in the Phi ↵Owen Anderson2008-03-291-58/+25
| | | | | | | | | elimination algorithm where we were accidentally reasoning about the source rather than the destination. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48936 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a tokenfactor node to use the load chain rather than theDan Gohman2008-03-281-1/+1
| | | | | | | load value. This fixes PR2177. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48932 91177308-0d34-0410-b5e6-96231b3b80d8
* Backing out 48911 for now. It's breaking stuff.Evan Cheng2008-03-281-12/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48922 91177308-0d34-0410-b5e6-96231b3b80d8
* ifdef out a dead function. Should this be removed?Chris Lattner2008-03-281-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48916 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename getAnyLoad to getLoad is suggested by Evan.Duncan Sands2008-03-282-17/+17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48914 91177308-0d34-0410-b5e6-96231b3b80d8
* New entry.Evan Cheng2008-03-281-0/+44
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48912 91177308-0d34-0410-b5e6-96231b3b80d8
* Load from stub is already re-materializable.Evan Cheng2008-03-281-8/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48911 91177308-0d34-0410-b5e6-96231b3b80d8
* Update example to new syntax.Nick Lewycky2008-03-281-2/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48910 91177308-0d34-0410-b5e6-96231b3b80d8
* make memset inference significantly more powerful: it can now handle Chris Lattner2008-03-281-82/+184
| | | | | | | | | | | memsets that initialize "structs of arrays" and other store sequences that are not sequential. This is still only enabled if you pass -form-memset-from-stores. The flag is not heavily tested and I haven't analyzed the perf regressions when -form-memset-from-stores is passed either, but this causes no make check regressions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48909 91177308-0d34-0410-b5e6-96231b3b80d8
* New entry.Evan Cheng2008-03-281-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48908 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement LegalizeTypes support for softfloat LOAD.Duncan Sands2008-03-273-78/+64
| | | | | | | | | In order to handle indexed nodes I had to introduce a new constructor, and since I was there I factorized the code in the various load constructors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48894 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid creating chain dependencies from CopyToReg nodes to load and storeDan Gohman2008-03-271-54/+72
| | | | | | | | | | | | | | | | | | | nodes. This doesn't currently have much impact the generated code, but it does produce simpler-looking SelectionDAGs, and consequently simpler-looking ScheduleDAGs, because there are fewer spurious dependencies. In particular, CopyValueToVirtualRegister now uses the entry node as the input chain dependency for new CopyToReg nodes instead of calling getRoot and depending on the most recent memory reference. Also, rename UnorderedChains to PendingExports and pull it up from being a local variable in SelectionDAGISel::BuildSelectionDAG to being a member variable of SelectionDAGISel, so that it doesn't have to be passed around to all the places that need it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48893 91177308-0d34-0410-b5e6-96231b3b80d8
* PHI->removeIncomingValue may remove PHInode.Devang Patel2008-03-271-1/+2
| | | | | | | Increment iterator in advance. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48890 91177308-0d34-0410-b5e6-96231b3b80d8