oota-llvm.git
21 years agoUpdated from the discussion on July 21, 2003.
John Criswell [Mon, 21 Jul 2003 22:22:48 +0000 (22:22 +0000)]
Updated from the discussion on July 21, 2003.
Expanded upon testing priorities.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7225 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoFixed misspelling.
Misha Brukman [Mon, 21 Jul 2003 21:58:16 +0000 (21:58 +0000)]
Fixed misspelling.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7223 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoSimplify code a bit
Chris Lattner [Mon, 21 Jul 2003 19:56:49 +0000 (19:56 +0000)]
Simplify code a bit

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7217 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoAdded code that checks to see if a global variable is external before replacing
John Criswell [Mon, 21 Jul 2003 19:42:57 +0000 (19:42 +0000)]
Added code that checks to see if a global variable is external before replacing
a load of the global variable with the variable's constant value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7216 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoRegression test for the Instruction Combining optimizization.
John Criswell [Mon, 21 Jul 2003 19:41:51 +0000 (19:41 +0000)]
Regression test for the Instruction Combining optimizization.
This test helps to see if the optimization correctly handles variables that
are declared constant and external.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7215 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoRemove unneccesary #ifdefs
Chris Lattner [Mon, 21 Jul 2003 19:23:31 +0000 (19:23 +0000)]
Remove unneccesary #ifdefs

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7214 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoFix warnings
Chris Lattner [Mon, 21 Jul 2003 19:20:44 +0000 (19:20 +0000)]
Fix warnings

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7213 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoRemove instloops library
Chris Lattner [Mon, 21 Jul 2003 19:07:27 +0000 (19:07 +0000)]
Remove instloops library

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7210 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoEliminated dead code.
Misha Brukman [Mon, 21 Jul 2003 16:34:35 +0000 (16:34 +0000)]
Eliminated dead code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7209 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoAdded special consideration for instrumentation strategy
Anand Shukla [Sun, 20 Jul 2003 15:39:30 +0000 (15:39 +0000)]
Added special consideration for instrumentation strategy

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7208 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoInitialize the target architecture based on compiler defines, so if compiled on
Misha Brukman [Fri, 18 Jul 2003 22:21:40 +0000 (22:21 +0000)]
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

21 years agoAdded check for inlinable function
Anand Shukla [Fri, 18 Jul 2003 20:55:26 +0000 (20:55 +0000)]
Added check for inlinable function

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7206 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoPlease, save your applause^H^H^H^H^H^H^H^Hflames for the end...
Brian Gaeke [Fri, 18 Jul 2003 20:23:43 +0000 (20:23 +0000)]
Please, save your applause^H^H^H^H^H^H^H^Hflames for the end...

Avoid a fall-through in the (stubby) treatment of the longjmp intrinsic
call which causes llc & lli to core-dump.

Add a sort-of treatment of cast double to ulong. I am not really sure
what a user should expect to see upon casting a negative FP value to
unsigned long long. But with what is given here, I was able to write
a program that could cast -123.456 to ulong and back and get -123.0,
which seems like a step in the right direction.  GCC seems to give you
0. I don't know if I'd consider that useful.

These cases were coming up in GNU coreutils-5.0.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7205 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoCleaned up the code which chooses the appropriate value for the file descriptor
Misha Brukman [Fri, 18 Jul 2003 18:33:38 +0000 (18:33 +0000)]
Cleaned up the code which chooses the appropriate value for the file descriptor
to pass to dlsym() -- Linux/x86 wants 0 while Sparc/Solaris wants RTLD_SELF,
which is not zero. Thanks to Chris for the suggestion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7204 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoAdded a DEBUG() guard to a debug information printout.
Misha Brukman [Fri, 18 Jul 2003 18:03:45 +0000 (18:03 +0000)]
Added a DEBUG() guard to a debug information printout.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7203 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoAdded pass to instrument backedges for lightweight tracing
Anand Shukla [Fri, 18 Jul 2003 16:25:40 +0000 (16:25 +0000)]
Added pass to instrument backedges for lightweight tracing

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7202 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoA pass to combine multiple backedges that go to same target
Anand Shukla [Fri, 18 Jul 2003 16:08:32 +0000 (16:08 +0000)]
A pass to combine multiple backedges that go to same target

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7201 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoUse getClassB for load and store; we don't want to abort when we
Brian Gaeke [Thu, 17 Jul 2003 21:30:06 +0000 (21:30 +0000)]
Use getClassB for load and store; we don't want to abort when we
try to load or store through a bool*.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7195 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoFix typo in call to isUnresolvableFunc, which was breaking the build.
Brian Gaeke [Thu, 17 Jul 2003 19:07:46 +0000 (19:07 +0000)]
Fix typo in call to isUnresolvableFunc, which was breaking the build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7194 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoDinakar and I fixed a bug where we were trying to get the initializer of
John Criswell [Thu, 17 Jul 2003 19:06:55 +0000 (19:06 +0000)]
Dinakar and I fixed a bug where we were trying to get the initializer of
an external constant.  Since external constants don't have initializers, we
were failing on an assert() call in llvm/GlobalVariable.h.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7193 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoAdded bits about MachineFunctionPass
Brian Gaeke [Thu, 17 Jul 2003 18:53:20 +0000 (18:53 +0000)]
Added bits about MachineFunctionPass

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7192 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoTests for globals with different kinds of behavior in DS Analysis.
Vikram S. Adve [Wed, 16 Jul 2003 21:48:38 +0000 (21:48 +0000)]
Tests for globals with different kinds of behavior in DS Analysis.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7191 91177308-0d34-0410-b5e6-96231b3b80d8

