Commit Graph

8743 Commits

Author SHA1 Message Date
Jeff Cohen
b8b836d019 Expository comment submitted by Henrik Bach
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18976 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-16 04:06:56 +00:00
Chris Lattner
3e3b6f7a46 Fix PR485, instead of emitting zero sized arrays, emit arrays of size 1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18974 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 23:13:15 +00:00
Reid Spencer
00e8930206 Change the signatures of the destroyFile and destroyDirectory methods to
const because they affect the file system, not the Path object.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18973 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 23:02:10 +00:00
Reid Spencer
24ac21f937 Remove the CFE's lib directory from the bytecode path because LLVM should
be agnostic to the needs of any specific FE.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18969 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 22:22:51 +00:00
Reid Spencer
835b6941fd Remove automatic insertion of CFE's lib directory into the bytecode path
because LLVM should be agnostic to the needs of specific front ends.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18968 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 22:21:42 +00:00
Chris Lattner
56998b26ae Add a verifier assertion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18965 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 20:23:49 +00:00
Chris Lattner
fd4b3c4774 Eliminate a virtual method call
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18964 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 18:14:04 +00:00
Chris Lattner
5226f6a901 Fix a bug in -no-aa that caused two DSGraph tests to XPASS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18962 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 17:13:24 +00:00
Reid Spencer
07f9f4e2a4 Fix a file overwrite bug in llvm-ar introduced by changes to
createTemporaryFile semantics where it doesn't create a fully unique name
if the basename doesn't exist. This functionality is now optionally
provided by the boolean reuse_current parameter to createTemporaryFile and
makeUnique. The default values differ because of the way these functions
are used in LLVM.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18961 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 08:32:45 +00:00
Chris Lattner
68a9d3eb38 Adjust to new interfaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18958 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 07:22:25 +00:00
Chris Lattner
0af024c5d0 Adjust to new alias analysis interfaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18957 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 07:22:13 +00:00
Chris Lattner
5b2103405b Move virtual method call out of loop
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18955 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 07:04:32 +00:00
Jeff Cohen
003485a0b3 Make Win32 TimeValue::toString() re-entrant and work with mingw
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18954 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 04:28:44 +00:00
Jeff Cohen
ab68df02bc Fix VC++ compilation errors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18953 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 04:08:15 +00:00
Reid Spencer
cda985e191 For PR351:
* Remove #inclusion of FileUtilities.h, not needed any more.
* Convert getUniqueFilename -> sys::Pat::makeUnique()


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18948 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 01:51:56 +00:00
Reid Spencer
c29befb554 For PR351:
* Fix implementation and documentation about LLVMGCCDIR/bytecode-libs
* Add the makeUnique method, replacement for getUniqueFilename in Support.
* Add the sys::CopyFile function, replacement for CopyFile in Support.
* Move GetLLVMConfigDir() into generic code area since its generic.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18947 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 01:50:13 +00:00
Reid Spencer
67f6d3ad30 For PR351:
Remove getUniqueFilename and CopyFile. These are now implemented by
sys::Path::makeUnique and sys::CopyFile, respectively.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18946 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 01:46:54 +00:00
Chris Lattner
0ce8580fcd Constant exprs are not efficiently negatable in practice. This disables
turning X - (constantexpr) into X + (-constantexpr) among other things.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18935 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-14 20:08:06 +00:00
Reid Spencer
3b0cc78c60 Add the getMagicNumber method.
Patch contributed by Henrik Bach. Thanks Henrik!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18933 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-14 18:42:13 +00:00
Brian Gaeke
5761805d27 The mystery of Olden/tsp solved, and more opportunities for speedup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18932 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-14 09:10:10 +00:00
Brian Gaeke
6b260e2638 Get rid of shifts by zero in most cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18931 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-14 08:21:02 +00:00
Jeff Cohen
626e38e481 Implement Win32 Path::getStatusInfo(), TimeValue::toString()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18930 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-14 05:26:43 +00:00
Reid Spencer
e2e2411f40 For PR351:
Implement the new environment pointer for ExecuteAndWait


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18928 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-14 04:18:51 +00:00
Reid Spencer
44f6966ef0 For PR351:
* Remove the ExecWait function. This is now in sys::Program::ExecuteAndWait


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18927 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-14 04:18:15 +00:00
Reid Spencer
f6e5a25f3a Revert the last patch as it causes a static destruction ordering problem.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18925 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-14 03:55:21 +00:00
Reid Spencer
51ab8ec66e For PR351:
Adjust to changes in the interface of FindExecutable, getting ToolRunner
ready for bigger things to come.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18919 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 23:43:44 +00:00
Reid Spencer
9665e8a697 For PR351:
* Remove isExecutable as its now implemented by sys::Path::executable
* Make FindExecutable a thin veneer over sys::Program::FindProgramByName.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18918 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 23:41:37 +00:00
Chris Lattner
395fd5949b When generating code for X86 targets, make sure the fp control word is set
to 64-bit precision, not 80 bits.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18915 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 21:52:52 +00:00
Brian Gaeke
9d97547680 Fix link error in PPC optimized build of 'opt'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18913 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 21:28:39 +00:00
Reid Spencer
9b9e22a32e For PR351:
Remove AllocateRWXMemory as it is not used any more in LLVM. The function
has been replaced with sys::Memory::AllocateRWX several months ago.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18912 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 20:14:30 +00:00
Chris Lattner
e171d5c812 Add some notes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18911 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 20:13:10 +00:00
Reid Spencer
2356f8612e For PR351:
Remove the MakeFileReadable and MakeFileExecutable functions which are no
longer present in LLVM. They have been replaced with the sys::Path methods
makeReadable and makeExecutable, respectively.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18910 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 20:08:14 +00:00
Chris Lattner
de97b5788c Get rid of getSizeOf, using ConstantExpr::getSizeOf instead.
do not insert a prototype for malloc of: void* malloc(uint): on 64-bit u
targets this is not correct.  Instead of prototype it as void *malloc(...),
and pass the correct intptr_t through the "...".

