Commit Graph

3240 Commits

Author SHA1 Message Date
Reid Spencer
b2164e5cb5 For PR540:
Add a Mutex class for thread synchronization in a platform-independent way.
The current implementation only supports pthreads. Win32 use of Critical
Sections will be added later. The design permits other threading models to
be used if (and only if) pthreads is not available.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22403 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-12 15:37:43 +00:00
Reid Spencer
22177fe580 For PR540:
* Add check for pthread.h
* Make sure -lpthread gets added to LIBS if its available


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22402 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-12 15:24:20 +00:00
Chris Lattner
39429617e0 Add support for emitting 64-bit integers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22399 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-12 06:57:26 +00:00
Chris Lattner
f5d507e905 Add some apparently undocumented ELF section header flags
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22398 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-12 06:40:29 +00:00
Nate Begeman
8d2623d49a Clean up and add comments to the newly implemented subtarget code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22396 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-12 03:04:49 +00:00
Nate Begeman
0e219eb9b8 Clean up the TargetSubtarget class a bit, removing an unnecessary argument
to the constructor.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22392 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-12 02:41:19 +00:00
Nate Begeman
fb5792f416 Implement Subtarget support
Implement the X86 Subtarget.

This consolidates the checks for target triple, and setting options based
on target triple into one place.  This allows us to convert the asm printer
and isel over from being littered with "forDarwin", "forCygwin", etc. into
just having the appropriate flags for each subtarget feature controlling
the code for that feature.

This patch also implements indirect external and weak references in the
X86 pattern isel, for darwin.  Next up is to convert over the asm printers
to use this new interface.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22389 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-12 01:41:54 +00:00
Chris Lattner
f0cf1b7e5f The symbol table just needs a const GlobalValue*, not a non-const one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22377 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-11 06:16:24 +00:00
Chris Lattner
6871aed032 expose a new code emitter object
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22374 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-11 05:15:32 +00:00
Chris Lattner
1ed38fb9a7 add a helper method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22373 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-11 04:49:33 +00:00
Chris Lattner
75bbdff3d3 add a name mangler object
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22370 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-11 03:11:10 +00:00
Chris Lattner
5f056bf4b8 Change *EXTLOAD to use an VTSDNode operand instead of being an MVTSDNode.
This is the last MVTSDNode.

This allows us to eliminate a bunch of special case code for handling
MVTSDNodes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22367 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-10 01:55:33 +00:00
Chris Lattner
f7db8c69a1 Move TRUNCSTORE to using a VTSDNode operand instead of being a MVTSDNode.
Also update some comments that Andrew forgot to update when he changed
loads/stores.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22365 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-10 00:28:25 +00:00
Chris Lattner
15e4b01920 Introduce a new VTSDNode class with the ultimate goal of eliminating the
MVTSDNode class.  This class is used to provide an operand to operators
that require an extra type.  We start by converting FP_ROUND_INREG and
SIGN_EXTEND_INREG over to using it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22364 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-10 00:07:11 +00:00
Reid Spencer
a229c5cce7 Final Changes For PR495:
This chagne just renames some sys::Path methods to ensure they are not
misused. The Path documentation now divides methods into two dimensions:
Path/Disk and accessor/mutator. Path accessors and mutators only operate
on the Path object itself without making any disk accesses. Disk accessors
and mutators will also access or modify the file system. Because of the
potentially destructive nature of disk mutators, it was decided that all
such methods should end in the work "Disk" to ensure the user recognizes
that the change will occur on the file system. This patch makes that
change. The method name changes are:

makeReadable        -> makeReadableOnDisk
makeWriteable       -> makeWriteableOnDisk
makeExecutable      -> makeExecutableOnDisk
setStatusInfo       -> setStatusInfoOnDisk
createDirectory     -> createDirectoryOnDisk
createFile          -> createFileOnDisk
createTemporaryFile -> createTemporaryFileOnDisk
destroy             -> eraseFromDisk
rename              -> renamePathOnDisk

These changes pass the Linux Deja Gnu tests.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22354 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-08 03:08:58 +00:00
Jeff Cohen
4607b54877 fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22352 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-08 02:48:04 +00:00
Reid Spencer
dd04df0ec3 For PR495:
Get rid of the difference between file paths and directory paths. The Path
class now simply stores a path that can refer to either a file or a
directory. This required various changes in the implementation and interface
of the class with the corresponding impact to its users. Doxygen comments were
also updated to reflect these changes. Interface changes are:

appendDirectory -> appendComponent
appendFile -> appendComponent
elideDirectory -> eraseComponent
elideFile -> eraseComponent
elideSuffix -> eraseSuffix
renameFile -> rename
setDirectory -> set
setFile -> set

Changes pass Dejagnu and llvm-test/SingleSource tests.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22349 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-07 23:21:43 +00:00
Reid Spencer
c7f083297c For PR495:
Change interface to Path class:
readable -> canRead
writable -> canWrite
executable -> canExecute

