1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-23 04:52:54 +02:00
Commit Graph

2596 Commits

Author SHA1 Message Date
Chris Lattner
70d0a6155b Add a useful accessor
llvm-svn: 19209
2005-01-01 15:58:55 +00:00
Chris Lattner
7f004e59d8 Add two helper functions.
llvm-svn: 19208
2005-01-01 15:58:41 +00:00
Reid Spencer
53cfb14270 * Fix a bug in an m4 macro that used an incorrect test operator
* Add CAN_DLOPEN_SELF so we can determine if dlopen(0) will open the
  program or not.
* Correct a warning messages to be a little more specific on what it checks

llvm-svn: 19184
2004-12-29 07:07:57 +00:00
Reid Spencer
b454405d4a For PR351:
* Move implementation of sys::PreventCoreFiles function to this file from
  the now defunct SysConfig abstraction.

llvm-svn: 19159
2004-12-27 06:17:27 +00:00
Reid Spencer
7da5e588d4 For PR351:
SysConf abstraction was pointless because it had a single function in it that
pertained only to the current process. So merge it into the Process abstraction
and remove the files completely.

llvm-svn: 19149
2004-12-27 06:15:14 +00:00
Reid Spencer
38f6b8a1bd For PR351:
* Add checks for sterror and strerror_r functions
* Add check to determine if /dev/zero is needed for allocating RWX memory.

llvm-svn: 19148
2004-12-27 06:15:02 +00:00
Reid Spencer
ff28563c07 For PR351:
* Make sure all headers used by lib/System have checks
* Use "standard" autoconf checks for certain problematic headers
For PR432:
* Resurrect --with-llvmgccdir so a specific llvm-gcc/llvm-g++ installation
  can be specified.

llvm-svn: 19142
2004-12-25 07:31:29 +00:00
Reid Spencer
27dbe5c161 For PR351:
Create new variables LLVM_ON_UNIX and LLVM_ON_WIN32 so we can start getting
rid of reliance upon a symbolic link to switch implementations in lib/System

llvm-svn: 19131
2004-12-24 06:29:05 +00:00
Reid Spencer
9d949160f5 For PR351:
Move non-portable FDHandle class to its only user: lib/Debugger

llvm-svn: 19106
2004-12-22 10:24:43 +00:00
Jeff Cohen
147ad804fa Fix VC++ compilation error
llvm-svn: 19082
2004-12-21 15:40:41 +00:00
Reid Spencer
56bec4165e Remove this file as there are no LLVM users of it any more.
llvm-svn: 19066
2004-12-20 04:35:20 +00:00
Reid Spencer
6abec217dd Remove this file as its not used by anything in LLVM any more. System
dependent behavior is now made through the lib/System interface.

llvm-svn: 19064
2004-12-20 04:25:53 +00:00
Reid Spencer
df938f3108 Remove these files as they are included by nothing in LLVM any more. The
system dependent functionality has been moved to lib/System.

llvm-svn: 19063
2004-12-20 04:24:32 +00:00
Reid Spencer
9bba44181d Remove these headers. The files that used to #include them don't any more
as most system dependent behavior has been moved to lib/System.

llvm-svn: 19062
2004-12-20 04:20:37 +00:00
Reid Spencer
cdaadc1eb5 Add HAVE_SYSCONF
llvm-svn: 19060
2004-12-20 04:08:58 +00:00
Reid Spencer
d244303b05 For PR351:
* Add GetMallocUsage as a wrapper around mallinfo()
* Add GetTotalMemoryUsage to get approximate RSS size
* Add GetTimeUsage to get elapsed/system/user time

llvm-svn: 19051
2004-12-20 00:58:53 +00:00
Reid Spencer
8ef5b3a158 Wrap long lines
llvm-svn: 19050
2004-12-20 00:58:41 +00:00
Reid Spencer
38b0d98740 For PR351:
This file is no longer needed as system dependent functions have been
encapsulated into lib/System.

llvm-svn: 19049
2004-12-20 00:58:25 +00:00
Reid Spencer
944664fd34 For PR351:
Incorporate the abilities of RunPRogramWithTimeout into
sys::Program::ExecuteAndWait so that redirection and a timeout are optionally
supported.

