Chris Lattner
034f12ea08
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46018 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-15 22:09:33 +00:00
Chris Lattner
48be23cd65
rename SDTRet -> SDTNone.
...
Move definition of 'trap' sdnode up from x86 instrinfo to targetselectiondag.td.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46017 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-15 22:02:54 +00:00
Owen Anderson
7047dd4d22
Remove DefInst from LiveVariables::VarInfo. Use the facilities on MachineRegisterInfo instead.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46016 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-15 22:02:46 +00:00
Chris Lattner
da68d30d24
no need to expand ISD::TRAP to X86ISD::TRAP, just match ISD::TRAP.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46015 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-15 21:58:22 +00:00
Chris Lattner
41bab0beac
Add support for targets that have a legal ISD::TRAP.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46014 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-15 21:58:08 +00:00
Chuck Rose III
9a79de3d09
Add files to windows project files. Also include <algorithm> explicitly so that vstudio build works
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46013 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-15 21:43:17 +00:00
Anton Korobeynikov
6bf3ba67a5
Fix JIT encoding of trap/ud2 instruction
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46012 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-15 21:40:02 +00:00
Bill Wendling
585e64e63e
Reformatted. It was confusing the other way. No functionality change.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46009 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-15 21:16:32 +00:00
Gordon Henriksen
afa47c5a26
Fix a memory correctness error noticed by valgrind (harmless in practice).
...
Thanks to Duncan Sands for noticing it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46007 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-15 20:02:11 +00:00
Duncan Sands
fdd75125b8
Testcase for gimplify_expr crash caused by an
...
unexpected placeholder_expr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46006 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-15 19:55:41 +00:00
Evan Cheng
e14af4fe74
Oops. Forgot to commit this.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46003 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-15 07:49:54 +00:00
Evan Cheng
4c46fc6bbf
Oops. Forgot to commit this.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46002 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-15 07:49:36 +00:00
Anton Korobeynikov
66fac79b89
For PR1839: add initial support for __builtin_trap. llvm-gcc part is missed
...
as well as PPC codegen
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46001 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-15 07:02:33 +00:00
Chris Lattner
0747baaf6a
clarify that byval is valid for any pointer argument.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45998 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-15 04:34:22 +00:00
Evan Cheng
6bfa8a121d
Rename CCIfStruct to CCIfByVal and CCStructAssign to CCPassByVal. Remove unused parameters of CCStructAssign and add size and alignment requirement info.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45997 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-15 03:34:58 +00:00
Evan Cheng
bdfd5ef823
Both x86-32 and x86-64 handle byval parameter attributes.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45996 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-15 03:15:41 +00:00
Evan Cheng
c67e6e8e82
ByVal stack slot alignment should be at least as large as pointer ABI alignment.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45995 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-15 03:14:05 +00:00
Evan Cheng
5daafa9b1b
Revert my last commit. Not needed.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45994 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-15 03:10:35 +00:00
Duncan Sands
15ea48c9ce
Simplify CallInst::hasByValArgument using a new method.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45974 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-14 19:57:00 +00:00
Duncan Sands
b0c9b93bb4
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45973 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-14 19:52:09 +00:00
Chris Lattner
459525df1e
don't create the post-ra scheduler unless it is enabled.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45972 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-14 19:00:06 +00:00
Chris Lattner
a6c3f80d97
remove dead #include
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45971 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-14 18:45:28 +00:00
Evan Cheng
3d64f1c018
Need a space to separate Make options.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45964 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-14 17:58:03 +00:00
Duncan Sands
02e30d70e2
This test is now the same as byval-1.ll, so remove it.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45960 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-14 14:57:30 +00:00
Duncan Sands
559ad3c2c2
Test that byval cannot be used with pointers to
...
types with no size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45959 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-14 14:55:05 +00:00
Duncan Sands
d6a844cda8
We now allow byval on fairly general pointer types.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45956 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-14 06:53:45 +00:00
Chris Lattner
3cc838433a
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%.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45955 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-14 06:41:29 +00:00
Evan Cheng
42725e7251
Simplify code.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45950 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-14 02:38:45 +00:00
Chris Lattner
941db495b8
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45949 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-14 02:09:12 +00:00
Chris Lattner
6a93fc01a7
The isNotSuitableForSRA property is now dead, don't compute it.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45948 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-14 01:32:52 +00:00
Chris Lattner
727c21084d
Change SRAGlobal to not depend on isNotSuitableForSRA, which makes it very
...
difficult to understand the invariants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45947 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-14 01:31:05 +00:00
Chris Lattner
58e44f49dd
Make the 'shrink global to bool' optimization more self contained, and thus
...
easier to show that its safe. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45946 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-14 01:17:44 +00:00
Chris Lattner
37ac608623
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45945 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-14 00:28:35 +00:00
Chris Lattner
f497b028b8
factor memcpy/memmove simplification out to its own SimplifyMemTransfer
...
method, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45944 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-13 23:50:23 +00:00
Chris Lattner
88b39744ec
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45943 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-13 22:30:28 +00:00
Chris Lattner
6d0339d451
simplify some code by adding a InsertBitCastBefore method,
...
make memmove->memcpy conversion a bit simpler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45942 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-13 22:23:22 +00:00
Duncan Sands
9e9cf0ce31
Whitespace tweak.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45940 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-13 21:20:29 +00:00
Duncan Sands
a41d719803
Remove the assumption that byval has been applied to
...
a pointer to a struct.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45939 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-13 21:19:59 +00:00
Duncan Sands
421d1c93cc
Allow the byval attribute for pointers to any type with
...
a size, not just structs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45938 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-13 21:19:12 +00:00
Chris Lattner
ee2b7a4530
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).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45937 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-13 20:59:02 +00:00
Duncan Sands
1fac17f2e7
Check that nested functions don't get pointless
...
static chains.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45936 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-13 18:44:12 +00:00
Duncan Sands
e3a8830c1d
Small simplification.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45932 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-13 08:12:17 +00:00
Duncan Sands
e1e520f601
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45931 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-13 08:02:44 +00:00
Chris Lattner
4db8f85c75
new testcase for rdar://5685492
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45918 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-13 00:19:57 +00:00
Chris Lattner
3f732807f3
improve cygwin compatibility, patch by Sam Bishop
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45917 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-12 22:54:07 +00:00
Chris Lattner
65844fbd84
clarify a note
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45914 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-12 18:58:46 +00:00
Evan Cheng
f4a5498ab4
Add hasByValArgument() to test if a call instruction has byval argument(s).
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45913 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-12 18:57:32 +00:00
Chris Lattner
92938b7145
we don't have to make an explicit copy of a byval argument when
...
inlining a function if we know that the function does not write
to *any* memory. This implements test/Transforms/Inline/byval2.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45912 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-12 18:54:29 +00:00
Evan Cheng
7723ab3a51
Indirect call with byval parameter requires a cast first.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45911 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-12 18:53:07 +00:00
Duncan Sands
cfad1b4f78
Be more liberal in what parameter attributes are
...
allowed on the vararg arguments of a call.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45909 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-12 16:42:01 +00:00