Commit Graph

7497 Commits

Author SHA1 Message Date
Chris Lattner 5c0b0ba3f8 Add llvm tools to path of LLVMGCC
llvm-svn: 7882
2003-08-15 15:20:52 +00:00
Chris Lattner 2aae234ead Remove extraneous #include
llvm-svn: 7881
2003-08-15 05:21:30 +00:00
Chris Lattner 3b5b633c77 Remove uses of the NonCopyable class, to make the doxygen output look better
llvm-svn: 7880
2003-08-15 05:20:06 +00:00
Chris Lattner 8023f5c1c9 Revert my last (accidental) checkin, but keep the typeo fix
llvm-svn: 7879
2003-08-15 04:56:47 +00:00
Chris Lattner 6ae402fd2c rename selection library to selectiondag
llvm-svn: 7878
2003-08-15 04:56:09 +00:00
Chris Lattner 0605c232b7 rename selection directory and library to SelectionDAG
llvm-svn: 7877
2003-08-15 04:55:22 +00:00
Chris Lattner 4640c6c05e build the new runtime directory
llvm-svn: 7876
2003-08-15 04:53:45 +00:00
Chris Lattner e81de41edf Add a bunch of new node types, etc
llvm-svn: 7875
2003-08-15 04:53:16 +00:00
Chris Lattner a9ed3a52cb Add support for basic blocks, unary/binary unspecs, conditional branches, ...
llvm-svn: 7874
2003-08-15 04:52:51 +00:00
Chris Lattner 3830ba4cd8 Adjust to new API, add expandCall stub
llvm-svn: 7873
2003-08-15 04:51:59 +00:00
Chris Lattner 7235d86507 Add support for unconditional branches and for emitting JE instructions
llvm-svn: 7872
2003-08-15 04:50:49 +00:00
Chris Lattner eb745be508 Ignore dummy register classes
llvm-svn: 7871
2003-08-15 04:36:19 +00:00
Chris Lattner 572c69ea1e Add a bunch of new node types, including a new Void dummy register class
llvm-svn: 7870
2003-08-15 04:35:14 +00:00
Chris Lattner 32dd756809 Add support for nodes with void arguments, like chain nodes
llvm-svn: 7869
2003-08-15 04:28:04 +00:00
Chris Lattner 2e9fc94afc Make sure to create the directory before we cram a .bc file into it
llvm-svn: 7864
2003-08-15 03:02:52 +00:00
Chris Lattner 7aabe391b8 Adjust level, build things in parallel
llvm-svn: 7863
2003-08-15 02:38:18 +00:00
Chris Lattner 43063248aa initial checkin, adjust LEVEL
llvm-svn: 7862
2003-08-15 02:38:06 +00:00
Chris Lattner 002c6a65c5 Initial checkin of README
llvm-svn: 7861
2003-08-15 02:35:13 +00:00
Chris Lattner aea063b30a Initial checkin of runtime/GCCLibraries makefile
llvm-svn: 7860
2003-08-15 02:33:49 +00:00
Chris Lattner d750ca9595 Update readme
llvm-svn: 7859
2003-08-15 02:31:23 +00:00
Chris Lattner 2a6b89bec5 Convert libraries into the BYTECODE_LIBRARY style
llvm-svn: 7858
2003-08-15 02:20:32 +00:00
Chris Lattner bf6efd1c6c Disable this library for now
llvm-svn: 7857
2003-08-15 02:19:43 +00:00
Chris Lattner 18f5a36838 Some of this gets hoisted up to Makefile.common
llvm-svn: 7856
2003-08-15 02:19:08 +00:00
Chris Lattner 0c4f4fe11b Implement BYTECODE_LIBRARY support
llvm-svn: 7855
2003-08-15 02:18:35 +00:00
Misha Brukman a12864b1bd * Must save FP registers when calling CompilationCallback(), because FP
registers are global, are NOT windowed, and hence can be clobbered!
* Removed unused register shorthand notations
* Fixed and cleaned up comments in inline assembly

llvm-svn: 7853
2003-08-15 00:26:50 +00:00
Chris Lattner e58e442e20 Remove extraneous cl:: namespace qualifiers
llvm-svn: 7852
2003-08-14 22:04:41 +00:00
Brian Gaeke ca782d9fe6 Add support for reading command line arguments from an environment variable.
llvm-svn: 7851
2003-08-14 22:00:59 +00:00
Chris Lattner 23991d5d65 Simplifications to Makefile.common, remove support for Purify since it was
broken by libtoolification anyways, and noone can use it because purify doesn't
support the 64-bit sparc compilers even if it weren't broken!

llvm-svn: 7850
2003-08-14 21:10:25 +00:00
Chris Lattner ecc3ec0ca9 Disable this support stuff, it doesn't work under linux anyway
llvm-svn: 7849
2003-08-14 20:55:38 +00:00
Vikram S. Adve 96c81e9fff Improvement to the previous fix: branch following a delay slot of
another delayed instr. would cause the later sanity-check (assertion)
in PhyRegAlloc.cpp to fail, even though there is really no error.

llvm-svn: 7848
2003-08-14 20:45:56 +00:00
Chris Lattner 47be951787 Stop annoying warnings about mismatched types with the argument of a free
implement more constant expressions so that 176.gcc compiles with the CBE

llvm-svn: 7847
2003-08-14 19:19:53 +00:00
Chris Lattner 0064550636 I just moved papi to a new directory
llvm-svn: 7846
2003-08-14 18:59:53 +00:00
Chris Lattner f26be8427d Implement a _REAL_ memory manager for the code generated by the JIT. This
speeds up program execution by 15% pretty consistently for large programs