llvm-svn: 19039
2004-12-19 17:59:57 +00:00
Reid Spencer
9bf67b0b3f For PR351:
Turn path instance variables into sys::Path instead of std::string

llvm-svn: 19038
2004-12-19 17:59:45 +00:00
Reid Spencer
e3eb1bb93d For PR351:
Replace RunProgramWithTimeout with an inline function that calls
sys::Program::ExecuteAndWait. This is now just a convenience function.

llvm-svn: 19037
2004-12-19 17:59:33 +00:00
Reid Spencer
97e79cf40a Correct the name of the method. CopyFiles -> CopyFile.
llvm-svn: 19025
2004-12-18 00:14:24 +00:00
Chris Lattner
40cf227b6a Make code fit in 80 cols
llvm-svn: 19016
2004-12-17 17:02:54 +00:00
Reid Spencer
df60327fbe 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
391b891e42 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
22b625f52c Get rid of inclusion of config.h because this file is autoconf'd.
llvm-svn: 18992
2004-12-16 18:47:17 +00:00
Reid Spencer
652f1f43fd Adjust documentation of GetBytecodeLibraryPaths after removing LLVMGCCDIR
support from it.

llvm-svn: 18972
2004-12-15 22:49:18 +00:00
Reid Spencer
bb0cee77f8 Remove LLVMGCCDIR.
llvm-svn: 18971
2004-12-15 22:28:35 +00:00
Reid Spencer
9d3a8ad836 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.

llvm-svn: 18961
2004-12-15 08:32:45 +00:00
Chris Lattner
78b1a2c137 Make the AliasAnalysis interface more precise for common cases.
llvm-svn: 18956
2004-12-15 07:21:39 +00:00
Reid Spencer
8fe73b4d39 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.

llvm-svn: 18947
2004-12-15 01:50:13 +00:00
Reid Spencer
c13933032d 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
8461ddd8c9 Add some system specific functions we use
llvm-svn: 18945
2004-12-15 01:41:56 +00:00
Jeff Cohen
cc0adb0271 Implement Win32 Path::getStatusInfo(), TimeValue::toString()
llvm-svn: 18930
2004-12-14 05:26:43 +00:00
Reid Spencer
165388298b For PR351:
* Fix commentary, wrap lines, etc.
* Add an environment pointer to the ExecuteAndWait function.

llvm-svn: 18926
2004-12-14 04:17:12 +00:00
Reid Spencer
a0f6155809 For PR351:
* isExecutable -> sys::Path::executable()
* Adjust interface of FindExecutable to return a sys::Path

llvm-svn: 18917
2004-12-13 23:40:08 +00:00
Reid Spencer
3b88b3427b 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
df7f779d7d 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
5a18b63eb5 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.

llvm-svn: 18907
2004-12-13 19:59:50 +00:00
Chris Lattner
79c3a57af7 Change this method to return ulong, not uint, for 64-bit targets.
llvm-svn: 18906
2004-12-13 19:48:51 +00:00
Reid Spencer
7dfa723d34 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
dd50ab43d0 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
fe4882b78e Added a size_type typedef to LLVM containers to make Visual Studio shut up
(and possibly to make LLVM more x86 64bit friendly).

llvm-svn: 18891
2004-12-13 16:28:53 +00:00
Reid Spencer
f7cd830e8d Add a convenience function for clearing the two global areas.
Patch contributed by Morten Ofsted.

llvm-svn: 18890
2004-12-13 16:22:32 +00:00
Reid Spencer
24cf14cef6 * Add a std::ostream inserter for sys::Path
* Correct the std::string constructor to take a const reference.

llvm-svn: 18877
2004-12-13 06:57:15 +00:00
Reid Spencer
6d4e664b79 Remove commented out functions that have been replaced with lib/System
functionality.

llvm-svn: 18868
2004-12-13 03:15:47 +00:00
Reid Spencer
1e51643433 Make the size() method const
llvm-svn: 18852
2004-12-13 02:58:51 +00:00
Reid Spencer
285b0e4cda For PR351:\
* Modify file reading to use sys::MappedFile \
* Use sys::Path instead of std::string

