Chris Lattner
1f22d9154a
Change legalizeop of FP_ROUND and FP_EXTEND to not fall through
...
into the ANY_EXTEND/ZERO_EXTEND/SIGN_EXTEND code to simplify it.
Unmerge the code for FP_ROUND and FP_EXTEND from each other to
make each one simpler.
llvm-svn: 46061
2008-01-16 06:57:07 +00:00
Chris Lattner
109f0e56f5
make sure to use a cpu that has sse.
...
llvm-svn: 46060
2008-01-16 06:32:02 +00:00
Chris Lattner
2825f8fff0
make it more clear that this predicate only applies to scalar FP types.
...
llvm-svn: 46058
2008-01-16 06:24:21 +00:00
Chris Lattner
fbb75278b2
introduce a isTypeInSSEReg predicate, which allows us to simplify
...
some code. No functionality change.
llvm-svn: 46055
2008-01-16 06:19:45 +00:00
Chris Lattner
41e1fd13b2
My previous commit had an incomplete message, it should have been:
...
make the 'fp return in ST(0)' optimization smart enough to
look through token factor nodes. THis allows us to compile
testcases like CodeGen/X86/fp-stack-retcopy.ll into:
_carg:
subl $12, %esp
call L_foo$stub
fstpl (%esp)
fldl (%esp)
addl $12, %esp
ret
instead of:
_carg:
subl $28, %esp
call L_foo$stub
fstpl 16(%esp)
movsd 16(%esp), %xmm0
movsd %xmm0, 8(%esp)
fldl 8(%esp)
addl $28, %esp
ret
Still not optimal, but much better and this is a trivial patch. Fixing
the rest requires invasive surgery that is is not llvm 2.2 material.
llvm-svn: 46054
2008-01-16 05:56:59 +00:00
Chris Lattner
1819f31640
make the 'fp return in ST(0)' optimization smart enough to
...
look through token factor
llvm-svn: 46053
2008-01-16 05:53:06 +00:00
Chris Lattner
d9f29a1e3e
various whitespace cleanups, no functionality change.
...
llvm-svn: 46052
2008-01-16 05:52:18 +00:00
Chris Lattner
50f1b6f9a5
Factor the ReachesChainWithoutSideEffects out of dag combiner into
...
a public SDOperand::reachesChainWithoutSideEffects method. No
functionality change.
llvm-svn: 46050
2008-01-16 05:49:24 +00:00
Devang Patel
a8d63b0b30
Do not strip llvm.used values.
...
llvm-svn: 46045
2008-01-16 03:33:05 +00:00
Ted Kremenek
9b2d0769ed
Changed ImmutableMap::find to return an iterator instead of a pointer
...
to the tree node.
llvm-svn: 46034
2008-01-15 23:53:53 +00:00
Devang Patel
2dda5ca0a4
- Introduces versioning macro LLVM_LTO_VERSION
...
- Communicate symbol visibility
- Communicate code generation model
llvm-svn: 46033
2008-01-15 23:52:34 +00:00
Chris Lattner
b7af13397a
Commit a piece that I missed before, patch by Alain Frisch
...
llvm-svn: 46032
2008-01-15 23:27:40 +00:00
Dale Johannesen
1268083b64
Missed file from previous checkin.
...
llvm-svn: 46030
2008-01-15 23:25:27 +00:00
Dale Johannesen
319c7bb405
Fix and enable EH for x86-64 Darwin. Adds
...
ShortenEHDataFor64Bits as a not-very-accurate
abstraction to cover all the changes in DwarfWriter.
Some cosmetic changes to Darwin assembly code for
gcc testsuite compatibility.
llvm-svn: 46029
2008-01-15 23:24:56 +00:00
Owen Anderson
214c1c3461
Move some calls to getVRegDef higher in the callgraph, so they don't get executed as frequently in performance sensitive code.
...
llvm-svn: 46027
2008-01-15 22:58:11 +00:00
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