llvm-svn: 7845
2003-08-14 18:35:27 +00:00
Misha Brukman 71e5ae9349 Using `std::remove' requires `cstdio.h'.
llvm-svn: 7843
2003-08-14 16:05:35 +00:00
Misha Brukman 2b6d3384ce * Enable SPEC testing in the `configure' script command line
* Switched from using `m||' to `m##' because VIM mis-highlights `m||'
* Simplified the regex getting the file version number

llvm-svn: 7842
2003-08-14 15:26:28 +00:00
Misha Brukman 4aab2b25b3 Since we now have TableGen editing modes for VIM and (X)Emacs, we no longer need
to mark TableGen description files with "C++ mode".

llvm-svn: 7841
2003-08-14 15:16:28 +00:00
Chris Lattner bf0c0100f6 Restore 'nice name' to pass
llvm-svn: 7840
2003-08-14 14:43:24 +00:00
Brian Gaeke 8c14ba96ca Factory methods for function passes now return type FunctionPass *.
llvm-svn: 7839
2003-08-14 06:09:32 +00:00
Brian Gaeke 2cc4b9dd2c Add new method to FunctionPassManager to add ImmutablePasses.
llvm-svn: 7838
2003-08-14 06:07:57 +00:00
Brian Gaeke 74db4c7e27 Unbreak SPARC backend: addPassesToJITCompile and
addPassesToEmitMachineCode now both take a FunctionPassManager.

llvm-svn: 7837
2003-08-14 06:04:59 +00:00
Brian Gaeke cbd3a40626 Factory methods for function passes now return type FunctionPass *.
Get rid of RegisterLLC, which can't handle FunctionPasses anyway.

llvm-svn: 7836
2003-08-14 06:04:49 +00:00
Brian Gaeke ec8519d6b6 Unbreak SPARC backend: addPassesToJITCompile and
addPassesToEmitMachineCode now both take a FunctionPassManager.
Factory methods for function passes now return type FunctionPass *.

llvm-svn: 7835
2003-08-14 06:04:29 +00:00
Chris Lattner e7e094467d Dramatically simplify how -time-passes works.
This also enables -time-passes for FunctionPassManagers, which allows it to
be used for the JIT

llvm-svn: 7834
2003-08-14 05:20:28 +00:00
Misha Brukman 0fe23478bf Using std::string requires `#include <string>', says gcc-2.95.3.
llvm-svn: 7833
2003-08-13 22:27:15 +00:00
Chris Lattner cbf0839a03 Fix FIXME by removing FIXME
llvm-svn: 7832
2003-08-13 22:15:04 +00:00
Chris Lattner afa3ec446c This file uses stable_sort
llvm-svn: 7831
2003-08-13 21:32:37 +00:00
Chris Lattner dad4e27046 I must have missed these when eliminating the cast to bool cannonicalizations
llvm-svn: 7829
2003-08-13 20:17:41 +00:00
Chris Lattner 3ac7c26a1c Implement instcombine optimizations:
(A <setcc1> B) logicalop (A <setcc2> B)  -> (A <setcc3> B) or true or false

Where setcc[123] is one of the 6 setcc instructions, and logicalop is one of: And, Or, Xor

llvm-svn: 7828
2003-08-13 20:16:26 +00:00
Chris Lattner faedc5ef79 Add some more tests for: (A <setcc1> B) logicalop (A <setcc2> B)
llvm-svn: 7827
2003-08-13 20:13:15 +00:00
Brian Gaeke ed474bb329 X86 static backend: smacked
Function at a time: smacked

Who you gonna call!!!  :-)

llvm-svn: 7826
2003-08-13 19:02:09 +00:00
Chris Lattner b8b97505ba Generalize some of the add tests to allow for reassociation to take place
llvm-svn: 7825
2003-08-13 19:01:45 +00:00
Chris Lattner 895746a4b7 Add some tests for difficult reassociation cases
llvm-svn: 7824
2003-08-13 19:01:09 +00:00
Brian Gaeke 89207943a1 Factory methods for FunctionPasses now return type FunctionPass *.
llvm-svn: 7823
2003-08-13 18:18:15 +00:00
Brian Gaeke aa58664639 Deconstify parameter to getPointerToFunction().
llvm-svn: 7822
2003-08-13 18:17:54 +00:00
Brian Gaeke 845b5af4d4 addPassesToJITCompile and addPassesToEmitMachineCode now take a
FunctionPassManager, to support function-at-a-time compilation and
 emission of code.

llvm-svn: 7821
2003-08-13 18:17:27 +00:00
Brian Gaeke 2b804a2797 Deconstify parameter to getPointerToFunction().
Use a FunctionPassManager instead of a PassManager.

llvm-svn: 7820
2003-08-13 18:16:50 +00:00
Brian Gaeke 5896956ff0 Deconstify parameter to getPointerToFunction().
Run passes on single function (hey, just-in-time compilation!)
 instead of the entire module that contains it.

llvm-svn: 7819
2003-08-13 18:16:34 +00:00
Brian Gaeke 1678e859b0 In ExecutionEngine::getPointerToGlobal(), throw away const qualifier
on Function * when passing it to getPointerToFunction().

llvm-svn: 7818
2003-08-13 18:16:14 +00:00
Brian Gaeke 02cbe2824c addPassesToJITCompile now takes a FunctionPassManager, to support
function-at-a-time compilation and emission of code.
Separate addPassesToEmitAssembly from addPassesToJITCompile, because
 the latter requires you to use FunctionPasses, and the former might
 diverge anyway.

llvm-svn: 7817
2003-08-13 18:15:52 +00:00
Brian Gaeke 1a6f2b83ab Factory methods for FunctionPasses now return type FunctionPass *.
Correct one of the functions' comments.

llvm-svn: 7816
2003-08-13 18:15:29 +00:00
Brian Gaeke 1600c4a70c Factory methods for FunctionPasses now return type FunctionPass *.
Revert (to v1.55) one of the hunks of Chris's change that messed up the
 %-register workaround.

llvm-svn: 7815
2003-08-13 18:15:15 +00:00
Chris Lattner 8ac196dd3b Assign arguments different ranks so they get grouped together
llvm-svn: 7813
2003-08-13 16:16:26 +00:00
Chris Lattner cea4d8c2f5 Implement constant folding of casts from boolean constants to other values
llvm-svn: 7812
2003-08-13 15:52:25 +00:00
John Criswell 35364c8408 Removing the pool allocator from the main CVS tree.
Use the poolalloc module in CVS from now on.

