Commit Graph

9377 Commits

Author SHA1 Message Date
Chris Lattner
7e6182319d use more specific cast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20297 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-24 05:26:04 +00:00
Chris Lattner
69331f5726 add more checking
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20296 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-24 05:25:17 +00:00
Chris Lattner
83beacddc9 Do not read free'd memory when printing an error message.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20295 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-24 04:59:49 +00:00
Chris Lattner
ad993cbb77 add a new method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20293 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-24 02:37:26 +00:00
Tanya Lattner
00aaadf9f0 Only print out machine instructions before modulo scheduling if we are actually doing modulo scheduling! :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20292 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-24 02:14:44 +00:00
Andrew Lenharth
3a7118d7da Ah the problems you have to fix when you stray from the One True Way (TM)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20290 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-23 17:33:42 +00:00
Chris Lattner
1f21ef1511 make this more efficient. Scan up to 16 nodes, not the whole list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20289 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-23 16:53:04 +00:00
Chris Lattner
8daf056c90 new method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20288 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-23 16:51:11 +00:00
Chris Lattner
35f0aecdb0 Reduce the amount of searching this assertion does. On a testcase of mine,
this reduces the time for -simplifycfg in a debug build from 106s to 14.82s


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20286 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-23 07:09:08 +00:00
Chris Lattner
572dd08204 Silence some uninit variable warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20284 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-23 05:57:21 +00:00
Tanya Lattner
01b4abd348 Fixed bug in findAllcircuits. Fixed branch addition to schedule. Added debug information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20280 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-23 02:01:42 +00:00
Andrew Lenharth
7bc47020f6 oops
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20278 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-22 23:29:25 +00:00
Chris Lattner
13d0108666 Remove use of bind_obj, deleter, and finegrainify namespacification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20277 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-22 23:27:21 +00:00
Chris Lattner
cfa2f8eef4 Remove use of bind_obj
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20276 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-22 23:22:58 +00:00
Chris Lattner
a08976b092 C++ is not a functional programming language.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20274 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-22 23:13:58 +00:00
Andrew Lenharth
032f235f02 dynamic stack allocas
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20273 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-22 21:59:48 +00:00
Chris Lattner
84734ce8ef Fix a bug in the 'store fpimm, ptr' -> 'store intimm, ptr' handling code.
Changing 'op' here caused us to not enter the store into a map, causing
reemission of the code!!  In practice, a simple loop like this:

