Commit Graph

3983 Commits

Author SHA1 Message Date
Evan Cheng
b9b2b309d3 Back out Owen's 6/9 changes. They broke MultiSource/Benchmarks/Prolangs-C/bison (and perhaps others).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28747 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-11 09:32:57 +00:00
Owen Anderson
f25c19c6b5 Make Loop able to verify that it is in LCSSA-form, and have the LCSSA pass assert
on this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28738 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-09 18:33:30 +00:00
Owen Anderson
a452932171 Update some comments, and expose LCSSAID in preparation for having other passes
require LCSSA.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28734 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-08 20:02:53 +00:00
Reid Spencer
393830a33a For PR804:
Change the file size field of StatusInfo to be uint64_t instead of size_t
so that we know it is always 64 bits. This prevents some overflow on
systems where size_t is 32 bits when it ought to be 64.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28726 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-08 17:00:08 +00:00
Vladimir Prus
dd49dbfe44 New method BasicBlock::getFirstNonPHI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28724 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-08 15:46:18 +00:00
Reid Spencer
32f5553c03 For PR787:
Provide new llvm::sys::Program facilities for converting the stdout and
stdin to binary mode. There is no standard way to do this and the available
mechanisms are platform specific. Adjust the bytecode reader and writer to
use these methods when their input is stdin or output is stdout. THis avoids
the problem with \n writing CRLF to a bytecode file on windows.

Patch Contributed by Michael Smith.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28722 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-07 23:18:34 +00:00
Reid Spencer
af303d53e6 For PR780:
1. Add #includes to LinkAllVMCore.h to get Mangler.o and InlineAsm.o
2. Make Mangler.h and InlineAsm.h use the macros to ensure linkage
3. Make each of the tools with --load options include LinkAllVMCore.h
This should be the last set of changes for this bug and 800.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28719 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-07 23:03:13 +00:00
Chris Lattner
3bdac5171b Add a virtual dtor to the InlineAsm class so that the principle method of
the class can be defined in InlineAsm.cpp


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28718 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-07 22:47:44 +00:00
Reid Spencer
454d85be66 Previous version of this file wasn't supposed to be committed. This version
attempts to get all of libVMCore.a through the least number of declarations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28716 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-07 22:09:38 +00:00
Reid Spencer
4f1bd9e996 For PR780:
1. Fix the macros in IncludeFile.h to put everything in the llvm namespace
2. Replace the previous explicit mechanism in all the .h and .cpp files
   with the macros in IncludeFile.h