llvm-svn: 7810
2003-08-13 15:36:15 +00:00
Chris Lattner d07283a2ad Implement InstCombine/2003-08-12-AllocaNonNull.ll
llvm-svn: 7807
2003-08-13 05:38:46 +00:00
Chris Lattner c992add9fe Do not cannonicalize (X != 0) into (cast X to bool)
llvm-svn: 7806
2003-08-13 05:33:12 +00:00
Chris Lattner 9b741f172c Reorganize tests because we no longer cannonicalize X != 0 -> cast X to bool
In fact, we plan to eliminate cast to bool entirely.

llvm-svn: 7805
2003-08-13 05:27:57 +00:00
Chris Lattner bcbac5eaea Update test to represent new cannonicalization rules for multiplies
llvm-svn: 7804
2003-08-13 04:20:06 +00:00
Chris Lattner ede3fe05c5 Change cannonicalization rules: add X,X is represented as multiplies, multiplies
of a power of two are represented as a shift.

llvm-svn: 7803
2003-08-13 04:18:28 +00:00
Chris Lattner ec611ae0d0 Adjust files for move of mapping info stuff into the Sparc directory
llvm-svn: 7802
2003-08-13 02:38:16 +00:00
Chris Lattner bb9be9ddbc Mapping directory no longer exists
llvm-svn: 7801
2003-08-13 02:37:24 +00:00
Chris Lattner 32fdf188e7 Incorporate mapping library into the sparc library
llvm-svn: 7800
2003-08-13 02:28:20 +00:00
Chris Lattner e9643bb118 Obsolete file
llvm-svn: 7799
2003-08-13 02:27:13 +00:00
Brian Gaeke dd306efa11 Just incorporating some notes I wrote for myself into a place where they won't
get lost...

llvm-svn: 7798
2003-08-13 00:30:48 +00:00
Vikram S. Adve 26a1f5fe87 Make MInst2LVSetBI and MInst2LVSetAI be hash_maps instead of maps.
Add some comments and non-const methods to fix constness problems.

llvm-svn: 7797
2003-08-12 23:39:08 +00:00
Vikram S. Adve 7dc5b6707c For instructions in a delay slot of another instruction,
we no longer need to find the live-before set of the delayed
branch since that set is now included the live-before/after
set of the instructions in each delay slot.  Just assert that instead.

llvm-svn: 7796
2003-08-12 22:22:24 +00:00
Vikram S. Adve 869b11b7c4 For an instruction with delay slots, mark all live values before
the instruction as being live before/after the delay slot
instructions as well.

