Commit Graph

17594 Commits

Author SHA1 Message Date
Andrew Lenharth 6a5f52d15a beter Select on FP
llvm-svn: 20424
2005-03-03 21:47:53 +00:00
Chris Lattner 00ee68c612 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);
}

llvm-svn: 20423
2005-03-03 21:12:04 +00:00
Andrew Lenharth 00348ce902 LSR cleanup patch
llvm-svn: 20422
2005-03-03 19:03:21 +00:00
Chris Lattner 1a678c67c9 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.  :-(

llvm-svn: 20415
2005-03-03 01:04:50 +00:00
Chris Lattner ef1e989e4f Add an optional argument to lower to a specific constant value instead of
to a "sizeof" expression.

llvm-svn: 20414
2005-03-03 01:03:43 +00:00
Chris Lattner 3b5667c579 Add an argument.
llvm-svn: 20413
2005-03-03 01:03:10 +00:00
Misha Brukman f090d1b3ab Fix the spelling of the word `the'
llvm-svn: 20412
2005-03-02 23:17:31 +00:00
Chris Lattner 4d8689edcb Print the module ID as a comment.
llvm-svn: 20411
2005-03-02 23:12:40 +00:00
Chris Lattner 5b5caaf3cd cleanup the cfg after lsr
llvm-svn: 20410
2005-03-02 21:56:00 +00:00
Andrew Lenharth 180a04a4bb remove 32 sign extend after 32 sextload and handle small negative constant
llvm-svn: 20408
2005-03-02 17:23:03 +00:00
Andrew Lenharth ed4b6488a7 Added LSR as a beta pass for alpha
llvm-svn: 20407
2005-03-02 17:21:38 +00:00
Chris Lattner c8bb99760a Add a temporary option for llc-beta: -enable-lsr-for-ppc, which turns on
Loop Strength Reduction.

llvm-svn: 20399
2005-03-02 06:19:22 +00:00
Reid Spencer a556669219 Be slightly more accurate in an error message.
llvm-svn: 20397
2005-03-02 05:45:56 +00:00
Chris Lattner fe760deb75 Fix a nasty order of evaluation bug that Gabor Greif ran into. Here's an
explanation from IRC:

	|sabre|	I think it's an order of evaluation thing
	|sabre|	for me, the RHS of the assignment is evaluated first
	|sabre|	getTypeDescription checks to see if ConcreteTypeDescription[Ty] contains anything
	|sabre|	since it doesn't, it computes and returns the value
	|sabre|	this gets put into the map.
	|sabre|	For you, the LHS is evaluated first.
	|sabre|	Map[Ty] (aka ConcreteTypeDescriptions[Ty]) inserts an empty string into the map, returning a reference
	|sabre|	getTypeDesc then sees the empty string in the map
	|sabre|	and returns it
	|sabre|	bork :)

llvm-svn: 20394
2005-03-02 03:54:43 +00:00
Chris Lattner 884ebd4c79 Now that type does not derive from Value, these do not need to be virtual.
llvm-svn: 20393
2005-03-02 03:43:55 +00:00
Misha Brukman e4fad6b70f Fix HTML-4.01 Strict compliance
llvm-svn: 20386
2005-03-01 17:19:21 +00:00
Misha Brukman a9b8676393 Use a colon instead of a period since we're introducing a command list
llvm-svn: 20385
2005-03-01 17:15:23 +00:00
Reid Spencer fefb9ea94d Correct a typo in Makefile.rules.
Patch idea contributed by Vladimir Merzliakov.

llvm-svn: 20384
2005-03-01 16:27:06 +00:00
Jeff Cohen 8ea6f9e821 Fixed the following LSR bugs:
* Loop invariant code does not dominate the loop header, but rather
    the end of the loop preheader.

  * The base for a reduced GEP isn't a constant unless all of its
    operands (preceding the induction variable) are constant.

  * Allow induction variable elimination for the simple case after all.

Also made changes recommended by Chris for properly deleting
instructions.

llvm-svn: 20383
2005-03-01 03:46:11 +00:00
Alkis Evlogimenos b3846f4b06 Lower llvm.isunordered(a, b) into a != a | b != b.
llvm-svn: 20382
2005-03-01 02:07:58 +00:00
Chris Lattner ff851073f6 cleanup my miswording
llvm-svn: 20381
2005-02-28 19:47:14 +00:00
Chris Lattner 12328e9378 Remove tabs from file.
llvm-svn: 20380
2005-02-28 19:36:15 +00:00
Chris Lattner 5d43cbc6ac Add a test for llvm.prefetch.
llvm-svn: 20379
2005-02-28 19:31:42 +00:00
Chris Lattner 811107350a Add support to the C backend for llvm.prefetch. Patch contributed by
Justin Wick!

llvm-svn: 20378
2005-02-28 19:29:46 +00:00
Chris Lattner 1772c1a672 recognize llvm.prefetch. Patch contributed by Justin Wick!
llvm-svn: 20377
2005-02-28 19:28:00 +00:00
Chris Lattner 39637ef023 Verify llvm.prefetch.
llvm-svn: 20376
2005-02-28 19:27:42 +00:00
Chris Lattner c87e03aeea Lower prefetch to a noop, patch contributed by Justin Wick!
llvm-svn: 20375
2005-02-28 19:27:23 +00:00
Chris Lattner 816cc5e10d Add a prefetch intrinsic, patch contributed by Justin Wick!
llvm-svn: 20374
2005-02-28 19:25:57 +00:00
Chris Lattner c8a2c22f36 Document llvm.prefetch, patch contributed by Justin Wick!
llvm-svn: 20373
2005-02-28 19:24:19 +00:00
Andrew Lenharth 76eff48195 fix integer division and stuff
llvm-svn: 20372
2005-02-28 17:22:18 +00:00
Chris Lattner 81c1dd2a06 Adam Treat implemented this :)
llvm-svn: 20371
2005-02-28 16:52:28 +00:00
Reid Spencer 9947c42037 Changes to enable creation of native executables directly from gccld and to
ensure that -L paths don't contain both bytecode and native libraries.
This patch contributed by Adam Treat.

llvm-svn: 20370
2005-02-28 08:45:35 +00:00
Reid Spencer 35cb2f49c4 A few small steps toward HTML 4.01 Strict compliance.
llvm-svn: 20369
2005-02-28 01:10:48 +00:00
Reid Spencer da132f2fdf Add a little more detail about the configuration process for projects.
llvm-svn: 20368
2005-02-28 00:40:29 +00:00
Jeff Cohen dcaa48b5c4 Fix crash in LSR due to attempt to remove original induction variable. However,
for reasons explained in the comments, I also deactivated this code as it needs
more thought.

llvm-svn: 20367
2005-02-28 00:08:56 +00:00
Jeff Cohen fd63d3af0d PHI nodes were incorrectly placed when more than one GEP is reduced in a loop.
llvm-svn: 20360
2005-02-27 21:08:04 +00:00
Jeff Cohen 39751c3b7c First pass at improved Loop Strength Reduction. Still not yet ready for prime time.
llvm-svn: 20358
2005-02-27 19:37:07 +00:00
Chris Lattner c6e3380fd7 Bug fixed
llvm-svn: 20357
2005-02-27 19:31:02 +00:00
Chris Lattner cf1359ddf5 New testcase for PR529
llvm-svn: 20356
2005-02-27 19:28:30 +00:00
Chris Lattner 2fe7b71936 Fix this to create a recursive mutex. Patch by Evan Jones!
llvm-svn: 20355
2005-02-27 19:07:36 +00:00
Chris Lattner 7f32c4aa36 Use const iterators where possible. Patch by Evan Jones!
llvm-svn: 20354
2005-02-27 19:06:10 +00:00
Chris Lattner eeffe8eea3 Rename include guard, patch contributed by Evan Jones!
llvm-svn: 20353
2005-02-27 19:05:24 +00:00
Chris Lattner 7561ca1d15 Teach globalopt how memset/cpy/move affect memory, to allow better optimization.
llvm-svn: 20352
2005-02-27 18:58:52 +00:00
Chris Lattner a1079acb0a new testcase globalopt should handle.
llvm-svn: 20351
2005-02-27 18:48:19 +00:00
Chris Lattner 19d4ab642f new testcase globalopt should implement
llvm-svn: 20350
2005-02-27 18:47:17 +00:00
Chris Lattner 5042453bb8 Test that a global is marked constant when it can be.
llvm-svn: 20349
2005-02-27 18:19:26 +00:00
Alkis Evlogimenos 24340589c0 Add llc to tools.
llvm-svn: 20345
2005-02-27 10:21:37 +00:00
Chris Lattner 0ce80cd542 Fix spelling, patch contributed by Gabor Greif!
llvm-svn: 20343
2005-02-27 06:18:25 +00:00
Chris Lattner dc166eb8f7 Fix spelling, patch contributed by Gabor Greif
llvm-svn: 20342
2005-02-27 06:15:51 +00:00
Chris Lattner 600420647f Fix misspellings, patch contributed by Gabor Greif!
llvm-svn: 20341
2005-02-27 06:14:21 +00:00