1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 20:43:44 +02:00
Commit Graph

2901 Commits

Author SHA1 Message Date
Jeff Cohen
82a6b596d0 Implement SetInterruptFunction for Windows.
llvm-svn: 22582
2005-08-02 03:04:47 +00:00
Chris Lattner
4558fc8536 add a new function proto
llvm-svn: 22577
2005-08-02 02:13:42 +00:00
Chris Lattner
367080bfc2 Mark these as V9 specific
llvm-svn: 22572
2005-08-01 20:38:31 +00:00
Jeff Cohen
019104459d Keep tabs and trailing spaces out.
llvm-svn: 22565
2005-07-30 18:33:25 +00:00
Nate Begeman
0d1a7b6737 Break SCEVExpander out of IndVarSimplify into its own .h/.cpp file so that
other passes may use it.

llvm-svn: 22557
2005-07-30 00:12:19 +00:00
Andrew Lenharth
d8bfbd99e9 support near allocations for the JIT
llvm-svn: 22554
2005-07-29 23:40:16 +00:00
Andrew Lenharth
f623af9b64 new is not a valid default anywhere, so make this pure virtual
llvm-svn: 22542
2005-07-28 18:13:59 +00:00
Andrew Lenharth
02e0c80ecb Like constants, globals on some platforms are GOT relative. This means they have to be allocated
near the GOT, which new doesn't do.  So break out the allocate into a new function.

Also move GOT index handling into JITResolver.  This lets it update the mapping when a Lazy
function is JITed.  It doesn't managed the table, just the mapping.  Note that this is
still non-ideal, as any function that takes a function address should also take a GOT
index, but that is a lot of changes.  The relocation resolve process updates any GOT entry
it sees is out of date.

llvm-svn: 22537
2005-07-28 12:44:13 +00:00
Jeff Cohen
2894295331 Please do not reintroduce tabs.
llvm-svn: 22531
2005-07-28 02:04:44 +00:00
Reid Spencer
e82a9e2218 Fix PR608:
Previously the script assumed the version number was the last field, now
it assumes it is the first sequence of digits.

llvm-svn: 22527
2005-07-27 21:58:38 +00:00
Jeff Cohen
81980781a1 Eliminate tabs and trailing spaces.
llvm-svn: 22520
2005-07-27 05:53:44 +00:00
Andrew Lenharth
8fc535e9bd allow constants to be relocated like GV (necessary for alpha, as constants are relocated with globals, not with .text), and allow targets to have a GOT managed for them
llvm-svn: 22496
2005-07-22 20:46:42 +00:00
Reid Spencer
40c5ebe4eb For: memory operations -> stores
This is the first incremental patch to implement this feature. It adds no
functionality to LLVM but setup up the information needed from targets in
order to implement the optimization correctly. Each target needs to specify
the maximum number of store operations for conversion of the llvm.memset,
llvm.memcpy, and llvm.memmove intrinsics into a sequence of store operations.
The limit needs to be chosen at the threshold of performance for such an
optimization (generally smallish). The target also needs to specify whether
the target can support unaligned stores for multi-byte store operations.
This helps ensure the optimization doesn't generate code that will trap on
an alignment errors.
More patches to follow.

llvm-svn: 22468
2005-07-19 04:52:44 +00:00
Chris Lattner
5aed419b6d Add two helper methods, adjust a prototype
llvm-svn: 22456
2005-07-16 17:40:34 +00:00
Chris Lattner
e40a414500 Add ability to set TYPE and FLAGS field for section trivially
llvm-svn: 22454
2005-07-16 17:35:26 +00:00
Chris Lattner
40fbf63df8 Major refactor of the ELFWriter code. Instead of building up one big
vector that represents the .o file at once, build up a vector for each
section of the .o file.  This is needed because the .o file writer needs
to be able to switch between sections as it emits them (e.g. switch
between the .text section and the .rel section when emitting code).

This patch has no functionality change.

llvm-svn: 22453
2005-07-16 08:01:13 +00:00
Reid Spencer
d390dabdd5 * Correct the AC_DEFINE for LLVM_PATH_GRAPHVIZ to use AC_DEFINE_UNQUOTED so
we actually get the path and not $GRAPHVIZ as the value.
* Add a #define for the gv program (HAVE_GV) and its value LLVM_PATH_GV.

llvm-svn: 22433
2005-07-14 05:19:12 +00:00
Reid Spencer
878f3f051f Put the path to the Graphviz program in the #defines so it can be used.
llvm-svn: 22430
2005-07-14 02:25:12 +00:00
Reid Spencer
4ca34a740e Implement a test for the Graphviz program for Chris Lattner. The symbol
GRAPHVIZ will contain the path to the program if its found (or "echo Graphviz"
if not) and the #define HAVE_GRAPHVIZ will be defined if its found.