llvm-svn: 7795
2003-08-12 22:19:59 +00:00
Brian Gaeke 709a16a0bc Give std::map<BasicBlock *, BasicBlock *> the short name BBMap, because
it's used 7 different times.
Rename `getBackEdges' to `findAndInstrumentBackEdges', for clarity.
Remove some excess whitespace and commented-out code.
Use shorter forms of CallInst ctors.
Do not make `reopt_threshold' visible to the LLVM program, and do not
 pass it to the call to `reoptimizerInitialize'.  Don't pass the
 GlobalVariable representing it to any of our helper methods.
 `reopt_threshold' is an internal parameter of the reoptimizer, which
 InstLoops does not need to know about.

llvm-svn: 7794
2003-08-12 22:00:24 +00:00
Chris Lattner deaa0dd71a Allow pulling logical operations through shifts.
This implements InstCombine/shift.ll:test14*

llvm-svn: 7793
2003-08-12 21:53:41 +00:00
Chris Lattner 98b3ecddec Fix bug: Reassociate/2003-08-12-InfiniteLoop.ll
llvm-svn: 7792
2003-08-12 21:45:24 +00:00
Chris Lattner 15be830b4f new testcase
llvm-svn: 7791
2003-08-12 21:35:55 +00:00
Chris Lattner e8c98debef Right, instcombine cannot remove ((X >> C) << C) if it's signed.
llvm-svn: 7790
2003-08-12 21:22:51 +00:00
Chris Lattner 699b952403 New testcases
llvm-svn: 7789
2003-08-12 21:20:49 +00:00
Chris Lattner 291675b34d Reenable optimized build
llvm-svn: 7788
2003-08-12 20:46:50 +00:00
Chris Lattner 58c7eb60ec Assign finer grained ranks, make sure to reassociate top-level after reassociating bottom level
llvm-svn: 7787
2003-08-12 20:14:27 +00:00
Chris Lattner 01d5639515 Simplify code
llvm-svn: 7783
2003-08-12 19:17:27 +00:00
Chris Lattner 812aab7727 Implement testcases InstCombine/or.ll:test16/test17
llvm-svn: 7782
2003-08-12 19:11:07 +00:00
Chris Lattner 4d9385c849 New testcases
llvm-svn: 7781
2003-08-12 19:10:50 +00:00
John Criswell 48ecca60e1 Merged in changes between PRE11_ROOT and LLVM_PRE111 (i.e. the beginning of
the pre-release 1.1 branch and pre-release 1.1.1).
Made the USE_SPEC option work.
Silenced unnecessary error output from the cmp command when checking for
updates to lex/yacc generated files.  This fixes a problem where we get error
messages the first time the file is generated.
Fixed the distclean option.  It is now in the Makefile (i.e. only runs in the
top level source directory), removes more files, and plays nicely with
external project Makefiles.

llvm-svn: 7780
2003-08-12 18:51:51 +00:00
Brian Gaeke b7a8388b8c Add FunctionPassManager - it's like a PassManager, but it only deals in
FunctionPasses.

llvm-svn: 7778
2003-08-12 17:22:39 +00:00
Vikram S. Adve d6f22ad8d3 Disable emitting LLVM-to-MI maps, by default.
Add -emitmaps options to turn this back on.

llvm-svn: 7774
2003-08-12 15:51:02 +00:00
Chris Lattner 05e8f9cea0 Testcase for feature we should support eventually
llvm-svn: 7772
2003-08-12 14:58:08 +00:00
Chris Lattner e5b8234685 Fix emission of instructions that directly reference MBBs
llvm-svn: 7771
2003-08-12 05:19:49 +00:00
Chris Lattner 9f09954df9 Make LOC count more accurate by not including the tablegen lexer/parser, any .inc files, which are generated by tablegen, nor .lo files which sometimes get picked up from libtool
llvm-svn: 7770
2003-08-12 05:11:12 +00:00
Chris Lattner 0e3ec2c1bf Add support for the Any type. Minor fixes and enhancements for BasicBlock operands
llvm-svn: 7769
2003-08-12 04:56:42 +00:00
Chris Lattner 58dc2187ac Rename DNVT_bool to DNVT_i1 to be consistent with type system
llvm-svn: 7768
2003-08-12 04:28:21 +00:00
Chris Lattner a8ae6c570f Add support for basicblocks, setCC instructions, and branches
llvm-svn: 7767
2003-08-12 04:17:29 +00:00
Chris Lattner 045049beb9 Add support for a bool argty
llvm-svn: 7766
2003-08-12 04:12:42 +00:00
Vikram S. Adve 029ed09323 Fix va_arg to generate LDDFi for floating point values, instead of LDXi.
All non-FP cases use LDXi as before.

llvm-svn: 7765
2003-08-12 03:04:05 +00:00
Sumant Kowshik 46d9b22e90 Bug fix: Some nodes pointed to by globals may not be marked incomplete and need to be tracked to find pool arguments
llvm-svn: 7763
2003-08-12 00:45:13 +00:00
Sumant Kowshik dca760a431 Minor fix so that the program exits upon a poolfree failure
llvm-svn: 7762
2003-08-12 00:43:23 +00:00
Chris Lattner 4bdec32446 It is not an error if a rule does not match, it's just a failed match!
llvm-svn: 7761
2003-08-11 22:30:51 +00:00
Misha Brukman 46b0345761 Initial checkin of the LLEE, the (LL)VM (E)xecution (E)nvironment.
llvm-svn: 7760
2003-08-11 22:29:36 +00:00
Chris Lattner 7606fa0d41 Add basic support for 16 and 32 bit function arguments!
llvm-svn: 7755
2003-08-11 21:30:00 +00:00
Chris Lattner 6088a0b4cb add frameidx support
Make load work
Make type inference infer from Arg1 to arg0 as well as from arg0 to arg1

llvm-svn: 7754
2003-08-11 21:29:40 +00:00
Chris Lattner e021bceb18 Add support for frameidx and literal immediates for instructions
llvm-svn: 7749
2003-08-11 21:28:59 +00:00
Chris Lattner 03d00fe39a Add support for naming the destination of a "set" in a pattern
llvm-svn: 7748
2003-08-11 20:32:02 +00:00
Chris Lattner bb9dfb0782 Add support for the Arg1 argument type
llvm-svn: 7747
2003-08-11 20:25:52 +00:00
Chris Lattner 1a2e6f7917 Sort #includes, eliminate #include of "llvm/Type.h" which was redundant
llvm-svn: 7746
2003-08-11 20:06:16 +00:00
Chris Lattner 262c832aea Cygwin apparently works with %'s on registers!
llvm-svn: 7745
2003-08-11 20:04:57 +00:00
Brian Gaeke e2fe394f6f If we can't find INT64_MAX, set it to a reasonable default value,
instead of printing out an (incorrect) #error message.

llvm-svn: 7744
2003-08-11 20:04:57 +00:00
Chris Lattner 1ae8eb0021 Whoops, accidental checkin. :(
llvm-svn: 7743
2003-08-11 19:35:46 +00:00
Chris Lattner 9a59f58d90 Add a new -enable-cygwin-compatible-output argument, which make the output more
consumably by the cygwin assembler.  This is really just a nasty hack until we
get real target triple support.

llvm-svn: 7742
2003-08-11 19:35:26 +00:00
Chris Lattner ce200422d4 Add support to the mangler for targets which require _'s on global symbols
llvm-svn: 7741
2003-08-11 19:34:29 +00:00
Misha Brukman b1e7b2dd7e Added keyword `include', and a FIXME for hex and binary constants.
llvm-svn: 7740
2003-08-11 19:14:20 +00:00
Misha Brukman 8efaeb3106 * Added pointers to the README files in emacs/ and vim/ directories.
* Added slashes to distinguish directories and tools from simple scripts.

llvm-svn: 7739
2003-08-11 19:13:12 +00:00
Misha Brukman 7170f65f1f * Added (X)Emacs mode for TableGen description files
* Added README that describes how to use the mode files
* Associated files with .llx extension with llvm-mode

llvm-svn: 7738
2003-08-11 19:10:02 +00:00
Brian Gaeke 12b32533cc Print % signs before register names; turn off "noprefix" mode in gas output.
Fixes test case test/Programs/LLVMSource/2003-08-03-ReservedWordGlobal.ll.

Also: Refactor implicit-uses printing into its own method.
Remove a couple of unused variables.

llvm-svn: 7737
2003-08-11 19:05:46 +00:00
Chris Lattner 264ee89b28 Geez, this misha guy is a _horrible_ speller. :)
llvm-svn: 7736
2003-08-11 18:53:14 +00:00
Misha Brukman efe54beb7a * Added a section describing the hidden gems in llvm/utils
* Converted some tabs to spaces
* Made lines fit within 80 columns

llvm-svn: 7735
2003-08-11 18:45:46 +00:00
Vikram S. Adve 2df6ea2f38 Register argument to va_start must be marked as defined!
llvm-svn: 7734
2003-08-11 18:42:47 +00:00
Misha Brukman 216ed65030 tablegen.vim:
* Added keyword `field'
* Keywords get different highlighting than types
* Added a simple attempt at multi-line C-style comments with FIXME

README:
* Added note about symlinking an entire directory ~/.vim/syntax

llvm-svn: 7733
2003-08-11 18:05:19 +00:00
Chris Lattner 789ddcef4c Add .llx
llvm-svn: 7732
2003-08-11 18:01:39 +00:00
Misha Brukman 61e66baa25 Added a TableGen syntax highlighting mode for VIM and a README that describes
how to add the functionality to the user's VIM installation.

llvm-svn: 7731
2003-08-11 17:56:08 +00:00
Chris Lattner 2923637f63 Add (ret int) expander so that we can at least write testcases
llvm-svn: 7730
2003-08-11 15:48:00 +00:00
Chris Lattner 1d0e9841b9 Don't forget to initializer result field to 0!
llvm-svn: 7729
2003-08-11 15:47:35 +00:00
Misha Brukman 1117639691 Converted tabs to spaces.
llvm-svn: 7728
2003-08-11 15:38:50 +00:00
Misha Brukman 1024b0ef59 Removed `-debug' so that spurious printouts of patterns are not seen at
compilation time.

