Commit Graph

82 Commits

Author SHA1 Message Date
Chris Lattner
62c720a5bd Targets now configure themselves with the module, not flags
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8133 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-24 19:50:12 +00:00
Chris Lattner
bb43350e32 Add support for modules with "any" pointersize/endianness
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8122 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-24 14:02:14 +00:00
Misha Brukman
5d5bc7b90c Revert change: default architecture is never set, it is guessed from input
bytecode file. This means that LLC on X86 will compile to Sparc assembly given a
64-bit input bytecode file...


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7419 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-30 15:29:55 +00:00
Misha Brukman
fcf2be75ec Initialize the target architecture based on compiler defines, so if compiled on
x86 or Sparc, LLC will automatically default to that platform, no guessing
required. On another platform, it will default to `noarch' and will have to
guess which architecture to compile to.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7207 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-18 22:21:40 +00:00
Misha Brukman
29abc97100 Fixed indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7122 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-07 22:28:42 +00:00
Chris Lattner
5b836c4a06 Minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6799 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-20 15:49:04 +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
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
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
5b4299c26d Remove duplicate pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6631 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-05 20:51:10 +00:00
Chris Lattner
68d9ed8b76 Remove ugly hack (that I put in originally) for building in trace stuff
automatically in LLC


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6358 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-27 21:23:02 +00:00
Chris Lattner
68492725a0 Add a new option to disable stripping of bytecode files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5969 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-28 03:28:56 +00:00
Chris Lattner
10daaa1416 Remove two fields from TargetData which are target specific.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5963 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-26 20:11:09 +00:00
Chris Lattner
bc19466912 Make sure to copy double alignment as well
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5936 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-25 06:06:13 +00:00
Chris Lattner
b5881f126d Kill using declarations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5934 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-25 05:26:11 +00:00
Chris Lattner
2b5f2c1a64 Make sure to add a targetdata instance to the passmanager, and make it match the
one in use by the TargetMachine


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5931 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-25 05:22:29 +00:00
Chris Lattner
c986392c30 Remove support for "target data" pass ctors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5900 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-24 18:36:41 +00:00
Chris Lattner
6ede045533 Rename header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5283 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-14 22:57:15 +00:00
Chris Lattner
c93489bf87 Eliminate direct access to TargetData structure
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5156 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-28 20:00:00 +00:00
Chris Lattner
ab0aa7ff99 * Privatize the TargetName
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4418 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 21:48:33 +00:00
Chris Lattner
6334205cb5 Allow TargetMachine to refuse static code gen
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4415 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 21:12:46 +00:00
Chris Lattner
4aba5e34a1 * Remove explicit strcmp calls
* Rename Sparc.h to TargetMachineImpls.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4406 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 20:45:04 +00:00
Chris Lattner
1751b7ed27 Change LowerAllocations pass to 'require' TargetData instead of it being
passed in.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3930 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-25 23:47:49 +00:00
Chris Lattner
0f82df410c Indent a comment right, add a new one
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3819 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-19 16:06:28 +00:00
Vikram S. Adve
7d0ba02640 Make all registered optimization passes available to llc.
Eliminate duplicate tracing options and use those defined by the trace passes.
Making the tracing step a module pass that runs before any llc-specific
passes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3753 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-16 16:35:34 +00:00
Misha Brukman
655fb5c817 Function.h is unnecessary when Module.h is included.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3716 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-14 03:04:02 +00:00
Chris Lattner
50e3a20b54 Print the tool name when an error comes from so that I can tell which
tool of a pipeline is having issues.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3167 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-30 21:43:22 +00:00
Chris Lattner
d9d8c07eea *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3040 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-23 22:04:43 +00:00
Chris Lattner
5ff62e90d0 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2985 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-22 02:10:13 +00:00
Chris Lattner
c5fbf71d76 Strip the symbols out of the bytecode to inflate generated executables less.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2811 91177308-0d34-0410-b5e6-96231b3b80d8
2002-06-30 16:25:07 +00:00
Anand Shukla
cf17bcc7e7 Changes for 64bit gcc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2799 91177308-0d34-0410-b5e6-96231b3b80d8
2002-06-25 21:57:48 +00:00
Chris Lattner
7e70829632 MEGAPATCH checkin.
For details, See: docs/2002-06-25-MegaPatchInfo.txt


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2779 91177308-0d34-0410-b5e6-96231b3b80d8
2002-06-25 16:13:24 +00:00
Chris Lattner
39fd659d68 Fix tracing code support to link in the tracing routines if neccesary.
This is required because trace code can insert calls to functions that
are (now) in an LLVM library, not a native library.

This change makes it easier to use the tracing code because the native
link options don't have to change, and it fits in a lot better with the
LLVM model.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2675 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-20 21:20:08 +00:00
Chris Lattner
65f1b895bb Merge all include/llvm/Transforms/Scalar/* into a single Scalar.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2538 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-07 20:03:27 +00:00
Chris Lattner
e23476a027 Remove unneccesary pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2421 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-30 20:53:05 +00:00
Chris Lattner
c6f3ae5c66 Eliminate duplicate or unneccesary #include's
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2397 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-29 17:42:12 +00:00
Chris Lattner
f57b845547 * Rename MethodPass class to FunctionPass
- Rename runOnMethod to runOnFunction
* Transform getAnalysisUsageInfo into getAnalysisUsage
  - Method is now const
  - It now takes one AnalysisUsage object to fill in instead of 3 vectors
    to fill in
  - Pass's now specify which other passes they _preserve_ not which ones
    they modify (be conservative!)
  - A pass can specify that it preserves all analyses (because it never
    modifies the underlying program)
* s/Method/Function/g in other random places as well


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2333 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-27 06:56:12 +00:00
Chris Lattner
76d12299b5 Make sure that there is no case where a signal can occur leaving a partially
written output file.  This is important because crashing testcases often write
part of a file out, and the testing harness decides the file is up-to-date next
time the test is run.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2303 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-18 19:55:25 +00:00
Chris Lattner
02d6ef8976 s/PrintMethodPass/PrintFunctionPass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2182 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-08 22:05:01 +00:00
Chris Lattner
2fbfdcffd3 Change references to the Method class to be references to the Function
class.  The Method class is obsolete (renamed) and all references to it
are being converted over to Function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2144 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-07 20:49:59 +00:00
Vikram S. Adve
d32e70a09f Rename pass to DecomposeMultiDimRefs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1960 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-24 03:19:54 +00:00
Chris Lattner
4ddcd54751 * Make all command line arguments static
* Change -trace & -tracem options to use a 3 values enum option
* Change to use new style interface to passes


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1813 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-26 21:36:53 +00:00
Chris Lattner
e41576d141 * Remove -noasm option. If we're not compiling, what's the point?
* convert over to pass based target backend.  Much cleaner now


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1665 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-03 23:43:19 +00:00
Chris Lattner
c889677195 Switch over to a model where we compile each method, emit assembly, then free
machineinstr memory before starting on the next method.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1659 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-03 07:54:10 +00:00
Chris Lattner
cd50d3fafa PassManager is now in its own header file
MethodPass's now cannot be run on external methods


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1609 91177308-0d34-0410-b5e6-96231b3b80d8
2002-01-31 00:46:45 +00:00
Chris Lattner
888912dbe0 In an amazing fit of stupidity, I flipped the conditional and didn't test
it right.  Sheesh :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1550 91177308-0d34-0410-b5e6-96231b3b80d8
2002-01-22 21:07:24 +00:00
Chris Lattner
d7db863c1d Rename LowerAllocations.h to ChangeAllocations.h since it now contains the
RaiseAllocations pass as well.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1525 91177308-0d34-0410-b5e6-96231b3b80d8
2002-01-22 01:04:08 +00:00
Chris Lattner
f4de63f65f Implement a more powerful, simpler, pass system. This pass system can figure
out how to run a collection of passes optimially given their behaviors and
charactaristics.

Convert code to use it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1507 91177308-0d34-0410-b5e6-96231b3b80d8
2002-01-21 07:31:50 +00:00
Chris Lattner
697954c15d Changes to build successfully with GCC 3.02
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1503 91177308-0d34-0410-b5e6-96231b3b80d8
2002-01-20 22:54:45 +00:00
Chris Lattner
cee8f9ae67 Create a new #include "Support/..." directory structure to move things
from "llvm/Support/..." that are not llvm dependant.

Move files and fix #includes


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1400 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-27 00:03:19 +00:00