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
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
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
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
Anton Korobeynikov
44893ee93d
Fix JIT encoding of trap/ud2 instruction
...
llvm-svn: 46012
2008-01-15 21:40:02 +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
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
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
Duncan Sands
0c362b8606
Whitespace tweak.
...
llvm-svn: 45940
2008-01-13 21:20:29 +00:00
Evan Cheng
08584fc86a
Code clean up.
...
llvm-svn: 45898
2008-01-12 01:08:07 +00:00
Chris Lattner
5e112f44c8
fix a wordo that gordon noticed :)
...
llvm-svn: 45896
2008-01-12 00:53:16 +00:00
Chris Lattner
0242c393d1
Any x86 instruction that reads from an invariant location is invariant.
...
This allows us to sink things like:
cvtsi2sd 32(%esp), %xmm1
when reading from the argument area, for example.
llvm-svn: 45895
2008-01-12 00:35:08 +00:00
Chris Lattner
0293fca6d8
rename MachineInstr::setInstrDescriptor -> setDesc
...
llvm-svn: 45871
2008-01-11 18:10:50 +00:00
Chris Lattner
a83f66d1bb
remove xchg and shift-reg-by-1 instructions, which are dead.
...
llvm-svn: 45870
2008-01-11 18:00:50 +00:00
Chris Lattner
73e9c2c12d
add a note, remove a done deed.
...
llvm-svn: 45869
2008-01-11 18:00:13 +00:00
Arnold Schwaighofer
5cc460a50e
hrm - correct spelling.
...
Actually were not riding any arguments. Sadly there is no semantic spell checker that is going to safe you from such a mistake.
llvm-svn: 45868
2008-01-11 17:10:15 +00:00
Arnold Schwaighofer
d58f91f376
Improve tail call optimized call's argument lowering. Before this
...
commit all arguments where moved to the stack slot where they would
reside on a normal function call before the lowering to the tail call
stack slot. This was done to prevent arguments overwriting each other.
Now only arguments sourcing from a FORMAL_ARGUMENTS node or a
CopyFromReg node with virtual register (could also be a caller's
argument) are lowered indirectly.
--This line, and those below, will be ignored--
M X86/X86ISelLowering.cpp
M X86/README.txt
llvm-svn: 45867
2008-01-11 16:49:42 +00:00
Arnold Schwaighofer
d2318e2f41
Correct a copy and paste error.
...
llvm-svn: 45865
2008-01-11 14:34:56 +00:00
Evan Cheng
b10a30578e
Rename Int_CVTSI642SSr* to Int_CVTSI2SS64r* for naming consistency and remove unused instructions.
...
llvm-svn: 45861
2008-01-11 07:37:44 +00:00
Chris Lattner
20d1e419b3
more flags set right
...
llvm-svn: 45860
2008-01-11 07:18:17 +00:00
Chris Lattner
cb62477ec2
add some missing flags.
...
llvm-svn: 45859
2008-01-11 06:59:07 +00:00
Dale Johannesen
31afe330e4
Weak things initialized to 0 don't go in bss on Darwin.
...
Cosmetic changes to spacing to match gcc (some dejagnu
tests actually care).
llvm-svn: 45848
2008-01-11 00:54:37 +00:00
Chris Lattner
bfffa4f21e
Simplify the side effect stuff a bit more and make licm/sinking
...
both work right according to the new flags.
This removes the TII::isReallySideEffectFree predicate, and adds
TII::isInvariantLoad.
It removes NeverHasSideEffects+MayHaveSideEffects and adds
UnmodeledSideEffects as machine instr flags. Now the clients
can decide everything they need.
I think isRematerializable can be implemented in terms of the
flags we have now, though I will let others tackle that.
llvm-svn: 45843
2008-01-10 23:08:24 +00:00
Chris Lattner
48c54909dc
IMPLICIT_USE and IMPLICIT_DEF are dead, remove them.
...
llvm-svn: 45838
2008-01-10 19:27:54 +00:00
Chris Lattner
9d7971791b
Start inferring side effect information more aggressively, and fix many bugs in the
...
x86 backend where instructions were not marked maystore/mayload, and perf issues where
instructions were not marked neverHasSideEffects. It would be really nice if we could
write patterns for copy instructions.
I have audited all the x86 instructions down to MOVDQAmr. The flags on others and on
other targets are probably not right in all cases, but no clients currently use this
info that are enabled by default.
llvm-svn: 45829
2008-01-10 07:59:24 +00:00
Chris Lattner
7ceba534ba
rename X86InstrX86-64.td -> X86Instr64bit.td
...
llvm-svn: 45826
2008-01-10 05:50:42 +00:00
Chris Lattner
6ad01a9965
remove explicit sets of 'neverHasSideEffects' that can now be
...
inferred from the instr patterns.
llvm-svn: 45824
2008-01-10 05:45:39 +00:00
Chris Lattner
9b4f2b2316
get def use info more correct.
...
llvm-svn: 45821
2008-01-10 05:12:37 +00:00
Chris Lattner
8e486a6b25
verify that the frame index is immutable before remat'ing (still disabled)
...
or being side-effect free.
llvm-svn: 45816
2008-01-10 04:16:31 +00:00
Evan Cheng
8846740401
Mark byval parameter stack objects mutable for now.
...
llvm-svn: 45813
2008-01-10 02:24:25 +00:00
Dale Johannesen
fdd4b3846f
Emit unused EH frames for weak definitions on Darwin,
...
because assembler/linker can't cope with weak absolutes.
PR 1880.
llvm-svn: 45811
2008-01-10 02:03:30 +00:00
Evan Cheng
f6fd56d085
Do not use the stack pointer directly, issue a copyfromreg instead. Otherwise we can end up with something like ADD32ri %esp, x which two-address pass won't like.
...
llvm-svn: 45798
2008-01-10 00:37:26 +00:00
Evan Cheng
7581a2a634
Remove comments that do not correspond to anything after recent refactoring.
...
llvm-svn: 45792
2008-01-10 00:09:10 +00:00
Chris Lattner
c465555fe6
add a testcase
...
llvm-svn: 45768
2008-01-09 00:37:18 +00:00
Duncan Sands
6f28b87039
Use size_t to store Pos, avoid truncating value
...
on 64-bit builds. Analysis and original patch
by Török Edwin. Code audit found another place
with the same problem, also fixed here.
llvm-svn: 45746
2008-01-08 10:06:15 +00:00
Evan Cheng
e7fd8ad117
Minor fix to enable x86-64 pic jit (still fails for other reasons).
...
llvm-svn: 45734
2008-01-08 02:07:10 +00:00
Evan Cheng
165d39b8e4
Fix a x86-64 static codegen bug. This fixes a lot of x86-64 jit failures.
...
llvm-svn: 45733
2008-01-08 02:06:11 +00:00
Bill Wendling
e859abc363
Silence warning about loss of precision.
...
llvm-svn: 45731
2008-01-08 00:52:29 +00:00
Evan Cheng
ae2f627ea8
Unbreak x86-64.
...
llvm-svn: 45725
2008-01-07 23:08:23 +00:00
Chris Lattner
184daf9101
add a note that is important for some fp apps.
...
llvm-svn: 45723
2008-01-07 21:59:58 +00:00
Duncan Sands
fbbbb24641
Unbreak x86-32 darwin long double!
...
llvm-svn: 45703
2008-01-07 16:36:38 +00:00
Duncan Sands
93959fc16a
Fix long double support on x86-32 linux.
...
llvm-svn: 45701
2008-01-07 13:44:22 +00:00
Bill Wendling
b94c1f2999
Operand 1 should be a register. We don't care if it's a preg, vreg, or 0.
...
llvm-svn: 45699
2008-01-07 08:05:29 +00:00
Chris Lattner
f83aae613c
rename TargetInstrDescriptor -> TargetInstrDesc.
...
Make MachineInstr::getDesc return a reference instead
of a pointer, since it can never be null.
llvm-svn: 45695
2008-01-07 07:27:27 +00:00
Chris Lattner
9b987de2c5
rename hasVariableOperands() -> isVariadic(). Add some comments.
...
Evan, please review the comments I added to getNumDefs to make sure
that they are accurate, thx.
llvm-svn: 45687
2008-01-07 05:19:29 +00:00
Chris Lattner
9d38dfa4a5
Move a bunch more accessors from TargetInstrInfo to TargetInstrDescriptor
...
llvm-svn: 45680
2008-01-07 03:13:06 +00:00