llvm-svn: 7727
2003-08-11 15:30:20 +00:00
Chris Lattner 5acb68de53 Remove dead code
llvm-svn: 7726
2003-08-11 15:24:02 +00:00
Chris Lattner 7fed97d00a Add patterns for multiply, and, or, and xor
llvm-svn: 7725
2003-08-11 15:23:25 +00:00
Chris Lattner c914a4847b add support for more nodes
llvm-svn: 7724
2003-08-11 15:23:05 +00:00
Misha Brukman 6a8d5b8186 Put printouts of acquired patterns under the DEBUG() guard, fixed spelling.
llvm-svn: 7723
2003-08-11 15:16:12 +00:00
Chris Lattner e5b80dfdf1 Until the pattern matching instruction selector is finished, enable debug output from it
llvm-svn: 7722
2003-08-11 15:11:01 +00:00
Chris Lattner 603e0076c0 Fix handling of 'free' if it has absolutely no prototype
llvm-svn: 7721
2003-08-11 15:05:08 +00:00
Chris Lattner f458b7dd3b Include the new selection library for the X86 target
llvm-svn: 7720
2003-08-11 14:59:53 +00:00
Chris Lattner e61db425e8 Add support for a pattern matching instruction selector. This is still in
the early implementation phases, so it is disabled by default

llvm-svn: 7719
2003-08-11 14:59:22 +00:00
Chris Lattner 2c2062cdba Build the SelectionDAG library
llvm-svn: 7718
2003-08-11 14:57:48 +00:00
Chris Lattner 600d308853 Initial checkin of SelectionDAG implementation. This is still rough and
unfinished

llvm-svn: 7717
2003-08-11 14:57:33 +00:00
Chris Lattner 963e822148 Initial checkin of SelectionDAG header file
llvm-svn: 7716
2003-08-11 14:56:26 +00:00
Chris Lattner 254980008b Add full support for code generating expanders!
This includes support for referencing named arguments.

llvm-svn: 7715
2003-08-10 23:51:52 +00:00
Chris Lattner 1bce0f268b Implement autopromotion of leaf trees from arguments to nodes of their own,
making it easier to write patterns without lots of extraneous parens

llvm-svn: 7714
2003-08-10 22:38:36 +00:00
Chris Lattner 3859c9a8db Implement correct parsing, representation, and printing of DAG argument names
Implements testcase TableGen/TreeNames.td

llvm-svn: 7713
2003-08-10 22:14:13 +00:00
Chris Lattner 4eaf72fc3b Recognize $foo as a variable
llvm-svn: 7712
2003-08-10 22:04:25 +00:00
Chris Lattner ba2cf32f00 New testcase
llvm-svn: 7711
2003-08-10 22:02:44 +00:00
Chris Lattner 5223d51aac Implement real code emission, at least for Instruction patterns,
next up: support for expanders

llvm-svn: 7710
2003-08-10 21:54:43 +00:00
Chris Lattner 0e00f36924 First cut at emitting the reducer. This reducer just prints out the patterns
selected, but it seems to work great!

llvm-svn: 7709
2003-08-10 20:34:13 +00:00
Chris Lattner 3e2e0fb7ee Make imm be a leaf instead of a nonterminal
llvm-svn: 7708
2003-08-10 19:51:16 +00:00
Chris Lattner d2ec0bd8f0 Finish the matcher!
llvm-svn: 7707
2003-08-10 19:50:51 +00:00
Chris Lattner 12a19fda99 Add new function
llvm-svn: 7706
2003-08-10 19:50:32 +00:00
John Criswell 8aba798388 Removed information on the Pool Allocator as it is no longer available.
Fixed a spelling error.

llvm-svn: 7705
2003-08-08 22:46:30 +00:00
John Criswell 6274b71eb2 Added a FAQ about how to clean the directory if it fails to build after an
update.

llvm-svn: 7704
2003-08-08 22:43:39 +00:00
John Criswell 4135b21377 Updated for the 1.1 pre-release.
Attempted to explain how OBJ_ROOT=. and OBJ_ROOT=`pwd` are not the same thing.

llvm-svn: 7703
2003-08-08 22:36:30 +00:00
Chris Lattner 575288e02d This implements a large amount of the matcher, in fact, all of it except for one bug
llvm-svn: 7702
2003-08-08 22:29:23 +00:00
Chris Lattner 1ac45ba538 Emit the first half of the instruction selector.
llvm-svn: 7701
2003-08-08 16:30:10 +00:00
Misha Brukman 3f0385d424 Chomped spurious blank lines.
llvm-svn: 7700
2003-08-08 15:37:35 +00:00
Chris Lattner 4d8ba42bc4 Finish implementation of nonterminal instantiation.
Tree patterns are now, finally, ready to use!

llvm-svn: 7699
2003-08-07 23:16:20 +00:00
Chris Lattner fe64759b2c Add new method to get a value type as a string
llvm-svn: 7698
2003-08-07 23:15:21 +00:00
Chris Lattner 245b525551 * Fix <>'s in code to be &lt;&gt;'s
* Add section describing how we prefer #includes to be ordered

