1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
Commit Graph

82 Commits

Author SHA1 Message Date
Reid Spencer
4428c3483b For PR950:
This patch removes the SetCC instructions and replaces them with the ICmp
and FCmp instructions. The SetCondInst instruction has been removed and
been replaced with ICmpInst and FCmpInst.

llvm-svn: 32751
2006-12-23 06:05:41 +00:00
Reid Spencer
992d9788b3 For PR950:
The long awaited CAST patch. This introduces 12 new instructions into LLVM
to replace the cast instruction. Corresponding changes throughout LLVM are
provided. This passes llvm-test, llvm/test, and SPEC CPUINT2000 with the
exception of 175.vpr which fails only on a slight floating point output
difference.

llvm-svn: 31931
2006-11-27 01:05:10 +00:00
Reid Spencer
6b01730b52 Minor style fixes from review.
llvm-svn: 31685
2006-11-11 19:59:25 +00:00
Reid Spencer
c08e36fd77 Add a -disable-loop-extraction option to bugpoint.
llvm-svn: 31683
2006-11-11 19:05:02 +00:00
Reid Spencer
4bafa71dc1 For PR786:
Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting
fall out by removing unused variables. Remaining warnings have to do with
unused functions (I didn't want to delete code without review) and unused
variables in generated code. Maintainers should clean up the remaining
issues when they see them. All changes pass DejaGnu tests and Olden.

llvm-svn: 31380
2006-11-02 20:25:50 +00:00
Chris Lattner
064d0ec956 Change DisambiguateGlobalSymbols to not rename asm globals, which breaks
bugpoint on leopard.

llvm-svn: 30150
2006-09-07 18:21:07 +00:00
Reid Spencer
71c3f66dc6 For PR797:
Final removal of exceptions from lib/System and adjustment of users to
accommodate.

llvm-svn: 29846
2006-08-23 20:34:57 +00:00
Chris Lattner
db59f434fd wrap long line
llvm-svn: 28113
2006-05-04 23:35:31 +00:00
Chris Lattner
2c346c9a4b Fix printing of the instructions.
llvm-svn: 24714
2005-12-14 22:01:07 +00:00
Andrew Lenharth
ce9b9b83a8 This solves the problem of the CBE renaming symbols that start with . but the assembly side still trying to reference them by their old names. Should be safe untill we hit a language front end that lets you specify such a name.
llvm-svn: 24626
2005-12-06 20:51:30 +00:00
Jeff Cohen
a38c737e85 When a function takes a variable number of pointer arguments, with a zero
pointer marking the end of the list, the zero *must* be cast to the pointer
type.  An un-cast zero is a 32-bit int, and at least on x86_64, gcc will
not extend the zero to 64 bits, thus allowing the upper 32 bits to be
random junk.

The new END_WITH_NULL macro may be used to annotate a such a function
so that GCC (version 4 or newer) will detect the use of un-casted zero
at compile time.

llvm-svn: 23888
2005-10-23 04:37:20 +00:00
Chris Lattner
239aee9cd3 If the user interrupts bugpoint, don't extract loops
llvm-svn: 22603
2005-08-02 23:25:56 +00:00
Chris Lattner
c7ffb0c713 When the user hits ctrl-c, bugpoint should attempt to stop reduction as
quickly as possible and output what it has so far.  If they hit it twice,
bugpoint is killed.

llvm-svn: 22579
2005-08-02 02:16:17 +00:00
Jeff Cohen
bd51ec7461 Eliminate all remaining tabs and trailing spaces.
llvm-svn: 22523
2005-07-27 06:12:32 +00:00
Chris Lattner
eb6bad32e9 Fix PR576.
Instead of emitting a JIT stub that looks like this:

internal void %l1_main_entry_2E_ce_wrapper(int) {
header:
        %resolver = call sbyte* %getPointerToNamedFunction( sbyte* getelementptr ([20 x sbyte]* %l1_main_entry_2E_ce_name, int 0, int 0) )           ; <sbyte*> [#uses=1]
        %resolverCast = cast sbyte* %resolver to void (int)*            ; <void (int)*> [#uses=1]
        call void %resolverCast( int %0 )
        ret void
}

Emit one that looks like this:

internal void %l1_main_entry_2E_ce_wrapper(int) {
Entry:
	%fpcache = load void (int)** %l1_main_entry_2E_ce.fpcache               ; <void (int)*> [#uses=2]
        %isNull = seteq void (int)* %fpcache, null              ; <bool> [#uses=1]
        br bool %isNull, label %lookupfp, label %usecache

usecache:               ; preds = %lookupfp, %Entry
        %fp = phi void (int)* [ %resolverCast, %lookupfp ], [ %fpcache, %Entry ]            ; <void (int)*> [#uses=1]
        call void %fp( int %0 )
        ret void

lookupfp:               ; preds = %Entry
        %resolver = call sbyte* %getPointerToNamedFunction( sbyte* getelementptr ([20 x sbyte]* %l1_main_entry_2E_ce_name, int 0, int 0) )           ; <sbyte*> [#uses=1]
        %resolverCast = cast sbyte* %resolver to void (int)*            ; <void (int)*> [#uses=2]
        store void (int)* %resolverCast, void (int)** %l1_main_entry_2E_ce.fpcache
        br label %usecache
}


This makes the JIT debugger *MUCH* faster on large programs, as
getPointerToNamedFunction takes time linear with the size of the program, and
before we would call it every time a function in the text module was called from
the safe module (ouch!).

llvm-svn: 22387
2005-07-12 01:00:32 +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
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
Chris Lattner
f30a6e0fbc If loopextract breaks the program provide output so that we can repro the
problem.

llvm-svn: 21790
2005-05-08 21:54:56 +00:00
Jeff Cohen
4d31aeb9df Eliminate tabs and trailing spaces
llvm-svn: 21441
2005-04-22 04:13:13 +00:00
Misha Brukman
960a8d47d7 Remove trailing whitespace
llvm-svn: 21428
2005-04-22 00:00:37 +00:00
Chris Lattner
354330cd68 Replace more a*'s with arg_*'s, thanks to Gabor Greif!
llvm-svn: 20615
2005-03-15 15:48:06 +00:00
Alkis Evlogimenos
a5d7d0a516 Use arg_iterator and arg_begin and arg_end functions.
llvm-svn: 20608
2005-03-15 07:02:26 +00:00
Chris Lattner
a024984017 Fix spelling, patch contributed by Gabor Greif!
llvm-svn: 20343
2005-02-27 06:18:25 +00:00
Chris Lattner
fbef45a056 Improve output precision.
llvm-svn: 19564
2005-01-15 00:07:19 +00:00
Reid Spencer
e2af7fb67b For PR351:
* removeFile() -> sys::Path::destroyFile()
* remove extraneous toString() calls
* convert local variables representing path names from std::string to
  sys::Path
* Use sys::Path objects with FileRemove instead of std::string
* Use sys::Path methods for construction of path names

llvm-svn: 19001
2004-12-16 23:04:20 +00:00
Reid Spencer
b9c443d0a3 For PR351:
* Convert use of getUniqueFilename to sys::Path::makeUnique();

llvm-svn: 18949
2004-12-15 01:53:08 +00:00
Reid Spencer
f89154ee5c LinkModules is now in the Linker class
llvm-svn: 18863
2004-12-13 03:01:03 +00:00
Chris Lattner
b1263d42f8 Fix a bug in the checkin where I adjusted this code to work when
LinkModules nukes the second module argument.

llvm-svn: 17986
2004-11-19 07:09:40 +00:00
Chris Lattner
0b306d9680 Make this code not depend on LinkModules leaving the second argument unmolested.
llvm-svn: 17874
2004-11-16 06:31:38 +00:00
Reid Spencer
7a004d2749 Linker.h has a new home.
llvm-svn: 17801
2004-11-14 23:00:08 +00:00
Reid Spencer
c4abcbefb1 Changes For Bug 352
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.

llvm-svn: 16137
2004-09-01 22:55:40 +00:00
Misha Brukman
b521637a8d * Convert "\n" -> '\n'
* Print out another '\n' after printing out program execution status
* Make sure code wraps at 80 cols

llvm-svn: 15123
2004-07-23 01:30:49 +00:00
Reid Spencer
7f33869f9b bug 122:
- Replace ConstantPointerRef usage with GlobalValue usage

llvm-svn: 14953
2004-07-18 00:44:37 +00:00
Misha Brukman
5b0111dddd Linker.h moved to include/llvm/Support
llvm-svn: 14351
2004-06-23 17:33:09 +00:00
Chris Lattner
387b7a11ce Turn the block extractor on by default now that it basically works, eliminating the option.
llvm-svn: 13502
2004-05-12 19:02:44 +00:00
Chris Lattner
54d077797b Check to see if all blocks are extractible first.
llvm-svn: 13491
2004-05-12 16:08:01 +00:00
Chris Lattner
9bb62d5754 Implement the final missing bits for block extractor support. Now bugpoint
can extract basic blocks up to the limit of the block extractor implementation.

llvm-svn: 13475
2004-05-12 02:43:24 +00:00
Chris Lattner
bc83892156 Implement basic block extraction for the miscompilation debugger. This still needs
two things: the FIXME in ExtractBlocks needs to be implemented, and the basic block
extractor itself needs to have enough bugs fixed for this to be more or less
useful.

Until the time that this is generally useful, it is hidden behind the new bugpoint
-enable-block-extraction option.  I hope to get the FIXME done tonight.

Also of note, this patch adds a -extract-bbs option to bugpoint which can be used
to debug the block extractor.  (hint hint Misha :)

llvm-svn: 13471
2004-05-11 21:54:13 +00:00
Chris Lattner
7902d8fd02 Teach bugpoint to be a little bit smarter and avoid repeating work
llvm-svn: 13132
2004-04-23 20:36:51 +00:00
Misha Brukman
1e9b5281d0 Add a space before result for readability on the command line.
llvm-svn: 13109
2004-04-22 20:02:09 +00:00
Misha Brukman
f8b15005bf Add doxygenified comments to functions.
llvm-svn: 13097
2004-04-21 18:36:43 +00:00
Misha Brukman
85b8b45f7b As per Chris, greatly simplify handling of external functions by using the
wrapper idea uniformly: we can use Value::replaceAllUsesWith() instead of
special-casing by class of user.

llvm-svn: 13063
2004-04-19 03:36:47 +00:00
Misha Brukman
e7ccafce7e Finally implement rewriting global initializers which use external functions
by creating an internal wrapper function with same signature as the external
function, and use it instead of the "real" function.

The wrapper then calls the external function using the same JIT function
resolution API that has been used before for rewriting instructions, since the
wrapper has an explicit call instruction which we can rewrite.

llvm-svn: 13054
2004-04-19 01:12:01 +00:00
Chris Lattner
903a90b9de Disambiguate symbols after loop extraction so that we can diagnose a code
generator bug if multiple loops are extracted from a function.

llvm-svn: 12847
2004-04-11 23:52:35 +00:00
Chris Lattner
ff16e6b701 Fix an obvious bug in the refactoring I did a few days ago
llvm-svn: 12797
2004-04-09 22:28:33 +00:00
Chris Lattner
d2c51f2cc3 Merge the code generator miscompilation code into the optimizer miscompilation
code.  This "instantly" gives us loop-extractor power to assist with the
debugment of our nasty codegen issues.  :)

llvm-svn: 12678
2004-04-05 22:58:16 +00:00
Chris Lattner
5c943cebf1 Refactor and genericize code
llvm-svn: 12675
2004-04-05 21:37:38 +00:00
Chris Lattner
ec5b2f9597 minor formatting change
llvm-svn: 12606
2004-04-02 06:32:45 +00:00
Chris Lattner
950f3fac90 Fix two pretty serious bugs:
1. Each time the loop extractor extracted a loop, we would leak a module.
  2. When we extracted a loop, we didn't add the new function to the list of
     miscompiled functions.  Thus if the bug was in a loop nest and we
     extracted it, we could actually *LOSE THE BUG*, which is very bad.

With these patches, bugpoint has successfully found a bug for me in a function
with several nested loops, and cut it down to just one of them. :) :)

llvm-svn: 12605
2004-04-02 06:32:17 +00:00
Chris Lattner
e45504d887 When loop extraction succeeds, make sure to map the function pointers over
to avoid dangling references.

llvm-svn: 12470
2004-03-17 17:42:09 +00:00