21 years ago(1) Added DSGraph::cloneReachableSubgraph and DSGraph::cloneReachableNodes
Vikram S. Adve [Wed, 16 Jul 2003 21:45:15 +0000 (21:45 +0000)]
(1) Added DSGraph::cloneReachableSubgraph and DSGraph::cloneReachableNodes
    to clone the subgraph reachable from a set of root nodes, into the
    current graph, merging the global nodes into those in the current graph.
(2) Added DSGraph::updateFromGlobalGraph() to rematerialize nodes from the
    globals graph into the current graph in both BU and TD passes.
(3) Added hash_set<const GlobalValue*> InlinedGlobals: a set of globals to
    track which globals have been inlined into the current graph from
    callers or callees.  In the TD pass, such globals are up-to-date and
    do not need to be rematerialized from the GlobalsGraph.
(4) Added StripIncompleteBit/KeepIncompleteBit to remove incomplete bit
    when cloning nodes into the globals graph.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7190 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoRematerialize nodes from the globals graph into the current graph
Vikram S. Adve [Wed, 16 Jul 2003 21:42:03 +0000 (21:42 +0000)]
Rematerialize nodes from the globals graph into the current graph
after all callees are inlined into the current graph.

NOTE: There's also a major bug fix for the BU pass in DataStructure.cpp,
which ensures that resolvable indirect calls are not moved out to the
globals graph, so that they are eventually inlined (if possible).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7189 91177308-0d34-0410-b5e6-96231b3b80d8

21 years ago(1) Rematerialize nodes from the globals graph into the current graph
Vikram S. Adve [Wed, 16 Jul 2003 21:40:28 +0000 (21:40 +0000)]
(1) Rematerialize nodes from the globals graph into the current graph
    after all callers are inlined into the current graph.
(2) Optimize the way a graph is inlined into its callees in the TD phase:
    (a) Use DSGraph::cloneReachableSubgraph to clone only a subgraph at
        each call site, for faster inlining.
    (b) Clone separately for the same callee at different call sites,
        since only the reachable subgraph is being cloned, not the entire
        caller graph.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7188 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoImplement 2 important changes: (1) rematerialization from the globals graph,
Vikram S. Adve [Wed, 16 Jul 2003 21:36:31 +0000 (21:36 +0000)]
Implement 2 important changes: (1) rematerialization from the globals graph,
and (2) faster inlining by cloning only reachable nodes.  In particular:
(1) Added DSGraph::cloneReachableSubgraph and DSGraph::cloneReachableNodes
    to clone the subgraph reachable from a set of root nodes, into the
    current graph, merging the global nodes into thos in the current graph.
    The TD pass now uses this for faster inlining, and so does the
    next function.
(2) Added DSGraph::updateFromGlobalGraph() to rematerialize nodes from the
    globals graph into the current graph in both BU and TD passes.