llvm-svn: 22424
2005-07-13 03:20:14 +00:00
Jeff Cohen
6e01930e34 Eliminate tabs
llvm-svn: 22421
2005-07-13 02:19:59 +00:00
Jeff Cohen
0882aa2a75 Win32 support for Mutex class.
llvm-svn: 22420
2005-07-13 02:15:18 +00:00
Reid Spencer
78910545f0 For PR540:
This patch completes the changes for making lli thread-safe. Here's the list
of changes:
* The Support/ThreadSupport* files were removed and replaced with the
  MutexGuard.h file since all ThreadSupport* declared was a Mutex Guard.
  The implementation of MutexGuard.h is now based on sys::Mutex which hides
  its implementation and makes it unnecessary to have the -NoSupport.h and
  -PThreads.h versions of ThreadSupport.

* All places in ExecutionEngine that previously referred to "Mutex" now
  refer to sys::Mutex

* All places in ExecutionEngine that previously referred to "MutexLocker"
  now refer to MutexGuard (this is frivolous but I believe the technically
  correct name for such a class is "Guard" not a "Locker").

These changes passed all of llvm-test. All we need now are some test cases
that actually use multiple threads.

llvm-svn: 22404
2005-07-12 15:51:55 +00:00
Reid Spencer
5f037ea395 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.

llvm-svn: 22403
2005-07-12 15:37:43 +00:00
Reid Spencer
373e553223 For PR540:
* Add check for pthread.h
* Make sure -lpthread gets added to LIBS if its available

llvm-svn: 22402
2005-07-12 15:24:20 +00:00
Chris Lattner
81e3035723 Add support for emitting 64-bit integers
llvm-svn: 22399
2005-07-12 06:57:26 +00:00
Chris Lattner
79e388c0f6 Add some apparently undocumented ELF section header flags
llvm-svn: 22398
2005-07-12 06:40:29 +00:00
Nate Begeman
0a08ce9c07 Clean up and add comments to the newly implemented subtarget code.
llvm-svn: 22396
2005-07-12 03:04:49 +00:00
Nate Begeman
4d96f2769c Clean up the TargetSubtarget class a bit, removing an unnecessary argument
to the constructor.

llvm-svn: 22392
2005-07-12 02:41:19 +00:00
Nate Begeman
626fb671c8 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.

llvm-svn: 22389
2005-07-12 01:41:54 +00:00
Chris Lattner
3efcbfbfc7 The symbol table just needs a const GlobalValue*, not a non-const one.
llvm-svn: 22377
2005-07-11 06:16:24 +00:00
Chris Lattner
e788f4d773 expose a new code emitter object
llvm-svn: 22374
2005-07-11 05:15:32 +00:00
Chris Lattner
fe9d6ce97a add a helper method
llvm-svn: 22373
2005-07-11 04:49:33 +00:00
Chris Lattner
fada9c1e1f add a name mangler object
llvm-svn: 22370
2005-07-11 03:11:10 +00:00
Chris Lattner
6e49696ba6 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.

llvm-svn: 22367
2005-07-10 01:55:33 +00:00
Chris Lattner
a966d80ab8 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.

llvm-svn: 22365
2005-07-10 00:28:25 +00:00
Chris Lattner
c355896290 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.

llvm-svn: 22364
2005-07-10 00:07:11 +00:00
Reid Spencer
04d734c2f6 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.

llvm-svn: 22354
2005-07-08 03:08:58 +00:00
Jeff Cohen
341ba60e2e fix typo
llvm-svn: 22352
2005-07-08 02:48:04 +00:00
Reid Spencer
5534b2d505 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.

llvm-svn: 22349
2005-07-07 23:21:43 +00:00
Reid Spencer
fb7bca6fa6 For PR495:
Change interface to Path class:
readable -> canRead
writable -> canWrite
executable -> canExecute

More (incremental) changes coming to close 495.

llvm-svn: 22345
2005-07-07 18:21:42 +00:00
Chris Lattner
ad1e2361e9 Add support for building/representing the symbol table, add some enum constants
llvm-svn: 22342
2005-07-07 07:00:37 +00:00
Chris Lattner
bf100c8bdb 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.

llvm-svn: 22338
2005-07-05 19:57:53 +00:00
Chris Lattner
83170cd9ba Don't crash on a query where the block is not in any loop. Thanks to
Sameer D. Sahasrabuddhe for pointing this out!

llvm-svn: 22314
2005-06-29 17:41:25 +00:00
Chris Lattner
85b1b5aa24 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 :)

llvm-svn: 22290
2005-06-27 06:28:45 +00:00
Chris Lattner
82cdeff6db add some new file types
llvm-svn: 22286
2005-06-25 03:31:43 +00:00
Chris Lattner
37688fa81f refactor these interfaces a bit
llvm-svn: 22281
2005-06-25 02:47:50 +00:00
Chris Lattner
24bcb4753a improve comments
llvm-svn: 22280
2005-06-24 18:17:33 +00:00
Andrew Lenharth
8ff5960b39 make AliasAnalysis know that VAArg writes memory. This is extremely conservative and should be fixed
llvm-svn: 22267
2005-06-20 15:24:23 +00:00
Andrew Lenharth
ce40ab3077 fix DCE + va_arg problem
llvm-svn: 22264
2005-06-19 14:46:20 +00:00
Andrew Lenharth
108f509fb5 header file changes for varargs
llvm-svn: 22253
2005-06-18 18:31:30 +00:00