Owen Anderson
1a72d98dd2
Various clean-ups suggested by Chris.
...
llvm-svn: 28678
2006-06-04 00:02:23 +00:00
Owen Anderson
b83c3beb44
Fix a bug in Phi-noded insertion. Also, update some comments to reflect what's
...
actually going on.
llvm-svn: 28677
2006-06-03 23:22:50 +00:00
Evan Cheng
696779cea0
Cygwin support. Patch by Anton Korobeynikov!
...
llvm-svn: 28672
2006-06-02 22:38:37 +00:00
Evan Cheng
ddb0525a32
Use xor to clear a register.
...
llvm-svn: 28667
2006-06-02 21:20:34 +00:00
Evan Cheng
ed96100b00
Incorrect AT&T opcode.
...
llvm-svn: 28666
2006-06-02 21:09:10 +00:00
Chris Lattner
6cca762d5f
Remove unneeded hook. Patch by Anton K. Thanks!
...
llvm-svn: 28664
2006-06-02 19:11:46 +00:00
Chris Lattner
d14d882c4a
Add mingw support, patch contributed by Anton
...
llvm-svn: 28661
2006-06-02 18:54:01 +00:00
Chris Lattner
0f5ef733cc
Force anything that #includes llvm/Transforms/Utils/UnifyFunctionExitNodes.h
...
to link in the implementation. Thanks to Anton Korobeynikov for figuring out
what was going on here.
llvm-svn: 28660
2006-06-02 18:40:06 +00:00
Chris Lattner
5cba9093c8
Fix build on systems with bad bison's
...
llvm-svn: 28657
2006-06-02 18:20:28 +00:00
Chris Lattner
3300df2fb9
Remove dead #include
...
llvm-svn: 28642
2006-06-01 20:02:28 +00:00
Chris Lattner
93c46b83b6
Make the "pruning cloner" smarter. As it propagates constants through the
...
code (while cloning) it often gets the branch/switch instructions. Since it
knows that edges of the CFG are dead, it need not clone (or even look) at
the obviously dead blocks. This should speed up the inliner substantially on
code where there are lots of inlinable calls to functions with constant
arguments. On C++ code in particular, this kicks in.
llvm-svn: 28641
2006-06-01 19:19:23 +00:00
Chris Lattner
609f7e070d
Fix linking of inline asm objects.
...
llvm-svn: 28640
2006-06-01 19:14:22 +00:00
Reid Spencer
b41365509f
Provide configuration support and usage for MINGW32 platform
...
llvm-svn: 28639
2006-06-01 19:03:21 +00:00
Chris Lattner
6838320f46
Fix -pedantic warnings.
...
llvm-svn: 28636
2006-06-01 17:29:22 +00:00
Chris Lattner
50af98a5f2
Fix -pedantic warnings
...
llvm-svn: 28635
2006-06-01 17:27:11 +00:00
Chris Lattner
3d631893f9
Fix -pedantic warning
...
llvm-svn: 28634
2006-06-01 17:17:46 +00:00
Chris Lattner
1d2618c6c7
Silence -pedantic warning
...
llvm-svn: 28633
2006-06-01 17:17:06 +00:00
Chris Lattner
339d8b5ba9
Silence a -pedantic warning.
...
llvm-svn: 28632
2006-06-01 17:16:21 +00:00
Chris Lattner
ac3d91f023
Silence -pedantic warning.
...
llvm-svn: 28630
2006-06-01 17:13:10 +00:00
Chris Lattner
cba966934e
Silence some -pedantic warnings.
...
llvm-svn: 28629
2006-06-01 17:12:14 +00:00
Reid Spencer
2c6d390a60
Change from using a stub function to a stub variable for passing to the
...
IncludeFile hack to ensure linkage of analysis passes. This works around
some -pedantic warnings about assigning an object to a function.
llvm-svn: 28621
2006-06-01 07:02:51 +00:00
Reid Spencer
490c23de9b
Prevent the -pedantic option from causing Mac OS/X build problems:
...
LiveIntervalAnalysis.cpp:218: error: floating constant exceeds range of 'double'
llvm-svn: 28620
2006-06-01 06:12:21 +00:00
Owen Anderson
1b0cd45469
Remove a FIXME that was fixed with my last patch.
...
llvm-svn: 28619
2006-06-01 06:07:40 +00:00
Owen Anderson
facd63d07c
More cleanups. Also, add a special case for updating PHI nodes, and
...
reimplement getValueDominatingFunction to walk the DominanceTree rather than
just searching blindly.
llvm-svn: 28618
2006-06-01 06:05:47 +00:00
Evan Cheng
4966cad9b5
Typos
...
llvm-svn: 28617
2006-06-01 05:53:27 +00:00
Reid Spencer
4b26f88ec9
For PR786:
...
Don't warn about -pedantic errors. Add a note to the PR instead.
llvm-svn: 28616
2006-06-01 05:49:51 +00:00
Reid Spencer
cf025eb201
For PR786:
...
Turn -pedantic and -Wno-long-long compile flags on by default. In a few
places, avoid the warnings by removing these options in the local makefile.
One notable exception: lib/Target/CBackend/Writer.cpp. These warnings are
left on as a reminder to developers to clean them up.
llvm-svn: 28614
2006-06-01 01:55:21 +00:00
Reid Spencer
94a443bb29
Use archive libraries instead of object files for VMCore, BCReader,
...
BCWriter, and bzip2 libraries. Adjust the various makefiles to accommodate
these changes. This was done to speed up link times.
llvm-svn: 28610
2006-06-01 01:30:27 +00:00
Evan Cheng
15c1f84762
Remove a warning
...
llvm-svn: 28607
2006-06-01 00:30:39 +00:00
Evan Cheng
4488266c46
Rename ASM modifier trunc8, trunc16 to subreg8, subreg16.
...
llvm-svn: 28606
2006-05-31 22:34:26 +00:00
Reid Spencer
30d5eade2a
Fix casting so there's no warning on Alpha.
...
llvm-svn: 28605
2006-05-31 22:26:11 +00:00
Evan Cheng
f90443c471
Sign extender
...
llvm-svn: 28603
2006-05-31 22:05:11 +00:00
Reid Spencer
3a6304d4e8
Squelch this warning:
...
/bzlib.c:126: warning: string length `1056' is greater than the length `509' ISO
C89 compilers are required to support
llvm-svn: 28602
2006-05-31 21:53:42 +00:00
Chris Lattner
36f99c7c1d
Swap the order of operands created here. For +&|^, the order doesn't matter,
...
but for sub, it really does! Fix fixes a miscompilation of fibheap_cut in
llvmgcc4.
llvm-svn: 28600
2006-05-31 21:14:00 +00:00
Owen Anderson
aae280d83c
Extract a huge loop into a helper method. Fix a few iterator-invalidation bugs.
...
llvm-svn: 28599
2006-05-31 20:55:06 +00:00
Evan Cheng
889544823a
Rename instructions for consistency sake.
...
llvm-svn: 28594
2006-05-31 19:00:07 +00:00
Evan Cheng
5b6029f577
commuteInstruction() does not always create a new MI!
...
llvm-svn: 28592
2006-05-31 18:03:39 +00:00
Reid Spencer
2d7af150ca
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
Evan Cheng
6a09baaff4
Eliminate a memory leak.
...
llvm-svn: 28585
2006-05-31 07:13:03 +00:00
Evan Cheng
bbc183c90e
visitVBinOp: Can't fold divide by zero!
...
llvm-svn: 28584
2006-05-31 06:08:35 +00:00
Evan Cheng
abbbe57ba2
Select vector_shuffle v1, undef <2, 3, ?, ?> to MOVHLPS.
...
llvm-svn: 28582
2006-05-31 00:51:37 +00:00
Evan Cheng
82db95cd32
Remove dead code.
...
llvm-svn: 28581
2006-05-31 00:50:42 +00:00
Evan Cheng
8dc7251083
A new entry
...
llvm-svn: 28579
2006-05-30 23:56:31 +00:00
Evan Cheng
c024ad7f32
MAXP{D|S} and MINP{D|S} are commutable.
...
llvm-svn: 28578
2006-05-30 23:47:30 +00:00
Evan Cheng
e2397256c1
Commute shufps / shufpd.
...
llvm-svn: 28577
2006-05-30 23:34:30 +00:00
Evan Cheng
88bd79b75b
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
bdb6af8e7d
Fix a build breaker.
...
llvm-svn: 28574
2006-05-30 21:45:53 +00:00
Evan Cheng
66bfb1dc9a
Oops. PSHUFD is only available with SSE2.
...
llvm-svn: 28573
2006-05-30 21:30:59 +00:00
Chris Lattner
a5c50baaf5
Add a note
...
llvm-svn: 28572
2006-05-30 21:29:15 +00:00
Chris Lattner
31b150e334
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
Evan Cheng
03ca651244
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
d7e0bab7f0
Remove bogus comment.
...
llvm-svn: 28564
2006-05-30 20:24:48 +00:00
Reid Spencer
1e1cfbb6fe
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
ae1c91ec10
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
7e0c2d106e
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
1bf57da16e
Expand ret into "CopyToReg;BRIND"
...
llvm-svn: 28559
2006-05-30 17:33:19 +00:00
Reid Spencer
9159a7e937
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
0ce0aa6544
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
Reid Spencer
ce05d51e82
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
ced05ab1b4
Add a note about integer multiplication by constants.
...
llvm-svn: 28551
2006-05-30 07:37:37 +00:00
Evan Cheng
f7637e403f
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
1891844780
Some new entries about truncate / anyext
...
llvm-svn: 28548
2006-05-30 06:23:50 +00:00
Andrew Lenharth
ec5b37953c
move calltarget to dsa
...
llvm-svn: 28546
2006-05-29 23:39:48 +00:00
Andrew Lenharth
bc04a6c143
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
Vladimir Prus
08c8b74864
Reset DEBUG_SYMBOL_TABLE back to 0.
...
llvm-svn: 28538
2006-05-29 12:54:52 +00:00
Vladimir Prus
8a3a4fb0ba
Fix compile error when DEBUG_SYMBOL_TABLE is defined.
...
llvm-svn: 28537
2006-05-29 12:45:15 +00:00
Reid Spencer
ac33b75511
Fix grammar in a comment.
...
llvm-svn: 28534
2006-05-29 02:34:34 +00:00
Owen Anderson
d46a77c3c8
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
Owen Anderson
a857559867
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.
llvm-svn: 28527
2006-05-28 19:33:28 +00:00
Owen Anderson
703f6baab0
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.
llvm-svn: 28524
2006-05-27 18:47:11 +00:00
Chris Lattner
0189e09b89
Fix some regression from the inliner patch I committed last night. This fixes
...
ldecod, lencod, and SPASS.
llvm-svn: 28523
2006-05-27 17:28:13 +00:00
Chris Lattner
04d52ee9a2
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
llvm-svn: 28521
2006-05-27 01:28:04 +00:00
Chris Lattner
e1552475d3
Ignore generated files
...
llvm-svn: 28520
2006-05-27 01:23:30 +00:00
Chris Lattner
12c9d54f79
Implement a new method, CloneAndPruneFunctionInto, as documented.
...
llvm-svn: 28519
2006-05-27 01:22:24 +00:00
Chris Lattner
1835cfb302
Refactor some code to expose an interface to constant fold and instruction given it's opcode, typeand operands.
...
llvm-svn: 28517
2006-05-27 01:18:04 +00:00
Chris Lattner
d8bd52bfd2
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.
llvm-svn: 28514
2006-05-27 00:43:02 +00:00
Owen Anderson
1843c1ee17
A few small clean-ups, and the addition of an LCSSA statistic.
...
llvm-svn: 28512
2006-05-27 00:31:37 +00:00
Evan Cheng
58bfb4e600
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.
llvm-svn: 28511
2006-05-26 23:13:20 +00:00
Evan Cheng
de0f25081a
Change RET node to include signness information of the return values. i.e.
...
RET chain, value1, sign1, value2, sign2, ...
llvm-svn: 28510
2006-05-26 23:10:12 +00:00
Evan Cheng
f53c4cc192
Change RET node to include signness information of the return values. e.g.
...
RET chain, value1, sign1, value2, sign2
llvm-svn: 28509
2006-05-26 23:09:09 +00:00
Owen Anderson
d706fc78b2
Fix a copy-and-paste-o that would break some compilers.
...
llvm-svn: 28507
2006-05-26 21:19:17 +00:00
Owen Anderson
2414055ac6
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.
llvm-svn: 28506
2006-05-26 21:11:53 +00:00
Evan Cheng
25db1a52d2
Vector argument must be passed in memory location aligned on 16-byte boundary.
...
llvm-svn: 28505
2006-05-26 20:37:47 +00:00
Evan Cheng
7f468901bb
Mac OS X ABI document lied. The first four XMM registers are used to pass
...
vector arguments, not three.
llvm-svn: 28504
2006-05-26 19:22:06 +00:00
Chris Lattner
0043931185
Implement Transforms/InstCombine/store.ll:test2.
...
llvm-svn: 28503
2006-05-26 19:19:20 +00:00
Chris Lattner
e3222507ee
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
llvm-svn: 28501
2006-05-26 18:42:34 +00:00
Evan Cheng
629df0afb2
Minor update to make the code more clear
...
llvm-svn: 28499
2006-05-26 18:39:59 +00:00
Evan Cheng
bde90b2732
Update more comments.
...
llvm-svn: 28498
2006-05-26 18:37:16 +00:00
Evan Cheng
414c909954
Fix some comments.
...
llvm-svn: 28497
2006-05-26 18:25:43 +00:00
Evan Cheng
a4b6f4749d
No need to handle illegal types.
...
llvm-svn: 28496
2006-05-26 18:22:49 +00:00
Owen Anderson
93098cfc4c
Skeletal LCSSA pass. This is currently non-functional. Expect functionality
...
and documentation updates soo.
llvm-svn: 28495
2006-05-26 13:58:26 +00:00
Rafael Espindola
f7c5af4863
On ARM, alignment is in bits
...
Add lr as a hard coded operand of bx
llvm-svn: 28494
2006-05-26 10:56:17 +00:00
Evan Cheng
c80154a36e
Remove a couple of bogus casts.
...
llvm-svn: 28493
2006-05-26 08:04:31 +00:00
Evan Cheng
328b47bc28
Remove a bogus cast.
...
llvm-svn: 28492
2006-05-26 08:00:14 +00:00
Evan Cheng
77b8eaf292
Minor bug caught by Ashwin Chandra
...
llvm-svn: 28491
2006-05-26 06:22:34 +00:00
Chris Lattner
c6c2770e08
Transform things like (splat(splat)) -> splat
...
llvm-svn: 28490
2006-05-26 00:29:06 +00:00
Chris Lattner
261299e3f5
Introduce a helper function that simplifies interpretation of shuffle masks.
...
No functionality change.
llvm-svn: 28489
2006-05-25 23:48:38 +00:00
Evan Cheng
f610c3e318
Consistency
...
llvm-svn: 28488
2006-05-25 23:31:23 +00:00
Chris Lattner
c678c720a7
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
llvm-svn: 28487
2006-05-25 23:24:33 +00:00
Chris Lattner
5df88a112b
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]
llvm-svn: 28485
2006-05-25 22:53:38 +00:00