Chris Lattner
ed4775a3c1
Remove usage of sys/unistd.h
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6788 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-19 18:42:09 +00:00
Chris Lattner
dccb6d017b
Funcresolve no longer performs nicification of resolved functions
...
instcombine does this
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6787 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-19 17:03:51 +00:00
Chris Lattner
936f771e25
Update comments
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6785 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-19 17:03:00 +00:00
Chris Lattner
0e6094122a
The actual nicification of calls is now implemented in instcombine, not in
...
funcresolve
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6784 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-19 17:02:06 +00:00
Chris Lattner
9fe3886678
Implement the functionality of InstCombine/call.ll
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6783 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-19 17:00:31 +00:00
Chris Lattner
a3df1ff807
Remove a bunch of complicated code. The functionality is implemented in instcombine instead
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6782 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-19 16:59:19 +00:00
Chris Lattner
037b568e63
New testcase
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6781 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-18 22:48:11 +00:00
Brian Gaeke
5ce1a585df
tools/llc/llc.cpp: Make "-o -" work.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6780 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-18 21:43:33 +00:00
Brian Gaeke
de3aa4f77f
lib/Target/X86/X86TargetMachine.{cpp,h}: Add initial version
...
(non-working) of llc guts for X86, and add a prototype for it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6779 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-18 21:43:21 +00:00
Chris Lattner
8c6bb90b8e
Diversify examples
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6778 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-18 21:30:51 +00:00
Chris Lattner
b5561ffaf2
fix incorrect anchor
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6777 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-18 21:28:11 +00:00
Brian Gaeke
2e2f2dcd6a
lib/Target/Sparc/Sparc.cpp:
...
Move LowerAllocations, PrintFunction, and SymbolStripping passes, and
the corresponding -disable-strip and -d options, over here to the SPARC
target-specific bits of llc. Rename -d to -dump-asm.
tools/llc/Makefile:
Reindent. Add x86 library so that llc compiles again.
tools/llc/llc.cpp:
Remove support for running arbitrary optimization passes. Use opt instead.
Remove LowerAllocations, PrintFunction, and SymbolStripping passes, as noted
above.
Allow user to select a backend (x86 or SPARC); default to guessing from
the endianness/pointer size of the input bytecode file.
Fix typos.
Delete empty .s file and exit with error status if target does not support
static compilation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6776 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-18 21:14:23 +00:00
Chris Lattner
baed07333f
Move llvm tools to the start of the testrunner path, which allows the llvm 'as'
...
tool to be found in preference to the system 'as' tool.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6775 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-18 19:39:06 +00:00
Chris Lattner
893f025262
Detemplatize the PATypeHandle class, which was only really instantiated on 'Type'.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6774 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-18 19:22:36 +00:00
Chris Lattner
c500cf2fab
Remove extra line
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6773 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-18 19:20:11 +00:00
Chris Lattner
cccc28c674
Reindent code to match the rest of the file
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6772 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-18 18:46:08 +00:00
Chris Lattner
433c3fea6d
Fix breakage due to John's recent changes
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6771 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-18 18:26:22 +00:00
Chris Lattner
a34f440f69
Add new DAE pass to gccld. It does not add cause any regressions in the test-suite
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6770 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-18 16:29:02 +00:00
Chris Lattner
97f4b664cd
Handle arguments passed in through the va_arg area
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6769 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-18 16:25:51 +00:00
Chris Lattner
c8621e6f28
These instructions really take three operands. This fixes some assertions
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6765 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-18 15:09:02 +00:00
Brian Gaeke
b471a23a85
lib/CWriter/Writer.cpp: Copy AsmWriter's ConstantFP checking code here
...
into a new function FPCSafeToPrint(), and use it in printConstant()
and printFunction() to decide whether we should output ConstantFPs as
floating-point constants or as references to stack-allocated variables.
lib/VMCore/AsmWriter.cpp: Fix an apparent typo in the code mentioned above.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6762 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-17 23:55:35 +00:00
Brian Gaeke
4399a4982a
Add #ifdef hack for MAP_ANONYMOUS being spelled MAP_ANON on some platforms.
...
(We're already talking about autoconf'ing this, so I'm assuming this hack
will be short-lived...I just don't want it to get lost in my working files.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6761 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-17 23:14:06 +00:00
Chris Lattner
c0feeb5a0f
Make testcase more interesting, remove absolute path from -load line
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6760 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-17 22:21:55 +00:00
Chris Lattner
08227e4f17
Initial checkin of DAE pass
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6759 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-17 22:21:05 +00:00
Chris Lattner
697a00fbf0
* Add new CallSite::get factory method
...
* add new setCalledFunction method
* FIX arg_end method which was horribly broken!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6758 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-17 22:16:59 +00:00
Chris Lattner
a599f871af
Add new op_erase method
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6757 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-17 22:15:55 +00:00
Chris Lattner
57ec659810
Make sure accessor is properly doxygenized. It wants two lines
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6756 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-17 21:44:51 +00:00
Chris Lattner
95ab3d4bc4
Add accessor
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6755 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-17 21:44:31 +00:00
Chris Lattner
fac0ecabf1
Fix to mesh with Johns recent changes
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6754 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-17 20:55:04 +00:00
Brian Gaeke
5285270871
Use $(PLATFORMLIBDL) to selectively bring in -ldl only on those platforms where
...
it is needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6753 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-17 20:09:18 +00:00
Brian Gaeke
5768ff4850
Add variable named PLATFORMLIBDL to control OS-specific usage of libdl.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6752 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-17 20:08:02 +00:00
Brian Gaeke
1d0acacc63
Use std::isnan instead of isnan. Brought back to you from the
...
future, by the reconciliation of the C++ and C99 standards. Someday.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6751 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-17 19:59:17 +00:00
Brian Gaeke
8c63883f1f
Put ifdefs around use of malloc.h/mallinfo, which isn't available on FreeBSD.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6750 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-17 19:54:00 +00:00
Chris Lattner
ad110d2bb4
Make CallSite's default constructable, copyable, and assignable (explicitly)
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6749 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-17 19:50:28 +00:00
Chris Lattner
f25b7729c1
Life is too short. Link in too much stuff on Linux to make building on sun easier
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6748 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-17 19:14:59 +00:00
Chris Lattner
da601403d9
The never-ending odyssey trying to get sparc to link
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6747 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-17 18:19:52 +00:00
Chris Lattner
d562436355
Make sure to get the value of ARCH before we use it
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6746 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-17 17:53:35 +00:00
Chris Lattner
2bf4c61557
Do not link in the Sparc JIT when building on X86. Eventually the sparc will not
...
link in the X86 JIT either, but this makes testing easier.
For some reason, the sparc JIT was breaking the X86 JIT when it was linked in. :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6745 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-17 15:54:52 +00:00
Chris Lattner
de3209bfdb
Apparently "sparc" is a macro on sparcs. Ugh. :)
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6744 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-17 15:54:02 +00:00
Chris Lattner
7a5500e2f6
Whoops, didn't mean to check that in :(
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6743 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-17 15:46:34 +00:00
Chris Lattner
97ac14f33c
Use more structured command line option processing
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6742 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-17 15:43:13 +00:00
Chris Lattner
7aefa966cd
#ifdef out code that only applies when the HOSTARCH = sparc
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6741 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-17 15:32:38 +00:00
Chris Lattner
388f669d95
Implement handling of constantexprs for disambiguation. This implements
...
BasicAA/featuretest.ll:constexpr_test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6740 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-17 15:25:37 +00:00
Chris Lattner
1ae9143050
Add new testcase
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6739 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-17 15:16:35 +00:00
Chris Lattner
efa095e418
Avoid divide by zero errors
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6738 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-17 15:07:20 +00:00
Chris Lattner
5449955313
Fix misspelling of ExtraSources, hopefully to unbreak the nightly tester
...
Remove evil rcs tag :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6737 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-17 14:30:21 +00:00
Chris Lattner
eaeaad614c
Fix bug: Assembler/2003-06-17-InvokeDisassemble.llx
...
"yes, invoke instructions can have just three arguments"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6736 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-17 13:31:10 +00:00
Chris Lattner
634a28f999
New testcase
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6735 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-17 13:21:13 +00:00
Chris Lattner
a8ab89e3da
Fairly major change: emit fixed sized allocas in the entry block as a variable,
...
instead of a variable pointer and an alloca. All accesses to the variable then
use the address-of operator to access it. This plays better with the internal
GCC code generation phases, which bail early on functions which contain allocas.
It also makes the code a bit easier to read.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6734 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-17 04:39:14 +00:00
Chris Lattner
bea68b3021
Don't corrupt memory when removing an instruction from the program, but
...
not the worklist
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6733 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-17 03:57:18 +00:00