More (incremental) changes coming to close 495.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22345 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-07 18:21:42 +00:00
Chris Lattner
e578ab938b Add support for building/representing the symbol table, add some enum constants
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22342 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-07 07:00:37 +00:00
Chris Lattner
e64e72b794 Make several cleanups to Andrews varargs change:
1. Pass Value*'s into lowering methods so that the proper pointers can be
   added to load/stores from the valist
2. Intrinsics that return void should only return a token chain, not a token
   chain/retval pair.
3. Rename LowerVAArgNext -> LowerVAArg, because VANext is long gone.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22338 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-05 19:57:53 +00:00
Chris Lattner
50f5490842 Don't crash on a query where the block is not in any loop. Thanks to
Sameer D. Sahasrabuddhe for pointing this out!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22314 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-29 17:41:25 +00:00
Chris Lattner
320181576e iniital checkin of ELFWriter header.
For now, the elf writer is only capable of emitting an empty elf file, with
a section table and a section table string table.  This will be enhanced
in the future :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22290 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-27 06:28:45 +00:00
Chris Lattner
33f80a8723 add some new file types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22286 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-25 03:31:43 +00:00
Chris Lattner
11f14c8be0 refactor these interfaces a bit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22281 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-25 02:47:50 +00:00
Chris Lattner
b7eb682293 improve comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22280 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-24 18:17:33 +00:00
Andrew Lenharth
14f1703ae3 make AliasAnalysis know that VAArg writes memory. This is extremely conservative and should be fixed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22267 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-20 15:24:23 +00:00
Andrew Lenharth
c64b64a204 fix DCE + va_arg problem
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22264 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-19 14:46:20 +00:00
Andrew Lenharth
f542821385 header file changes for varargs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22253 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-18 18:31:30 +00:00
Reid Spencer
8a207c16d2 Make sure a variable is initialized before use to clean up a warning from
GCC 4.0.0 in release build.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22248 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-18 16:53:27 +00:00
Chris Lattner
e6ad5ea996 silence a huge number of bogus warnings with GCC 4 on Reid's tester.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22244 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-17 13:20:15 +00:00
Tanya Lattner
771c5c1819 Added ModuloSchedSB as a friend class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22237 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-17 03:59:51 +00:00
Reid Spencer
47d309e1a9 Don't lie to the casual reader about Value subclassing from Annotable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22215 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-15 18:40:45 +00:00
Nate Begeman
cb647519d3 Add some operators the PowerPC backend needs to efficiently and correctly
generate conditional branches.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22214 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-15 18:28:44 +00:00
Chris Lattner
98c162a086 Give the asmparser the ability to parse strings, patch contributed by
Alexander Friedman!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22145 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-20 03:25:29 +00:00
Chris Lattner
1a4dff0118 remove deprecated methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22076 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-16 01:49:23 +00:00
Reid Spencer
b9a5d6861b Remove the check for the ffsll function. Its no longer needed by the
simplify-libcalls pass (pass now computes it without a call to ffsll).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22074 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-15 22:15:11 +00:00
Chris Lattner
3e909e8bb9 fix warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22060 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-15 17:25:14 +00:00
Chris Lattner
7a5659176f fix compiler warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22059 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-15 17:23:19 +00:00
Reid Spencer
edd5d9ece1 Some cleanups for compilation with GCC 4.0.0 to remove warnings:
* Use C++ style casts, not C style casts
* Abstract base classes should have virtual destructor.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22057 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-15 16:13:11 +00:00
Reid Spencer
26a35003bf Forgot to commit this earlier. Its part of the simplify-libcalls
enhancement for ffs, ffsl, and ffsll optimizations. We can't do the opt
unless we also have the at least ffsll function. Notably SVR4 doesn't.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22033 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-14 20:04:19 +00:00
Chris Lattner
6765bfed31 add a new map
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22017 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-14 07:36:02 +00:00
Chris Lattner
4211e73c49 Add a way to construct an arbitrary node, cleanly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22008 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-14 06:20:08 +00:00
Chris Lattner
50f5a51f41 add accessors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22007 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-14 06:19:11 +00:00
Chris Lattner
bc83996b31 Pass the dag into LowerOperation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22005 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-14 05:51:05 +00:00
Chris Lattner
38135af219 Print the symbolic register name in a register allocator debug dump.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22002 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-14 05:34:15 +00:00
Chris Lattner
adf6a965a3 Add an isTailCall flag to LowerCallTo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21958 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-13 18:50:42 +00:00
Chris Lattner
4c1eae9fb3 add TAILCALL node
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21956 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-13 18:40:17 +00:00
Chris Lattner
cc13b76246 add a new method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21929 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-13 07:23:03 +00:00
Chris Lattner
712ad0c36d allow a virtual register to be associated with live-in values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21927 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-13 07:08:07 +00:00
Chris Lattner
16cd04d26c rename the ADJCALLSTACKDOWN/ADJCALLSTACKUP nodes to be CALLSEQ_START/BEGIN.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21915 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-12 23:24:06 +00:00