Commit Graph

3521 Commits

Author SHA1 Message Date
Andrew Lenharth
f69a98cea3 fix up stack pointer adjustments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20442 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-04 21:40:02 +00:00
Andrew Lenharth
3381913322 fix FCMOVxx typo, set rem and div to hardcode target reg to be the same as the one the assembler uese, update ISel to put values in regs used by assembler for rem and div
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20434 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-04 20:09:23 +00:00
Andrew Lenharth
8d46a268c5 turn on IEEE for compares
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20425 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-03 22:12:11 +00:00
Andrew Lenharth
4585969e87 beter Select on FP
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20424 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-03 21:47:53 +00:00
Chris Lattner
6d9b69fd5f Print -X like this:
double test(double l1_X) {
  return (-l1_X);
}

instead of like this:

double test(double l1_X) {
  return (-0x0p+0 - l1_X);
}


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20423 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-03 21:12:04 +00:00
Andrew Lenharth
f3f475efee LSR cleanup patch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20422 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-03 19:03:21 +00:00
Chris Lattner
f7fe494c19 Do not lower malloc's to pass "sizeof" expressions like this:
ltmp_0_7 = malloc(((unsigned )(&(((signed char (*)[784])/*NULL*/0)[1u]))));

Instead, just emit the literal constant, like this:

  ltmp_0_7 = malloc(784u);

This works around a bug in ICC 8.1 compiling the CBE generated code.  :-(


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20415 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-03 01:04:50 +00:00
Chris Lattner
4318a3d0e9 cleanup the cfg after lsr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20410 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-02 21:56:00 +00:00
Andrew Lenharth
74d00d860e remove 32 sign extend after 32 sextload and handle small negative constant
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20408 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-02 17:23:03 +00:00
Andrew Lenharth
e4f161c909 Added LSR as a beta pass for alpha
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20407 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-02 17:21:38 +00:00
Chris Lattner
0c7490617a Add a temporary option for llc-beta: -enable-lsr-for-ppc, which turns on
Loop Strength Reduction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20399 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-02 06:19:22 +00:00
Chris Lattner
ca76f357b9 Remove tabs from file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20380 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-28 19:36:15 +00:00
Chris Lattner
33e9d29b3b Add support to the C backend for llvm.prefetch. Patch contributed by
Justin Wick!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20378 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-28 19:29:46 +00:00
Andrew Lenharth
e699e95571 fix integer division and stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20372 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-28 17:22:18 +00:00
Chris Lattner
da895d6337 Fix spelling, patch contributed by Gabor Greif!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20343 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-27 06:18:25 +00:00
Andrew Lenharth
2b6c4f554b make BB labels be exported for debuging, add fp negation optimization, further pecimise the FP instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20332 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-25 22:55:15 +00:00
Andrew Lenharth
016947578f fix Allocas. Really. I mean it this time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20306 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-24 18:36:32 +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
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
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
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
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
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
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
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
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
Andrew Lenharth
093f32785b try to do better match for i32 adds
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20143 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-12 21:11:17 +00:00
Andrew Lenharth
9b1e659cd6 make FP conversion more conservative (matches gcc)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20142 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-12 21:10:58 +00:00
Andrew Lenharth
7536eeabf6 oops, I was sure this had already gond though the nightly tester
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20141 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-12 20:42:09 +00:00
Andrew Lenharth
ebce50464a added sign extend for boolean
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20137 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-12 19:35:12 +00:00
Andrew Lenharth
3e31592dca fix a bunch of regressions due to call behavior
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20110 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-10 20:10:38 +00:00
Tanya Lattner
db40cf1b58 Added new circuit finding alogrithm.
Fixed bug in graph so that phi ite diff edges are added.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20108 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-10 17:02:58 +00:00
Tanya Lattner
4bcb011f96 Allow modsched and local scheduling to both be run.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20107 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-10 17:02:06 +00:00
Andrew Lenharth
63f2ab2d1b so, if you beat on it, you too can talk emacs into having a sane indenting policy... Also, optimize many function calls with pc-relative calls (partial prologue skipping for that case coming soon), try to fix the random jumps to strange places problem by pesimizing div et. al. register usage and fixing up GP before using, some calling convention tweaks, and make frame pointer unallocatable (not strickly necessary, but let's go for correctness first)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20106 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-10 06:25:22 +00:00
Andrew Lenharth
3d261f5ae3 fix fp branch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20105 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-10 05:17:38 +00:00
Misha Brukman
f5024ff76d * Fix spelling of `volatile'
* Align comments with tablegen elements


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20103 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-10 01:52:22 +00:00
Andrew Lenharth
445171aaf6 BranchCC, nifty
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20067 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-08 00:40:03 +00:00
Andrew Lenharth
760270da51 fix store issue and an FP conversion (segfault) issue
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20066 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-07 23:02:23 +00:00
Andrew Lenharth
2921916ffc copytoreg fix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20063 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-07 06:31:44 +00:00
Andrew Lenharth
06342c3484 copyfromreg fix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20062 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-07 06:21:37 +00:00
Andrew Lenharth
0382401356 fix load bug
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20061 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-07 05:55:55 +00:00
Andrew Lenharth
a549deb025 more FP load store fixes and Load store simplifications
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20060 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-07 05:33:15 +00:00
Andrew Lenharth
f311e8b901 clean up load and stores alot
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20059 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-07 05:18:02 +00:00
Andrew Lenharth
0538034a82 teach all loads and stores about the stack
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20058 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-07 05:07:00 +00:00
Andrew Lenharth
2c9e38c285 prefer FP scratch registers and more check in LowerArguments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20057 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-06 21:07:31 +00:00