llvm-svn: 7697
2003-08-07 21:45:47 +00:00
Misha Brukman 1b7a238f3f File-related functions moved to FileUtilities.h .
llvm-svn: 7696
2003-08-07 21:42:28 +00:00
Misha Brukman c231c0889e close() requires "unistd.h" .
llvm-svn: 7695
2003-08-07 21:35:41 +00:00
Misha Brukman e4d58ec261 Doxygen-ify the comments by using '///' instead of '//'.
llvm-svn: 7694
2003-08-07 21:34:25 +00:00
Misha Brukman b02e413f65 Remove references to `bugpoint' from the now-generic system utilities.
llvm-svn: 7693
2003-08-07 21:33:33 +00:00
Chris Lattner b8f72991a6 Completely remove mention of the correlated branch elimination pass. It has
bugs and needs to be reworked anyway.

llvm-svn: 7692
2003-08-07 21:30:12 +00:00
Misha Brukman 3581f8542d Moved removeFile() and getUniqueFilename() into FileUtilities.
llvm-svn: 7691
2003-08-07 21:28:50 +00:00
Misha Brukman 250bf3674c * The possessive third-person singular has no apostrophe (its)
* Grouped header files to fit with the LLVM standard
* Fit code into 80 columns

llvm-svn: 7690
2003-08-07 21:23:52 +00:00
Misha Brukman 0c2305b110 Re-grouped and alphabetized headers for easier reading and cleaner style.
llvm-svn: 7689
2003-08-07 21:19:30 +00:00
Misha Brukman 83d52f3c36 Fixed path for SystemUtils.h and a few code cleanups.
llvm-svn: 7688
2003-08-07 21:05:13 +00:00
Misha Brukman e722e4ea49 Moved SystemUtils.h to include/Support and SystemUtils.cpp to lib/Support.
llvm-svn: 7687
2003-08-07 21:04:42 +00:00
Chris Lattner 19630d41f8 Implement type-inference/checking for non-terminal references
llvm-svn: 7686
2003-08-07 21:02:56 +00:00
Chris Lattner acf3dbe0c5 Rename all of the "Process" methods to be "read" methods, start the Instantiate method
llvm-svn: 7685
2003-08-07 20:42:23 +00:00
Chris Lattner ca89a11494 Add support for "cast" nodes, which are required when there is not enough information
to infer type type of all nodes, e.g. (ret imm)

llvm-svn: 7684
2003-08-07 19:59:42 +00:00
Chris Lattner bd1ffb4ea1 Use the new version of isSubClassOf
llvm-svn: 7683
2003-08-07 19:42:14 +00:00
Chris Lattner c6793425e3 Add and use a new method
llvm-svn: 7682
2003-08-07 19:41:59 +00:00
Chris Lattner 9b759739ef Cleanup and reorganize code, no functional changes
llvm-svn: 7679
2003-08-07 19:28:55 +00:00
Chris Lattner b6629063ec Read in expanders too
llvm-svn: 7678
2003-08-07 19:21:10 +00:00
Chris Lattner a63e04482f Continued evolution of the selector emitter: Represent instruction patterns
as first class objects

llvm-svn: 7677
2003-08-07 19:12:24 +00:00
Misha Brukman 1fe74d144b Implement LLVM intrinsics `llvm.setjmp' and `llvm.longjmp' as follows:
* setjmp() simply returns 0
* longjmp() simply calls abort()

llvm-svn: 7676
2003-08-07 15:43:46 +00:00
Vikram S. Adve da92f366c7 Fix assertion in MachineInstr::substituteValue().
llvm-svn: 7675
2003-08-07 15:01:48 +00:00
Vikram S. Adve 6e4a358f72 Fix sanity-checking in 'maskUnsigned' code to be more precise:
use or def-and-use operands can be substituted after one def-only
operand has been substituted.

llvm-svn: 7674
2003-08-07 15:01:26 +00:00
John Criswell 449670a8f7 Fixed a segfault in gccld.
The original code does not work because the value from WorkList.end() is
invalidated once WorkList.erase() is called.  To ensure proper functionality,
we must ensure that WorkList.erase() is always called before WorkList.end().

llvm-svn: 7673
2003-08-07 14:43:13 +00:00
Chris Lattner eaa5b964bb Update tablegen interfaces
llvm-svn: 7672
2003-08-07 13:52:22 +00:00
Chris Lattner ccb9f8ed54 Finish implementation of the type inference engine.
Start working on reading in nonterminals

llvm-svn: 7671
2003-08-07 06:02:15 +00:00
Chris Lattner da2e1dcc2b Allow clients to get at the pointer type
llvm-svn: 7670
2003-08-07 06:01:44 +00:00
Chris Lattner 32809aad34 Add new method getVAlueAsDag
llvm-svn: 7669
2003-08-07 06:00:43 +00:00
Chris Lattner c01182c716 Initial checkin of tree pattern parser and type inference engine (which still needs work).
llvm-svn: 7668
2003-08-07 05:40:14 +00:00
Chris Lattner 40842f4c8b Eliminate now-dead method
llvm-svn: 7667
2003-08-07 05:39:37 +00:00
Chris Lattner 377f096678 Start using the CodeGeneratorWrappers
llvm-svn: 7666
2003-08-07 05:39:09 +00:00
Chris Lattner 9f993091ea Initial checkin of useful wrappers around the Target classes, for now, only ValueType and
Target are wrapped

llvm-svn: 7665
2003-08-07 05:38:11 +00:00
Sumant Kowshik 43ecb4829d Removed the support for pool allocation testing. This will be in a separate TEST file
llvm-svn: 7664
2003-08-07 05:36:53 +00:00
Sumant Kowshik db64829787 Change implementation so that variable sized slabs are used to allow arbitrary sized array allocations
llvm-svn: 7663
2003-08-07 05:31:04 +00:00
Sumant Kowshik 0b83080595 Added code for pool allocating only the pool-allocatable data structures in the presence of collapsed nodes + a couple of bug fixes
llvm-svn: 7662
2003-08-07 05:29:28 +00:00
Chris Lattner 8706805dae This register is never used, disable it.
llvm-svn: 7661
2003-08-07 04:49:16 +00:00
Sumant Kowshik b2d3c8e805 Added a flag which is set when all data structures are not pool allocated
llvm-svn: 7660
2003-08-07 04:37:52 +00:00
Chris Lattner 74bc5c7147 There was no reason for these to be bit-fields, they just need to be unique.
Also, add an isVoid item