This gets us a consistent mechanism throughout LLVM for ensuring linkage.
Next step is to make sure its used in enough places.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28715 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-07 22:00:26 +00:00
Reid Spencer
170da9b058 For PR780:
This change was suggested by Chris so that we can select an alternate
(or even no-op) implementation of the link assurance. I'm committing this
for your review, Chris. If the names and definitions are okay, I'll adjust
all the .h and .cpp files in a later patch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28712 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-07 20:35:46 +00:00
Reid Spencer
6df60a9eff For PR780:
Break the "IncludeFile" mechanism into its own header file and adjust other
files accordingly. Use this facility for the IntrinsicInst problem which
was the subject of PR800.
More to follow on this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28709 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-07 20:00:19 +00:00
Chris Lattner
fc790168a2 Move toolrunner out of libsupport into the bugpoint tool
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28700 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-06 22:31:36 +00:00
Chris Lattner
001db453f5 Add PowerPC intrinsics to support dcbz[l]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28696 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-06 21:29:23 +00:00
Reid Spencer
51ab5c8862 Add the -Xlinker option to bugpoint which allows an option to be passed
through to gcc when its being used as a linker. This allows -L and -l
(and any other) options to be added so that non-complete bytecode files
can be processed with bugpoint. The -Xlinker option can be added as many
times as needed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28692 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-06 00:00:42 +00:00
Reid Spencer
bddcb9427c For PR778:
Move file-scoped documentation to class-scoped so it is more readily
accessible.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28689 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-05 16:29:06 +00:00
Reid Spencer
515b5b379f Make it possible to override the standard version printer. Not all tools
built with CommandLine.h will want the --version option to report that the
tool belongs to LLVM. To override simply pass a void func() to the
cl::SetVersionPrinter() function and that void func() will be called when
it is time to print the version information.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28687 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-05 16:22:56 +00:00
Reid Spencer
cdb08a3691 For PR633:
Add configure checks for setjmp/longjmp for Chris. I can't believe this easy
PR has been outstanding for so long. If I don't get to something, please
remind me! :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28686 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-05 16:11:07 +00:00
Reid Spencer
caf0ecec9e Some enhancements for gv/graphviz/dot/dotty support and better handling of
paths under MingW.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28685 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-05 15:54:38 +00:00
Reid Spencer
ecbd242833 For PR798:
Have configure find the "dotty" program and adjust configuration.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28674 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-02 23:13:18 +00:00
Chris Lattner
191b0ba97e Force anything that #includes llvm/Transforms/Utils/UnifyFunctionExitNodes.h
to link in the implementation.  Thanks to Anton Korobeynikov for figuring out
what was going on here.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28660 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-02 18:40:06 +00:00
Reid Spencer
76c8710697 Remove some flags backed out from earlier attempts at getting MING32W
configuration settled down.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28651 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-02 00:40:35 +00:00
Chris Lattner
080e25d884 Fix -pedantic warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28634 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-01 17:17:46 +00:00
Reid Spencer
484fc8e384 Provide support for detecting if the Win32 imaghlp and psapi libraries
are available. These libraries are used in lib/System and should be
included on the link line or if not available generate an error when
building lib/System.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28628 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-01 16:55:59 +00:00
Reid Spencer
79818a40d7 Favor C++ casts over C casts in C++ code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28622 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-01 07:03:53 +00:00
Reid Spencer
192913e281 Change from using a stub function to a stub variable for passing to the
IncludeFile hack to ensure linkage of analysis passes. This works around
some -pedantic warnings about assigning an object to a function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28621 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-01 07:02:51 +00:00
Chris Lattner
6fb568f77e Fix utostr once and for all, by making there only be one function named
utostr.  To keep the efficiency in the 32-bit case, make it check to see if
the value is 32-bits and if so switch over to the faster 32-bit case.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28601 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-31 21:25:50 +00:00
Andrew Lenharth
9e3264a1ea 4 billion names is enough for anyone. And really fix the build on alpha this time
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28598 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-31 20:40:36 +00:00
Andrew Lenharth
37e8bde141 Fix build breakage on alpha, without causing it on x86. as a bonus, all platforms can invent the same number of unique names now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28596 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-31 20:18:28 +00:00
Andrew Lenharth
f48ec61fbd revert for now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28595 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-31 19:16:26 +00:00
Andrew Lenharth
cffba3a6e9 make 64-bit safe and fix the build on alpha
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28593 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-31 18:56:42 +00:00
Reid Spencer
0b2375edfe Make the getNamedFunction and getNamedGlobal methods be const. They don't
change the module in any way and we should enforce that.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28588 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-31 16:40:28 +00:00
Vladimir Prus
e2e83c9994 Clarify type naming.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28587 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-31 16:03:20 +00:00
Vladimir Prus
ef27d899fd Improve InstVisitor docs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28586 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-31 15:30:18 +00:00
Reid Spencer
461bed2b75 Provide a simpler interface for getting a ConstantArray from a character
string. Instead of specifying the length, just specify whether the user
wants a terminating null or not. The default is "true" to retain the same
behavior as previously provided by this function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28562 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-30 18:15:07 +00:00
Vladimir Prus
e167af3023 Make doc comment visible in doxygen output. Clarify Type construction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28555 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-30 15:49:30 +00:00
Reid Spencer
efcaa42c28 Properly document the second form of ConstArray::get()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28553 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-30 08:26:13 +00:00
Reid Spencer
8949477ae4 Adjust the interface to ConstantArray::get. The previous
implementation always added a null byte to the end of the string. It turns
out that this is not always wanted. By adding a length parameter we preserve
this behavior when length==0 (default value) but also allow other lengths
(not null terminated) to be created.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28552 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-30 08:23:18 +00:00
Andrew Lenharth
632cd52162 Since there was interest on the mailing list, this is a utility pass that
uses DSA to make find targets of calls.  It provides a very convinient
interface to DSA results to do things with indirect calls, such as
write a devirtualizer (which I have and may commit one of these days).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28545 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-29 22:58:38 +00:00
Reid Spencer
3ccc7b4654 Replace an old C-style cast with a C++ cast (squelch warning)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28533 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-29 02:32:43 +00:00
Chris Lattner
c83769ae33 Fix pastos in comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28522 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-27 06:57:55 +00:00
Chris Lattner
f72716d81f Implement a new method: CloneAndPruneFunctionInto, as documented.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28518 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-27 01:21:50 +00:00
Chris Lattner
b5a554ec80 Add an interface to constant fold and instruction given it's opcode, type
and operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28516 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-27 01:17:40 +00:00
Chris Lattner
3258ed6a36 Add a new sentry node type, allowing assertions to catch trivial
use-after-deleted errors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28513 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-27 00:40:15 +00:00
Evan Cheng
8e7d056bc5 Change RET node to include signness information of the return values. e.g.
RET chain, value1, sign1, value2, sign2


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28509 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-26 23:09:09 +00:00
Owen Anderson
11f510b577 Skeletal LCSSA pass. This is currently non-functional. Expect functionality
and documentation updates soo.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28495 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-26 13:58:26 +00:00
Chris Lattner
32cdb6617e Fix breakage on platforms where string/cassert don't pull in int64_t.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28464 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-25 05:59:50 +00:00
Evan Cheng
9657eac240 CALL node change: now containing signness of each argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28460 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-25 00:54:33 +00:00
Reid Spencer
19b7e0e0ca For PR786:
Minor tweaks in public headers and a few .cpp files so that LLVM can build
successfully with -pedantic and projects using LLVM with -pedantic don't
get warnings from LLVM. There's still more -pedantic warnings to fix.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28453 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-24 19:21:13 +00:00
Chris Lattner
d74ea2bbd8 Patches to make the LLVM sources more -pedantic clean. Patch provided
by Anton Korobeynikov!  This is a step towards closing PR786.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28447 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-24 17:04:05 +00:00