Commit Graph

25088 Commits

Author SHA1 Message Date
Evan Cheng c0f90bef47 Commute shufps / shufpd.
llvm-svn: 28577
2006-05-30 23:34:30 +00:00
Reid Spencer b5ddb66ce0 1. No need to thwart this test with an environment variable. Turning it off
is the default and handled by the makefile system and runtest
2. Redirect stderr of llvm-as and llvm2cpp so that warning messages about
   instrinsics don't cause Tcl to report the run as failed.

llvm-svn: 28576
2006-05-30 23:07:17 +00:00
Evan Cheng f21045a5cd Somehow I lost a condition when I was shuffling some code around. Anyway,
only transform a shufps to pshufd when the first two operands are the same.

llvm-svn: 28575
2006-05-30 22:13:36 +00:00
Evan Cheng c8c172eaae Fix a build breaker.
llvm-svn: 28574
2006-05-30 21:45:53 +00:00
Evan Cheng a4fc5b8699 Oops. PSHUFD is only available with SSE2.
llvm-svn: 28573
2006-05-30 21:30:59 +00:00
Chris Lattner a5d4587296 Add a note
llvm-svn: 28572
2006-05-30 21:29:15 +00:00
Chris Lattner b9342afa56 Always reserve space for 8 spilled GPRs. GCC apparently assumes that this
space will be available, even if the callee isn't varargs.

llvm-svn: 28571
2006-05-30 21:21:04 +00:00
Reid Spencer c3b9370754 llvm2cpp is ready to be compiled so add it to the makefile, but make it
optional.

llvm-svn: 28570
2006-05-30 21:20:55 +00:00
Reid Spencer ad7da68343 Add the new command line arguments.
llvm-svn: 28569
2006-05-30 21:19:29 +00:00
Reid Spencer 30945ca559 Fix more bugs. This version now passes all of the Feature test except for
a floating point conversion problem with NAN in intrinsics.ll. llvm2cpp
makes an attempt to provide the correct conversion, based on the
implementation in the CBackend writer, but it doesn't get NAN correct.

llvm-svn: 28568
2006-05-30 21:18:23 +00:00
Evan Cheng baace007a3 Added a test case for parameter passing of vector values.
llvm-svn: 28567
2006-05-30 20:37:00 +00:00
Evan Cheng 1ec0e4233e Fix the test failure on non-Darwin targets.
llvm-svn: 28566
2006-05-30 20:35:46 +00:00
Evan Cheng 66f849bd7b Allow shufps x, x, mask to be converted to pshufd x, mask to save a move.
llvm-svn: 28565
2006-05-30 20:26:50 +00:00
Evan Cheng b33e54ead7 Remove bogus comment.
llvm-svn: 28564
2006-05-30 20:24:48 +00:00
Reid Spencer f9aa688f5b Add llvm2cpp program.
llvm-svn: 28563
2006-05-30 19:56:31 +00:00
Reid Spencer 82ebabafde Provide a simpler interface for getting a ConstantArray from a character
string. Instead of specifying the length, just specify whether the user
wants a terminating null or not. The default is "true" to retain the same
behavior as previously provided by this function.

llvm-svn: 28562
2006-05-30 18:15:07 +00:00
Evan Cheng d12c97d23a Make sure the register pressure reduction schedulers work for non-uniform
latency targets, e.g. PPC32.

llvm-svn: 28561
2006-05-30 18:05:39 +00:00
Evan Cheng 61e9f0d680 When a priority_queue is empty, the behavior of top() operator is
non-deterministic. Returns NULL when it's empty!

llvm-svn: 28560
2006-05-30 18:04:34 +00:00
Rafael Espindola 5bc60da112 Expand ret into "CopyToReg;BRIND"
llvm-svn: 28559
2006-05-30 17:33:19 +00:00
Chris Lattner 11c25cfa13 Enable -fno-use-cxa-atexit on darwin/ppc also.
llvm-svn: 28558
2006-05-30 16:38:06 +00:00
Reid Spencer b0cffafb59 Undo a patch that breaks llvm-as because the warning message is written to
stdout when the output of llvm-as is also written to stdout. We'll have to
fix tcl some other way.

llvm-svn: 28557
2006-05-30 16:34:59 +00:00
Reid Spencer b5c64fc3b6 Write the WARNING message to cout instead of cerr. Writing to cerr causes
Tcl to claim that the program had an error and thus produces errors in
the dejagnu testing when its really just a warning.

llvm-svn: 28556
2006-05-30 16:05:59 +00:00
Vladimir Prus 413441b9c9 Make doc comment visible in doxygen output. Clarify Type construction.
llvm-svn: 28555
2006-05-30 15:49:30 +00:00
Reid Spencer 37cf1765ed Fix many small bugs in llvm2cpp. This patch gets llvm2cpp working with
everything except PHI nodes and one odd recurse/opaque type situation.
PHI nodes forward reference INSTRUCTIONS (aaaaaaaahhhhhhh!) :)

