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

2889 Commits

Author SHA1 Message Date
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
Reid Spencer
58090fdf3d Make sure a variable is initialized before use to clean up a warning from
GCC 4.0.0 in release build.

llvm-svn: 22248
2005-06-18 16:53:27 +00:00
Chris Lattner
96e6d65c22 silence a huge number of bogus warnings with GCC 4 on Reid's tester.
llvm-svn: 22244
2005-06-17 13:20:15 +00:00
Tanya Lattner
e8f3fe8b46 Added ModuloSchedSB as a friend class.
llvm-svn: 22237
2005-06-17 03:59:51 +00:00
Reid Spencer
0628cd9f1b Don't lie to the casual reader about Value subclassing from Annotable.
llvm-svn: 22215
2005-06-15 18:40:45 +00:00
Nate Begeman
68cd6aa245 Add some operators the PowerPC backend needs to efficiently and correctly
generate conditional branches.

llvm-svn: 22214
2005-06-15 18:28:44 +00:00
Chris Lattner
fd4bec23d6 Give the asmparser the ability to parse strings, patch contributed by
Alexander Friedman!

llvm-svn: 22145
2005-05-20 03:25:29 +00:00
Chris Lattner
774a5d8b9a remove deprecated methods
llvm-svn: 22076
2005-05-16 01:49:23 +00:00
Reid Spencer
a9e52c8caf 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).

llvm-svn: 22074
2005-05-15 22:15:11 +00:00
Chris Lattner
ee65cff29c fix warning
llvm-svn: 22060
2005-05-15 17:25:14 +00:00
Chris Lattner
138c960903 fix compiler warning
llvm-svn: 22059
2005-05-15 17:23:19 +00:00
Reid Spencer
ba222e3e99 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.

llvm-svn: 22057
2005-05-15 16:13:11 +00:00
Reid Spencer
9c7bfc232e 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.

llvm-svn: 22033
2005-05-14 20:04:19 +00:00