llvm-svn: 7659
2003-08-07 00:17:00 +00:00
Misha Brukman b611692487 Changing command-line option formats to be more consistent with LLVM style.
llvm-svn: 7658
2003-08-06 23:25:25 +00:00
Misha Brukman 8f18938d1c * Renamed option from `nopreselect' to `nopreopt' since it disables more than
just PreSelection
* Wrapped code at 80 columns
* Added the DecomposeMultiDimRefs Pass to the JIT compilation path

llvm-svn: 7657
2003-08-06 23:06:21 +00:00
Chris Lattner e76a2e790d Ick, add the RIGHT accessor
llvm-svn: 7656
2003-08-06 23:01:18 +00:00
Chris Lattner 116ad79efd Add accessor
llvm-svn: 7655
2003-08-06 23:00:31 +00:00
Chris Lattner 4438d571f2 There is something wrong with code that looks like:
if (R == 0 || ...)
  R->getName()

llvm-svn: 7654
2003-08-06 22:29:04 +00:00
Misha Brukman 79226d066e Use the registers g1 and g5 as temporaries for making far jumps and far calls,
because saving i1 and i2 to their ``designated'' stack slots corrupts unknown
memory in other functions, standard libraries, and worse.

In addition, this has the benefit of improving JIT performance because we
eliminate writing out 4 instructions in CompilationCallback() and 2 loads and 2
stores.

llvm-svn: 7653
2003-08-06 22:19:18 +00:00
John Criswell fa30f1be46 Removed Makefile.common.
Since we are including Makefile.test, we automatically get Makefile.common.
Furthermore, the double inclusion of Makefile.common causes the test suite to
be executed twice per invocation of the top level make.

llvm-svn: 7652
2003-08-06 21:50:36 +00:00
Chris Lattner 48b78c8bf3 Export the register classes so that the instruction selector can get at them as needed
llvm-svn: 7651
2003-08-06 21:47:14 +00:00
Brian Gaeke 360855a017 Makefile.common: Remove commented-out and duplicate rules.
llvm-svn: 7650
2003-08-06 21:44:22 +00:00
Chris Lattner 4159fdaef2 Add a bunch of new Alpha Intrinsics for Rahul Joshi
llvm-svn: 7646
2003-08-06 20:08:25 +00:00
Vikram S. Adve 792b48f4d1 1. Bug fix: was using SLL instead of SLLX for ULongTy. Chump.
2. Handle fp-to-uint conversions directly here instead of relying on
   a pre-transformation to replace them with the 2-step conversion.
3. Use size rather than explicitly checking types when deciding what
   opcodes to use, wherever possible.  This is less error prone (the
   bug fix above was not the first time!).
4. Float-to-pointer casts shd now work though this hasn't been tested.

llvm-svn: 7645
2003-08-06 18:48:40 +00:00
Vikram S. Adve 26125cbeb5 Remove conversion of fp-to-uint cast into a multi-step cast:
this is not an optional transformation on SPARC and is now handled
directly by instruction selection.

llvm-svn: 7644
2003-08-06 18:42:49 +00:00
Chris Lattner 39a2b3aa08 New testcase
llvm-svn: 7643
2003-08-06 18:26:19 +00:00
Chris Lattner 584058220a The HAVE_JUMP code is dead, these intrinsics should _never_ be expanded
llvm-svn: 7642
2003-08-06 18:04:40 +00:00
Chris Lattner c592c9f8a3 Remove unnecessary use of NonCopyable
llvm-svn: 7641
2003-08-06 17:16:24 +00:00
Misha Brukman 31b31d94d9 Added asserts to prevent negative shift amounts from being generated.
llvm-svn: 7640
2003-08-06 16:28:49 +00:00
Misha Brukman 4510698acb SparcV9CodeEmitter.cpp:
* Doxygen-ified comments
* Added capability to make far calls (i.e., beyond 30 bits in CALL instr)
  which implies that we need to delete function references that were added by
  the call to addFunctionReference() because the actual call instruction is 10
  instructions away (thanks to 64-bit address construction)
* Cleaned up code that generates far jumps by using an array+loop

SparcV9CodeEmitter.h:
* Explained more of the side-effects of emitFarCall()

llvm-svn: 7639
2003-08-06 16:20:22 +00:00
Chris Lattner bade93cde8 Sort the file lists
llvm-svn: 7638
2003-08-06 16:02:50 +00:00
Chris Lattner a0de5c8f21 Loop unroller doesn't necessarily need to be profile driven
llvm-svn: 7637
2003-08-06 15:40:37 +00:00
Chris Lattner fb2054c40b Completely eliminate the isVoid TSFlag, shifting over all other fields
llvm-svn: 7636
2003-08-06 15:32:20 +00:00
Chris Lattner 19d25b3c41 add a pattern for RET, immediates no longer need to be explicitly typed
llvm-svn: 7635
2003-08-06 15:31:35 +00:00
Chris Lattner 0c4dd1ea09 Start adding usefulness to the DAG node definitions, add a new Expander
class

llvm-svn: 7634
2003-08-06 15:31:02 +00:00
Chris Lattner f0f55a9b28 Add error checking code to the node type parser. Start the instruction pattern
reader

llvm-svn: 7632
2003-08-06 06:16:35 +00:00
Chris Lattner b5035a4ec9 Initial support for an instruction selector emitter
llvm-svn: 7631
2003-08-06 05:42:05 +00:00
Chris Lattner 236ced1487 All good classes with virtual functions should have virtual dtors...
llvm-svn: 7630
2003-08-06 05:39:03 +00:00
Chris Lattner bb43caeb95 Add an instruction selector emitter skeleton
llvm-svn: 7629
2003-08-06 04:47:56 +00:00
Chris Lattner 36498143ba convert over to using TableGen backends
llvm-svn: 7628
2003-08-06 04:36:35 +00:00
Chris Lattner 7179feb5e2 Switch code over to being a TableGenBackend
llvm-svn: 7627
2003-08-06 04:32:07 +00:00
Chris Lattner 4708d5ce31 Add more helper methods
llvm-svn: 7626
2003-08-06 04:31:26 +00:00
Chris Lattner 5f2e204a46 New common interface for backends to use
llvm-svn: 7625
2003-08-06 04:23:04 +00:00
Sumant Kowshik 5ca0380a65 Added POOLFLAGS option to run pool allocation
llvm-svn: 7624
2003-08-06 01:03:28 +00:00
Chris Lattner 9994870cb3 "fix" coding style stuff
Change some <>'s into &lt;&gt;'s

