Commit Graph

330 Commits

Author SHA1 Message Date
Chris Lattner 24922c7a2b Timers SHOULD NOT record the time taken to count the bytes allocated in the heap!
llvm-svn: 20765
2005-03-22 03:20:38 +00:00
Chris Lattner 252f546ceb Fix a bug where we would consider " .99" and "1.0" different because of the
leading whitespace.

llvm-svn: 20647
2005-03-17 04:49:04 +00:00
Andrew Lenharth 7054073bb6 yay for camel_cvs diff
llvm-svn: 20552
2005-03-10 20:15:09 +00:00
Chris Lattner b9f0cebeb5 get bugpoint working on ia64, by building .so's with -fpic. :)
llvm-svn: 20525
2005-03-09 03:31:02 +00:00
Chris Lattner 5315aa0ec6 Remove some stuff I checked in accidentally
llvm-svn: 20340
2005-02-27 04:32:35 +00:00
Chris Lattner 3e7a193bd7 Instead of doing a manual comparison loop, just use memcmp, thanks to JohnC
for the suggestion! :)

llvm-svn: 20203
2005-02-15 22:12:10 +00:00
Chris Lattner 9d0db6f602 Make this more efficient now that we know both files are the same length.
llvm-svn: 20202
2005-02-15 22:01:43 +00:00
Misha Brukman f232a4582d Fix spelling
llvm-svn: 20201
2005-02-15 21:59:53 +00:00
Reid Spencer f4425b0208 Adjust DiffFilesWithTolerance to help poor cygwin's mmap facility by
handling zero length files a little more intelligently. If both files are
zero length then we return 0 (true) indicating a match. If only one of the
files is zero length then we return 1 (false) indicating that the files
differ. If the files don't agree in length then they can't match so we
skip the first loop that looks for a quick match.

llvm-svn: 20200
2005-02-15 21:47:02 +00:00
Chris Lattner a3a55bf997 Work around GCC PR19958, which causes programs to sometimes crash after
printing help output or version info.

llvm-svn: 20180
2005-02-14 19:17:29 +00:00
Chris Lattner dc01c3f058 Move helper function here.
llvm-svn: 20168
2005-02-13 23:13:47 +00:00
Chris Lattner 610ce2c678 Don't print a 'Total Execution Time' line for the 'Miscellaneous Ungrouped
Timers' section.  Since these are random timers in the program it doesn't
make sense to sum them up.

llvm-svn: 20090
2005-02-09 18:41:32 +00:00
Tanya Lattner 5ca41e2b68 Make this work on systems where size_t == unsigned and where they are not
the same.

llvm-svn: 19929
2005-01-29 23:29:55 +00:00
Tanya Lattner 238cf92000 Make this work on systems where size_t is not the same as unsigned.
llvm-svn: 19928
2005-01-29 23:08:01 +00:00
Chris Lattner 800b72445f This file was schizophrenic when it came to representing sizes. In some
cases it represented them as 'unsigned's, which are not enough for 64-bit
hosts.  In other cases, it represented them as uint64_t's, which are
inefficient for 32-bit hosts.

This patch unifies all of the sizes to use size_t instead.

llvm-svn: 19918
2005-01-29 17:17:18 +00:00
Chris Lattner bb4384ba71 After reading in a bc file, trim the resultant buffer down to what we
really need.  This reduces 4M of memory consumption reading 176.gcc.

llvm-svn: 19916
2005-01-29 17:05:56 +00:00
Chris Lattner 173340640a Finegrainify namespacification
llvm-svn: 19915
2005-01-29 16:53:02 +00:00
Chris Lattner 2295d0b7de Memory used is a delta between memuse at the start of the time and the
memuse at the end, thus it is signed.

llvm-svn: 19904
2005-01-29 05:21:16 +00:00
Chris Lattner 6c43f5e5fe Fix crash comparing empty file against nonempty file.
llvm-svn: 19782
2005-01-23 06:02:40 +00:00
Chris Lattner b782187b32 Make DiffFilesWithTolerance take sys::Path's instead of std::strings
Delete dead functions.

llvm-svn: 19771
2005-01-23 03:31:02 +00:00
Chris Lattner 364e8b771d Fix a bug in previous checkin
llvm-svn: 19769
2005-01-23 03:19:13 +00:00
Chris Lattner 16a4368c40 Add a new method, refactored out of fpcmp
llvm-svn: 19766
2005-01-23 03:13:43 +00:00
Jeff Cohen c8f1f4bc8e Use binary mode for reading/writing bytecode files
llvm-svn: 19751
2005-01-22 17:36:17 +00:00
Jeff Cohen 1a26d15c80 Use size_t instead of long to represent memory usage. long is 32 bits
on 64-bit Windows.

llvm-svn: 19393
2005-01-08 20:15:57 +00:00
Chris Lattner 867158cefd Do not throw away bits for no reason
llvm-svn: 19378
2005-01-08 19:32:59 +00:00
Chris Lattner 2c5e4ed8f9 Silence a VS warning.
llvm-svn: 19377
2005-01-08 19:31:31 +00:00
Reid Spencer 4e8dd44733 Make printing a warning message optional in CheckBytecodeOutputToConsole.
llvm-svn: 19240
2005-01-02 00:10:03 +00:00
Reid Spencer 1263cfd14f Implement a function to print a warning if bytecode output is to be sent to
a terminal/console.