(3) `I' flags are removed from all nodes in the globals graph, because they
    are difficult to maintain correctly and are not needed anyway.
(4) Aux. function calls are only removed to the globals graph if they
    will never be resovled.  (This is what fixed gap.)  The immediate
    reason is that if we took these out of a function (and moved them to
    the globals graph) we would need to rematerialize these nodes into the
    function graph for every function in the BU pass.  The longer term
    problem is that we would need to find a way to remove them from the
    globals graph iff they have been resolved on all paths through the
    call graph.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7187 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoFactor out the test for unresolvable external functions into
Vikram S. Adve [Wed, 16 Jul 2003 21:25:17 +0000 (21:25 +0000)]
Factor out the test for unresolvable external functions into
isUnresolvableFunc() (I thought I needed this externally.
I don't, but it's still nicer this way.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7186 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoFixed the number translation scheme for the integer condition code registers: it
Misha Brukman [Wed, 16 Jul 2003 20:30:40 +0000 (20:30 +0000)]
Fixed the number translation scheme for the integer condition code registers: it
now works in instructions which require a 2-bit or 3-bit INTcc code.

Incidentally, that means that the representation of INTcc registers is now the
same in both integer and FP instructions. Thus, code became much simpler and
cleaner.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7185 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoThe name should really be `simm11' to follow the naming convention, but this has
Misha Brukman [Wed, 16 Jul 2003 20:27:44 +0000 (20:27 +0000)]
The name should really be `simm11' to follow the naming convention, but this has
no change in functionality.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7184 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoMarked some of the phony targets are PHONY. This will hopefully speed
John Criswell [Wed, 16 Jul 2003 20:26:06 +0000 (20:26 +0000)]
Marked some of the phony targets are PHONY.  This will hopefully speed
up builds a little bit since it will prevent GNU make from matching these
phony targets against implicit rules.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7183 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoNo need for a second immediate field if the class already inherits one.
Misha Brukman [Tue, 15 Jul 2003 21:27:14 +0000 (21:27 +0000)]
No need for a second immediate field if the class already inherits one.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7182 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoEncode predict = 1 by default, because the Sparc assembler does this.
Misha Brukman [Tue, 15 Jul 2003 21:26:49 +0000 (21:26 +0000)]
Encode predict = 1 by default, because the Sparc assembler does this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7181 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoFixed a bug: outputting name of variable instead of its value.
Misha Brukman [Tue, 15 Jul 2003 21:26:09 +0000 (21:26 +0000)]
Fixed a bug: outputting name of variable instead of its value.
Also, placed DEBUG() guards around debug information so that the generated file
is much smaller and hence should be faster to preprocess/compile.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7180 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoThis optimization greatly enhances efficiency of creating new instructions by
Misha Brukman [Tue, 15 Jul 2003 21:00:32 +0000 (21:00 +0000)]
This optimization greatly enhances efficiency of creating new instructions by
masking and shifting operands directly into their place in the instruction,
instead of the old-fashioned way of ORing in each bit separately.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7179 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoCorrectly handle calls to functions which are further away than 2**32 bits will
Misha Brukman [Tue, 15 Jul 2003 19:09:43 +0000 (19:09 +0000)]
Correctly handle calls to functions which are further away than 2**32 bits will
allow, i.e. make a sequence of instructions to enable an indirect call using
jump-and-link and 2 temporary registers (which we save and ultimately restore).

Warning: if the delay slot of a function call is used to do meaningful work and
not just a NOP, this behavior is incorrect. However, the Sparc backend does not
yet utilize the delay slots effectively, so it is not necessary to make an
overly complicated algorithm for something that's not used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7178 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoClean up my last checkin: code is easier to read and explains the differences in
Misha Brukman [Tue, 15 Jul 2003 15:58:26 +0000 (15:58 +0000)]
Clean up my last checkin: code is easier to read and explains the differences in
usage of the special file handle RTLD_SELF on Sparc/Solaris vs. 0 on Linux/x86.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7177 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoOn Sparc/Solaris, the special handle RTLD_SELF is used as a handle referring to
Misha Brukman [Tue, 15 Jul 2003 15:55:32 +0000 (15:55 +0000)]
On Sparc/Solaris, the special handle RTLD_SELF is used as a handle referring to
the program's executing image, not 0 as it is on Linux/x86 and possibly other
systems.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7176 91177308-0d34-0410-b5e6-96231b3b80d8

21 years ago* Added support for the %ccr register
Misha Brukman [Mon, 14 Jul 2003 23:26:03 +0000 (23:26 +0000)]
* 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)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7175 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoThe word `separate' only has one `e'.
Misha Brukman [Mon, 14 Jul 2003 17:26:34 +0000 (17:26 +0000)]
The word `separate' only has one `e'.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7174 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoThe word `separate' only has one `e'.
Misha Brukman [Mon, 14 Jul 2003 17:20:40 +0000 (17:20 +0000)]
The word `separate' only has one `e'.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7173 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoFixed: </pre</p> => </pre></p>
Misha Brukman [Mon, 14 Jul 2003 17:05:20 +0000 (17:05 +0000)]
Fixed: </pre</p> => </pre></p>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7172 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoMerged in changes from PRE101 in the prerelease branch.
John Criswell [Mon, 14 Jul 2003 16:52:07 +0000 (16:52 +0000)]
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().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7171 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoUse uint32_t for table index and size: table will never be > 4GB.
Vikram S. Adve [Fri, 11 Jul 2003 22:02:28 +0000 (22:02 +0000)]
Use uint32_t for table index and size: table will never be > 4GB.
Also, make Pointer type depend on architecture.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7170 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoTrace loads and stores as they happen (stores were being
Vikram S. Adve [Fri, 11 Jul 2003 21:57:43 +0000 (21:57 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7169 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoIf we have a constant pointer reference to a function, we were printing
Brian Gaeke [Fri, 11 Jul 2003 21:57:01 +0000 (21:57 +0000)]
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.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7168 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoFix some serious floating-point bugs (fixes test cases such as Oscar,
Brian Gaeke [Fri, 11 Jul 2003 18:18:35 +0000 (18:18 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7165 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoAdded functionality to instrmentation pass
Anand Shukla [Thu, 10 Jul 2003 21:55:57 +0000 (21:55 +0000)]
Added functionality to instrmentation pass

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7161 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoFixed grammatical error.
Misha Brukman [Thu, 10 Jul 2003 21:38:28 +0000 (21:38 +0000)]
Fixed grammatical error.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7160 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoSeveral important bug fixes:
Vikram S. Adve [Thu, 10 Jul 2003 20:07:54 +0000 (20:07 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7159 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoBug fix in creating constants: need 1U << 31, not 1 << 31.
Vikram S. Adve [Thu, 10 Jul 2003 19:48:19 +0000 (19:48 +0000)]
Bug fix in creating constants: need 1U << 31, not 1 << 31.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7158 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoFold cast-to-bool into not. Later, this should also be folded into other
Vikram S. Adve [Thu, 10 Jul 2003 19:47:42 +0000 (19:47 +0000)]
Fold cast-to-bool into not.  Later, this should also be folded into other
boolean operations: AND, OR, XOR.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7157 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoValues stored in CallArgsDescriptor cannot be const.
Vikram S. Adve [Thu, 10 Jul 2003 19:46:15 +0000 (19:46 +0000)]
Values stored in CallArgsDescriptor cannot be const.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7156 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoisMarkedForSpill() should be const.
Vikram S. Adve [Thu, 10 Jul 2003 19:45:28 +0000 (19:45 +0000)]
isMarkedForSpill() should be const.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7155 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoChange interface to MachineInstr::substituteValue to specify more precisely
Vikram S. Adve [Thu, 10 Jul 2003 19:45:07 +0000 (19:45 +0000)]
Change interface to MachineInstr::substituteValue to specify more precisely
which args can be substituted: defsOnly, defsAndUses or usesOnly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7154 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoPrint out all neighbors in interference graph, not just higher-numbered ones.
Vikram S. Adve [Thu, 10 Jul 2003 19:43:33 +0000 (19:43 +0000)]
Print out all neighbors in interference graph, not just higher-numbered ones.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7153 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoSeveral fixes to handling of int CC register:
Vikram S. Adve [Thu, 10 Jul 2003 19:42:55 +0000 (19:42 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7152 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoSeveral fixes to handling of int CC register:
Vikram S. Adve [Thu, 10 Jul 2003 19:42:11 +0000 (19:42 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7151 91177308-0d34-0410-b5e6-96231b3b80d8

21 years ago*** empty log message ***
Vikram S. Adve [Thu, 10 Jul 2003 19:32:38 +0000 (19:32 +0000)]
*** empty log message ***

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7150 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoJust documentation.
Vikram S. Adve [Thu, 10 Jul 2003 19:31:26 +0000 (19:31 +0000)]
Just documentation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7149 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoAdd phony target "bytecode" to ensure that it works in recursive makes.
Vikram S. Adve [Thu, 10 Jul 2003 19:25:29 +0000 (19:25 +0000)]
Add phony target "bytecode" to ensure that it works in recursive makes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7147 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoLowercase versions of `occurrence' need to be spelled correctly, too.
Misha Brukman [Thu, 10 Jul 2003 17:05:26 +0000 (17:05 +0000)]
Lowercase versions of `occurrence' need to be spelled correctly, too.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7142 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoMove the space separator to where it really belongs: in the print statement, not
Misha Brukman [Thu, 10 Jul 2003 16:52:41 +0000 (16:52 +0000)]
Move the space separator to where it really belongs: in the print statement, not
in a variable assignment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7141 91177308-0d34-0410-b5e6-96231b3b80d8

21 years ago`Occurrence' has no `a' and the `r' is doubled.
Misha Brukman [Thu, 10 Jul 2003 16:49:51 +0000 (16:49 +0000)]
`Occurrence' has no `a' and the `r' is doubled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7140 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoConverted tabs to spaces.
Misha Brukman [Thu, 10 Jul 2003 16:35:17 +0000 (16:35 +0000)]
Converted tabs to spaces.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7139 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoSome beautification changes (tabs to spaces, removed extra blank lines);
Misha Brukman [Wed, 9 Jul 2003 17:33:50 +0000 (17:33 +0000)]
Some beautification changes (tabs to spaces, removed extra blank lines);
no functionality changed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7138 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoSimplified DOTRACING flag.
Vikram S. Adve [Tue, 8 Jul 2003 23:40:48 +0000 (23:40 +0000)]
Simplified DOTRACING flag.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7135 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoCorrected the Table of Contents.
John Criswell [Tue, 8 Jul 2003 20:35:59 +0000 (20:35 +0000)]
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).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7132 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoPointer hash table reallocation code seems never to have been tested!
Vikram S. Adve [Tue, 8 Jul 2003 18:42:44 +0000 (18:42 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7130 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoNative libraries (libinstr*.a) should not have been taken out when
Vikram S. Adve [Tue, 8 Jul 2003 18:40:58 +0000 (18:40 +0000)]
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!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7129 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoUse libinstr.$(ARCH).a instead of libinstr64.a
Vikram S. Adve [Tue, 8 Jul 2003 18:39:51 +0000 (18:39 +0000)]
Use libinstr.$(ARCH).a instead of libinstr64.a
Also, $(RM) needs -f flag.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7128 91177308-0d34-0410-b5e6-96231b3b80d8

21 years ago*** empty log message ***
Vikram S. Adve [Tue, 8 Jul 2003 15:39:02 +0000 (15:39 +0000)]
*** empty log message ***

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7126 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoRemoved size_t from the parameter list of the malloc() prototype in generated C
John Criswell [Tue, 8 Jul 2003 14:52:09 +0000 (14:52 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7125 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoStop using the `Offset' variable, as we are cycling through the bits of a field
Misha Brukman [Mon, 7 Jul 2003 22:30:44 +0000 (22:30 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7123 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoFixed indentation.
Misha Brukman [Mon, 7 Jul 2003 22:28:42 +0000 (22:28 +0000)]
Fixed indentation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7122 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoRemoved an extra slash that appears in the path name when these variables are
Misha Brukman [Mon, 7 Jul 2003 22:27:05 +0000 (22:27 +0000)]
Removed an extra slash that appears in the path name when these variables are
combined with a '/' separating them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7121 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoElaborated assembly syntax of instructions in the comments.
Misha Brukman [Mon, 7 Jul 2003 22:18:42 +0000 (22:18 +0000)]
Elaborated assembly syntax of instructions in the comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7120 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoRemoved unnecessary assignment (it was taken care by a superclass) and clarified
Misha Brukman [Mon, 7 Jul 2003 22:18:06 +0000 (22:18 +0000)]
Removed unnecessary assignment (it was taken care by a superclass) and clarified
some comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7119 91177308-0d34-0410-b5e6-96231b3b80d8

21 years ago* Made $Template refer to a path relative to the checked-out tree
Misha Brukman [Mon, 7 Jul 2003 21:27:40 +0000 (21:27 +0000)]
* 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7118 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoFixed the directions for building the C front end.
John Criswell [Mon, 7 Jul 2003 19:29:20 +0000 (19:29 +0000)]
Fixed the directions for building the C front end.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7117 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoAdded information about how to unpack the distribution for those who do not
John Criswell [Mon, 7 Jul 2003 19:27:35 +0000 (19:27 +0000)]
Added information about how to unpack the distribution for those who do not
have access to CVS.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7116 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoInsert workaround for GAS bug in assembling FLD/FSTP XWORD PTR [...]
Brian Gaeke [Mon, 7 Jul 2003 18:34:20 +0000 (18:34 +0000)]
Insert workaround for GAS bug in assembling FLD/FSTP XWORD PTR [...]
instructions, by outputting them as bytes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7115 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoMoved RegClassIDs enum to be next to the RegTypes enum.
Misha Brukman [Mon, 7 Jul 2003 16:52:39 +0000 (16:52 +0000)]
Moved RegClassIDs enum to be next to the RegTypes enum.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7114 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoCorrection to last fix: Pointer types do not return true in Type::IsIntegral().
Vikram S. Adve [Sun, 6 Jul 2003 22:50:31 +0000 (22:50 +0000)]
Correction to last fix: Pointer types do not return true in Type::IsIntegral().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7113 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoChoose register instead of immediate for ConstantExpr in ChooseRegOrImmed.
Vikram S. Adve [Sun, 6 Jul 2003 20:33:21 +0000 (20:33 +0000)]
Choose register instead of immediate for ConstantExpr in ChooseRegOrImmed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7112 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoMajor bug fix though it happened rarely (only on a compare after an
Vikram S. Adve [Sun, 6 Jul 2003 20:13:59 +0000 (20:13 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7111 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoRegression test for bug in reg. allocation that was using %xcc instead
Vikram S. Adve [Sun, 6 Jul 2003 20:12:18 +0000 (20:12 +0000)]
Regression test for bug in reg. allocation that was using %xcc instead
of %icc even for 32-bit and smaller comparisons.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7110 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoMake the RegClassID values public -- there is no other way to get them.
Vikram S. Adve [Sun, 6 Jul 2003 19:53:59 +0000 (19:53 +0000)]
Make the RegClassID values public -- there is no other way to get them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7109 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoAdd -d option to trust the disassembler.
Brian Gaeke [Thu, 3 Jul 2003 21:44:32 +0000 (21:44 +0000)]
Add -d option to trust the disassembler.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7105 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agohere little scriptie, nice scriptie...
Brian Gaeke [Thu, 3 Jul 2003 21:15:02 +0000 (21:15 +0000)]
here little scriptie, nice scriptie...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7104 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoApparently, the "regType" and "regClass" used in the Sparc backend are not both
Misha Brukman [Thu, 3 Jul 2003 18:36:47 +0000 (18:36 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7103 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoAdded support for poolallocarray and poolmakeunfreeable. The latter is used by the...
Sumant Kowshik [Thu, 3 Jul 2003 17:55:47 +0000 (17:55 +0000)]
Added support for poolallocarray and poolmakeunfreeable. The latter is used by the SAFECode project

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7102 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoFixed an error in the pathname to LLVMGCCDIR for the pre-built binaries (forgot
John Criswell [Thu, 3 Jul 2003 16:49:40 +0000 (16:49 +0000)]
Fixed an error in the pathname to LLVMGCCDIR for the pre-built binaries (forgot
that <> denotes a tag).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7100 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoAdded information on software requirements for unpacking the archives that we
John Criswell [Thu, 3 Jul 2003 16:43:01 +0000 (16:43 +0000)]
Added information on software requirements for unpacking the archives that we
will eventually distribute.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7099 91177308-0d34-0410-b5e6-96231b3b80d8

21 years ago* Reworded a bit about JITs (I don't like acronyms followed by 's)
Misha Brukman [Thu, 3 Jul 2003 16:29:36 +0000 (16:29 +0000)]
* 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7098 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoAdded another remark on how building the C front end is optional.
John Criswell [Thu, 3 Jul 2003 16:03:39 +0000 (16:03 +0000)]
Added another remark on how building the C front end is optional.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7097 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoPerformed a major update for the pre-release.
John Criswell [Thu, 3 Jul 2003 16:01:38 +0000 (16:01 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7096 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoAdding a web page on how to start a new LLVM Project.
John Criswell [Thu, 3 Jul 2003 15:37:52 +0000 (15:37 +0000)]
Adding a web page on how to start a new LLVM Project.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7095 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoReuse the values if they are constants: this is important so that we index into the...
Chris Lattner [Thu, 3 Jul 2003 06:42:38 +0000 (06:42 +0000)]
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7093 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoNew testcase
Chris Lattner [Thu, 3 Jul 2003 06:29:15 +0000 (06:29 +0000)]
New testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7092 91177308-0d34-0410-b5e6-96231b3b80d8

21 years agoRemove globals more aggressively from graphs.
Chris Lattner [Thu, 3 Jul 2003 02:03:53 +0000 (02:03 +0000)]
Remove globals more aggressively from graphs.
Fix a bug where we removed nodes that were marked U.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7090 91177308-0d34-0410-b5e6-96231b3b80d8