llvm-svn: 28554
2006-05-30 10:21:41 +00:00
Reid Spencer 84504f215b Properly document the second form of ConstArray::get()
llvm-svn: 28553
2006-05-30 08:26:13 +00:00
Reid Spencer 6f61453ff8 Adjust the interface to ConstantArray::get. The previous
implementation always added a null byte to the end of the string. It turns
out that this is not always wanted. By adding a length parameter we preserve
this behavior when length==0 (default value) but also allow other lengths
(not null terminated) to be created.

llvm-svn: 28552
2006-05-30 08:23:18 +00:00
Evan Cheng 02420144ab Add a note about integer multiplication by constants.
llvm-svn: 28551
2006-05-30 07:37:37 +00:00
Evan Cheng 734e1e241b A addressing mode folding enhancement:
Fold c2 in (x << c1) | c2 where (c2 < c1)
e.g.
int test(int x) {
  return (x << 3) + 7;
}

This can be codegen'd as:
leal 7(,%eax,8), %eax

llvm-svn: 28550
2006-05-30 06:59:36 +00:00
Evan Cheng 905e88caaa Add a lea instruction selection test case.
llvm-svn: 28549
2006-05-30 06:53:55 +00:00
Evan Cheng 749138582e Some new entries about truncate / anyext
llvm-svn: 28548
2006-05-30 06:23:50 +00:00
Reid Spencer c267698f23 First complete version of llvm2cpp that doesn't crash on any of the Feature
tests. The output in a few cases still doesn't compile, however.

llvm-svn: 28547
2006-05-30 03:43:49 +00:00
Andrew Lenharth c3cff44880 move calltarget to dsa
llvm-svn: 28546
2006-05-29 23:39:48 +00:00
Andrew Lenharth e465381401 Since there was interest on the mailing list, this is a utility pass that
uses DSA to make find targets of calls.  It provides a very convinient
interface to DSA results to do things with indirect calls, such as
write a devirtualizer (which I have and may commit one of these days).

llvm-svn: 28545
2006-05-29 22:58:38 +00:00
Chris Lattner d65928994a Silly cleanup
llvm-svn: 28544
2006-05-29 18:52:52 +00:00
Chris Lattner dc0b3afcdd silly cleanup
llvm-svn: 28543
2006-05-29 18:52:05 +00:00
Reid Spencer 131ca2869c Fix a bug with diffing the wrong files. Make output more readable.
llvm-svn: 28542
2006-05-29 18:09:38 +00:00
Reid Spencer c194e7e843 Next batch of implementation:
1. Get rid of old AsmWriter cruft that's not needed.
2. Implement several instructions. Enough to get by globalvars.ll and
   alignment.ll in the Feature test suite.
3. Handle constants properly (don't repeat definitions).
4. Make the output compatible with llvm-dis for diff purposes.

llvm-svn: 28541
2006-05-29 18:08:06 +00:00
Reid Spencer 4967fa722d Fix file header comment.
llvm-svn: 28540
2006-05-29 18:06:28 +00:00
Reid Spencer fe361813aa Remove temporary testing rules.
llvm-svn: 28539
2006-05-29 18:05:59 +00:00
Vladimir Prus 5150b763ce Reset DEBUG_SYMBOL_TABLE back to 0.
llvm-svn: 28538
2006-05-29 12:54:52 +00:00
Vladimir Prus f10bbd052d Fix compile error when DEBUG_SYMBOL_TABLE is defined.
llvm-svn: 28537
2006-05-29 12:45:15 +00:00
Reid Spencer 84f1a3e639 Fix two bugs in the CppWriter.cpp:
1. Return the module from the MakeModule function so it can be verified.
2. Make sure types get generated with their names

llvm-svn: 28536
2006-05-29 02:58:15 +00:00
Reid Spencer 7af13d73f7 Fix the file's comment block.
llvm-svn: 28535
2006-05-29 02:35:29 +00:00
Reid Spencer edcf47ea45 Fix grammar in a comment.
llvm-svn: 28534
2006-05-29 02:34:34 +00:00
Reid Spencer 5531640f4b Replace an old C-style cast with a C++ cast (squelch warning)
llvm-svn: 28533
2006-05-29 02:32:43 +00:00
Reid Spencer d078a1fd4c Correct some grammar and describe current reality.
llvm-svn: 28532
2006-05-29 02:31:47 +00:00
Owen Anderson a03aa6f37f Require both tests to pass.
llvm-svn: 28531
2006-05-29 01:28:16 +00:00
Owen Anderson c01e7bde40 Update the testcase to check the full extent of LCSSA.
llvm-svn: 28530
2006-05-29 01:07:04 +00:00
Owen Anderson 8a8f278f15 Add Use replacement. Assuming there is nothing horribly wrong with this, LCSSA
is now theoretically feature-complete.  It has not, however, been thoroughly
test, and is still considered experimental.

llvm-svn: 28529
2006-05-29 01:00:00 +00:00
Reid Spencer 58d5dce11d Initial Commit of llvm2cpp
This is a safekeeping commit. The program is not finished. It currently
handles modules, types, global variables and function declarations. Blocks
and instructions remain to be done.

llvm-svn: 28528
2006-05-29 00:57:22 +00:00