Commit Graph

6852 Commits

Author SHA1 Message Date
Misha Brukman b402819ddf * Added support for the %ccr register
* FP double registers are now coded correctly
* Removed function which converted registers based on register types, it was
  broken (because regTypes are broken)

llvm-svn: 7175
2003-07-14 23:26:03 +00:00
Misha Brukman 7b14a19965 The word `separate' only has one `e'.
llvm-svn: 7174
2003-07-14 17:26:34 +00:00
Misha Brukman 7fdaab4f68 The word `separate' only has one `e'.
llvm-svn: 7173
2003-07-14 17:20:40 +00:00
Misha Brukman c8ccfe90af Fixed: </pre</p> => </pre></p>
llvm-svn: 7172
2003-07-14 17:05:20 +00:00
John Criswell ae648fa032 Merged in changes from PRE101 in the prerelease branch.
Specifically, this updates libtool to version 1.5 and adds the following:
	- Added the -only-static option that we added in our previous libtool.
	- Modified the autoconf macros so that libtool uses the -G option when
	  linking on Solaris.  This allows libraries with global variables with
	  constructors to automatically run those constructors when the
	  library is dlopened().

llvm-svn: 7171
2003-07-14 16:52:07 +00:00
Vikram S. Adve 6fa4b79587 Use uint32_t for table index and size: table will never be > 4GB.
Also, make Pointer type depend on architecture.