llvm-svn: 18851
2004-12-13 02:58:40 +00:00
Reid Spencer
bb21c8cf16 Add LLVMGCCDIR for path lookup
llvm-svn: 18850
2004-12-13 02:58:28 +00:00
Reid Spencer
cc8a470ea6 Make the OpenAndLoad functions have an ErrorMessage argument.
llvm-svn: 18849
2004-12-13 02:58:16 +00:00
Reid Spencer
5be572d3b4 Completely rewrite the interface to be class based
llvm-svn: 18848
2004-12-13 02:58:05 +00:00
Reid Spencer
b4cb7f30c3 For PR351:\
* Consolidate path retrieval into just two methods. \
* Add FindLibrary as a convenience function. \
* Add isDynamicLibrary for testing for dynamic libs. \
* Make toString constant and reference clean.

llvm-svn: 18847
2004-12-13 02:57:53 +00:00
Reid Spencer
71746efbf5 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
e2af9dc813 Path::get -> Path::toString
llvm-svn: 18785
2004-12-11 00:14:15 +00:00
Chris Lattner
d104c10aa5 Add missing accessor.
llvm-svn: 18775
2004-12-10 20:35:47 +00:00
Chris Lattner
a856de4013 New prototype
llvm-svn: 18751
2004-12-10 07:55:01 +00:00
Jeff Cohen
2d53514c83 Fix residual Visual Studio build problems
llvm-svn: 18688
2004-12-09 05:51:11 +00:00
Chris Lattner
8cb5c70203 Move method out of line
llvm-svn: 18666
2004-12-08 21:04:10 +00:00
Chris Lattner
5cc8fcda9e Define the pointer hash struct before the string one, to improve compatibility
with ICC.  Patch contributed by Bjørn Wennberg.

llvm-svn: 18663
2004-12-08 20:59:18 +00:00
Alkis Evlogimenos
f57d029464 Use getOperand() and remove getElementAt() function.
llvm-svn: 18612
2004-12-08 03:45:20 +00:00
Reid Spencer
8db74faeb6 For PR387:\
Add runPass methods to remove -Woverloaded-virtual warnings are not \
present and circumvent possible inheritance bugs.

llvm-svn: 18600
2004-12-07 08:11:11 +00:00
Reid Spencer
d50c86f078 For PR387:\
Make only one print method to avoid overloaded virtual warnings when \
compiled with -Woverloaded-virtual

llvm-svn: 18589
2004-12-07 04:03:45 +00:00
Alkis Evlogimenos
806fb993fe Add accessors for Constants in a ConstantStruct.
llvm-svn: 18550
2004-12-05 20:09:18 +00:00
Reid Spencer
6b2113de16 Fix PR139: \
Add support for ordered linking with the LinkItems function

llvm-svn: 18546
2004-12-05 19:14:43 +00:00
Chris Lattner
cdcd7126f1 Add a new method
llvm-svn: 18531
2004-12-05 06:43:27 +00:00
Chris Lattner
f9f7c0c5d8 Fix typeo
llvm-svn: 18530
2004-12-05 06:33:15 +00:00
Reid Spencer
fc2bf75791 Make a const method const
llvm-svn: 18524
2004-12-05 05:17:34 +00:00
Chris Lattner
e2b8d886c9 Move the strip pass from Scalar to IPO lib
llvm-svn: 18438
2004-12-02 21:24:19 +00:00
Chris Lattner
6adc42af75 Remove dead field
llvm-svn: 18412
2004-12-02 02:35:38 +00:00
Chris Lattner
e561ef0261 Add method
llvm-svn: 18368
2004-11-30 02:51:53 +00:00
Reid Spencer
fea77c07f6 Add in some methods for use by the JIT. LoadLibraryPermanently brings the
library into the address space permanently. SearchForAddressOfSymbol looks
in all previously permanently loaded libraries and any currently open
libraries for a symbol, instead of just one library like GetAddressOfSymbol

llvm-svn: 18354
2004-11-29 13:27:56 +00:00
Reid Spencer
71ebca79cb Changes resulting from AC_LIB_LTDL usage.
llvm-svn: 18350
2004-11-29 12:36:16 +00:00
Reid Spencer
dba402cd23 Don't include ltdl.h any more. Its nested in lib/System now.
llvm-svn: 18347
2004-11-29 12:12:11 +00:00
Reid Spencer
19f0bd4d59 Make the default constructor cause the program's symbols to be loaded as
if it was a dynamic library.

