Evan Cheng
09cf82992b
Don't pull in environ, not always safe. Global variables are bad anyway.
...
Use execve when explicit environment variables ptr is available. Otherwise
just use execv.
llvm-svn: 28740
2006-06-09 20:43:11 +00:00
Owen Anderson
b1dc1d44f8
Add LCSSA as a requirement for LoopUnswitch, and assert that LoopUnswitch preserves
...
LCSSA.
llvm-svn: 28739
2006-06-09 18:40:32 +00:00
Owen Anderson
505adff3f0
Make Loop able to verify that it is in LCSSA-form, and have the LCSSA pass assert
...
on this.
llvm-svn: 28738
2006-06-09 18:33:30 +00:00
Evan Cheng
beedf824e3
Comments to appease sabre.
...
llvm-svn: 28737
2006-06-09 06:25:10 +00:00
Evan Cheng
0e14a56d35
Minor compilation speed improvement.
...
llvm-svn: 28736
2006-06-09 06:24:42 +00:00
Evan Cheng
398f70292c
RewriteExpr, either the new PHI node of induction variable or the
...
post-increment value, should be first cast to the appropriated type (to the
type of the common expr). Otherwise, the rewrite of a use based on (common +
iv) may end up with an incorrect type.
llvm-svn: 28735
2006-06-09 00:12:42 +00:00
Owen Anderson
5d029264ec
Update some comments, and expose LCSSAID in preparation for having other passes
...
require LCSSA.
llvm-svn: 28734
2006-06-08 20:02:53 +00:00
Chris Lattner
c03a9259c0
Fix X86/inline-asm.ll:test2, a case where an input value was implicitly
...
truncated.
llvm-svn: 28733
2006-06-08 18:27:11 +00:00
Chris Lattner
705948d742
Fix Regression/CodeGen/X86/inline-asm.ll, a case where inline asm causes
...
implement extension of a register.
llvm-svn: 28731
2006-06-08 18:22:48 +00:00
Reid Spencer
36bc2b00eb
Squelch a warning about signed/unsigned.
...
llvm-svn: 28729
2006-06-08 18:08:43 +00:00
Chris Lattner
ba1ed585ee
Add support for "m" inline asm constraints.
...
llvm-svn: 28728
2006-06-08 18:03:49 +00:00
Chris Lattner
8f8b5e4631
Fix an assert-on-inline-inline-asm bug.
...
llvm-svn: 28727
2006-06-08 18:00:47 +00:00
Reid Spencer
5e91c03fa9
For PR804:
...
Change the file size field of StatusInfo to be uint64_t instead of size_t
so that we know it is always 64 bits. This prevents some overflow on
systems where size_t is 32 bits when it ought to be 64.
llvm-svn: 28726
2006-06-08 17:00:08 +00:00
Vladimir Prus
9bc4009e9b
Remove dead code.
...
llvm-svn: 28725
2006-06-08 16:03:13 +00:00
Vladimir Prus
b5b6dc49e2
New method BasicBlock::getFirstNonPHI.
...
llvm-svn: 28724
2006-06-08 15:46:18 +00:00
Reid Spencer
ab97f22ccc
For PR787:
...
Provide new llvm::sys::Program facilities for converting the stdout and
stdin to binary mode. There is no standard way to do this and the available
mechanisms are platform specific. Adjust the bytecode reader and writer to
use these methods when their input is stdin or output is stdout. THis avoids
the problem with \n writing CRLF to a bytecode file on windows.
Patch Contributed by Michael Smith.
llvm-svn: 28722
2006-06-07 23:18:34 +00:00
Reid Spencer
5113dc5cfe
For PR780:
...
1. Add #includes to LinkAllVMCore.h to get Mangler.o and InlineAsm.o
2. Make Mangler.h and InlineAsm.h use the macros to ensure linkage
3. Make each of the tools with --load options include LinkAllVMCore.h
This should be the last set of changes for this bug and 800.
llvm-svn: 28719
2006-06-07 23:03:13 +00:00
Chris Lattner
5bd30fa310
Add a virtual dtor to the InlineAsm class so that the principle method of
...
the class can be defined in InlineAsm.cpp
llvm-svn: 28718
2006-06-07 22:47:44 +00:00
Chris Lattner
5ff8b962c8
Fix a bug where the types for inlineasm nodes were not properly entered into
...
the compaction table for a function. This broke compilation of hexxagon
on darwin/x86 with recent changes.
llvm-svn: 28717
2006-06-07 22:20:03 +00:00
Reid Spencer
be535661cc
For PR780:
...
1. Fix the macros in IncludeFile.h to put everything in the llvm namespace
2. Replace the previous explicit mechanism in all the .h and .cpp files
with the macros in IncludeFile.h
This gets us a consistent mechanism throughout LLVM for ensuring linkage.
Next step is to make sure its used in enough places.
llvm-svn: 28715
2006-06-07 22:00:26 +00:00
Reid Spencer
d4b795902c
Fix a spello in a comment.
...
llvm-svn: 28714
2006-06-07 21:24:10 +00:00
Reid Spencer
54cb2d8533
For PR780:
...
Break the "IncludeFile" mechanism into its own header file and adjust other
files accordingly. Use this facility for the IntrinsicInst problem which
was the subject of PR800.
More to follow on this.
llvm-svn: 28709
2006-06-07 20:00:19 +00:00
Evan Cheng
dc614c193e
Added X86FunctionInfo subclass of MachineFunction to record whether the
...
function that is being lowered is forced to use FP. Currently this is only
true for main() / Cygwin.
llvm-svn: 28703
2006-06-06 23:30:24 +00:00
Chris Lattner
d63b1b5a1f
Move toolrunner out of libsupport into the bugpoint tool
...
llvm-svn: 28700
2006-06-06 22:31:36 +00:00
Chris Lattner
95cebb082f
Fix a bug in a recent patch. This fixes UnitTests/Vector/Altivec/casts.c on
...
PPC/altivec
llvm-svn: 28698
2006-06-06 22:26:02 +00:00
Chris Lattner
16826c3503
Now that PR633 is implemented, the CBE can know to emit _setjmp/_longjmp
...
when available. This speeds up hexxagon from 18.61s to 16.61s with the CBE on
PPC Mac OS (for reference, LLC is 15.48s and GCC is 23.35s).
llvm-svn: 28697
2006-06-06 21:45:47 +00:00
Chris Lattner
c8587d4b81
Add PowerPC intrinsics to support dcbz[l]
...
llvm-svn: 28696
2006-06-06 21:29:23 +00:00
Owen Anderson
ac601b4c4b
Fix some formatting, and use inLoop() when appropriate.
...
llvm-svn: 28694
2006-06-06 04:36:36 +00:00
Owen Anderson
9e81c1bb03
Stop a memory leak, and update some comments.
...
llvm-svn: 28693
2006-06-06 04:28:30 +00:00
Reid Spencer
c3065b7d3f
Add the -Xlinker option to bugpoint which allows an option to be passed
...
through to gcc when its being used as a linker. This allows -L and -l
(and any other) options to be added so that non-complete bytecode files
can be processed with bugpoint. The -Xlinker option can be added as many
times as needed.
llvm-svn: 28692
2006-06-06 00:00:42 +00:00
Rafael Espindola
6306becc49
add R0 to liveout
...
expand "ret null" (implements test/Regression/CodeGen/ARM/ret_void.ll)
note that a Flag link is missing between the copy and the branch
llvm-svn: 28691
2006-06-05 22:26:14 +00:00
Reid Spencer
614cb2ff82
For PR798:
...
Provide GraphViz support for MingW32. Patch provided by Anton Korobeynikov
llvm-svn: 28688
2006-06-05 16:26:06 +00:00
Reid Spencer
b3171678ee
Make it possible to override the standard version printer. Not all tools
...
built with CommandLine.h will want the --version option to report that the
tool belongs to LLVM. To override simply pass a void func() to the
cl::SetVersionPrinter() function and that void func() will be called when
it is time to print the version information.
llvm-svn: 28687
2006-06-05 16:22:56 +00:00
Reid Spencer
7c77323e1d
For PR798:
...
Add support for Graphviz. Patch contributed by Anton Korobeynikov.
llvm-svn: 28684
2006-06-05 15:44:46 +00:00
Evan Cheng
0f29df98a1
A few new entries.
...
llvm-svn: 28683
2006-06-04 09:08:00 +00:00
Evan Cheng
0de66677e7
Be consistent with gcc.
...
llvm-svn: 28682
2006-06-04 07:24:07 +00:00
Owen Anderson
766f90b08e
Some more clean-up, and squash an IDF-Phi related bug.
...
llvm-svn: 28680
2006-06-04 00:55:19 +00:00
Andrew Lenharth
b47461350c
ignore ordered/unordered for now
...
llvm-svn: 28679
2006-06-04 00:25:51 +00:00
Owen Anderson
eb33815f1b
Various clean-ups suggested by Chris.
...
llvm-svn: 28678
2006-06-04 00:02:23 +00:00
Owen Anderson
d00eacc4f9
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
e8a42360c5
Cygwin support. Patch by Anton Korobeynikov!
...
llvm-svn: 28672
2006-06-02 22:38:37 +00:00
Evan Cheng
a2efb9f3ec
Use xor to clear a register.
...
llvm-svn: 28667
2006-06-02 21:20:34 +00:00
Evan Cheng
7ae8632cb4
Incorrect AT&T opcode.
...
llvm-svn: 28666
2006-06-02 21:09:10 +00:00
Chris Lattner
540886f0ae
Remove unneeded hook. Patch by Anton K. Thanks!
...
llvm-svn: 28664
2006-06-02 19:11:46 +00:00
Chris Lattner
8fd1036612
Add mingw support, patch contributed by Anton
...
llvm-svn: 28661
2006-06-02 18:54:01 +00:00
Chris Lattner
02e0b4ddb7
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
f42ccafe00
Fix build on systems with bad bison's
...
llvm-svn: 28657
2006-06-02 18:20:28 +00:00
Chris Lattner
cdf2b1fc30
Remove dead #include
...
llvm-svn: 28642
2006-06-01 20:02:28 +00:00
Chris Lattner
cc340c02a4
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
c774592641
Fix linking of inline asm objects.
...
llvm-svn: 28640
2006-06-01 19:14:22 +00:00
Reid Spencer
187b4adcfe
Provide configuration support and usage for MINGW32 platform
...
llvm-svn: 28639
2006-06-01 19:03:21 +00:00
Chris Lattner
71819be586
Fix -pedantic warnings.
...
llvm-svn: 28636
2006-06-01 17:29:22 +00:00
Chris Lattner
e1ade0a523
Fix -pedantic warnings
...
llvm-svn: 28635
2006-06-01 17:27:11 +00:00
Chris Lattner
20a4da4dfd
Fix -pedantic warning
...
llvm-svn: 28634
2006-06-01 17:17:46 +00:00
Chris Lattner
4442a70b3a
Silence -pedantic warning
...
llvm-svn: 28633
2006-06-01 17:17:06 +00:00
Chris Lattner
f905a7b994
Silence a -pedantic warning.
...
llvm-svn: 28632
2006-06-01 17:16:21 +00:00
Chris Lattner
b47b8a9fad
Silence -pedantic warning.
...
llvm-svn: 28630
2006-06-01 17:13:10 +00:00
Chris Lattner
dcd73534df
Silence some -pedantic warnings.
...
llvm-svn: 28629
2006-06-01 17:12:14 +00:00
Reid Spencer
5861659a1e
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
cd8f67a106
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
619e4ba57f
Remove a FIXME that was fixed with my last patch.
...
llvm-svn: 28619
2006-06-01 06:07:40 +00:00
Owen Anderson
cd76fa04a1
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
2b2c1be49c
Typos
...
llvm-svn: 28617
2006-06-01 05:53:27 +00:00
Reid Spencer
75f29be136
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
a62f097c96
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
a647c7ff42
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
2489ccdd90
Remove a warning
...
llvm-svn: 28607
2006-06-01 00:30:39 +00:00
Evan Cheng
cfaffdd335
Rename ASM modifier trunc8, trunc16 to subreg8, subreg16.
...
llvm-svn: 28606
2006-05-31 22:34:26 +00:00
Reid Spencer
ff82596981
Fix casting so there's no warning on Alpha.
...
llvm-svn: 28605
2006-05-31 22:26:11 +00:00
Evan Cheng
cf70c7f42d
Sign extender
...
llvm-svn: 28603
2006-05-31 22:05:11 +00:00
Reid Spencer
d8df61a4d0
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
1df0e98ac2
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
dad8c57340
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
25e44e008d
Rename instructions for consistency sake.
...
llvm-svn: 28594
2006-05-31 19:00:07 +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
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
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
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
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
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
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
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
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
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
749138582e
Some new entries about truncate / anyext
...
llvm-svn: 28548
2006-05-30 06:23:50 +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
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
edcf47ea45
Fix grammar in a comment.
...
llvm-svn: 28534
2006-05-29 02:34:34 +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
Owen Anderson
152d063ccb
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
1310e42803
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
67c424e010
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
be853d77e9
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
64d8692dee
Ignore generated files
...
llvm-svn: 28520
2006-05-27 01:23:30 +00:00
Chris Lattner
3df13f4f22
Implement a new method, CloneAndPruneFunctionInto, as documented.
...
llvm-svn: 28519
2006-05-27 01:22:24 +00:00
Chris Lattner
bc3c879fcf
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
8f872d2091
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
b4e16996f1
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
21dee4e0b2
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
a3add0fea8
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
a2e9953c54
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
6e047ab8fc
Fix a copy-and-paste-o that would break some compilers.
...
llvm-svn: 28507
2006-05-26 21:19:17 +00:00
Owen Anderson
f3dd3e2bfd
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
b92f418408
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
bfb5ea6875
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
dab43b2b0e
Implement Transforms/InstCombine/store.ll:test2.
...
llvm-svn: 28503
2006-05-26 19:19:20 +00:00
Chris Lattner
44a793c3a6
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
a01e799927
Minor update to make the code more clear
...
llvm-svn: 28499
2006-05-26 18:39:59 +00:00
Evan Cheng
cbfb3d07e0
Update more comments.
...
llvm-svn: 28498
2006-05-26 18:37:16 +00:00
Evan Cheng
763f9b00f0
Fix some comments.
...
llvm-svn: 28497
2006-05-26 18:25:43 +00:00
Evan Cheng
83dc51d7ff
No need to handle illegal types.
...
llvm-svn: 28496
2006-05-26 18:22:49 +00:00
Owen Anderson
8eca8910b6
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
87bc1a9b0b
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
70145f2d5e
Remove a couple of bogus casts.
...
llvm-svn: 28493
2006-05-26 08:04:31 +00:00
Evan Cheng
0f5c7936e7
Remove a bogus cast.
...
llvm-svn: 28492
2006-05-26 08:00:14 +00:00
Evan Cheng
29296b844f
Minor bug caught by Ashwin Chandra
...
llvm-svn: 28491
2006-05-26 06:22:34 +00:00
Chris Lattner
0e47716e69
Transform things like (splat(splat)) -> splat
...
llvm-svn: 28490
2006-05-26 00:29:06 +00:00
Chris Lattner
12249be286
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
8aca43e8da
Consistency
...
llvm-svn: 28488
2006-05-25 23:31:23 +00:00
Chris Lattner
99155be33f
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
83f6578b0c
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
Evan Cheng
0421aca87a
Some clean up.
...
llvm-svn: 28483
2006-05-25 22:38:31 +00:00
Chris Lattner
dc1614d93e
Add support for the missing FP condition codes
...
llvm-svn: 28482
2006-05-25 22:26:02 +00:00
Evan Cheng
29f805ec65
Remove some dead code.
...
llvm-svn: 28481
2006-05-25 22:25:52 +00:00
Evan Cheng
2554e3d9ba
X86 / Cygwin asm / alignment fixes.
...
Patch contributed by Anton Korobeynikov!
llvm-svn: 28480
2006-05-25 21:59:08 +00:00
Chris Lattner
0853700582
Revert a patch that is unsafe, due to out of range array accesses in inner
...
array scopes possibly accessing valid memory in outer subscripts.
llvm-svn: 28478
2006-05-25 21:25:12 +00:00
Evan Cheng
5ee96893ae
Build breakage.
...
llvm-svn: 28475
2006-05-25 18:56:34 +00:00
Chris Lattner
1fbb0d38c7
Fix build failure of povray
...
llvm-svn: 28473
2006-05-25 18:06:16 +00:00
Chris Lattner
630bbcef8d
Fix Benchmarks/MallocBench/cfrac
...
llvm-svn: 28471
2006-05-25 16:54:16 +00:00
Rafael Espindola
91df1ef41f
implement initial version of ARMAsmPrinter::printOperand
...
llvm-svn: 28470
2006-05-25 12:57:06 +00:00
Rafael Espindola
4781610886
port the ARM backend to use ISD::CALL instead of LowerCallTo
...
llvm-svn: 28469
2006-05-25 11:00:18 +00:00
Evan Cheng
009f5f55f7
Turn on -sched-commute-nodes by default.
...
llvm-svn: 28465
2006-05-25 08:37:31 +00:00
Evan Cheng
2a33094284
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.
llvm-svn: 28463
2006-05-25 00:59:30 +00:00
Evan Cheng
c2cd473d9b
CALL node change (arg / sign pairs instead of just arguments).
...
llvm-svn: 28462
2006-05-25 00:57:32 +00:00
Evan Cheng
4582771f3f
CALL node change: now including signness of every argument.
...
llvm-svn: 28461
2006-05-25 00:55:32 +00:00
Evan Cheng
4af59dac0b
Assert if InflightSet is not cleared after instruction selecting a BB.
...
llvm-svn: 28459
2006-05-25 00:24:28 +00:00
Evan Cheng
1a8e74d113
Clear HandleMap and ReplaceMap after instruction selection. Or it may cause
...
non-deterministic behavior.
llvm-svn: 28454
2006-05-24 20:46:25 +00:00
Reid Spencer
6e64180f03
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.
llvm-svn: 28453
2006-05-24 19:21:13 +00:00
Reid Spencer
94531bf367
For PR786:
...
Remove a spurious ;
llvm-svn: 28452
2006-05-24 19:05:21 +00:00
Chris Lattner
a643d528bd
Patch for a new instcombine xform, patch contributed by Nick Lewycky!
...
This implements Transforms/InstCombine/2006-05-10-InvalidIndexUndef.ll
llvm-svn: 28450
2006-05-24 17:34:30 +00:00
Chris Lattner
aa2372562e
Patches to make the LLVM sources more -pedantic clean. Patch provided
...
by Anton Korobeynikov! This is a step towards closing PR786.
llvm-svn: 28447
2006-05-24 17:04:05 +00:00
Chris Lattner
33165c246c
Fix CodeGen/Generic/vector.ll:test_div with altivec.
...
llvm-svn: 28445
2006-05-24 00:15:25 +00:00
Chris Lattner
b56d22c2f6
Handle SETO* like we handle SET*, restoring behavior after Evan's setcc
...
change. This fixes PowerPC/fnegsel.ll.
llvm-svn: 28443
2006-05-24 00:06:44 +00:00
Chris Lattner
de177e016e
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.
llvm-svn: 28442
2006-05-23 23:39:48 +00:00
Chris Lattner
a58f559848
Fix file header comment
...
llvm-svn: 28441
2006-05-23 23:20:42 +00:00
Evan Cheng
7068a93cae
Better way to check for vararg.
...
llvm-svn: 28440
2006-05-23 21:08:24 +00:00
Evan Cheng
17e734f0a6
Remove PreprocessCCCArguments and PreprocessFastCCArguments now that
...
FORMAL_ARGUMENTS nodes include a token operand.
llvm-svn: 28439
2006-05-23 21:06:34 +00:00
Chris Lattner
8be5be817c
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.
llvm-svn: 28438
2006-05-23 18:50:38 +00:00
Evan Cheng
ac4f66ff24
-enable-unsafe-fp-math implies -enable-finite-only-fp-math
...
llvm-svn: 28437
2006-05-23 18:18:46 +00:00
Vladimir Prus
df1d439849
Fix missing include
...
llvm-svn: 28435
2006-05-23 13:43:15 +00:00
Evan Cheng
1c5b7d12df
Incorrect SETCC CondCode used for FP comparisons.
...
llvm-svn: 28433
2006-05-23 06:40:47 +00:00
Evan Cheng
ea1450742e
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.
llvm-svn: 28432
2006-05-23 06:39:12 +00:00
Rafael Espindola
27f8bdc7e5
implement minimal versions of
...
ARMAsmPrinter::runOnMachineFunction
LowerFORMAL_ARGUMENTS
ARMInstrInfo::isMoveInstr
llvm-svn: 28431
2006-05-23 02:48:20 +00:00
Evan Cheng
26ba25f910
A isel deficiency.
...
llvm-svn: 28427
2006-05-22 05:54:49 +00:00
Evan Cheng
85b6232b53
Back out indirect branch load folding hack. It broke some tests.
...
llvm-svn: 28425
2006-05-21 06:28:50 +00:00
Chris Lattner
80b0a70911
Add a note
...
llvm-svn: 28424
2006-05-21 03:57:07 +00:00
Owen Anderson
80b1b4d41e
Make TargetData strings less redundant.
...
llvm-svn: 28423
2006-05-20 23:28:54 +00:00
Chris Lattner
d0622b6894
Silence a bogus gcc warning
...
llvm-svn: 28422
2006-05-20 23:14:03 +00:00
Chris Lattner
482fb65144
Fix a parsing bug that caused 7 llvm-test regressions on PPC last night.
...
I'm suprised it didn't cause more!
llvm-svn: 28421
2006-05-20 21:16:59 +00:00
Evan Cheng
401049ce33
- Use of load's chain result should be redirected to load's chain operand.
...
If it reads the chain result of the call, then the use, callseq_start,
and call would form a cycle!
- Don't forget handle node replacement!
- There could also be a TokenFactor between the load and the callseq_start.
llvm-svn: 28420
2006-05-20 09:21:39 +00:00
Evan Cheng
0643f902be
A new entry
...
llvm-svn: 28419
2006-05-20 07:44:53 +00:00
Evan Cheng
a26c451fa2
Missing break statements.
...
llvm-svn: 28418
2006-05-20 07:44:28 +00:00
Evan Cheng
b9ac06bb33
Remove unused patterns.
...
llvm-svn: 28417
2006-05-20 01:40:16 +00:00
Evan Cheng
f838cfcfbe
Handle indirect call which folds a load manually. This never matches by
...
the TableGen generated code since the load's chain result is read by
the callseq_start node.
llvm-svn: 28416
2006-05-20 01:36:52 +00:00
Owen Anderson
f7db631b7d
Sparc is big-endian.
...
llvm-svn: 28415
2006-05-20 00:49:30 +00:00
Owen Anderson
88812b5c0a
Make all of the TargetMachine subclasses use the new string TargetData methods.
...
This is part of the on-going work on PR 761.
llvm-svn: 28414
2006-05-20 00:24:56 +00:00
Chris Lattner
29d2085716
Print csretcc calls like this:
...
call csretcc void %structret( { sbyte }* %P )
instead of this:
callcsretcc void %structret( { sbyte }* %P )
llvm-svn: 28412
2006-05-19 21:58:52 +00:00
Chris Lattner
620895a47a
Fix misencoding of calling conventions
...
llvm-svn: 28411
2006-05-19 21:57:37 +00:00
Chris Lattner
3ea816fa48
pretty print csretcc for calls
...
llvm-svn: 28410
2006-05-19 21:54:03 +00:00
Chris Lattner
01dd6df5f3
CSRet allows varargs
...
llvm-svn: 28409
2006-05-19 21:34:04 +00:00
Chris Lattner
5bdc7127af
Asmprint csret nicely
...
llvm-svn: 28408
2006-05-19 21:29:57 +00:00
Chris Lattner
09c0e99dfb
Regenerate
...
llvm-svn: 28407
2006-05-19 21:28:53 +00:00
Chris Lattner
21cffffbb0
Add support for parsing csret
...
llvm-svn: 28406
2006-05-19 21:28:34 +00:00
Chris Lattner
ef13ee3281
csret functions can be varargs (as can target cc's). Verify restrictions on
...
csret functions.
llvm-svn: 28405
2006-05-19 21:25:17 +00:00
Chris Lattner
29d7bded45
Add a note
...
llvm-svn: 28402
2006-05-19 21:01:38 +00:00
Chris Lattner
b22eb6304f
Add a note
...
llvm-svn: 28401
2006-05-19 20:55:31 +00:00
Chris Lattner
17f1f1a56c
Split the SSE readme items out into their own README.
...
llvm-svn: 28400
2006-05-19 20:51:43 +00:00
Chris Lattner
427ea6f0a7
Split FP-stack notes out of the main readme. Next up: splitting out SSE.
...
llvm-svn: 28399
2006-05-19 20:45:52 +00:00
Chris Lattner
240f846495
Move a target-independent note out of the X86 readme.
...
llvm-svn: 28398
2006-05-19 20:45:08 +00:00
Chris Lattner
d6a25a08d1
Particularly ugly code.
...
llvm-svn: 28397
2006-05-19 19:41:33 +00:00
Reid Spencer
2452c94df4
Fix a doxygen problem and break lines at 80 columns
...
llvm-svn: 28395
2006-05-19 19:09:46 +00:00
Evan Cheng
feca91a516
These can be transformed into lea as well. Not that we use this feature
...
currently...
llvm-svn: 28393
2006-05-19 18:43:41 +00:00
Evan Cheng
7b8feb27c8
- Use exact-width integer types, e.g. int32_t, to avoid confusion.
...
- Fix a couple of minor bugs in i16immSExt8 and i16immZExt8.
- Added loadiPTR fragment used for indirect jumps and calls.
llvm-svn: 28392
2006-05-19 18:40:54 +00:00