llvm-svn: 19237
2005-01-01 23:56:20 +00:00
Reid Spencer ad7bdf7400 Fix a bug that made the nightly tester *really* slow. During changes for
portability, the --track-space option was inadvertently ignored. This patch
fixes that so that sys::Process::GetMallocUsage() is only invoked if the
--track-spaces option is given. Apparently the mallinfo() call that
GetMallocUsage() uses is *very* slow, especially when processing very large
modules like projects/llvm-test/MultiSource/Applications/kimwitu++.

llvm-svn: 19163
2004-12-27 08:03:04 +00:00
Reid Spencer 5260b5b46d For PR351:
Move non-portable FDHandle class to its only user: lib/Debugger

llvm-svn: 19106
2004-12-22 10:24:43 +00:00
Reid Spencer 92e8a5a0ea Fix a bug where system time always equals user time
llvm-svn: 19075
2004-12-20 21:44:27 +00:00
Reid Spencer ee556dd431 Put some header files back that Win32 needs.
llvm-svn: 19058
2004-12-20 03:59:23 +00:00
Reid Spencer 2708881067 For PR351:
* Move system dependent implementation out of this file.
* Make implementation use sys::Process::GetMallocUsage where necessary.
* Make implementation use sys::Process::GetTimeUsage where necessary.

llvm-svn: 19053
2004-12-20 00:59:04 +00:00
Reid Spencer 2d76ff5c85 For PR351:
* Pass sys::Path instead of std::string for paths
* Correct the types of arguments passed to RunProgramWithTimeout due to its
  interface using sys::Path instead of std::string
* Replace "/dev/null" (not portable) with empty string which
  sys::Program::ExecuteAndWait recognizes as "redirect to bit bucket"

llvm-svn: 19041
2004-12-19 18:00:21 +00:00
Reid Spencer d44f845213 For PR351:
* Remove unneeded header files.
* Move RedirectFD static function to lib/System/Unix/Program.cpp
* Delete RunProgramWithTimeout, now implemented by
  sys::Program::ExecuteAndWait. RunProgramWithTimeout is now a convenience func.

llvm-svn: 19040
2004-12-19 18:00:09 +00:00
Reid Spencer beb9946af8 For PR351:
* Make the OutputC and OutputAsm functions work with sys::Path for the output
  file name instead of using std::string.
* Get rid of extraneous "toString" calls.
* Change "removeFile" to sys::Path::destroyFile()

llvm-svn: 19000
2004-12-16 23:01:34 +00:00
Reid Spencer ea71e3c89b For PR351:
* Remove the "removeFile" function, now implemented by the
  sys::Path::destroyFile method.
* Make the FileRemove work with a sys::Path instead of a std::string

llvm-svn: 18999
2004-12-16 23:00:05 +00:00
Reid Spencer 9329172767 For PR351:
* Remove #inclusion of FileUtilities.h, not needed any more.
* Convert getUniqueFilename -> sys::Pat::makeUnique()

llvm-svn: 18948
2004-12-15 01:51:56 +00:00
Reid Spencer 320a20ac45 For PR351:
Remove getUniqueFilename and CopyFile. These are now implemented by
sys::Path::makeUnique and sys::CopyFile, respectively.

llvm-svn: 18946
2004-12-15 01:46:54 +00:00
Reid Spencer c2e22fea42 For PR351:
* Remove the ExecWait function. This is now in sys::Program::ExecuteAndWait

llvm-svn: 18927
2004-12-14 04:18:15 +00:00
Reid Spencer 87ad666bb3 Revert the last patch as it causes a static destruction ordering problem.
llvm-svn: 18925
2004-12-14 03:55:21 +00:00
Reid Spencer d89ff0a5e1 For PR351:
Adjust to changes in the interface of FindExecutable, getting ToolRunner
ready for bigger things to come.

llvm-svn: 18919
2004-12-13 23:43:44 +00:00
Reid Spencer dc49d865a1 For PR351:
* Remove isExecutable as its now implemented by sys::Path::executable
* Make FindExecutable a thin veneer over sys::Program::FindProgramByName.

llvm-svn: 18918
2004-12-13 23:41:37 +00:00
Reid Spencer e42f222d36 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.

llvm-svn: 18912
2004-12-13 20:14:30 +00:00
Reid Spencer 6b8632850b 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.

llvm-svn: 18910
2004-12-13 20:08:14 +00:00
Reid Spencer 73fc525557 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.

llvm-svn: 18903
2004-12-13 18:28:59 +00:00
Reid Spencer aa95684acd For PR351: \
The getFileTimestamp and getFileSize functions have been removed from  \
FileUtilities.{h,cpp}. They are replaced by Path::getTimestamp and  \
Path::getSize,respectively.

llvm-svn: 18892
2004-12-13 17:01:53 +00:00
Reid Spencer 53bd3d0b1a Get rid of some leaks found by VC leak detector.
Patch contributed by Morten Ofsted.

llvm-svn: 18889
2004-12-13 16:04:04 +00:00
Reid Spencer 21d9ef9e82 For PR351:Remove the file type checking methods (now in sys::Path)
llvm-svn: 18846
2004-12-13 02:57:41 +00:00
Reid Spencer ca49210f65 Distribute headers and license files too
llvm-svn: 18505
2004-12-04 22:34:21 +00:00