Finally, fix Regression/CodeGen/SparcV9/2004-12-13-MallocCrash.ll, by not
forming constantexpr casts from pointer to uint.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18908 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 20:00:02 +00:00
Reid Spencer
77cc91deaa For PR351:
Implement three new functions to allow setting access/permission bits on
the file referenced by a path. The makeReadable and makeExecutable methods
replace the FileUtilities MakeFileReadable and MakeFileExecutable
functions. The makeWritable function is new and provided for consistency
since Path has a writable() method.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18907 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 19:59:50 +00:00
Chris Lattner
fcdd82e4a9 Change this method to return ulong, not uint, for 64-bit targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18906 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 19:48:51 +00:00
Reid Spencer
79fc924957 Genericize implementation of GetDLLSuffix now that we have LTDL_SHLIB_EXT
available.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18904 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 18:41:28 +00:00
Reid Spencer
2923f34533 For PR351:
The ReadFileIntoAddressSpace and UnmapFileFromAddressSpace functions are no
longer used by LLVM. Remove them. Replacement functionality for both
functions is now encapsulated in the sys::MappedFile class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18903 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 18:28:59 +00:00
Reid Spencer
9153f8f476 For PR351:
Use sys::MappedFile instead of ReadFileIntoAddressSpace and
UnmapFileFromAddressSpace. sys::MappedFile has the nice property that it
cleans up after itself so exception handling can be removed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18902 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 18:25:27 +00:00
Chris Lattner
c0354c904b Set the rounding mode for the X86 FPU to 64-bits instead of 80-bits. We
don't support long double anyway, and this gives us FP results closer to
other targets.

This also speeds up 179.art from 41.4s to 18.32s, by eliminating a problem
with extra precision that causes an FP == comparison to fail (leading to
extra loop iterations).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18895 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 17:23:11 +00:00
Reid Spencer
9d88d1aaab For PR351: \
The getFileTimestamp and getFileSize functions have been removed from  \
FileUtilities.{h,cpp}. They are replaced by Path::getTimestamp and  \
Path::getSize,respectively.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18892 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 17:01:53 +00:00
Reid Spencer
4af3da6e6b Get rid of some leaks found by VC leak detector.
Patch contributed by Morten Ofsted.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18889 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 16:04:04 +00:00
Reid Spencer
b0e1887014 Fix a bug where "." or any single character file name doesn't get the
terminating / when setDirectory is called.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18886 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 07:51:52 +00:00
Reid Spencer
3d595cba33 Remove an always false clause from an if statement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18885 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 07:51:07 +00:00
Alkis Evlogimenos
07941b493d Fix a bug where directory names of length one or less where not set
properly (examples: "", ".", "a").


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18883 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 07:41:35 +00:00
Reid Spencer
732f92d56e * Add a std::ostream inserter for sys::Path
* Correct the std::string constructor to take a const reference.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18877 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 06:57:15 +00:00
Jeff Cohen
3265369ff5 Fix recent breakage of win32 build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18876 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 06:26:35 +00:00
Reid Spencer
903f21dd39 * Fix header block.
* Fix loop style per standards
* Don't create a new Module when the Linker's module is released.
* Add/fix function comments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18871 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 03:50:50 +00:00
Reid Spencer
ff5f3ab9fe Add missing space in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18870 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 03:23:13 +00:00
Reid Spencer
518ec2ea1f Make sure the Archive gets deleted if there's an error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18869 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 03:22:31 +00:00
Reid Spencer
04f5412496 Fix header and function comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18867 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 03:13:18 +00:00