Owen Anderson [Mon, 29 May 2006 01:00:00 +0000 (01:00 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28529
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 29 May 2006 00:57:22 +0000 (00:57 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28528
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Sun, 28 May 2006 19:33:28 +0000 (19:33 +0000)]
Major think-o. Iterate over all live out-of-loop values, and perform the
other calculations on each individually, rather than trying to delay it and do
them all at the end.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28527
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sun, 28 May 2006 07:22:42 +0000 (07:22 +0000)]
Fix a problem where dejagnu won't accept the value of global tcl variable
"libdir" for some reason. Changing to llvmlibsdir instead fixes it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28526
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sun, 28 May 2006 04:21:40 +0000 (04:21 +0000)]
Provide an infrastructure for testing the llvm2cpp program (yet to be
committed). This infrastructure is only activated when RUNLLVM2CPP=1 is
specified on the make command line. Currently it is only supported in the
Feature test suite.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28525
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Sat, 27 May 2006 18:47:11 +0000 (18:47 +0000)]
Make LCSSA insert proper Phi nodes throughout the rest of the CFG by computing
the iterated Dominance Frontier of the loop-closure Phi's. This is the
second phase of the LCSSA pass. The third phase (coming soon) will be to
update all uses of loop variables to use the loop-closure Phi's instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28524
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 27 May 2006 17:28:13 +0000 (17:28 +0000)]
Fix some regression from the inliner patch I committed last night. This fixes
ldecod, lencod, and SPASS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28523
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 27 May 2006 06:57:55 +0000 (06:57 +0000)]
Fix pastos in comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28522
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 27 May 2006 01:28:04 +0000 (01:28 +0000)]
Switch the inliner over to using CloneAndPruneFunctionInto. This effectively
makes it so that it constant folds instructions on the fly. This is good
for several reasons:
0. Many instructions are constant foldable after inlining, particularly if
inlining a call with constant arguments.
1. Without this, the inliner has to allocate memory for all of the instructions
that can be constant folded, then a subsequent pass has to delete them. This
gets the job done without this extra work.
2. This makes the inliner *pass* a bit more aggressive: in particular, it
partially solves a phase order issue where the inliner would inline lots
of code that folds away to nothing, but think that the resultant function
is big because of this code that will be gone. Now the code never exists.
This is the first part of a 2-step process. The second part will be smart
enough to see when this implicit constant folding propagates a constant into
a branch or switch instruction, making CFG edges dead.
This implements Transforms/Inline/inline_constprop.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28521
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 27 May 2006 01:23:30 +0000 (01:23 +0000)]
Ignore generated files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28520
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 27 May 2006 01:22:24 +0000 (01:22 +0000)]
Implement a new method, CloneAndPruneFunctionInto, as documented.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28519
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 27 May 2006 01:21:50 +0000 (01:21 +0000)]
Implement a new method: CloneAndPruneFunctionInto, as documented.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28518
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 27 May 2006 01:18:04 +0000 (01:18 +0000)]
Refactor some code to expose an interface to constant fold and instruction given it's opcode, typeand operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28517
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 27 May 2006 01:17:40 +0000 (01:17 +0000)]
Add an interface to constant fold and instruction given it's opcode, type
and operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28516
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 27 May 2006 01:16:22 +0000 (01:16 +0000)]
New testcase: check that the inliner constant folds instructions on the
fly if it can.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28515
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 27 May 2006 00:43:02 +0000 (00:43 +0000)]
Fix a nasty dag combiner bug that caused nondeterminstic crashes (MY FAVORITE!):
SimplifySelectOps would eliminate a Select, delete it, then return true.
The clients would see that it did something and return null.
The top level would see a null return, and decide that nothing happened,
proceeding to process the node in other ways: boom.
The fix is simple: clients of SimplifySelectOps should return the select
node itself.
In order to catch really obnoxious boogs like this in the future, add an
assert that nodes are not deleted. We do this by checking for a sentry node
type that the SDNode dtor sets when a node is destroyed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28514
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 27 May 2006 00:40:15 +0000 (00:40 +0000)]
Add a new sentry node type, allowing assertions to catch trivial
use-after-deleted errors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28513
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Sat, 27 May 2006 00:31:37 +0000 (00:31 +0000)]
A few small clean-ups, and the addition of an LCSSA statistic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28512
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 26 May 2006 23:13:20 +0000 (23:13 +0000)]
Make CALL node consistent with RET node. Signness of value has type MVT::i32
instead of MVT::i1. Either is fine except MVT::i32 is probably a legal type
for most (if not all) platforms while MVT::i1 is not.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28511
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 26 May 2006 23:10:12 +0000 (23:10 +0000)]
Change RET node to include signness information of the return values. i.e.
RET chain, value1, sign1, value2, sign2, ...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28510
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 26 May 2006 23:09:09 +0000 (23:09 +0000)]
Change RET node to include signness information of the return values. e.g.
RET chain, value1, sign1, value2, sign2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28509
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Fri, 26 May 2006 21:59:20 +0000 (21:59 +0000)]
Trivial testcase that LCSSA can already handle.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28508
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Fri, 26 May 2006 21:19:17 +0000 (21:19 +0000)]
Fix a copy-and-paste-o that would break some compilers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28507
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Fri, 26 May 2006 21:11:53 +0000 (21:11 +0000)]
Clean up and refactor LCSSA a bunch. It should also run faster now, though
there's still a lot of work to be done on it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28506
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 26 May 2006 20:37:47 +0000 (20:37 +0000)]
Vector argument must be passed in memory location aligned on 16-byte boundary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28505
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 26 May 2006 19:22:06 +0000 (19:22 +0000)]
Mac OS X ABI document lied. The first four XMM registers are used to pass
vector arguments, not three.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28504
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 May 2006 19:19:20 +0000 (19:19 +0000)]
Implement Transforms/InstCombine/store.ll:test2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28503
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 May 2006 19:18:40 +0000 (19:18 +0000)]
New testcase for trivial DSE
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28502
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 May 2006 18:42:34 +0000 (18:42 +0000)]
Fix a bug in the bc reader/writer: we were not correctly encoding varargs
nonccc calls (we were dropping the CC and tail flag). This broke several
FORTRAN programs.
Testcase here: Regression/Assembler/2006-05-26-VarargsCallEncode.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28501
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 May 2006 18:41:26 +0000 (18:41 +0000)]
New testcase, check that the bc file correctly encodes varargs nonccc calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28500
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 26 May 2006 18:39:59 +0000 (18:39 +0000)]
Minor update to make the code more clear
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28499
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 26 May 2006 18:37:16 +0000 (18:37 +0000)]
Update more comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28498
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 26 May 2006 18:25:43 +0000 (18:25 +0000)]
Fix some comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28497
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 26 May 2006 18:22:49 +0000 (18:22 +0000)]
No need to handle illegal types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28496
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Fri, 26 May 2006 13:58:26 +0000 (13:58 +0000)]
Skeletal LCSSA pass. This is currently non-functional. Expect functionality
and documentation updates soo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28495
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 26 May 2006 10:56:17 +0000 (10:56 +0000)]
On ARM, alignment is in bits
Add lr as a hard coded operand of bx
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28494
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 26 May 2006 08:04:31 +0000 (08:04 +0000)]
Remove a couple of bogus casts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28493
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 26 May 2006 08:00:14 +0000 (08:00 +0000)]
Remove a bogus cast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28492
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 26 May 2006 06:22:34 +0000 (06:22 +0000)]
Minor bug caught by Ashwin Chandra
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28491
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 May 2006 00:29:06 +0000 (00:29 +0000)]
Transform things like (splat(splat)) -> splat
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28490
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 May 2006 23:48:38 +0000 (23:48 +0000)]
Introduce a helper function that simplifies interpretation of shuffle masks.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28489
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 25 May 2006 23:31:23 +0000 (23:31 +0000)]
Consistency
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28488
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 May 2006 23:24:33 +0000 (23:24 +0000)]
Turn (cast (shuffle (cast)) -> shuffle (cast) if it reduces the # casts in
the program. This exposes more opportunities for the instcombiner, and implements
vec_shuffle.ll:test6
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28487
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 May 2006 23:23:22 +0000 (23:23 +0000)]
new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28486
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 May 2006 22:53:38 +0000 (22:53 +0000)]
extract element from a shuffle vector can be trivially turned into an
extractelement from the SV's source. This implement vec_shuffle.ll:test[45]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28485
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 May 2006 22:52:49 +0000 (22:52 +0000)]
new testcases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28484
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 25 May 2006 22:38:31 +0000 (22:38 +0000)]
Some clean up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28483
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 May 2006 22:26:02 +0000 (22:26 +0000)]
Add support for the missing FP condition codes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28482
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 25 May 2006 22:25:52 +0000 (22:25 +0000)]
Remove some dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28481
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 25 May 2006 21:59:08 +0000 (21:59 +0000)]
X86 / Cygwin asm / alignment fixes.
Patch contributed by Anton Korobeynikov!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28480
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 May 2006 21:25:54 +0000 (21:25 +0000)]
The patch corresponding to this test had to be reverted as unsafe.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28479
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 May 2006 21:25:12 +0000 (21:25 +0000)]
Revert a patch that is unsafe, due to out of range array accesses in inner
array scopes possibly accessing valid memory in outer subscripts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28478
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 25 May 2006 20:21:19 +0000 (20:21 +0000)]
New test case. x86 isel was creating a cycle in the DAG.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28477
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 25 May 2006 20:16:55 +0000 (20:16 +0000)]
Can't trust NodeDepth when checking for possibility of load folding creating
a cycle. This increase the search space and will increase compile time (in
practice it appears to be small, e.g. 176.gcc goes from 62 sec to 65 sec)
that will be addressed later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28476
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 25 May 2006 18:56:34 +0000 (18:56 +0000)]
Build breakage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28475
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 May 2006 18:06:16 +0000 (18:06 +0000)]
Fix build failure of povray
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28473
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 May 2006 16:54:16 +0000 (16:54 +0000)]
Fix Benchmarks/MallocBench/cfrac
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28471
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 25 May 2006 12:57:06 +0000 (12:57 +0000)]
implement initial version of ARMAsmPrinter::printOperand
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28470
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 25 May 2006 11:00:18 +0000 (11:00 +0000)]
port the ARM backend to use ISD::CALL instead of LowerCallTo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28469
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 25 May 2006 10:49:19 +0000 (10:49 +0000)]
create test/Regression/CodeGen/ARM/ and add a minimal test to it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28468
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 25 May 2006 08:39:25 +0000 (08:39 +0000)]
-sched-commute-nodes is now on by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28467
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 25 May 2006 08:37:31 +0000 (08:37 +0000)]
Turn on -sched-commute-nodes by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28465
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 May 2006 05:59:50 +0000 (05:59 +0000)]
Fix breakage on platforms where string/cassert don't pull in int64_t.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28464
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 25 May 2006 00:59:30 +0000 (00:59 +0000)]
Switch X86 over to a call-selection model where the lowering code creates
the copyto/fromregs instead of making the X86ISD::CALL selection code create
them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28463
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 25 May 2006 00:57:32 +0000 (00:57 +0000)]
CALL node change (arg / sign pairs instead of just arguments).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28462
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 25 May 2006 00:55:32 +0000 (00:55 +0000)]
CALL node change: now including signness of every argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28461
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 25 May 2006 00:54:33 +0000 (00:54 +0000)]
CALL node change: now containing signness of each argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28460
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 25 May 2006 00:24:28 +0000 (00:24 +0000)]
Assert if InflightSet is not cleared after instruction selecting a BB.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28459
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 25 May 2006 00:21:44 +0000 (00:21 +0000)]
Fixed a really ugly bug. The TableGen'd isel is not freeing the "inflight set"
correctly. That is causing non-deterministic behavior (and possibly preventing
some load folding from happening).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28458
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 24 May 2006 23:02:40 +0000 (23:02 +0000)]
Abstract out the current optimization level into a flag that can be overridden
on the make line, to avoid bugs in native compilers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28457
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 24 May 2006 22:59:07 +0000 (22:59 +0000)]
Remove flags implied by -O3
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28456
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 24 May 2006 20:52:08 +0000 (20:52 +0000)]
Update testcase with recent cbe change
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28455
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 24 May 2006 20:46:25 +0000 (20:46 +0000)]
Clear HandleMap and ReplaceMap after instruction selection. Or it may cause
non-deterministic behavior.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28454
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Wed, 24 May 2006 19:21:13 +0000 (19:21 +0000)]
For PR786:
Minor tweaks in public headers and a few .cpp files so that LLVM can build
successfully with -pedantic and projects using LLVM with -pedantic don't
get warnings from LLVM. There's still more -pedantic warnings to fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28453
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Wed, 24 May 2006 19:05:21 +0000 (19:05 +0000)]
For PR786:
Remove a spurious ;
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28452
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 24 May 2006 18:34:08 +0000 (18:34 +0000)]
Don't use -fomit-frame-pointer on darwin, it breaks stacktrace collection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28451
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 24 May 2006 17:34:30 +0000 (17:34 +0000)]
Patch for a new instcombine xform, patch contributed by Nick Lewycky!
This implements Transforms/InstCombine/2006-05-10-InvalidIndexUndef.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28450
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 24 May 2006 17:34:02 +0000 (17:34 +0000)]
Testcase for a new instcombine xform, patch contributed by Nick Lewycky!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28449
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 24 May 2006 17:31:02 +0000 (17:31 +0000)]
Don't make zero-sized static arrays
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28448
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 24 May 2006 17:04:05 +0000 (17:04 +0000)]
Patches to make the LLVM sources more -pedantic clean. Patch provided
by Anton Korobeynikov! This is a step towards closing PR786.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28447
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 24 May 2006 00:49:32 +0000 (00:49 +0000)]
One of these xforms is only safe with unsafe math enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28446
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 24 May 2006 00:15:25 +0000 (00:15 +0000)]
Fix CodeGen/Generic/vector.ll:test_div with altivec.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28445
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 24 May 2006 00:12:50 +0000 (00:12 +0000)]
New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28444
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 24 May 2006 00:06:44 +0000 (00:06 +0000)]
Handle SETO* like we handle SET*, restoring behavior after Evan's setcc
change. This fixes PowerPC/fnegsel.ll.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28443
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 23 May 2006 23:39:48 +0000 (23:39 +0000)]
Print struct return functions and calls as actually returning the hidden
argument struct pointer, enabling ABI compatibility for the CBE with
platforms with strange struct-return ABIs. This fixes 252.eon and
CoyoteBench/fftbench on Darwin/X86 among other things.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28442
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 23 May 2006 23:20:42 +0000 (23:20 +0000)]
Fix file header comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28441
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 23 May 2006 21:08:24 +0000 (21:08 +0000)]
Better way to check for vararg.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28440
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 23 May 2006 21:06:34 +0000 (21:06 +0000)]
Remove PreprocessCCCArguments and PreprocessFastCCArguments now that
FORMAL_ARGUMENTS nodes include a token operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28439
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 23 May 2006 18:50:38 +0000 (18:50 +0000)]
Implement an annoying part of the Darwin/X86 abi: the callee of a struct
return argument pops the hidden struct pointer if present, not the caller.
For example, in this testcase:
struct X { int D, E, F, G; };
struct X bar() {
struct X a;
a.D = 0;
a.E = 1;
a.F = 2;
a.G = 3;
return a;
}
void foo(struct X *P) {
*P = bar();
}
We used to emit:
_foo:
subl $28, %esp
movl 32(%esp), %eax
movl %eax, (%esp)
call _bar
addl $28, %esp
ret
_bar:
movl 4(%esp), %eax
movl $0, (%eax)
movl $1, 4(%eax)
movl $2, 8(%eax)
movl $3, 12(%eax)
ret
This is correct on Linux/X86 but not Darwin/X86. With this patch, we now
emit:
_foo:
subl $28, %esp
movl 32(%esp), %eax
movl %eax, (%esp)
call _bar
*** addl $24, %esp
ret
_bar:
movl 4(%esp), %eax
movl $0, (%eax)
movl $1, 4(%eax)
movl $2, 8(%eax)
movl $3, 12(%eax)
*** ret $4
For the record, GCC emits (which is functionally equivalent to our new code):
_bar:
movl 4(%esp), %eax
movl $3, 12(%eax)
movl $2, 8(%eax)
movl $1, 4(%eax)
movl $0, (%eax)
ret $4
_foo:
pushl %esi
subl $40, %esp
movl 48(%esp), %esi
leal 16(%esp), %eax
movl %eax, (%esp)
call _bar
subl $4, %esp
movl 16(%esp), %eax
movl %eax, (%esi)
movl 20(%esp), %eax
movl %eax, 4(%esi)
movl 24(%esp), %eax
movl %eax, 8(%esi)
movl 28(%esp), %eax
movl %eax, 12(%esi)
addl $40, %esp
popl %esi
ret
This fixes SingleSource/Benchmarks/CoyoteBench/fftbench with LLC and the
JIT, and fixes the X86-backend portion of PR729. The CBE still needs to
be updated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28438
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 23 May 2006 18:18:46 +0000 (18:18 +0000)]
-enable-unsafe-fp-math implies -enable-finite-only-fp-math
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28437
91177308-0d34-0410-b5e6-
96231b3b80d8
Vladimir Prus [Tue, 23 May 2006 15:32:15 +0000 (15:32 +0000)]
Make class comment visible in Doxygen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28436
91177308-0d34-0410-b5e6-
96231b3b80d8
Vladimir Prus [Tue, 23 May 2006 13:43:15 +0000 (13:43 +0000)]
Fix missing include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28435
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 23 May 2006 06:41:23 +0000 (06:41 +0000)]
Added a test case for FP equality check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28434
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 23 May 2006 06:40:47 +0000 (06:40 +0000)]
Incorrect SETCC CondCode used for FP comparisons.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28433
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 23 May 2006 06:39:12 +0000 (06:39 +0000)]
Added option -enable-finite-only-fp-math. When on, the codegen can assume that
FP arithmetic arguments and results are never NaNs or +=Infs. This includes
ignoring parity flag (PF) when checking for FP equality.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28432
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 23 May 2006 02:48:20 +0000 (02:48 +0000)]
implement minimal versions of
ARMAsmPrinter::runOnMachineFunction
LowerFORMAL_ARGUMENTS
ARMInstrInfo::isMoveInstr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28431
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 23 May 2006 01:40:20 +0000 (01:40 +0000)]
Describe how to add a custom test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28430
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 23 May 2006 01:25:11 +0000 (01:25 +0000)]
Wrap long lines fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28429
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 22 May 2006 05:54:49 +0000 (05:54 +0000)]
A isel deficiency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28427
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sun, 21 May 2006 10:40:20 +0000 (10:40 +0000)]
For PR784:
Support Win32 platforms for llvm-gcc path. Patch by Anton Korobeynikov
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28426
91177308-0d34-0410-b5e6-
96231b3b80d8