Chris Lattner
2595fd0ca7
improve compatibility with mingw, patch by Alain Frisch
...
llvm-svn: 46026
2008-01-15 22:50:50 +00:00
Chris Lattner
f0dd2bb4e6
add a test to ensure that argpromote of one argument doesn't
...
break the byval attr on some other argument.
llvm-svn: 46025
2008-01-15 22:38:12 +00:00
Anton Korobeynikov
b26ac8cbb2
Add description of 'llvm.trap' intrinsic. Also, minor fixes in formatting.
...
llvm-svn: 46024
2008-01-15 22:31:34 +00:00
Chris Lattner
afd4056065
verify x86 generates ud2 for llvm.trap
...
llvm-svn: 46023
2008-01-15 22:22:02 +00:00
Evan Cheng
b94df1d6e5
Unbreak the build.
...
llvm-svn: 46021
2008-01-15 22:19:35 +00:00
Chris Lattner
4d3944c554
new testcase for llvm.trap.
...
llvm-svn: 46020
2008-01-15 22:17:26 +00:00
Chris Lattner
dac9c1bcfe
If someone wants to implement ppc TRAP, they can go for it :)
...
llvm-svn: 46019
2008-01-15 22:15:02 +00:00
Chris Lattner
bcb087fd62
The type of the 'abort' node should be pointer type (because
...
it's a function pointer) not MVT::Other. This fixes builtin_trap
lowering on ppc, alpha, ia64
llvm-svn: 46018
2008-01-15 22:09:33 +00:00
Chris Lattner
6846e346a8
rename SDTRet -> SDTNone.
...
Move definition of 'trap' sdnode up from x86 instrinfo to targetselectiondag.td.
llvm-svn: 46017
2008-01-15 22:02:54 +00:00
Owen Anderson
946d55e773
Remove DefInst from LiveVariables::VarInfo. Use the facilities on MachineRegisterInfo instead.
...
llvm-svn: 46016
2008-01-15 22:02:46 +00:00
Chris Lattner
0072ce1ff4
no need to expand ISD::TRAP to X86ISD::TRAP, just match ISD::TRAP.
...
llvm-svn: 46015
2008-01-15 21:58:22 +00:00
Chris Lattner
54fd35650d
Add support for targets that have a legal ISD::TRAP.
...
llvm-svn: 46014
2008-01-15 21:58:08 +00:00
Chuck Rose III
7dfc302a45
Add files to windows project files. Also include <algorithm> explicitly so that vstudio build works
...
llvm-svn: 46013
2008-01-15 21:43:17 +00:00
Anton Korobeynikov
44893ee93d
Fix JIT encoding of trap/ud2 instruction
...
llvm-svn: 46012
2008-01-15 21:40:02 +00:00
Bill Wendling
0ad07f292c
Reformatted. It was confusing the other way. No functionality change.
...
llvm-svn: 46009
2008-01-15 21:16:32 +00:00
Gordon Henriksen
26e9b6653c
Fix a memory correctness error noticed by valgrind (harmless in practice).
...
Thanks to Duncan Sands for noticing it.
llvm-svn: 46007
2008-01-15 20:02:11 +00:00
Duncan Sands
1095bdca79
Testcase for gimplify_expr crash caused by an
...
unexpected placeholder_expr.
llvm-svn: 46006
2008-01-15 19:55:41 +00:00
Evan Cheng
5e40103440
Oops. Forgot to commit this.
...
llvm-svn: 46003
2008-01-15 07:49:54 +00:00
Evan Cheng
4eb3d6c8d6
Oops. Forgot to commit this.
...
llvm-svn: 46002
2008-01-15 07:49:36 +00:00
Anton Korobeynikov
08ea121968
For PR1839: add initial support for __builtin_trap. llvm-gcc part is missed
...
as well as PPC codegen
llvm-svn: 46001
2008-01-15 07:02:33 +00:00
Chris Lattner
8c17d65f09
clarify that byval is valid for any pointer argument.
...
llvm-svn: 45998
2008-01-15 04:34:22 +00:00
Evan Cheng
d7403ac663
Rename CCIfStruct to CCIfByVal and CCStructAssign to CCPassByVal. Remove unused parameters of CCStructAssign and add size and alignment requirement info.
...
llvm-svn: 45997
2008-01-15 03:34:58 +00:00
Evan Cheng
4eb7ae04c5
Both x86-32 and x86-64 handle byval parameter attributes.
...
llvm-svn: 45996
2008-01-15 03:15:41 +00:00
Evan Cheng
57714c090b
ByVal stack slot alignment should be at least as large as pointer ABI alignment.
...
llvm-svn: 45995
2008-01-15 03:14:05 +00:00
Evan Cheng
fceb25b8e6
Revert my last commit. Not needed.
...
llvm-svn: 45994
2008-01-15 03:10:35 +00:00
Duncan Sands
087d6020ee
Simplify CallInst::hasByValArgument using a new method.
...
llvm-svn: 45974
2008-01-14 19:57:00 +00:00
Duncan Sands
81e35b4d47
I noticed that the trampoline straightening transformation could
...
drop attributes on varargs call arguments. Also, it could generate
invalid IR if the transformed call already had the 'nest' attribute
somewhere (this can never happen for code coming from llvm-gcc,
but it's a theoretical possibility). Fix both problems.
llvm-svn: 45973
2008-01-14 19:52:09 +00:00
Chris Lattner
b067edf1b3
don't create the post-ra scheduler unless it is enabled.
...
llvm-svn: 45972
2008-01-14 19:00:06 +00:00
Chris Lattner
a6559b0047
remove dead #include
...
llvm-svn: 45971
2008-01-14 18:45:28 +00:00
Evan Cheng
672ba05b73
Need a space to separate Make options.
...
llvm-svn: 45964
2008-01-14 17:58:03 +00:00
Duncan Sands
0e785005ce
This test is now the same as byval-1.ll, so remove it.
...
llvm-svn: 45960
2008-01-14 14:57:30 +00:00
Duncan Sands
c6e42dfda1
Test that byval cannot be used with pointers to
...
types with no size.
llvm-svn: 45959
2008-01-14 14:55:05 +00:00
Duncan Sands
5bd24c7449
We now allow byval on fairly general pointer types.
...
llvm-svn: 45956
2008-01-14 06:53:45 +00:00
Chris Lattner
554971a6d6
Improve the FP stackifier to decide all on its own whether
...
an instruction kills a register or not. This is cheap and
easy to do now that instructions record this on their flags,
and this eliminates the second pass of LiveVariables from the
x86 backend. This speeds up a release llc by ~2.5%.
llvm-svn: 45955
2008-01-14 06:41:29 +00:00
Evan Cheng
12fb1dc67e
Simplify code.
...
llvm-svn: 45950
2008-01-14 02:38:45 +00:00
Chris Lattner
efb498eddb
Fix the miscompilation of MiBench/consumer-lame that was exposed by Evan's
...
byval work. This miscompilation is due to the program indexing an array out
of range and us doing a transformation that broke this.
llvm-svn: 45949
2008-01-14 02:09:12 +00:00
Chris Lattner
5d135cc20a
The isNotSuitableForSRA property is now dead, don't compute it.
...
llvm-svn: 45948
2008-01-14 01:32:52 +00:00
Chris Lattner
760b05a331
Change SRAGlobal to not depend on isNotSuitableForSRA, which makes it very
...
difficult to understand the invariants.
llvm-svn: 45947
2008-01-14 01:31:05 +00:00
Chris Lattner
c2933482a0
Make the 'shrink global to bool' optimization more self contained, and thus
...
easier to show that its safe. No functionality change.
llvm-svn: 45946
2008-01-14 01:17:44 +00:00
Chris Lattner
d22a5f6314
Turn a memcpy from a double* into a load/store of double instead of
...
a load/store of i64. The later prevents promotion/scalarrepl of the
source and dest in many cases.
This fixes the 300% performance regression of the byval stuff on
stepanov_v1p2.
llvm-svn: 45945
2008-01-14 00:28:35 +00:00
Chris Lattner
8560bb9d98
factor memcpy/memmove simplification out to its own SimplifyMemTransfer
...
method, no functionality change.
llvm-svn: 45944
2008-01-13 23:50:23 +00:00
Chris Lattner
5fbf76aaf4
simplify some code. If we can infer alignment for source and dest that are
...
greater than memcpy alignment, and if we lower to load/store, use the best
alignment info we have.
llvm-svn: 45943
2008-01-13 22:30:28 +00:00
Chris Lattner
4f69f1a721
simplify some code by adding a InsertBitCastBefore method,
...
make memmove->memcpy conversion a bit simpler.
llvm-svn: 45942
2008-01-13 22:23:22 +00:00
Duncan Sands
0c362b8606
Whitespace tweak.
...
llvm-svn: 45940
2008-01-13 21:20:29 +00:00
Duncan Sands
423244deda
Remove the assumption that byval has been applied to
...
a pointer to a struct.
llvm-svn: 45939
2008-01-13 21:19:59 +00:00
Duncan Sands
86c17f2ebf
Allow the byval attribute for pointers to any type with
...
a size, not just structs.
llvm-svn: 45938
2008-01-13 21:19:12 +00:00
Chris Lattner
32eae5daa5
Fix PR1907, a nasty miscompilation because instcombine didn't
...
realize that ne & sgt was a signed comparison (it was only
looking at whether the left compare was signed).
llvm-svn: 45937
2008-01-13 20:59:02 +00:00
Duncan Sands
1853262730
Check that nested functions don't get pointless
...
static chains.
llvm-svn: 45936
2008-01-13 18:44:12 +00:00
Duncan Sands
560625b701
Small simplification.
...
llvm-svn: 45932
2008-01-13 08:12:17 +00:00
Duncan Sands
7414cc131b
When turning a call to a bitcast function into a direct call,
...
if this becomes a varargs call then deal correctly with any
parameter attributes on the newly vararg call arguments.
llvm-svn: 45931
2008-01-13 08:02:44 +00:00