llvm-svn: 7623
2003-08-05 22:54:23 +00:00
Chris Lattner 385a6b2589 Completely eliminate the per-machine-instruction regsUsed set.
This substantially shrinks the size of each machine instruction, which should
make allocation faster and the cache footprint of the machine code lighter.

Here are some timings for code generation of the larger benchmarks we have.
This are timings of code generation phases of the X86 JIT, when compiled in
debug mode:

		Before	After	Diff
164.gzip:
  InstSel	0.0878	0.0722	-21.6%
  RegAlloc	0.2031	0.1757	-15.6%
  TOTAL		0.5585	0.4999	-11.7%
Ptrdist-bc:
  InstSel	0.0878	0.0722	-21.6%
  RegAlloc	0.2070	0.1933	- 7.1%
  TOTAL		0.6972	0.6464	- 7.9%
197.parser:
  InstSel	0.2148	0.2148	- 0.0%
  RegAlloc	0.4941	0.4277	-15.5%
  TOTAL		1.3749	1.2851	- 7.0%
175.vpr:
  InstSel	0.2519	0.2109	-19.4%
  RegAlloc	0.5976	0.5663	- 5.5%
  TOTAL		1.6933	1.6347	- 3.5%
254.gap:
  InstSel	1.1328	0.9921	-14.2%
  RegAlloc	2.6933	2.4804	- 8.6%
  TOTAL		7.7871	7.2499	- 7.4%

llvm-svn: 7622
2003-08-05 22:39:13 +00:00
Chris Lattner 30e987470f Use a new local data structure instead of the MachineInstr::regsUsed set
llvm-svn: 7621
2003-08-05 22:11:13 +00:00
Chris Lattner 92f5fb598c Add a map
llvm-svn: 7620
2003-08-05 22:09:31 +00:00
Chris Lattner e62a2a76e5 Minor cleanups
llvm-svn: 7619
2003-08-05 22:03:27 +00:00
Chris Lattner b05d3508d6 Physical registers no longer live in the regsUsed set for each machine instr
llvm-svn: 7618
2003-08-05 21:55:58 +00:00
Chris Lattner 020b544cbc Do not insert physical regsiters into the regsUsed set
llvm-svn: 7617
2003-08-05 21:55:20 +00:00
John Criswell 1943f88a79 Reverted back to using OR for cmp/mv operations for lex/yacc output.
The shell AND/OR operators short-circuit on command success/failure, which is
the inverse of exit status (i.e. 0 means success, non-zero means failure).

llvm-svn: 7616
2003-08-05 21:38:28 +00:00
John Criswell 4d79702a4c Switched from using diff to cmp for two reasons:
o Not all versions of diff have the -q option
	o The cmp program is probably faster than diff
Fixed the logic that only copies the file over if no differences are found.

llvm-svn: 7615
2003-08-05 21:21:58 +00:00
Tanya Lattner dc3c9a8545 Fixed minor bug in SafeToHoist and made some changes suggested by Chris.
llvm-svn: 7614
2003-08-05 20:39:02 +00:00
Tanya Lattner b96c7a6985 Added LICM test cases to:
1) Check that trapping instructionns that are not guaranteed to execute are not hoisted.
2) Check that trapping instructions that are guaranteed to execute are hoisted.

llvm-svn: 7613
2003-08-05 18:52:42 +00:00
Tanya Lattner 57c03df032 Fixed LICM bug that hoists trapping instructions that are not guaranteed to execute.
llvm-svn: 7612
2003-08-05 18:45:46 +00:00
Chris Lattner adc5a89a3b Minor changes:
* Expand most tabs into spaces
  * Move #define DEBUG_TYPE to top of file to avoid warning

llvm-svn: 7611
2003-08-05 18:44:12 +00:00
Chris Lattner 61182a2021 Add more verbose comment
llvm-svn: 7610
2003-08-05 18:38:37 +00:00
Chris Lattner 44309a112f Add a comment to the method decl
llvm-svn: 7609
2003-08-05 18:38:16 +00:00
Chris Lattner 3df51d517c Remove unused method
llvm-svn: 7608
2003-08-05 17:09:08 +00:00
Sumant Kowshik 766e284526 Added declaration of mergeInGlobalsGraph
llvm-svn: 7607
2003-08-05 17:06:18 +00:00
Sumant Kowshik 1d869b78f5 Added function mergeInGlobalsGraph which merges in the entire globals graph with the graph of a function
llvm-svn: 7606
2003-08-05 17:04:41 +00:00
Sumant Kowshik 0383a65103 Major bug fixes including a memory leak and tracking some exceptional conditions. Also added support for including global and indirect call information in the DS graphs used by the pool allocation
llvm-svn: 7605
2003-08-05 17:01:54 +00:00
Chris Lattner ee937c80ed Specify DEBUG_TYPE's for the JIT debug messages
llvm-svn: 7604
2003-08-05 17:00:32 +00:00
Chris Lattner 21343336d6 This method has now been changed to preserve flags for us!
llvm-svn: 7603
2003-08-05 16:59:24 +00:00
Chris Lattner cd4f4320b0 All callers of these methods actually wanted them to preserve the flags,
so get rid of the def/use parameters that were getting passed in.

**** This now changes the semantics of these methods to preserve the flags,
     not clobber them!

llvm-svn: 7602
2003-08-05 16:58:46 +00:00
Sumant Kowshik e815b78deb Added the declaration of InlineIndirectCalls
llvm-svn: 7601
2003-08-05 16:56:59 +00:00
Chris Lattner 1d6ba3e359 Factor shared code
llvm-svn: 7600
2003-08-05 16:34:44 +00:00
Chris Lattner edc8c54e16 Fix bug: SimplifyCFG/2003-08-05-InvokeCrash.ll
Fix bug: SimplifyCFG/2003-08-05-MishandleInvoke.ll

llvm-svn: 7599
2003-08-05 16:27:44 +00:00