Commit Graph

25107 Commits

Author SHA1 Message Date
Andrew Lenharth 0d4c10eae6 Fix build breakage on alpha, without causing it on x86. as a bonus, all platforms can invent the same number of unique names now
llvm-svn: 28596
2006-05-31 20:18:28 +00:00
Andrew Lenharth 40d4af63f2 revert for now
llvm-svn: 28595
2006-05-31 19:16:26 +00:00
Evan Cheng 25e44e008d Rename instructions for consistency sake.
llvm-svn: 28594
2006-05-31 19:00:07 +00:00
Andrew Lenharth 26baab1593 make 64-bit safe and fix the build on alpha
llvm-svn: 28593
2006-05-31 18:56:42 +00:00
Evan Cheng 0c0996a97b commuteInstruction() does not always create a new MI!
llvm-svn: 28592
2006-05-31 18:03:39 +00:00
Reid Spencer 5dd0111188 Add a brief description for the tblgen program. More detail is needed but
the current author is not the person to provide it. Now that the file
exists, perhaps others will chime in and embellish.

llvm-svn: 28591
2006-05-31 17:54:39 +00:00
Reid Spencer a9355fa5d8 Update the documentation for llvm2cpp after the -gen-* options were added.
llvm-svn: 28590
2006-05-31 17:32:21 +00:00
Reid Spencer de2daad0ac Major reorganization and extension of the code. The diff on this will be a
mess as functions were moved around into a better ordering. The code was
extended to provide various -gen-* options to better control what the
generated output should be. Currently it is possible to generate entire
modules (three different ways), functions, global variables, and types.

llvm-svn: 28589
2006-05-31 17:31:38 +00:00
Reid Spencer 9fef163d19 Make the getNamedFunction and getNamedGlobal methods be const. They don't
change the module in any way and we should enforce that.

llvm-svn: 28588
2006-05-31 16:40:28 +00:00
Vladimir Prus 735e3f76a8 Clarify type naming.
llvm-svn: 28587
2006-05-31 16:03:20 +00:00
Vladimir Prus c1eae29b91 Improve InstVisitor docs.
llvm-svn: 28586
2006-05-31 15:30:18 +00:00
Evan Cheng 9d91caa053 Eliminate a memory leak.
llvm-svn: 28585
2006-05-31 07:13:03 +00:00
Evan Cheng 64d2846017 visitVBinOp: Can't fold divide by zero!
llvm-svn: 28584
2006-05-31 06:08:35 +00:00
Reid Spencer 03977ec9b1 Don't generate module definitions when the -fragment option is given.
llvm-svn: 28583
2006-05-31 04:43:19 +00:00
Evan Cheng 8abf45e22d Select vector_shuffle v1, undef <2, 3, ?, ?> to MOVHLPS.
llvm-svn: 28582
2006-05-31 00:51:37 +00:00
Evan Cheng 550cb663e8 Remove dead code.
llvm-svn: 28581
2006-05-31 00:50:42 +00:00
Evan Cheng 6821bbb1ea Update vector extract test cases.
llvm-svn: 28580
2006-05-31 00:48:09 +00:00
Evan Cheng ddced95d8f A new entry
llvm-svn: 28579
2006-05-30 23:56:31 +00:00
Evan Cheng 57399704b3 MAXP{D|S} and MINP{D|S} are commutable.
llvm-svn: 28578
2006-05-30 23:47:30 +00:00
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