llvm-svn: 18340
2004-11-29 10:38:54 +00:00
Chris Lattner
c57746a1e0 Change interface to this method a bit
llvm-svn: 18274
2004-11-27 18:37:04 +00:00
Chris Lattner
ab36efe42b Add a new interface
llvm-svn: 18266
2004-11-26 21:36:25 +00:00
Reid Spencer
6bfb910955 Remove HAVE_BZLIB and HAVE_BZIP2. We always have bzip2 now.
llvm-svn: 18254
2004-11-25 20:21:53 +00:00
Reid Spencer
0fd67aa7c9 Restrict the interface to not allow algorithm selection
llvm-svn: 18248
2004-11-25 19:37:42 +00:00
Chris Lattner
70c19defde Fix the FIXME, nuke the JIT specific forceCompilationOf method.
llvm-svn: 18131
2004-11-22 21:54:35 +00:00
Chris Lattner
39b616869e These methods are now obsolete
llvm-svn: 18128
2004-11-22 21:48:01 +00:00
Chris Lattner
f14eff8940 Add a new debug intrinsic parent class. Patch contributed by Michael
McCracken, thanks!

llvm-svn: 18107
2004-11-22 17:18:05 +00:00
Chris Lattner
2dbdf38808 This is the proper code for this method, thanks to Reid for getting CVS working
again.

llvm-svn: 18103
2004-11-22 16:54:54 +00:00
John Criswell
fbf58400ce Moved into the poolalloc tree.
llvm-svn: 18102
2004-11-22 16:32:35 +00:00
Reid Spencer
7aa1c0b8fb Implement a missing function called by JIT/Emitter.cpp but never defined.
NOTE: Its not clear that this implementation is correct.
CHRIS: Please review this!
llvm-svn: 18101
2004-11-22 12:38:36 +00:00
Chris Lattner
ed19f4fe7d Fix a warning
llvm-svn: 18083
2004-11-21 04:42:32 +00:00
Chris Lattner
3765dc4ebd Add another bit, to make the JIT a bit more efficient.
llvm-svn: 18077
2004-11-21 03:27:13 +00:00
Chris Lattner
6d1fb33657 ignore generated files
llvm-svn: 18073
2004-11-21 00:01:54 +00:00
Chris Lattner
32fb560b34 Ignore generated files
llvm-svn: 18071
2004-11-21 00:00:04 +00:00
Chris Lattner
34db55fe83 Ignore files
llvm-svn: 18070
2004-11-20 23:58:43 +00:00
Chris Lattner
53ea58d4c1 Change this interface a bit
llvm-svn: 18063
2004-11-20 23:52:43 +00:00
Chris Lattner
ebb79ba538 Add new methods that a target should implement
llvm-svn: 18060
2004-11-20 23:50:02 +00:00
Chris Lattner
62d04b04f0 Add missing #include
llvm-svn: 18058
2004-11-20 23:40:54 +00:00
Reid Spencer
f381e95cc6 Distinguish between BSD4.4 and SVR4 symbol tables
llvm-svn: 18044
2004-11-20 07:29:40 +00:00
Chris Lattner
c0599d0f14 Add getCurrentPCOffset() and addRelocation() methods.
llvm-svn: 18034
2004-11-20 03:44:39 +00:00
Chris Lattner
20654daf37 Add the getRelocationType method that I forgot
llvm-svn: 18033
2004-11-20 03:43:50 +00:00
Chris Lattner
bae6c00a15 Allow targets to implement relocation support.
llvm-svn: 18032
2004-11-20 03:43:27 +00:00
Chris Lattner
674e29ccde New file
llvm-svn: 18029
2004-11-20 03:05:50 +00:00
Chris Lattner
6e17c0f19e Remove dead #include
llvm-svn: 18027
2004-11-20 02:17:03 +00:00
Chris Lattner
f9b6c00d88 External symbols are const char*'s now, change this to match.
llvm-svn: 18008
2004-11-19 20:56:22 +00:00
Chris Lattner
2a37cb2ef9 Instead of storing std::string's for ExternalSymbol references, rely on the
fact that all ExternalSymbols are actually string literals with static storage.
Thus we don't have to do anything special to hold them and we certainly don't
have to copy string data around.

llvm-svn: 18007
2004-11-19 20:46:15 +00:00