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

2911 Commits

Author SHA1 Message Date
Chris Lattner
752c3e7b35 Mark hasConstantValue as a const method
llvm-svn: 22666
2005-08-05 00:49:06 +00:00
Nate Begeman
7547f4085b Add an extra parameter that Chris requested
llvm-svn: 22665
2005-08-04 23:50:43 +00:00
Nate Begeman
ef41400067 Fix a fixme in CondPropagate.cpp by moving a PhiNode optimization into
BasicBlock's removePredecessor routine.  This requires shuffling around
the definition and implementation of hasContantValue from Utils.h,cpp into
Instructions.h,cpp

llvm-svn: 22664
2005-08-04 23:24:19 +00:00
Chris Lattner
b2f675c588 Fix an obvious bug in the Log2 stuff that broke SingleSource/UnitTests/2005-05-12-Int64ToFP
last night.

llvm-svn: 22630
2005-08-03 20:53:19 +00:00
Chris Lattner
42474809e3 Wrap comments to 80 cols, fix code sequence for CountLeadingZeros_64 on
non-ppc GCC 4.0 machines.  Patch by Jim Laskey!

llvm-svn: 22618
2005-08-03 16:53:58 +00:00
Chris Lattner
260411fd9f Fix another bug in the clz patch that caused miscompilations when !gcc4
llvm-svn: 22616
2005-08-03 01:04:40 +00:00
Chris Lattner
420424b477 Fix the non-gcc 4.0 paths for countleadingzeros
Patch fixed by Jim Laskey

llvm-svn: 22598
2005-08-02 20:21:33 +00:00
Chris Lattner
4b86bc6f31 Fix inverted conditionals
llvm-svn: 22597
2005-08-02 20:06:18 +00:00
Chris Lattner
a9994bf67a Fix the non-gcc 4.0 path to compile
llvm-svn: 22593
2005-08-02 19:21:51 +00:00
Chris Lattner
eed3c76305 Consolidate all of the various log2 computing functions into MathExtras.h.
Also, provide accelerated implementations when building with GCC.
Patch contributed by Jim Laskey!

llvm-svn: 22591
2005-08-02 19:15:30 +00:00
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