no_exit:                ; preds = %no_exit, %entry
        %indvar = phi uint [ %indvar.next, %no_exit ], [ 0, %entry ]            ; <uint> [#uses=3]
        %tmp.4 = getelementptr "complex long double"* %P, uint %indvar, uint 0          ; <double*> [#uses=1]
        store double 0.000000e+00, double* %tmp.4
        %indvar.next = add uint %indvar, 1              ; <uint> [#uses=2]
        %exitcond = seteq uint %indvar.next, %N         ; <bool> [#uses=1]
        br bool %exitcond, label %return, label %no_exit

was being code gen'd to:

.LBBtest_1:     # no_exit
        movl %edx, %esi
        shll $4, %esi
        movl $0, 4(%eax,%esi)
        movl $0, (%eax,%esi)
        incl %edx
        movl $0, (%eax,%esi)
        movl $0, 4(%eax,%esi)
        cmpl %ecx, %edx
        jne .LBBtest_1  # no_exit

Note that we are doing 4 32-bit stores instead of 2.  Now we generate:

.LBBtest_1:     # no_exit
        movl %edx, %esi
        incl %esi
        shll $4, %edx
        movl $0, (%eax,%edx)
        movl $0, 4(%eax,%edx)
        cmpl %ecx, %esi
        movl %esi, %edx
        jne .LBBtest_1  # no_exit

This is much happier, though it would be even better if the increment of ESI
was scheduled after the compare :-/


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20265 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-22 07:23:39 +00:00
Andrew Lenharth
97f7735125 no longer build as a shared library
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20264 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-22 04:58:26 +00:00
Chris Lattner
6943570f3a Fix problems running the HowToUseJIT on powerpc, and probably problems with
ANY program that does not have all functions internalized.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20258 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-20 18:43:35 +00:00
Jeff Cohen
45a1b26caa Fix silly mistake.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20256 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-20 02:48:51 +00:00
Jeff Cohen
875d08e36b Implement standard I/O redirection in ExecuteAndWait().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20255 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-20 02:43:04 +00:00
Chris Lattner
97716a47a1 Add support for ".so" files compiled with LLVM which contain LLVM bytecode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20253 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-19 18:30:29 +00:00
Chris Lattner
b9476d9b45 Eliminate silly warnings from the linker of the form:
WARNING: Type conflict between types named 'union.._604.'.
    Src=' %union.._604.'.
   Dest=' %union.._604.'


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20252 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-19 17:52:37 +00:00
Jeff Cohen
23a1cf3e08 Change __MINGW to __MINGW32__. Patch submitted by Henrik Bach.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20243 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-19 03:01:13 +00:00
Jeff Cohen
d79bcfddbc Make PreventCoreFiles() do the right thing on Windows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20237 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-18 07:05:18 +00:00
Misha Brukman
1fb623e4ed Fix compilation errors with VS 2005, patch contributed by Aaron Gray.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20232 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-17 21:40:27 +00:00
Misha Brukman
d3f03e4b50 Fix compilation errors with VS 2005, patch by Aaron Gray.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20231 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-17 21:39:27 +00:00
Chris Lattner
d8658616cf Don't rely on doubles comparing identical to each other, which doesn't work
for 0.0 and -0.0.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20230 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-17 20:17:32 +00:00
Chris Lattner
aa781b3404 Don't sink argument loads into loops or other bad places. This disables folding of argument loads with instructions that are not in the entry block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20228 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-17 19:40:32 +00:00
Chris Lattner
1a84bd38ef Do not mark obviously unreachable blocks live when processing PHI nodes,
and handle incomplete control dependences correctly.  This fixes:

Regression/Transforms/ADCE/dead-phi-edge.ll
  -> a missed optimization

Regression/Transforms/ADCE/dead-phi-edge.ll
  -> a compiler crash distilled from QT4


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20227 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-17 19:28:49 +00:00
Chris Lattner
2352fec205 Scary typo that fixes Regression/Transforms/IndVarsSimplify/2005-02-17-TruncateExprCrash.ll
and PR515.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20224 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-17 16:54:16 +00:00
Jeff Cohen
e5f7e65f95 Arg list already has program name in it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20208 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-16 04:43:45 +00:00
Tanya Lattner
db1680b2be Fixed node deletion bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20207 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-16 04:00:59 +00:00
Chris Lattner
2ee51cbeb8 Instead of doing a manual comparison loop, just use memcmp, thanks to JohnC
for the suggestion! :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20203 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-15 22:12:10 +00:00
Chris Lattner
e4b6a86852 Make this more efficient now that we know both files are the same length.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20202 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-15 22:01:43 +00:00
Misha Brukman
1e1a99fffa Fix spelling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20201 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-15 21:59:53 +00:00
Reid Spencer
45d55641fa Adjust DiffFilesWithTolerance to help poor cygwin's mmap facility by
handling zero length files a little more intelligently. If both files are
zero length then we return 0 (true) indicating a match. If only one of the
files is zero length then we return 1 (false) indicating that the files
differ. If the files don't agree in length then they can't match so we
skip the first loop that looks for a quick match.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20200 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-15 21:47:02 +00:00
Chris Lattner
7a823bd01f Fix a problem where the PPC backend lost track of the fact that it had
to save and restore the LR register on entry and exit of a leaf function
that needed to access globals or the constant pool.  This should hopefully
fix oscar from sending the PPC tester spinning out of control.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20197 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-15 20:26:49 +00:00
Chris Lattner
7a0c775044 Add a sanity check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20195 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-15 18:48:48 +00:00
Chris Lattner
d672ab936f Add a new method to make it easy to update graphs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20194 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-15 18:40:55 +00:00
Chris Lattner
8399e02a2c Fix volatile load/store of pointers. Consider this testcase:
void %test(int** %P) {
  %A = volatile load int** %P
  ret void
}

void %test2(int*** %Q) {
  %P = load int*** %Q
  volatile store int** %P, int*** %Q
  ret void
}

instead of emitting:

void test(int **l1_P) {
  int *l2_A;

  l2_A = (int **((volatile int **)l1_P));
  return;
}
void test2(int ***l2_Q) {
  int **l1_P;

  l1_P = *l2_Q;
  *((volatile int ***)l2_Q) = l1_P;
  return;
}

... which is loading/storing volatile pointers, not through volatile pointers,
emit this (which is right):

void test(int **l1_P) {
  int *l3_A;

  l3_A = *((int * volatile*)l1_P);
  return;
}
void test2(int ***l2_Q) {
  int **l1_P;

  l1_P = *l2_Q;
  *((int ** volatile*)l2_Q) = l1_P;
  return;
}


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20191 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-15 05:52:14 +00:00
Chris Lattner
0798056b28 Fix a bug in my previous change to this, which broke the build on sparcs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20184 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-14 21:42:10 +00:00
Chris Lattner
27e192196f Print GEP offsets as signed values instead of unsigned values. On X86, this
prints:

getelementptr (int* %A, int -1)

as: "(A) - 4" instead of "(A) + 18446744073709551612", which makes the
assembler much happier.

This fixes test/Regression/CodeGen/X86/2005-02-14-IllegalAssembler.ll,
and Benchmarks/Prolangs-C/cdecl with LLC on X86.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20183 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-14 21:40:26 +00:00
Chris Lattner
8a7980b5ea Fix the second bug attached to PR504.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20181 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-14 20:11:45 +00:00
Chris Lattner
a92d12c053 Work around GCC PR19958, which causes programs to sometimes crash after
printing help output or version info.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20180 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-14 19:17:29 +00:00
Misha Brukman
b70aaa62b6 Write out single characters as chars, not strings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20179 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-14 18:52:35 +00:00
Chris Lattner
9d30e22da0 Implement CodeGen/CBackend/2005-02-14-VolatileOperations.ll
Volatile loads and stores need to emit volatile pointer operations in C.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20177 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-14 16:47:52 +00:00
Andrew Lenharth
572af908e4 fix setcc on floats, fixes singlesource:pi, perhaps others
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20172 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-14 05:41:43 +00:00
Chris Lattner
550c57cb30 Fix the llvm bootstrap
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20170 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-13 23:37:09 +00:00
Chris Lattner
45495c5248 Move helper function here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20168 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-13 23:13:47 +00:00