llvm-svn: 7170
2003-07-11 22:02:28 +00:00
Vikram S. Adve ac83df769b Trace loads and stores as they happen (stores were being
remembered in valuesStoredInFunction, but never traced at function return,
and that's too late to be finding the error anyway).
Stores trace both the value and the address being stored to,
but after some experience I think only values should be traced.
The pointer hash table just fills up far too quickly if every
store address were traced.

llvm-svn: 7169
2003-07-11 21:57:43 +00:00
Brian Gaeke b99d684839 If we have a constant pointer reference to a function, we were printing
out the entire llvm disassembly for the function at global constant-output
time, which caused the assembler to barf in 164.gzip. This fixes that
particular problem (though 164.gzip has other problems with X86 llc.)

llvm-svn: 7168
2003-07-11 21:57:01 +00:00
Brian Gaeke 5b04987a4c Fix some serious floating-point bugs (fixes test cases such as Oscar,
Fhourstones, McCat-vor, and many others...)

Printer.cpp: Print implicit uses for AddRegFrm instructions.  Break gas
bug workarounds up into separate stanzas of code for each bug.  Add new
workarounds for fild and fistp.

X86InstrInfo.def: Add O_ST0 implicit uses for more FP instrs where they
obviously apply. Also add PrintImplUses flags for FP instrs where they
are necessary for gas to understand the output.

llvm-svn: 7165
2003-07-11 18:18:35 +00:00
Anand Shukla b3d794a2c9 Added functionality to instrmentation pass
llvm-svn: 7161
2003-07-10 21:55:57 +00:00
Misha Brukman 5258e59908 Fixed grammatical error.
llvm-svn: 7160
2003-07-10 21:38:28 +00:00
Vikram S. Adve 4f420ce3a3 Several important bug fixes:
(1) Cannot use ANDN(ot), ORN, and XORN for boolean ops, only bitwise ops.

(2) Conditional move instructions must distinguish signed and unsigned
    condition codes, e.g., MOVLE vs. MOVLEU.

(3) Conditional-move-on-register was using the cond-move-on-cc opcodes,
    which produces a valid-looking instruction with bogus registers!

(4) Here's a really cute one: dividing-by-2^k for negative numbers needs to
    add 2^k-1 before shifting, not add 1 after shifting.  Sadly, these
    are the same when k=0 so our poor test case worked fine.

(5) Casting between signed and unsigned values was not correct:
    completely reimplemented.

(6) Zero-extension on unsigned values was bogus: I was only doing the
    SRL and not the SLLX before it.  Don't know WHAT I was thinking!

(7) And the most important class of changes: Sign-extensions on signed values.
    Signed values are not sign-extended after ordinary operations,
    so they must be sign-extended before the following cases:
	-- passing to an external or unknown function
	-- returning from a function
	-- using as operand 2 of DIV or REM
	-- using as either operand of condition-code setting operation
           (currently only SUBCC), with smaller than 32-bit operands


Also, a couple of improvements:

(1) Fold cast-to-bool into Not(bool).  Need to do this for And, Or, XOR also.

(2) Convert SetCC-Const into a conditional-move-on-register (case 41)
    if the constant is 0.  This was only being done for branch-on-SetCC-Const
    when the branch is folded with the SetCC-Const.

llvm-svn: 7159
2003-07-10 20:07:54 +00:00
Vikram S. Adve 8ea738a9ff Bug fix in creating constants: need 1U << 31, not 1 << 31.
llvm-svn: 7158
2003-07-10 19:48:19 +00:00
Vikram S. Adve 2f90c823a2 Fold cast-to-bool into not. Later, this should also be folded into other
boolean operations: AND, OR, XOR.

llvm-svn: 7157
2003-07-10 19:47:42 +00:00
Vikram S. Adve e2e50f2880 Values stored in CallArgsDescriptor cannot be const.
llvm-svn: 7156
2003-07-10 19:46:15 +00:00
Vikram S. Adve abf331db03 isMarkedForSpill() should be const.
llvm-svn: 7155
2003-07-10 19:45:28 +00:00
Vikram S. Adve 689adb19b0 Change interface to MachineInstr::substituteValue to specify more precisely
which args can be substituted: defsOnly, defsAndUses or usesOnly.

llvm-svn: 7154
2003-07-10 19:45:07 +00:00
Vikram S. Adve 39587d6264 Print out all neighbors in interference graph, not just higher-numbered ones.
llvm-svn: 7153
2003-07-10 19:43:33 +00:00
Vikram S. Adve 5224b19deb Several fixes to handling of int CC register:
(1) An int CC live range must be spilled if there are any interferences,
    even if no other "neighbour" in the interf. graph has been allocated
    that reg. yet.  This is actually true of any class with only one reg!

(2) SparcIntCCRegClass::colorIGNode sets the color even if the LR must
    be spilled so that the machine-independent spill code doesn't have to
    make the machine-dependent decision of which CC name to use based on
    operand type: %xcc or %icc.  (These are two halves of the same
register.)

(3) LR->isMarkedForSpill() is no longer the same as LR->hasColor().
    These should never have been the same, and this is necessary now for #2.

(4) All RDCCR and WRCCR instructions are directly generated with the
    phony number for %ccr so that EmitAssembly/EmitBinary doesn't have to
    deal with this.

llvm-svn: 7152
2003-07-10 19:42:55 +00:00
Vikram S. Adve 6528067646 Several fixes to handling of int CC register:
(1) An int CC live range must be spilled if there are any interferences,
    even if no other "neighbour" in the interf. graph has been allocated
    that reg. yet.  This is actually true of any class with only one reg!

(2) SparcIntCCRegClass::colorIGNode sets the color even if the LR must
    be spilled so that the machine-independent spill code doesn't have to
    make the machine-dependent decision of which CC name to use based on
    operand type: %xcc or %icc.  (These are two halves of the same register.)

(3) LR->isMarkedForSpill() is no longer the same as LR->hasColor().
    These should never have been the same, and this is necessary now for #2.

(4) All RDCCR and WRCCR instructions are directly generated with the
    phony number for %ccr so that EmitAssembly/EmitBinary doesn't have to
    deal with this.

llvm-svn: 7151
2003-07-10 19:42:11 +00:00
Vikram S. Adve fc329cd57b *** empty log message ***
llvm-svn: 7150
2003-07-10 19:32:38 +00:00
Vikram S. Adve f8c303d344 Just documentation.
llvm-svn: 7149
2003-07-10 19:31:26 +00:00
Vikram S. Adve 5fc4aee04e Add phony target "bytecode" to ensure that it works in recursive makes.
llvm-svn: 7147
2003-07-10 19:25:29 +00:00
Misha Brukman c18333ac0a Lowercase versions of `occurrence' need to be spelled correctly, too.
llvm-svn: 7142
2003-07-10 17:05:26 +00:00
Misha Brukman fd3e0afe65 Move the space separator to where it really belongs: in the print statement, not
in a variable assignment.

llvm-svn: 7141
2003-07-10 16:52:41 +00:00
Misha Brukman 069e6b5be0 `Occurrence' has no `a' and the `r' is doubled.
llvm-svn: 7140
2003-07-10 16:49:51 +00:00
Misha Brukman ecfc0d2d3c Converted tabs to spaces.
llvm-svn: 7139
2003-07-10 16:35:17 +00:00
Misha Brukman 1194d54975 Some beautification changes (tabs to spaces, removed extra blank lines);
no functionality changed.

llvm-svn: 7138
2003-07-09 17:33:50 +00:00
Vikram S. Adve fa6ede03b1 Simplified DOTRACING flag.
llvm-svn: 7135
2003-07-08 23:40:48 +00:00
John Criswell 71139f24d0 Corrected the Table of Contents.
Corrected capitalization of subheadings.
Created a new subsection for compiling the C front end and moved all references
to it there.
Updated the disk space requirements to reflect the need for the binary C front
end and the optional C front end source.
Added information on unpacking the distribution to the summary section.
Moved autoconf environment variables to the autoconf section.
Changed make to gmake.
Removed some of the precise directions for unpacking the archives.
Fixed some formatting inconsistencies (headings that were not centered).

llvm-svn: 7132
2003-07-08 20:35:59 +00:00
Vikram S. Adve 3b7c2a4db7 Pointer hash table reallocation code seems never to have been tested!
Unfortunately, reallocation also means that the pointer numbering will
change, so increase table size to try to avoid it.

llvm-svn: 7130
2003-07-08 18:42:44 +00:00
Vikram S. Adve b09caca804 Native libraries (libinstr*.a) should not have been taken out when
taking out the rule for compiling the test driver.
We need the native libraries for libinstr because they are directly
linked into the native CBE or LLC code.  That is the only practical
way to debug them!

llvm-svn: 7129
2003-07-08 18:40:58 +00:00
Vikram S. Adve eb44eb1e08 Use libinstr.$(ARCH).a instead of libinstr64.a
Also, $(RM) needs -f flag.

llvm-svn: 7128
2003-07-08 18:39:51 +00:00
Vikram S. Adve 6c9dc89ba5 *** empty log message ***
llvm-svn: 7126
2003-07-08 15:39:02 +00:00
John Criswell b99b317cba Removed size_t from the parameter list of the malloc() prototype in generated C
code.  This prevents a compiler warning on Sparc that causes the tests to fail.

llvm-svn: 7125
2003-07-08 14:52:09 +00:00
Misha Brukman 222639708e Stop using the `Offset' variable, as we are cycling through the bits of a field
initializer and the loop index variable already carries the offset information
that we need.

llvm-svn: 7123
2003-07-07 22:30:44 +00:00
Misha Brukman f75934fe93 Fixed indentation.
llvm-svn: 7122
2003-07-07 22:28:42 +00:00
Misha Brukman 6d1871c28b Removed an extra slash that appears in the path name when these variables are
combined with a '/' separating them.

llvm-svn: 7121
2003-07-07 22:27:05 +00:00
Misha Brukman ea6e7a5d72 Elaborated assembly syntax of instructions in the comments.
llvm-svn: 7120
2003-07-07 22:18:42 +00:00
Misha Brukman 25a49f0cf1 Removed unnecessary assignment (it was taken care by a superclass) and clarified
some comments.

llvm-svn: 7119
2003-07-07 22:18:06 +00:00
Misha Brukman 6aa98680fb * Made $Template refer to a path relative to the checked-out tree
* Made error messages print out what directory failed chdir()
* Put quotes around search arguments to grep
* Use `egrep' instead of `grep -e' because they are equivalent but `grep' does
  not have the `-e' option on Sparc/Solaris
* Added `--enable-jit' to the ./configure command because both X86 and Sparc
  have JITs and we want them to be tested
* Fixed the regular expressions parsing the changes in CVS which were causing
  the script to die

llvm-svn: 7118
2003-07-07 21:27:40 +00:00
John Criswell ed9fc328cc Fixed the directions for building the C front end.
llvm-svn: 7117
2003-07-07 19:29:20 +00:00
John Criswell c2ca0c44c8 Added information about how to unpack the distribution for those who do not
have access to CVS.

llvm-svn: 7116
2003-07-07 19:27:35 +00:00
Brian Gaeke c48e3fdffd Insert workaround for GAS bug in assembling FLD/FSTP XWORD PTR [...]
instructions, by outputting them as bytes.

llvm-svn: 7115
2003-07-07 18:34:20 +00:00
Misha Brukman c1db0fdd7e Moved RegClassIDs enum to be next to the RegTypes enum.
llvm-svn: 7114
2003-07-07 16:52:39 +00:00
Vikram S. Adve 55c8e21073 Correction to last fix: Pointer types do not return true in Type::IsIntegral().
llvm-svn: 7113
2003-07-06 22:50:31 +00:00
Vikram S. Adve 3bb921e8df Choose register instead of immediate for ConstantExpr in ChooseRegOrImmed.
llvm-svn: 7112
2003-07-06 20:33:21 +00:00
Vikram S. Adve d09c4c34c0 Major bug fix though it happened rarely (only on a compare after an
integer overflow):
We need to use %icc and not %xcc for comparisons on 32-bit or smaller
integer values.

llvm-svn: 7111
2003-07-06 20:13:59 +00:00
Vikram S. Adve 95b36820bb Regression test for bug in reg. allocation that was using %xcc instead
of %icc even for 32-bit and smaller comparisons.

llvm-svn: 7110
2003-07-06 20:12:18 +00:00
Vikram S. Adve c4499d6cb1 Make the RegClassID values public -- there is no other way to get them.
llvm-svn: 7109
2003-07-06 19:53:59 +00:00
Brian Gaeke d5676e8607 Add -d option to trust the disassembler.
llvm-svn: 7105
2003-07-03 21:44:32 +00:00
Brian Gaeke 5b343a4ba1 here little scriptie, nice scriptie...
llvm-svn: 7104
2003-07-03 21:15:02 +00:00
Misha Brukman bb95605448 Apparently, the "regType" and "regClass" used in the Sparc backend are not both
correct: empirically, "regType" is wrong for a number of registers. Thus, one
can only rely on the "regClass" to figure out what kind of register one is
dealing with.

This change switches to using only "regClass" and adds a few extra DEBUG() print
statements and a few clean-ups in comments and code, mostly minor.

llvm-svn: 7103
2003-07-03 18:36:47 +00:00
Sumant Kowshik 2b30ecdb77 Added support for poolallocarray and poolmakeunfreeable. The latter is used by the SAFECode project
llvm-svn: 7102
2003-07-03 17:55:47 +00:00
John Criswell 9558399227 Fixed an error in the pathname to LLVMGCCDIR for the pre-built binaries (forgot
that <> denotes a tag).

llvm-svn: 7100
2003-07-03 16:49:40 +00:00
John Criswell 6e0f34d4c2 Added information on software requirements for unpacking the archives that we
will eventually distribute.

llvm-svn: 7099
2003-07-03 16:43:01 +00:00
Misha Brukman 3aac8e11de * Reworded a bit about JITs (I don't like acronyms followed by 's)
* Added JIT capability to the LLI description section
* LLC is quasi-x86-capable

llvm-svn: 7098
2003-07-03 16:29:36 +00:00
John Criswell 4f0dde59cd Added another remark on how building the C front end is optional.
llvm-svn: 7097
2003-07-03 16:03:39 +00:00
John Criswell c5eb46092c Performed a major update for the pre-release.
Attempted to better structure and order the document.
Added more information about autoconf, the build system, and how to build LLVM.
Added directions on how to build the C front end.
Added a section on common problems and their solutions.

llvm-svn: 7096
2003-07-03 16:01:38 +00:00
John Criswell 163110df31 Adding a web page on how to start a new LLVM Project.
llvm-svn: 7095
2003-07-03 15:37:52 +00:00
Chris Lattner cedbb88d05 Reuse the values if they are constants: this is important so that we index into the right structure field
This fixes bug: BasicAA/2003-07-03-BasicAACrash.ll

llvm-svn: 7093
2003-07-03 06:42:38 +00:00
Chris Lattner 1646906d18 New testcase
llvm-svn: 7092
2003-07-03 06:29:15 +00:00
Chris Lattner 117da20334 Remove globals more aggressively from graphs.
Fix a bug where we removed nodes that were marked U.

llvm-svn: 7090
2003-07-03 02:03:53 +00:00
Chris Lattner 79c2e891c0 INCLUDE_PARENT_GRAPH is required
llvm-svn: 7089
2003-07-02 23:57:21 +00:00
Chris Lattner c812e5f44e INCLUDE_PARENT_GRAPH is required!
llvm-svn: 7088
2003-07-02 23:57:05 +00:00
Chris Lattner 9a75369b74 Disable incorrect mustalias code
llvm-svn: 7087
2003-07-02 23:56:51 +00:00
Chris Lattner 959177fb96 Remove space at end of line
llvm-svn: 7084
2003-07-02 23:44:15 +00:00
Chris Lattner 10bcbf402a Remove dead method
llvm-svn: 7083
2003-07-02 23:43:06 +00:00
Chris Lattner 7fd198806a Fix how we are handling unreachable functions. This DRAMATICALLY improves efficiency
llvm-svn: 7082
2003-07-02 23:42:48 +00:00
John Criswell 68c49640b7 Updated prior to the pre-release.
Removed items which are done (or near completion).
Added new items so that we don't forget them.

llvm-svn: 7081
2003-07-02 23:03:18 +00:00
Misha Brukman 97d3ce313b The word `open' was really intended to be `option'.
llvm-svn: 7080
2003-07-02 21:20:04 +00:00
John Criswell e59e2fdbc8 Removed the --enable-profiling option.
llvm-svn: 7079
2003-07-02 21:16:06 +00:00
John Criswell 61471078af Removed the --enable-profiling option (again).
llvm-svn: 7078
2003-07-02 20:49:38 +00:00
Chris Lattner cd7482b354 Keep track of how many inlinings are performed
llvm-svn: 7076
2003-07-02 20:24:42 +00:00
Chris Lattner d3d5c5c98e Try using trivially dead deletion
llvm-svn: 7075
2003-07-02 19:49:11 +00:00
Misha Brukman 20d93ca01d * Force all "don't care" bits to 0 so that there are absolutely no unset bits in
the TableGen descriptions; all unset bits are thus errors.
* As a result, found and fixed instructions where some operands were not
  actually assigned into the right portion of the instruction.

llvm-svn: 7074
2003-07-02 19:37:48 +00:00
Misha Brukman eccc0dac91 The classes F4_3 and F4_4 have an `rd' operand that needs to be set.
llvm-svn: 7073
2003-07-02 18:27:47 +00:00
Misha Brukman 81951e1142 Properly fix instruction syntax in comments, using `imm' for instructions that
use an immediate value instead of a register.

llvm-svn: 7072
2003-07-02 18:15:43 +00:00
Misha Brukman 6f9caec57f Fixed instruction syntax in the comments (specifies how instr is used).
llvm-svn: 7071
2003-07-02 18:02:58 +00:00
Misha Brukman 7dee443c1c * If compiling on X86 or Sparc, automagically enable the JIT for that arch
* Setting ENABLE_X86_JIT or ENABLE_SPARC_JIT on the `make' command-line will
  force the inclusion of that JIT on a different architecture
* If neither JIT is enabled (e.g., compiling on a different architecture), the
  -march option will not be available to LLI.
* As a side effect of the $ARCH variable, the Sparc LLI can now link just a bit
  faster by not including the x86 library.

llvm-svn: 7070
2003-07-02 17:53:19 +00:00
John Criswell 7ace0c39c8 Removed the CPPFLAGS and CFLAGS variables since the -DHAVE_CONFIG_H messes
up the test suite.  Since all the LLVM software assumes that config.h exists,
we can just do away with it for now.

llvm-svn: 7069
2003-07-02 16:53:44 +00:00
Vikram S. Adve 7a4abf89fa Force fixed-size but large alloca objects to the dynamically allocated
area to avoid using up precious stack space within the 4095 offset limit
from %fp.  Such objects that would themselves live at a large offset
were being put there already so this is a simple change.

llvm-svn: 7066
2003-07-02 06:59:22 +00:00
Chris Lattner ad7b9c1810 Remove dead Nodes list
llvm-svn: 7065
2003-07-02 06:06:34 +00:00
Chris Lattner 116f68a990 Complete rewrite of td pass
llvm-svn: 7064
2003-07-02 04:39:44 +00:00
Chris Lattner 049d558988 Print collapsed to match the paper
llvm-svn: 7063
2003-07-02 04:39:27 +00:00
Chris Lattner 0b61cdd191 Reduce amount of work we do calculating mustaliases if the arg is a global
llvm-svn: 7062
2003-07-02 04:39:13 +00:00
Chris Lattner 03f3cb1af7 Add support for ParentGraph only when building in debug mode
Minor cleanups, reenable folding of call nodes to external functions

llvm-svn: 7061
2003-07-02 04:38:49 +00:00
Chris Lattner db6e0ac800 Add some functions to the blacklist
llvm-svn: 7060
2003-07-02 04:38:00 +00:00
Chris Lattner 5a3d63d5aa Make the BU closure keep track of which actual calls happen
Minor cleanups

llvm-svn: 7059
2003-07-02 04:37:48 +00:00
Chris Lattner 3ff99e3731 Make local pass print out its progress
llvm-svn: 7058
2003-07-02 04:37:26 +00:00
Chris Lattner 60321c2c49 Add new methods
llvm-svn: 7057
2003-07-02 04:37:00 +00:00
Chris Lattner b10e385c01 Disable the parent graph code when not compiled in DEBUG mode
llvm-svn: 7056
2003-07-02 04:33:55 +00:00
Vikram S. Adve 9a8f8e3e95 Leak fix: delete old objects before reallocation in an assignment operator!
llvm-svn: 7055
2003-07-02 01:25:44 +00:00
Vikram S. Adve 1fce4cfa95 Minor beautification: fold a couple of lines of code.
llvm-svn: 7054
2003-07-02 01:24:00 +00:00
Vikram S. Adve cf952cb504 (1) Major bug fix: DecomposeArrayRef() replaces its argument instr. and
deletes it, but we were merrily trying to fix the operands of that
    instruction anyway!  Instead, fix the replacement instruction.

(2) An Improvement: Check for and extract global values in all operands,
    not just in known pointer operands.  For example, they can occur in
    call arguments, and probably other unforeseeable places as well.
    This also eliminates the special-case handling of Load and Store.

llvm-svn: 7053
2003-07-02 01:23:15 +00:00
Vikram S. Adve fa1dde06aa A def. operand of a machine instruction may be an ordinary Value*,
not just an Instruction*, at least in one unfortunate case:
the first operand to the va_arg instruction.
Modify ValueToDefVecMap to map from Value*, not Instruction*.

llvm-svn: 7052
2003-07-02 01:16:01 +00:00
Vikram S. Adve b5f8ada255 Bug/case fixes:
(1) select: Ok to convert a pointer to a float or double.
(2) regalloc: Some MachineInstr* for caller-saving code before a call
    were being inserted before and after the call!
(3) Don't insert the caller-saving instructions in the
    MachineCodeForInstruction for the Call instruction.
    *All* instructions generated by register allocation need to be
    recorded in those maps, but it needs to be done uniformly.

llvm-svn: 7051
2003-07-02 01:13:57 +00:00
John Criswell 29eafac9ff Added the ARCH variable so that some of the Makefiles can perform actions based
upon the target hardware architecture (as opposed to always checking the OS).

llvm-svn: 7050
2003-07-01 22:07:39 +00:00
John Criswell 10d05e2a53 Fixed a broken hyperlink.
Moved commas outside of hyperlinks in the contributors list.

llvm-svn: 7049
2003-07-01 21:55:57 +00:00
Chris Lattner afede5d65b TD pass keeps track of which functions have complete arguments
llvm-svn: 7048
2003-07-01 21:12:10 +00:00
Chris Lattner 931978ab2b Add new operator= impl
llvm-svn: 7047
2003-07-01 21:11:59 +00:00
Chris Lattner 8309574e8d Fix bug: Regression/Other/2002-03-11-ExprAssertion.ll
llvm-svn: 7046
2003-07-01 21:08:52 +00:00
Chris Lattner c5703edeb6 Fix testcase failing because of change of output
llvm-svn: 7045
2003-07-01 21:03:30 +00:00
John Criswell 57c57a1bbf Updated the name of the LLVM disassembler so that the test does not fail.
llvm-svn: 7044
2003-07-01 20:31:45 +00:00
Chris Lattner a4f746d536 new testcase
llvm-svn: 7043
2003-07-01 18:52:01 +00:00
Chris Lattner b6e3fb6350 Move to test/programs/LLvmsource
llvm-svn: 7037
2003-07-01 17:50:11 +00:00
Chris Lattner 972e76f00d Ok, I'm a moron. Fixed now
llvm-svn: 7035
2003-07-01 17:15:11 +00:00
Chris Lattner 31f1db746b Fix major problem that was causing all kinds of nasty foldings
llvm-svn: 7034
2003-07-01 17:10:50 +00:00
Chris Lattner 09711cc547 Make testcase a bit more interesting
llvm-svn: 7033
2003-07-01 16:28:32 +00:00
Chris Lattner b7d4e63b23 New testcase
llvm-svn: 7032
2003-07-01 16:28:20 +00:00
Chris Lattner 23428214e9 Rework TD pass to work with the precise call graph constructed by the BU phase
llvm-svn: 7031
2003-07-01 16:28:11 +00:00
Chris Lattner e809e3afd8 Do not treat global variables as functions! (and assert failing)
llvm-svn: 7030
2003-07-01 16:27:53 +00:00
Chris Lattner 8a30ad6d89 Dont' print scalar nodes for ConstantPointerRefs
llvm-svn: 7029
2003-07-01 16:27:32 +00:00
Chris Lattner 0c770cd936 Add new methods to BUDS for keeping track of a precise call graph
llvm-svn: 7028
2003-07-01 16:27:15 +00:00
Chris Lattner 269467d216 Minor cleanups
llvm-svn: 7027
2003-07-01 16:04:18 +00:00
Chris Lattner f5410e8237 Update to configure the tree before building it.
llvm-svn: 7026
2003-07-01 16:02:00 +00:00
John Criswell 33ba19f8f7 The Makefile now adds autoconf information to the compiler and linker flag
variables instead of overwriting those variables.  This makes it more flexible
and keeps some of the test Makefiles from breaking.

llvm-svn: 7025
2003-07-01 15:02:59 +00:00
John Criswell 7320d2fd32 Renamed all of the LObj* variables (which represent libtool objects) to Obj*.
One of the test Makefiles uses the same variable names for something else,
and this was probably interfering with it.

llvm-svn: 7024
2003-07-01 14:52:28 +00:00
Chris Lattner 40c4f1357b Fix verbose support bug
llvm-svn: 7023
2003-06-30 22:41:22 +00:00
John Criswell 45654a1cbe Removed the LIBS environment variable as it interferes with the tests and
is currently unused.

llvm-svn: 7022
2003-06-30 22:33:53 +00:00
John Criswell 3a821176f1 Added John Criswell to the contributors list.
llvm-svn: 7021
2003-06-30 22:20:46 +00:00
John Criswell c7418da8c1 Removed the --enable-profiling and --enable-verbose options.
llvm-svn: 7020
2003-06-30 22:17:28 +00:00
John Criswell 61efc69ce3 Removed the --enable-verbose option.
llvm-svn: 7019
2003-06-30 22:16:39 +00:00
John Criswell e17afeb1b4 Adding in sample project tree.
llvm-svn: 7018
2003-06-30 22:13:48 +00:00
John Criswell 568d13cf93 Adding in projects subtree.
llvm-svn: 7017
2003-06-30 22:12:19 +00:00
Chris Lattner c0822444fd This causes an assert in the assembler. :(
llvm-svn: 7016
2003-06-30 22:03:21 +00:00
John Criswell 0f929780d2 Removed these files as they are replaced by autoconf.
llvm-svn: 7015
2003-06-30 22:01:54 +00:00
John Criswell 3ef61afb76 Merged in autoconf branch. This provides configuration via the autoconf
system.

llvm-svn: 7014
2003-06-30 21:59:07 +00:00
Chris Lattner 53426e6526 Setjmp should always return zero if we don't implement longjmp. This avoids
leaving trash in the register, fixing anagram

llvm-svn: 7013
2003-06-30 19:35:54 +00:00
Brian Gaeke eba22eb59d Get rid of the duplicate '0x' in debug mode.
llvm-svn: 7012
2003-06-30 18:06:20 +00:00
Misha Brukman 2202c5a688 Spell `apparently' with an `e'.
llvm-svn: 7011
2003-06-30 15:33:47 +00:00
Chris Lattner 31514c1c92 New testcase
llvm-svn: 7010
2003-06-30 15:17:39 +00:00
Chris Lattner d9b889c4df Add dependency on analyze
llvm-svn: 7009
2003-06-30 15:17:36 +00:00
Chris Lattner 70923c688d Use the getFunctionNames method
llvm-svn: 7008
2003-06-30 05:57:39 +00:00
Chris Lattner bfce1115e3 Add new method
llvm-svn: 7007
2003-06-30 05:57:30 +00:00
Chris Lattner f8865a4389 Split CallSiteIterator out into DSCallSiteIterator.h, and generalize it a bit
llvm-svn: 7006
2003-06-30 05:27:53 +00:00
Chris Lattner fa52af4fb0 Be more const-correct
llvm-svn: 7005
2003-06-30 05:27:18 +00:00
Chris Lattner 53f4dd7f22 Be more const correct
llvm-svn: 7004
2003-06-30 05:27:05 +00:00
Chris Lattner 0929c5ef68 Fix bug in last checkin
llvm-svn: 7003
2003-06-30 05:18:26 +00:00
Chris Lattner a7630bdc06 Constness changes
llvm-svn: 7002
2003-06-30 05:10:09 +00:00
Chris Lattner 4ffb4e0e03 Reimplement the BU closure to collapse all SCC graphs into a single graph.
Look at all of the code that gets deleted!

llvm-svn: 7001
2003-06-30 05:09:58 +00:00
Chris Lattner 348d93c8c2 Handle the case where OldNodeMap == &ScalarMap correctly
llvm-svn: 7000
2003-06-30 05:09:29 +00:00
Chris Lattner 312783f0d2 Remove dead method
llvm-svn: 6999
2003-06-30 04:53:39 +00:00
Chris Lattner 01877f5224 Do not delete the same graph multiple times when freeing memory if graphs are sharing
llvm-svn: 6998
2003-06-30 04:53:27 +00:00
Chris Lattner 7695128217 Do not multiply delete graphs if functions are sharing graphs
llvm-svn: 6997
2003-06-30 04:53:08 +00:00
Chris Lattner 6d187fdc5a Move usages of explicit hash_* datastructures to use typedefs
llvm-svn: 6996
2003-06-30 03:36:09 +00:00
Chris Lattner 88cd849788 New testcase
llvm-svn: 6995
2003-06-30 03:25:53 +00:00
Chris Lattner 63aeacfe3d Revamp DSGraphs so that they can support multiple functions in the same
DSGraph at one time

llvm-svn: 6994
2003-06-30 03:15:25 +00:00
Chris Lattner 151576413e Adjust for new DSGraph API
llvm-svn: 6993
2003-06-30 03:14:54 +00:00
Chris Lattner 6e69c28229 Eliminate using declarations, adjust for new DSGraph API
llvm-svn: 6992
2003-06-30 03:14:44 +00:00
Chris Lattner 34bdfbf903 Substantial revamp: DSGraphs now may contain the graphs for multiple functions
in the same graph

llvm-svn: 6991
2003-06-30 03:14:23 +00:00
Chris Lattner 1fecb674e0 Add argument
llvm-svn: 6990
2003-06-30 03:13:36 +00:00
Chris Lattner 13cb5ae4ff Remove prototype for dead method
llvm-svn: 6989
2003-06-30 03:13:28 +00:00
Chris Lattner 2e2dc8e19d Add clean target to clean up my mess
llvm-svn: 6988
2003-06-29 23:20:51 +00:00
Chris Lattner 7e29f97d1d Abstract out the predicate which decides whether a function gets complete
arguments or not...

llvm-svn: 6987
2003-06-29 22:37:07 +00:00
Chris Lattner 205d1acfba Fix minor bug in previous checkin
llvm-svn: 6986
2003-06-29 22:36:31 +00:00
Chris Lattner 992abdae26 Add support for ensuring that nodes are not incomplete
llvm-svn: 6985
2003-06-29 22:36:15 +00:00
Chris Lattner 10db1077ff This node should not be incomplete!
llvm-svn: 6984
2003-06-29 22:35:55 +00:00
Chris Lattner c0f4dc1cfa New testcase
llvm-svn: 6983
2003-06-29 22:20:53 +00:00
Chris Lattner 16e3c398c8 Add support for "physical subtyping", which fixes:
DSGraph/2003-06-29-NodeCollapsing2.ll & DSGraph/PhysicalSubtyping.ll

llvm-svn: 6982
2003-06-29 20:27:45 +00:00
Chris Lattner 0aca3e714f Add print method to not get silly warning from analyze
llvm-svn: 6981
2003-06-29 20:27:16 +00:00
Chris Lattner 3ff1d70ecb New, smaller testcase
llvm-svn: 6980
2003-06-29 18:17:20 +00:00
Chris Lattner 5da440b239 New pass which is useful for writing regression tests
llvm-svn: 6979
2003-06-29 18:17:07 +00:00
Chris Lattner 7da5f74c56 New testcase
llvm-svn: 6978
2003-06-29 17:18:59 +00:00
Chris Lattner 7ac937e011 Until there is a setjmp/longjmp transformation pass, codegen setjmp as a noop
and longjmp as an abort!

llvm-svn: 6977
2003-06-29 16:42:32 +00:00
Chris Lattner e019d9e068 Fix testcase
llvm-svn: 6976
2003-06-29 01:09:07 +00:00
Chris Lattner 3a51027f3d New testcase
llvm-svn: 6975
2003-06-29 01:03:53 +00:00
Chris Lattner 5a61d2ffe2 Make sure that the global is known to be internal
llvm-svn: 6974
2003-06-29 00:57:34 +00:00
Chris Lattner 0877def4f6 Expose must alias information for global variables, implementing: DSGraph/mustalias.ll
llvm-svn: 6973
2003-06-29 00:54:08 +00:00
Chris Lattner 426b890f0d If the alias analysis algorithm we are using can provide MUST alias information,
expose it directly as value numbering information

llvm-svn: 6972
2003-06-29 00:53:34 +00:00
Chris Lattner 16e9212e2e Add support for gathering sets of must aliases
llvm-svn: 6971
2003-06-29 00:23:11 +00:00
Chris Lattner 83e21a0c93 Count operands to instructions as well as just results. This allows for global variables to be checked as well
llvm-svn: 6970
2003-06-29 00:07:11 +00:00
Chris Lattner 7739abc07b New testcase
llvm-svn: 6969
2003-06-28 23:52:34 +00:00
Chris Lattner e9505ee0f9 Do not chain to basic-aa
llvm-svn: 6968
2003-06-28 23:49:06 +00:00
Chris Lattner 69bdc6df96 Remove obsolete script
llvm-svn: 6967
2003-06-28 23:32:28 +00:00
Chris Lattner 423909da4d Remove usage of grep-not script
llvm-svn: 6966
2003-06-28 23:32:04 +00:00
Chris Lattner a6fee9d6d5 Remove explicit control flow through the use of the 'not' script
llvm-svn: 6965
2003-06-28 23:23:34 +00:00
Chris Lattner 213fbb3bbb Move DSGraph tests to test/Regression/Analysis/DSGraph
llvm-svn: 6964
2003-06-28 23:17:42 +00:00
Chris Lattner e4bdb41532 Move files to test/Regression/Analysis/DSGraph
llvm-svn: 6963
2003-06-28 23:17:26 +00:00
Chris Lattner abdf66ccfb No use in having CFGSimplify and SimplifyCFG directories!
llvm-svn: 6962
2003-06-28 23:14:35 +00:00
Chris Lattner cd1d05ab33 Eliminate explicit control flow in tests
llvm-svn: 6961
2003-06-28 23:13:12 +00:00
Chris Lattner 6cf9053473 Use not instead of grep-not
llvm-svn: 6960
2003-06-28 23:02:51 +00:00
Chris Lattner f8037d9b2b Switch tests over to use the 'not' script, instead of explicit control flow
llvm-svn: 6959
2003-06-28 23:02:20 +00:00
Chris Lattner 5d83a502b0 Force the interpreter for this testcase
llvm-svn: 6958
2003-06-28 23:02:04 +00:00
Chris Lattner dabfbcf19b Get rid of control flow in the test
llvm-svn: 6957
2003-06-28 22:53:07 +00:00
Chris Lattner 9793cf6789 New script for testrunner programs
llvm-svn: 6956
2003-06-28 22:52:52 +00:00
Chris Lattner 11c21f3eb2 Convert scripts from using explicit control flow to use the new grep-not script
llvm-svn: 6955
2003-06-28 22:44:42 +00:00
Chris Lattner 25479c3cfe Handle quoting right
llvm-svn: 6954
2003-06-28 22:43:58 +00:00
Chris Lattner 2785679e9e Make the TestRunner tests not print out horrible things when they run
llvm-svn: 6953
2003-06-28 22:35:46 +00:00
Chris Lattner 4be846d21e Fix testcase
llvm-svn: 6952
2003-06-28 22:31:37 +00:00
Chris Lattner 6793a25de8 Initial checkin of grep-not script
llvm-svn: 6951
2003-06-28 22:28:31 +00:00
Chris Lattner 63e2794408 Add the test/Scripts directory to the path used by TestRunner
llvm-svn: 6950
2003-06-28 22:21:39 +00:00
Chris Lattner 0e2647b413 Describe directory
llvm-svn: 6949
2003-06-28 22:20:19 +00:00
Chris Lattner 6545a75e93 Improve the make rule
llvm-svn: 6948
2003-06-28 22:16:59 +00:00
Chris Lattner fa578d0eb4 Propagate globals graph from the local to bu to td globals graphs. This
fixes bug: DSGraph/buglobals.ll

llvm-svn: 6947
2003-06-28 22:14:55 +00:00
Chris Lattner c7ba69d8b4 Drop references to globals who do exist in the globals graph, but are never
read or written to.  Keep track of how many times this happens.  This should
be good for deleting things like references to type information in C++ classes

llvm-svn: 6946
2003-06-28 22:10:58 +00:00
Chris Lattner 856a6cbb80 Avoid double negatives
llvm-svn: 6945
2003-06-28 21:58:28 +00:00
Chris Lattner fb9e684f5c Add new DSGraph::ScalarMapTy typedef to avoid pulling representation issues
into callers of getScalarMap

llvm-svn: 6944
2003-06-28 21:57:13 +00:00
Chris Lattner 1ad22dedd1 Add new 'isComplete' method
llvm-svn: 6943
2003-06-28 21:56:42 +00:00
Chris Lattner 111065409a New testcase
llvm-svn: 6942
2003-06-28 21:56:22 +00:00
Chris Lattner 2890f428a9 New pass to perform DSA based optimizations. Initially we just support turning
globals into constants if we can prove it's safe

llvm-svn: 6941
2003-06-28 21:54:55 +00:00
Chris Lattner 58626c9be7 New makefile for Dsgraph tests
llvm-svn: 6940
2003-06-28 21:16:38 +00:00
Chris Lattner 34a4ddae0f Add DSGraph to the tests
llvm-svn: 6939
2003-06-28 21:16:27 +00:00
Chris Lattner d401f39872 Avoid printing out huge structures or arrays if they are just filled with zeros
llvm-svn: 6938
2003-06-28 20:08:24 +00:00
Chris Lattner 7969401e16 Add support for a new zeroinitializer token which can be used to get rid of
huge arrays of zero initialized values

llvm-svn: 6937
2003-06-28 20:01:34 +00:00
Chris Lattner 37d4db2e7b Add test for new zeroinitializer token
llvm-svn: 6936
2003-06-28 20:01:03 +00:00
Chris Lattner fd7016a8ba jmp_buf is really a pointer type that is passed around...
llvm-svn: 6935
2003-06-28 19:29:34 +00:00
Chris Lattner 27223935d7 Add support for the Invoke instruction!
llvm-svn: 6934
2003-06-28 17:53:05 +00:00
Chris Lattner 2d52dd12b2 New testcase for invoke support
llvm-svn: 6933
2003-06-28 17:52:38 +00:00
Chris Lattner a80de5a3be Preserve compatibility with non-gcc compilers
llvm-svn: 6932
2003-06-28 17:15:12 +00:00
Chris Lattner 90921a7eee Fix bug: CBackend/2003-06-28-LinkOnceGlobalVars.llx
llvm-svn: 6931
2003-06-28 17:08:36 +00:00
Chris Lattner de025f3220 New testcase
llvm-svn: 6930
2003-06-28 17:07:23 +00:00
Chris Lattner fbfcf01b98 Allow the inlining limit to be controlled from the command line!
llvm-svn: 6929
2003-06-28 15:57:04 +00:00
Chris Lattner 719c715639 Add support for 'unsigned' command line arguments
llvm-svn: 6928
2003-06-28 15:47:20 +00:00
John Criswell abebb9af11 Added code to the clean rule that deletes files placed in the source directory.
These files interfer with a second build attempt.

llvm-svn: 6927
2003-06-27 17:03:20 +00:00
John Criswell 8224df947c Added the OPTIONAL_DIRS variable for specifying optional directories to build.
llvm-svn: 6926
2003-06-27 16:58:44 +00:00
Chris Lattner 8bf2e04b87 New testcase that crashes the cfe
llvm-svn: 6925
2003-06-27 02:37:53 +00:00
Brian Gaeke c1e4ee0f50 Nice tasty llc fixes. These should fix LLC for x86 for everything in
SingleSource except oopack and Oscar.  (Sorry, Oscar.)

include/llvm/Target/TargetInstrInfo.h: Remove virtual print method. Add
 accessors for ImplicitUses/Defs.
lib/Target/TargetInstrInfo.cpp: Remove virtual print method. If you
 really wanted this, just use MI->print(O, TM); instead...
lib/Target/X86:
FloatingPoint.cpp: ...like this.
X86InstrInfo.h: Remove virtual print method. Define the PrintImplUses
 target-specific flag bit.
X86InstrInfo.def: Add the PrintImplUses flag to all the instructions
 which implicitly use CL, because the assembler needs to see the CL in
 order to generate the right instruction.
Printer.cpp: Ditch fnIndex at Chris's request. Now we use CurrentFnName
  to name constants in the constant pool for each function instead. This
  avoids keeping state between runOnMachineFunction() invocations, which
  is a no-no. Having MangledGlobals be global is a bogon I'd like to get
  rid of too, but making it a static member of Printer causes link errors
  (why???).
 Make NumberForBB into a member of Printer instead of a global, too.
 Make printOp and printMemReference into methods of Printer.
 X86InstrInfo::print is now Printer::printMachineInstruction, because
  TargetInstrInfo::print is history. (Because of this, we have to qualify
  the names of some TargetInstrInfo methods we call.)
 Print out the ImplicitUses field of any instruction we print that has
  the PrintImplUses bit set.

llvm-svn: 6924
2003-06-27 00:00:48 +00:00
Brian Gaeke 92aefe564a Here are the notes from our Reoptimizer meetings.
llvm-svn: 6923
2003-06-26 20:37:42 +00:00
Chris Lattner 5a42f1b49e Modify script to support checkins on branches
llvm-svn: 6921
2003-06-26 20:11:07 +00:00
Brian Gaeke 4ab222142f Number constants from constant pool as CPIf_i where f is the function index
and i is the constant pool index.

llvm-svn: 6920
2003-06-26 18:02:30 +00:00
Chris Lattner d104cdb0ba Add a testcase to ensure that ctor/dtor attributes work in C
llvm-svn: 6919
2003-06-26 14:56:36 +00:00
Chris Lattner eaae578820 Add support to globaldce for deleting dead function prototypes
llvm-svn: 6918
2003-06-26 05:41:18 +00:00
Chris Lattner fd5d323ea9 When internalizing global ctor/dtor list, also mark it constant. This is gross, but
until DSA is working all of the time and is totally reliable, we do this.

llvm-svn: 6917
2003-06-26 05:30:40 +00:00
Chris Lattner c8a619313a Run the simplify CFG pass after instcombine which has the effect of deleting
ALL of the global ctor/dtor stuff if it is not used!

llvm-svn: 6916
2003-06-26 05:29:50 +00:00
Chris Lattner b254fe29d2 New variable which is just the GCCLD tool
llvm-svn: 6914
2003-06-26 05:28:00 +00:00
Chris Lattner 4ede64e304 Implement more aggressive folding of constant GEP instructions
llvm-svn: 6913
2003-06-26 05:22:45 +00:00
Chris Lattner 0f1d8a3947 Add support for elimination of load instruction from global constants
llvm-svn: 6912
2003-06-26 05:06:25 +00:00
Chris Lattner 8c4b0d05ee add tests for elimination of loads
llvm-svn: 6911
2003-06-26 05:05:51 +00:00
Chris Lattner e4b7d467f8 Move the instcombine pass before globaldce, so that if globals are made dead by instcombine, that they can be deleted.
llvm-svn: 6910
2003-06-26 04:32:31 +00:00
Chris Lattner 0fe5e45ee9 Don't register the destructors if the list is empty
llvm-svn: 6909
2003-06-26 04:20:38 +00:00
Brian Gaeke dda8abec9b Integrate the C writer's name mangler.
llvm-svn: 6908
2003-06-25 22:00:39 +00:00
Brian Gaeke 25e766aca5 First draft of X86 LLC backend. This should be OK for small programs like
Shootout, but it has some issues with bigger programs. Work in progress.

llvm-svn: 6907
2003-06-25 18:01:07 +00:00
Chris Lattner 63912f05ab Add test for instcombine -1*X -> -X
llvm-svn: 6905
2003-06-25 17:10:34 +00:00
Chris Lattner 35236d8477 Instcombine: X * -1 -> -X
llvm-svn: 6904
2003-06-25 17:09:20 +00:00
Chris Lattner 81d75b7cfc Fix bug: LevelRaise/2003-06-25-ExprAnalysis.ll
llvm-svn: 6903
2003-06-25 17:09:03 +00:00
Chris Lattner 930c8595f8 New testcase
llvm-svn: 6902
2003-06-25 17:08:34 +00:00
Chris Lattner b396afde26 Fix bug: Mem2Reg/2003-06-26-IterativePromote.ll
llvm-svn: 6901
2003-06-25 14:58:56 +00:00
Chris Lattner fec65d7526 New testcase
llvm-svn: 6900
2003-06-25 14:55:30 +00:00
Chris Lattner 0b3def4d49 Remove completed tasks
llvm-svn: 6899
2003-06-25 14:31:06 +00:00
Joel Stanley fbb9ab4913 - Fixed name mangling conditions to handle 'linkonce' linkage type. In
particular, name mangling for GlobalValues only occurs when the linkage type is
internal or when the name must be mangled to avoid a collision.  See comments in
CWriter::getValueName for more information.

- 'inline' keyword is now emitted for functions with 'linkonce' linkage type.

- Fixed typos.

llvm-svn: 6898
2003-06-25 04:52:09 +00:00
Chris Lattner 2599356122 Try to run cleanups even if nothing was modified in the preview passes
llvm-svn: 6897
2003-06-25 04:13:52 +00:00
Chris Lattner 0192b72fde Run dead arg elimination, and tell it that it's ok to hack up non-internal functions
llvm-svn: 6896
2003-06-25 04:13:36 +00:00
Chris Lattner 2ab04f7a41 Add argument to DAE to allow operation on non-internal functions
llvm-svn: 6895
2003-06-25 04:12:49 +00:00
Brian Gaeke 7610971759 It seems likely that floats would need a cast too, because they are
ordinarily promoted to doubles.

llvm-svn: 6894
2003-06-25 03:05:33 +00:00
Chris Lattner ef3d5d055d New testcase
llvm-svn: 6893
2003-06-24 23:40:27 +00:00
Chris Lattner 7f8bb880b4 Don't print message, remove temp files
llvm-svn: 6892
2003-06-24 23:38:09 +00:00
Chris Lattner ee967711e9 Fix bug: ADCE/2003-06-24-BadSuccessor.ll
llvm-svn: 6891
2003-06-24 23:02:45 +00:00
Chris Lattner 67baccf458 New testcase
llvm-svn: 6890
2003-06-24 22:58:05 +00:00
Chris Lattner 8bd8bc8399 Make assertion more descriptive
llvm-svn: 6889
2003-06-24 22:20:19 +00:00